示例#1
0
        public override RandomAccessDocIdSet GetRandomAccessDocIdSet(BoboIndexReader reader)
        {
            FacetDataCache dataCache = _facetHandler.GetFacetData <FacetDataCache>(reader);

            bool multi = dataCache is MultiValueFacetDataCache;
            BigNestedIntArray nestedArray = multi ? ((MultiValueFacetDataCache)dataCache).NestedArray : null;

            int[] range = Parse(dataCache, _rangeString);

            if (range == null)
            {
                return(null);
            }

            if (range[0] > range[1])
            {
                return(EmptyDocIdSet.Instance);
            }

            if (range[0] == range[1] && range[0] < 0)
            {
                return(EmptyDocIdSet.Instance);
            }

            int start = range[0];
            int end   = range[1];

            return(new RangeRandomAccessDocIdSet(start, end, dataCache, nestedArray, multi));
        }
示例#2
0
            public override IFacetCountCollector GetFacetCountCollector(BoboIndexReader reader, int docBase)
            {
                MultiValueFacetDataCache dataCache    = parent.GetFacetData <MultiValueFacetDataCache>(reader);
                BigNestedIntArray        _nestedArray = dataCache.NestedArray;

                return(new MultiRangeFacetCountCollector(parent.Name, dataCache, docBase, this.ospec, parent._predefinedRanges, _nestedArray));
            }
示例#3
0
 public RangeRandomAccessDocIdSet(int start, int end, FacetDataCache dataCache, BigNestedIntArray nestedArray, bool multi)
 {
     _start       = start;
     _end         = end;
     _dataCache   = dataCache;
     _nestedArray = nestedArray;
     _multi       = multi;
 }
示例#4
0
 public MultiValueFacetCountCollector(string name,
                                      MultiValueFacetDataCache dataCache,
                                      int docBase,
                                      BrowseSelection sel,
                                      FacetSpec ospec)
     : base(name, dataCache, docBase, sel, ospec)
 {
     _array = dataCache.NestedArray;
 }
示例#5
0
 internal MultiFacetRangeDocIdSetIterator(int start, int end, MultiValueFacetDataCache dataCache)
 {
     _start = start;
     _end   = end;
     for (int i = start; i <= end; ++i)
     {
         _minID = Math.Min(_minID, dataCache.MinIDs[i]);
         _maxID = Math.Max(_maxID, dataCache.MaxIDs[i]);
     }
     _doc        = Math.Max(-1, _minID - 1);
     nestedArray = dataCache.NestedArray;
 }
 public MultiValueFacetDataCache()
 {
     _nestedArray = new BigNestedIntArray();
 }
示例#7
0
 public MultiValueFacetDocIdSetIterator(MultiValueFacetDataCache dataCache, int index)
     : base(dataCache, index)
 {
     _nestedArray = dataCache.NestedArray;
 }
示例#8
0
 public MultiValueRandomAccessDocIdSet(MultiValueFacetDataCache dataCache, int index)
 {
     _dataCache   = dataCache;
     _index       = index;
     _nestedArray = dataCache.NestedArray;
 }
示例#9
0
 public MultiValueOrFacetDocIdSetIterator(MultiValueFacetDataCache dataCache, OpenBitSet bs)
     : base(dataCache, bs)
 {
     _nestedArray = dataCache.NestedArray;
 }
示例#10
0
 public MultiRandomAccessDocIdSet(MultiValueFacetDataCache dataCache, OpenBitSet bitset)
 {
     this.dataCache   = dataCache;
     this.bitset      = bitset;
     this.nestedArray = dataCache.NestedArray;
 }
示例#11
0
 public MultiValueWithWeightFacetDataCache()
 {
     _weightArray = new BigNestedIntArray();
 }
示例#12
0
 public MultiValueDocScorer(MultiValueFacetDataCache dataCache, IFacetTermScoringFunctionFactory scoreFunctionFactory, float[] boostList)
     : base(scoreFunctionFactory.GetFacetTermScoringFunction(dataCache.ValArray.Count, dataCache.NestedArray.Size), boostList)
 {
     _dataCache = dataCache;
     _array     = _dataCache.NestedArray;
 }
 public MultiValuedPathFacetCountCollector(string name, string sep,
                                           BrowseSelection sel, FacetSpec ospec, FacetDataCache dataCache)
     : base(name, sep, sel, ospec, dataCache)
 {
     _array = ((MultiValueFacetDataCache)(dataCache)).NestedArray;
 }
示例#14
0
 public MultiRangeFacetCountCollector(string name, MultiValueFacetDataCache dataCache,
                                      int docBase, FacetSpec ospec, IEnumerable <string> predefinedRanges, BigNestedIntArray nestedArray)
     : base(name, dataCache, docBase, ospec, predefinedRanges)
 {
     _nestedArray = nestedArray;
 }