Package com.browseengine.bobo.api

Examples of com.browseengine.bobo.api.BoboIndexReader.maxDoc()


      writer=new FileWriter(outFile);
      BufferedWriter bwriter=new BufferedWriter(writer);
      dumper=new IndexDumper(idxDir);
      Set<String> fields=idxReader.getFacetNames();
     
      for (int k=0;k<idxReader.maxDoc();++k){
        for (String field : fields){
          FacetHandler facetHandler = idxReader.getFacetHandler(field);
          if (facetHandler!=null){
            String[] f=facetHandler.getFieldValues(idxReader,k);
            StringBuilder buffer=new StringBuilder();
View Full Code Here


    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);
View Full Code Here

    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);
View Full Code Here

          if(log.isDebugEnabled()) {
            plan = fieldName + " IS MULTIVALUE NULL";
          }

          return new SenseiDocIdSet(docIdSet, DocIdSetCardinality.exact(facetDataCache.freqs[0], boboReader.maxDoc() + 1), plan);
        }
        else if (facetData instanceof FacetDataCache)
        {
          final FacetDataCache facetDataCache = (FacetDataCache) facetData;
View Full Code Here

          };

          if(log.isDebugEnabled()) {
            plan = fieldName + " IS NULL";
          }
          return new SenseiDocIdSet(docIdSet, DocIdSetCardinality.exact(facetDataCache.freqs[0], boboReader.maxDoc() + 1), plan);
        }
        throw new UnsupportedOperationException("The null filter is supported only for the bobo facetHandlers that use FacetDataCache");
      }
    };
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.