Package com.browseengine.bobo.facets.data

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


  }

  @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


  }
 
  public double getFacetSelectivity(BoboIndexReader reader)
  {
    double selectivity = 0;
    FacetDataCache dataCache = _facetHandler.getFacetData(reader);
    int[] idxes = FacetDataCache.convert(dataCache,_vals);
    if(idxes == null)
    {
      return 0.0;
    }
View Full Code Here

  }
 
  @Override
  public RandomAccessDocIdSet getRandomAccessDocIdSet(final BoboIndexReader reader) throws IOException
  {
    final FacetDataCache dataCache = _facetHandler.getFacetData(reader);
    final int[] indexes = FacetDataCache.convert(dataCache,_vals);
   
    int bits;
    bits = 0x0;
    for (int i : indexes)
View Full Code Here

    return new FacetCountCollectorSource() {
     
      @Override
      public FacetCountCollector getFacetCountCollector(BoboIndexReader reader,
          int docBase) {
        FacetDataCache dataCache = _innerHandler.getFacetData(reader);
        return new RangeFacetCountCollector(_name, dataCache,docBase, fspec, _predefinedRanges);
      }
    };
   
  }
View Full Code Here

    final List<String> list = buildAllRangeStrings();
   
    return new FacetCountCollectorSource(){
    @Override
    public FacetCountCollector getFacetCountCollector(BoboIndexReader reader, int docBase) {
        FacetDataCache dataCache = _dataFacetHandler.getFacetData(reader);
        return new DynamicRangeFacetCountCollector(getName(), dataCache, docBase, fspec, list);
    }
    };
  }
View Full Code Here

 
 
 
  @Override
  public int getNumItems(BoboIndexReader reader, int id) {
    FacetDataCache data = getFacetData(reader);
    if (data==null) return 0;
    return data.getNumItems(id);
  }
View Full Code Here

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

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

    return new FacetCountCollectorSource() {
   
    @Override
    public FacetCountCollector getFacetCountCollector(BoboIndexReader reader,
        int docBase) {
      FacetDataCache dataCache = getFacetData(reader);
      return new RangeFacetCountCollector(_name,dataCache,docBase,ospec,_predefinedRanges);
    }
  };
   
  }
View Full Code Here

    return (_predefinedRanges != null);
  }

  @Override
  public FacetDataCache load(BoboIndexReader reader) throws IOException {
      FacetDataCache dataCache = new FacetDataCache();
    dataCache.load(_indexFieldName, reader, _termListFactory);
    return dataCache;
  }
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.