pylucene 3.5.0-3
[pylucene.git] / lucene-java-3.5.0 / lucene / contrib / facet / src / test / org / apache / lucene / facet / search / AdaptiveAccumulatorTest.java
1 package org.apache.lucene.facet.search;
2
3 import org.apache.lucene.index.IndexReader;
4
5 import org.apache.lucene.facet.search.params.FacetSearchParams;
6 import org.apache.lucene.facet.search.sampling.BaseSampleTestTopK;
7 import org.apache.lucene.facet.search.sampling.Sampler;
8 import org.apache.lucene.facet.taxonomy.TaxonomyReader;
9
10 /**
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements.  See the NOTICE file distributed with
13  * this work for additional information regarding copyright ownership.
14  * The ASF licenses this file to You under the Apache License, Version 2.0
15  * (the "License"); you may not use this file except in compliance with
16  * the License.  You may obtain a copy of the License at
17  *
18  *     http://www.apache.org/licenses/LICENSE-2.0
19  *
20  * Unless required by applicable law or agreed to in writing, software
21  * distributed under the License is distributed on an "AS IS" BASIS,
22  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23  * See the License for the specific language governing permissions and
24  * limitations under the License.
25  */
26
27 public class AdaptiveAccumulatorTest extends BaseSampleTestTopK {
28
29   @Override
30   protected FacetsAccumulator getSamplingAccumulator(Sampler sampler,
31       TaxonomyReader taxoReader, IndexReader indexReader,
32       FacetSearchParams searchParams) {
33     AdaptiveFacetsAccumulator res = new AdaptiveFacetsAccumulator(searchParams,
34         indexReader, taxoReader);
35     res.setSampler(sampler);
36     return res;
37   }
38 }