Package com.browseengine.bobo.facets.data

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


  }
 
  @Override
  public String[] getFieldValues(BoboIndexReader reader,int id)
  {
    FacetDataCache dataCache = getFacetData(reader);
    if (_multiValue){
      return ((MultiValueFacetDataCache)dataCache)._nestedArray.getTranslatedData(id, dataCache.valArray)
    }
    else{
       
View Full Code Here


    return new FacetCountCollectorSource() {
     
      @Override
      public FacetCountCollector getFacetCountCollector(BoboIndexReader reader,
          int docBase) {
        FacetDataCache dataCache = PathFacetHandler.this.getFacetData(reader);
        if (_multiValue){
          return new MultiValuedPathFacetCountCollector(_name, _separator, sel, ospec,dataCache);
        }
        else{
          return new PathFacetCountCollector(_name,_separator,sel,ospec,dataCache);
View Full Code Here

  }

  @Override
  public FacetDataCache load(BoboIndexReader reader) throws IOException {
       if (!_multiValue){
        FacetDataCache dataCache = new FacetDataCache();
        dataCache.load(_indexedName, reader, _termListFactory);
        return dataCache;
       }
       else{
         MultiValueFacetDataCache dataCache = new MultiValueFacetDataCache();
         dataCache.load(_indexedName, reader, _termListFactory);
         return dataCache;
       }
  }
View Full Code Here

    return filter;
  }

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

    }
  }

    @Override
  public Object[] getRawFieldValues(BoboIndexReader reader,int id){
      FacetDataCache dataCache = getFacetData(reader);
      int encoded=dataCache.orderArray.get(id);
    if (encoded==0) {
      return new Object[0];
    }
    else{
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

    return new FacetDataCache.FacetDocComparatorSource(this);
  }

  @Override
  public String[] getFieldValues(BoboIndexReader reader,int id) {
    FacetDataCache dataCache = getFacetData(reader);
    return new String[]{dataCache.valArray.get(dataCache.orderArray.get(id))};
  }
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.