Package com.browseengine.bobo.facets.data

Examples of com.browseengine.bobo.facets.data.MultiValueFacetDataCache$AllocOnlyLoader


  }

  @Override
  public MultiValueFacetDataCache load(BoboIndexReader reader, WorkArea workArea) throws IOException
  {
  MultiValueFacetDataCache dataCache = new MultiValueFacetDataCache();
   
  dataCache.setMaxItems(_maxItems);

    if(_sizePayloadTerm == null)
    {
      dataCache.load(_indexFieldName, reader, _termListFactory, workArea);
    }
    else
    {
      dataCache.load(_indexFieldName, reader, _termListFactory, _sizePayloadTerm);
    }
    return dataCache;
  }
View Full Code Here


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

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

  }
 
  @Override
  public RandomAccessDocIdSet getRandomAccessDocIdSet(BoboIndexReader reader) throws IOException
  {
    final MultiValueFacetDataCache dataCache = (MultiValueFacetDataCache)_facetHandler.getFacetData(reader);
    final int[] index = _valueConverter.convert(dataCache, _vals);
    final BigNestedIntArray nestedArray = dataCache._nestedArray;
    final OpenBitSet bitset = new OpenBitSet(dataCache.valArray.size());
 
    for (int i : index)
View Full Code Here

    SenseiTermFilter orTermFilter =
        new SenseiTermFilter("column", vals, null, false, false);

    BoboIndexReader indexReader = createMock(BoboIndexReader.class);

    MultiValueFacetDataCache facetDataCache =
        new MultiValueFacetDataCache();
    facetDataCache.valArray = dictionary;
    facetDataCache.freqs = freqs;

    FacetHandler facetHandler =
        new MultiValueFacetHandler("column", 32);
View Full Code Here

        String plan = EMPTY_STRING;

        if(facetData instanceof MultiValueFacetDataCache)
        {
          final MultiValueFacetDataCache facetDataCache = (MultiValueFacetDataCache) facetData;

          DocIdSet docIdSet = new DocIdSet() {
            @Override
            public DocIdSetIterator iterator() throws IOException {
              return new MultiValueFacetDocIdSetIterator(facetDataCache, 0);
View Full Code Here

  @SuppressWarnings("unchecked")
  @Override
  public MultiValueFacetDataCache<?> load(BoboSegmentReader reader, WorkArea workArea)
      throws IOException {
    @SuppressWarnings("rawtypes")
    MultiValueFacetDataCache<?> dataCache = new MultiValueFacetDataCache();

    dataCache.setMaxItems(_maxItems);

    if (_sizePayloadTerm == null) {
      dataCache.load(_indexFieldName, reader, _termListFactory, workArea);
    } else {
      dataCache.load(_indexFieldName, reader, _termListFactory, _sizePayloadTerm);
    }
    return dataCache;
  }
View Full Code Here

        getName(), _indexFieldName));
  }

  @Override
  public String[] getFieldValues(BoboSegmentReader reader, int id) {
    MultiValueFacetDataCache dataCache = getFacetData(reader);
    if (dataCache != null) {
      return dataCache._nestedArray.getTranslatedData(id, dataCache.valArray);
    }
    return new String[0];
  }
View Full Code Here

  }

  @Override
  public Object[] getRawFieldValues(BoboSegmentReader reader, int id) {

    MultiValueFacetDataCache dataCache = getFacetData(reader);
    if (dataCache != null) {
      return dataCache._nestedArray.getRawData(id, dataCache.valArray);
    }
    return new String[0];
  }
View Full Code Here

      final FacetSpec ospec) {
    return new FacetCountCollectorSource() {

      @Override
      public FacetCountCollector getFacetCountCollector(BoboSegmentReader reader, int docBase) {
        MultiValueFacetDataCache dataCache = getFacetData(reader);
        final BigNestedIntArray _nestedArray = dataCache._nestedArray;
        return new RangeFacetCountCollector(_name, dataCache, docBase, ospec, _predefinedRanges) {
          @Override
          public void collect(int docid) {
            _nestedArray.countNoReturn(docid, _count);
View Full Code Here

TOP

Related Classes of com.browseengine.bobo.facets.data.MultiValueFacetDataCache$AllocOnlyLoader

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.