pylucene 3.5.0-3
[pylucene.git] / lucene-java-3.5.0 / lucene / contrib / facet / src / java / org / apache / lucene / facet / search / sampling / SampleFixer.java
1 package org.apache.lucene.facet.search.sampling;
2
3 import java.io.IOException;
4
5 import org.apache.lucene.facet.search.ScoredDocIDs;
6 import org.apache.lucene.facet.search.results.FacetResult;
7
8 /**
9  * Licensed to the Apache Software Foundation (ASF) under one or more
10  * contributor license agreements.  See the NOTICE file distributed with
11  * this work for additional information regarding copyright ownership.
12  * The ASF licenses this file to You under the Apache License, Version 2.0
13  * (the "License"); you may not use this file except in compliance with
14  * the License.  You may obtain a copy of the License at
15  *
16  *     http://www.apache.org/licenses/LICENSE-2.0
17  *
18  * Unless required by applicable law or agreed to in writing, software
19  * distributed under the License is distributed on an "AS IS" BASIS,
20  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  * See the License for the specific language governing permissions and
22  * limitations under the License.
23  */
24
25 /**
26  * Fixer of sample facet accumulation results
27  * 
28  * @lucene.experimental
29  */
30 public interface SampleFixer {
31   
32   /**
33    * Alter the input result, fixing it to account for the sampling. This
34    * implementation can compute accurate or estimated counts for the sampled facets. 
35    * For example, a faster correction could just multiply by a compensating factor.
36    * 
37    * @param origDocIds
38    *          full set of matching documents.
39    * @param fres
40    *          sample result to be fixed.
41    * @throws IOException
42    */
43   public void fixResult(ScoredDocIDs origDocIds, FacetResult fres) throws IOException; 
44 }