Package com.browseengine.bobo.facets.data

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


  }
  
  public double getFacetSelectivity(BoboIndexReader reader)
  {
    double selectivity = 0;
    FacetDataCache dataCache = _facetHandler.getFacetData(reader);
    int[] range = parse(dataCache,_rangeString);
    if (range != null)
    {
      int accumFreq=0;
      for(int idx=range[0]; idx<=range[1]; ++idx)
View Full Code Here


  }
 
  @Override
  public RandomAccessDocIdSet getRandomAccessDocIdSet(final BoboIndexReader reader) throws IOException
  {     
    final FacetDataCache dataCache = _facetHandler.getFacetData(reader);

    final boolean multi = dataCache instanceof MultiValueFacetDataCache;   
    final BigNestedIntArray nestedArray = multi ? ((MultiValueFacetDataCache) dataCache)._nestedArray : null;
    final int[] range = parse(dataCache,_rangeString);
   
View Full Code Here

    return new FacetCountCollectorSource() {
        // every string in the above list is of the form <latitude, longitude, radius>, which can be interpreted by GeoSimpleFacetCountCollector
      @Override
      public FacetCountCollector getFacetCountCollector(BoboIndexReader reader,
          int docBase) {
        FacetDataCache latDataCache = _latFacetHandler.getFacetData(reader);
        FacetDataCache longDataCache = _longFacetHandler.getFacetData(reader);
        return new GeoSimpleFacetCountCollector(_name, latDataCache, longDataCache, docBase, fspec, list);
      }
    };
   
  }
View Full Code Here

  }
 
  private BigSegmentedArray getCollapsedCounts(){
  if (_collapsedCounts==null){
    _collapsedCounts = new LazyBigIntArray(_bucketValues.size());
    FacetDataCache dataCache = _subCollector._dataCache;
    TermValueList<?> subList = dataCache.valArray;
    BigSegmentedArray subcounts = _subCollector._count;
    BitVector indexSet = new BitVector(subcounts.size());
    int c = 0;
    int i = 0;
View Full Code Here

    this(name,indexFieldName,null);
  }
 
  @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

    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

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.