Package com.browseengine.bobo.facets.data

Examples of com.browseengine.bobo.facets.data.FacetDataCache


    if (groupMode) {
      return new FacetCountCollectorSource(){
        @Override
        public FacetCountCollector getFacetCountCollector(
            BoboIndexReader reader, int docBase) {
          FacetDataCache dataCache = SimpleFacetHandler.this.getFacetData(reader);
          return new SimpleGroupByFacetCountCollector(_name,dataCache,docBase,sel,ospec);
       
      };
    }
    else {
      return new FacetCountCollectorSource(){
        @Override
        public FacetCountCollector getFacetCountCollector(
            BoboIndexReader reader, int docBase) {
          FacetDataCache dataCache = SimpleFacetHandler.this.getFacetData(reader);
          return new SimpleFacetCountCollector(_name,dataCache,docBase,sel,ospec);
       
      };
    }
  }
View Full Code Here


    }
  }

  @Override
  public FacetDataCache load(BoboIndexReader reader) throws IOException {
    FacetDataCache dataCache = new FacetDataCache();
    dataCache.load(_indexFieldName, reader, _termListFactory);
    return dataCache;
  }
View Full Code Here

    dataCache.load(_indexFieldName, reader, _termListFactory);
    return dataCache;
  }
 
  public BoboDocScorer getDocScorer(BoboIndexReader reader,FacetTermScoringFunctionFactory scoringFunctionFactory,Map<String,Float> boostMap){
    FacetDataCache dataCache = getFacetData(reader);
    float[] boostList = BoboDocScorer.buildBoostList(dataCache.valArray, boostMap);
    return new SimpleBoboDocScorer(dataCache,scoringFunctionFactory,boostList);
  }
View Full Code Here

    return c;
  }
 
  @Override
  public int getNumItems(BoboIndexReader reader, int id) {
  FacetDataCache dataCache = getFacetData(reader);
  if (dataCache==null) return 0;
  int encoded=dataCache.orderArray.get(id);
  return countBits(encoded);
  }
View Full Code Here

  return countBits(encoded);
  }

  @Override
  public String[] getFieldValues(BoboIndexReader reader,int id) {
    FacetDataCache dataCache = getFacetData(reader);
    if (dataCache==null) return new String[0];
    int encoded=dataCache.orderArray.get(id);
    if (encoded==0) {
      return new String[]{""};
    }
View Full Code Here

    }
  }

    @Override
  public Object[] getRawFieldValues(BoboIndexReader reader,int id){
      FacetDataCache dataCache = getFacetData(reader);
      if (dataCache==null) return new String[0];
      int encoded=dataCache.orderArray.get(id);
    if (encoded==0) {
      return new Object[0];
    }
View Full Code Here

    return new FacetCountCollectorSource() {
     
      @Override
      public FacetCountCollector getFacetCountCollector(BoboIndexReader reader,
          int docBase) {
        final FacetDataCache dataCache = CompactMultiValueFacetHandler.this.getFacetData(reader);
        return new CompactMultiValueFacetCountCollector(_name,sel,dataCache,docBase,ospec);
      }
    };
  }
View Full Code Here

      }
    }
   
    mterms.seal();

    return new FacetDataCache(order,mterms,freqList.toIntArray(),minIDList.toIntArray(),maxIDList.toIntArray(),TermCountSize.large);
  }
View Full Code Here

      };
   
  }
 
  public BoboDocScorer getDocScorer(BoboIndexReader reader,FacetTermScoringFunctionFactory scoringFunctionFactory,Map<String,Float> boostMap){
    FacetDataCache dataCache = getFacetData(reader);
    float[] boostList = BoboDocScorer.buildBoostList(dataCache.valArray, boostMap);
    return new CompactMultiValueDocScorer(dataCache,scoringFunctionFactory,boostList);
  }
View Full Code Here

    @Override
    public DocComparator getComparator(final IndexReader reader, int docbase)
        throws IOException {
      if (!(reader instanceof BoboIndexReader))
        throw new IllegalStateException("reader must be instance of "+BoboIndexReader.class);
      final FacetDataCache dataCache = _facetHandler.getFacetData((BoboIndexReader)reader);
      return new DocComparator(){
        @Override
        public int compare(ScoreDoc doc1, ScoreDoc doc2) {
          int encoded1=dataCache.orderArray.get(doc1.doc);
          int encoded2=dataCache.orderArray.get(doc2.doc);
View Full Code Here

TOP

Related Classes of com.browseengine.bobo.facets.data.FacetDataCache

Copyright © 2018 www.massapicom. 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.