Package com.browseengine.bobo.facets.data

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


    }
  }

    @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

  }

  @Override
  public RandomAccessDocIdSet getRandomAccessDocIdSet(BoboIndexReader reader)
      throws IOException {
    final FacetDataCache latDataCache = _latFacetHandler.getFacetData(reader);
    final FacetDataCache longDataCache = _longFacetHandler.getFacetData(reader);
   
    final int[] latRange = FacetRangeFilter.parse(latDataCache, _latRangeString);
    final int[] longRange = FacetRangeFilter.parse(longDataCache, _longRangeString);
    if((latRange == null) || (longRange == null)) return null;
   
View Full Code Here

  }
 
  public double getFacetSelectivity(BoboIndexReader reader)
  {
    double selectivity = 0;
    FacetDataCache dataCache = _facetHandler.getFacetData(reader);
    int idx = dataCache.valArray.indexOf(_value);
    if(idx<0)
    {
      return 0.0;
    }
View Full Code Here

  }

  @Override
  public RandomAccessDocIdSet getRandomAccessDocIdSet(BoboIndexReader reader) throws IOException
  {
    FacetDataCache dataCache = _facetHandler.getFacetData(reader);
    int index = dataCache.valArray.indexOf(_value);
    if (index < 0)
    {
      return EmptyDocIdSet.getInstance();
    }
View Full Code Here

      return bitSet;
    }
   
    @Override
    public RandomAccessDocIdSet getRandomAccessDocIdSet(final BoboIndexReader reader) throws IOException {
      final FacetDataCache dataCache = facetDataCacheBuilder.build(reader);
      final OpenBitSet openBitSet = getBitSet(dataCache);
      long count = openBitSet.cardinality();
      if (count == 0) {
        return EmptyDocIdSet.getInstance();
      } else {
View Full Code Here

      }
    }

    @Override
    public double getFacetSelectivity(BoboIndexReader reader) {
      FacetDataCache dataCache = facetDataCacheBuilder.build(reader);
      final OpenBitSet openBitSet = getBitSet(dataCache);
      int[] frequencies = dataCache.freqs;
      double selectivity = 0;
      int accumFreq = 0;
      int index = openBitSet.nextSetBit(0);
View Full Code Here

TOP

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

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.