test_class.declarator: vals = new String[]{"a", "c", "e"}
test_class.modifier: private
test_class.original_string: private String[] vals = new String[]{"a", "c", "e"};
test_class.type: String[]
test_class.var_name: vals
test_class.declarator: freqs
test_class.modifier: private
test_class.original_string: private int[] freqs;
test_class.type: int[]
test_class.var_name: freqs
test_class.declarator: dictionary = new TermStringList()
test_class.original_string: TermValueList<String> dictionary = new TermStringList();
test_class.type: TermValueList<String>
test_class.var_name: dictionary
test_class.file: sensei-core/src/test/java/com/senseidb/search/query/filters/TestSenseiTermFilter.java
test_class.identifier: TestSenseiTermFilter
test_case.body: @Test
    public void testSenseiTermFilter() throws IOException {
      SenseiTermFilter orTermFilter =
          new SenseiTermFilter("column", vals, null, false, false);
  
      BoboIndexReader indexReader = createMock(BoboIndexReader.class);
  
      MultiValueFacetDataCache facetDataCache =
          new MultiValueFacetDataCache();
      facetDataCache.valArray = dictionary;
      facetDataCache.freqs = freqs;
  
      FacetHandler facetHandler =
          new MultiValueFacetHandler("column", 32);
  
      expect(indexReader.maxDoc()).andReturn(1000).anyTimes();
      expect(indexReader.getFacetHandler("column")).andReturn(facetHandler);
      expect(indexReader.getFacetData("column")).andReturn(facetDataCache).anyTimes();
      replay(indexReader);
  
      SenseiDocIdSet orDocIdSet = orTermFilter.getSenseiDocIdSet(indexReader);
      DocSetAssertions.assertRange(26, 72, 1000, orDocIdSet.getCardinalityEstimate());
  
      SenseiTermFilter andTermFilter =
          new SenseiTermFilter("column", vals, null, true, false);
  
      reset(indexReader);
      expect(indexReader.maxDoc()).andReturn(1000).anyTimes();
      expect(indexReader.getFacetHandler("column")).andReturn(facetHandler);
      expect(indexReader.getFacetData("column")).andReturn(facetDataCache).anyTimes();
      replay(indexReader);
  
      SenseiDocIdSet andDocIdSet = andTermFilter.getSenseiDocIdSet(indexReader);
      DocSetAssertions.assertRange(0, 22, 1000, andDocIdSet.getCardinalityEstimate());
    }
test_case.class_method_signature: TestSenseiTermFilter.testSenseiTermFilter()
test_case.full_signature: @Test public void testSenseiTermFilter()
test_case.identifier: testSenseiTermFilter
test_case.invocations: createMock anyTimes andReturn expect maxDoc andReturn expect getFacetHandler anyTimes andReturn expect getFacetData replay getSenseiDocIdSet assertRange getCardinalityEstimate reset anyTimes andReturn expect maxDoc andReturn expect getFacetHandler anyTimes andReturn expect getFacetData replay getSenseiDocIdSet assertRange getCardinalityEstimate
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSenseiTermFilter()
focal_class.declarator: serialVersionUID = 1L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 1L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: logger = Logger.getLogger(SenseiTermFilter.class)
focal_class.modifier: private static
focal_class.original_string: private static Logger logger = Logger.getLogger(SenseiTermFilter.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: _name
focal_class.modifier: private final
focal_class.original_string: private final String _name;
focal_class.type: String
focal_class.var_name: _name
focal_class.declarator: _vals
focal_class.modifier: private final
focal_class.original_string: private final String[] _vals;
focal_class.type: String[]
focal_class.var_name: _vals
focal_class.declarator: _not
focal_class.modifier: private final
focal_class.original_string: private final String[] _not;
focal_class.type: String[]
focal_class.var_name: _not
focal_class.declarator: _isAnd
focal_class.modifier: private final
focal_class.original_string: private final boolean _isAnd;
focal_class.type: boolean
focal_class.var_name: _isAnd
focal_class.declarator: _noAutoOptimize
focal_class.modifier: private final
focal_class.original_string: private final boolean _noAutoOptimize;
focal_class.type: boolean
focal_class.var_name: _noAutoOptimize
focal_class.declarator: DECREASING_CARDINALITY_COMPARATOR = new Comparator<Pair<String, DocIdSetCardinality>>() {
      @Override
      public int compare(Pair<String, DocIdSetCardinality> a, Pair<String, DocIdSetCardinality> b) {
        return -a.getSecond().compareTo(b.getSecond());
      }
    }
focal_class.modifier: private static final
focal_class.original_string: private static final Comparator<Pair<String, DocIdSetCardinality>> DECREASING_CARDINALITY_COMPARATOR = new Comparator<Pair<String, DocIdSetCardinality>>() {
      @Override
      public int compare(Pair<String, DocIdSetCardinality> a, Pair<String, DocIdSetCardinality> b) {
        return -a.getSecond().compareTo(b.getSecond());
      }
    };
focal_class.type: Comparator<Pair<String, DocIdSetCardinality>>
focal_class.var_name: DECREASING_CARDINALITY_COMPARATOR
focal_class.declarator: INCREASING_CARDINALITY_COMPARATOR = new Comparator<Pair<String, DocIdSetCardinality>> (){
      @Override
      public int compare(Pair<String, DocIdSetCardinality> a, Pair<String, DocIdSetCardinality> b) {
        return a.getSecond().compareTo(b.getSecond());
      }
    }
focal_class.modifier: public static final
focal_class.original_string: public static final Comparator<Pair<String, DocIdSetCardinality>> INCREASING_CARDINALITY_COMPARATOR = new Comparator<Pair<String, DocIdSetCardinality>> (){
      @Override
      public int compare(Pair<String, DocIdSetCardinality> a, Pair<String, DocIdSetCardinality> b) {
        return a.getSecond().compareTo(b.getSecond());
      }
    };
focal_class.type: Comparator<Pair<String, DocIdSetCardinality>>
focal_class.var_name: INCREASING_CARDINALITY_COMPARATOR
focal_class.file: sensei-core/src/main/java/com/senseidb/search/query/filters/SenseiTermFilter.java
focal_class.identifier: SenseiTermFilter
focal_class.class_method_signature: SenseiTermFilter.SenseiTermFilter(String name,String vals[],String[] not,boolean isAnd,boolean noAutoOptimize)
focal_class.full_signature: public  SenseiTermFilter(String name,String vals[],String[] not,boolean isAnd,boolean noAutoOptimize)
focal_class.identifier: SenseiTermFilter
focal_class.modifiers: public
focal_class.parameters: (String name,String vals[],String[] not,boolean isAnd,boolean noAutoOptimize)
focal_class.signature:  SenseiTermFilter(String name,String vals[],String[] not,boolean isAnd,boolean noAutoOptimize)
focal_class.class_method_signature: SenseiTermFilter.buildDefaultDocIdSets(final BoboIndexReader reader,
                                                  final String name,
                                                  final String[] vals,
                                                  boolean isAnd)
focal_class.full_signature: static DocIdSet buildDefaultDocIdSets(final BoboIndexReader reader,
                                                  final String name,
                                                  final String[] vals,
                                                  boolean isAnd)
focal_class.identifier: buildDefaultDocIdSets
focal_class.modifiers: static
focal_class.parameters: (final BoboIndexReader reader,
                                                  final String name,
                                                  final String[] vals,
                                                  boolean isAnd)
focal_class.return: DocIdSet
focal_class.signature: DocIdSet buildDefaultDocIdSets(final BoboIndexReader reader,
                                                  final String name,
                                                  final String[] vals,
                                                  boolean isAnd)
focal_class.class_method_signature: SenseiTermFilter.buildLuceneDefaultDocIdSet(final BoboIndexReader reader,
                                                       final String name,
                                                       final String[] vals,
                                                       String[] nots,
                                                       boolean isAnd)
focal_class.full_signature: private static DocIdSet buildLuceneDefaultDocIdSet(final BoboIndexReader reader,
                                                       final String name,
                                                       final String[] vals,
                                                       String[] nots,
                                                       boolean isAnd)
focal_class.identifier: buildLuceneDefaultDocIdSet
focal_class.modifiers: private static
focal_class.parameters: (final BoboIndexReader reader,
                                                       final String name,
                                                       final String[] vals,
                                                       String[] nots,
                                                       boolean isAnd)
focal_class.return: DocIdSet
focal_class.signature: DocIdSet buildLuceneDefaultDocIdSet(final BoboIndexReader reader,
                                                       final String name,
                                                       final String[] vals,
                                                       String[] nots,
                                                       boolean isAnd)
focal_class.class_method_signature: SenseiTermFilter.planString(String type, String[] vals, String[] nots, List<String> optimizedVals, List<String> optimizedNots)
focal_class.full_signature: public String planString(String type, String[] vals, String[] nots, List<String> optimizedVals, List<String> optimizedNots)
focal_class.identifier: planString
focal_class.modifiers: public
focal_class.parameters: (String type, String[] vals, String[] nots, List<String> optimizedVals, List<String> optimizedNots)
focal_class.return: String
focal_class.signature: String planString(String type, String[] vals, String[] nots, List<String> optimizedVals, List<String> optimizedNots)
focal_class.class_method_signature: SenseiTermFilter.getSenseiDocIdSet(IndexReader reader)
focal_class.full_signature: @Override public SenseiDocIdSet getSenseiDocIdSet(IndexReader reader)
focal_class.identifier: getSenseiDocIdSet
focal_class.modifiers: @Override public
focal_class.parameters: (IndexReader reader)
focal_class.return: SenseiDocIdSet
focal_class.signature: SenseiDocIdSet getSenseiDocIdSet(IndexReader reader)
focal_class.class_method_signature: SenseiTermFilter.getValsByFrequency(String[] vals, int[] freqs, int maxDoc, DocIdSetCardinality total, TermValueList valArray, List<String> optimizedOut, boolean isAnd)
focal_class.full_signature: static String[] getValsByFrequency(String[] vals, int[] freqs, int maxDoc, DocIdSetCardinality total, TermValueList valArray, List<String> optimizedOut, boolean isAnd)
focal_class.identifier: getValsByFrequency
focal_class.modifiers: static
focal_class.parameters: (String[] vals, int[] freqs, int maxDoc, DocIdSetCardinality total, TermValueList valArray, List<String> optimizedOut, boolean isAnd)
focal_class.return: String[]
focal_class.signature: String[] getValsByFrequency(String[] vals, int[] freqs, int maxDoc, DocIdSetCardinality total, TermValueList valArray, List<String> optimizedOut, boolean isAnd)
focal_class.superclass: extends SenseiFilter
focal_method.body: public SenseiTermFilter(String name,String vals[],String[] not,boolean isAnd,boolean noAutoOptimize){
      _name = name;
      _vals = vals != null  ? vals : new String[0];
      _not = not != null  ? not : new String[0];
  
      // Bobo silliness: Empty vals means match all, which technically means an AND of an empty set.
      // EXCEPT if nots are also empty, but this is handled bellow.
      _isAnd = isAnd || vals == null || vals.length == 0;
      _noAutoOptimize = noAutoOptimize;
    }
focal_method.class_method_signature: SenseiTermFilter.SenseiTermFilter(String name,String vals[],String[] not,boolean isAnd,boolean noAutoOptimize)
focal_method.full_signature: public  SenseiTermFilter(String name,String vals[],String[] not,boolean isAnd,boolean noAutoOptimize)
focal_method.identifier: SenseiTermFilter
focal_method.modifiers: public
focal_method.parameters: (String name,String vals[],String[] not,boolean isAnd,boolean noAutoOptimize)
focal_method.signature:  SenseiTermFilter(String name,String vals[],String[] not,boolean isAnd,boolean noAutoOptimize)