Пример #1
0
 public BitSetRandomAccessDocIdSet(bool multi, MultiValueFacetDataCache multiCache, OpenBitSet openBitSet, FacetDataCache dataCache)
 {
     _multi = multi;
     _multiCache = multiCache;
     _openBitSet = openBitSet;
     _dataCache = dataCache;
 }
 public MultiValueFacetHandler(string name, string indexFieldName, TermListFactory termListFactory, Term sizePayloadTerm, IEnumerable<string> depends)
     : base(name, depends)
 {
     _depends = depends;
     _indexFieldName = (indexFieldName != null ? indexFieldName : name);
     _termListFactory = termListFactory;
     _sizePayloadTerm = sizePayloadTerm;
     _dataCache = null;
 }
 public MultiValueORFacetFilter(MultiValueFacetDataCache dataCache, int[] index)
 {
     _dataCache = dataCache;
     _nestedArray = dataCache._nestedArray;
     _index = index;
     _bitset = new OpenBitSet(_dataCache.valArray.Count);
     foreach (int i in _index)
     {
         _bitset.FastSet(i);
     }
 }
        public override DocComparator GetComparator(IndexReader reader, int docbase)
        {
            if (!reader.GetType().Equals(typeof(BoboIndexReader)))
            {
                throw new ArgumentException("reader must be instance of BoboIndexReader");
            }
            BoboIndexReader          boboReader = (BoboIndexReader)reader;
            MultiValueFacetDataCache dataCache  = (MultiValueFacetDataCache)cacheBuilder.Build(boboReader);

            return(new MultiFacetDocComparator(dataCache));
        }
        public override DocComparer GetComparer(AtomicReader reader, int docbase)
        {
            if (!(reader is BoboSegmentReader))
            {
                throw new ArgumentException("reader must be instance of " + typeof(BoboSegmentReader).Name);
            }
            BoboSegmentReader        boboReader = (BoboSegmentReader)reader;
            MultiValueFacetDataCache dataCache  = (MultiValueFacetDataCache)m_cacheBuilder.Build(boboReader);

            return(new MultiFacetDocComparer(dataCache));
        }
 public AttributesFacetCountCollector(AttributesFacetHandler attributesFacetHandler, string name, MultiValueFacetDataCache dataCache, int docBase, BrowseSelection browseSelection, FacetSpec ospec, int numFacetsPerKey, char separator)
     : base(name, dataCache, docBase, browseSelection, ospec)
 {
     this.attributesFacetHandler = attributesFacetHandler;
     this.dataCache = dataCache;
     this.numFacetsPerKey = numFacetsPerKey;
     this.separator = separator;
     //_array = dataCache.NestedArray; // NOT USED
     if (browseSelection != null)
     {
         values = browseSelection.Values;
     }
 }
        public override void Load(BoboIndexReader reader, BoboIndexReader.WorkArea workArea)
        {
            if (_dataCache == null)
            {
                _dataCache = new MultiValueFacetDataCache();
            }

            _dataCache.SetMaxItems(_maxItems);

            if (_sizePayloadTerm == null)
            {
                _dataCache.Load(_indexFieldName, reader, _termListFactory, workArea);
            }
            else
            {
                _dataCache.Load(_indexFieldName, reader, _termListFactory, _sizePayloadTerm);
            }
        }
Пример #8
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 MultiFacetDocComparator(MultiValueFacetDataCache dataCache)
 {
     _dataCache = dataCache;
 }
 public MultiValueFacetFilter(MultiValueFacetDataCache dataCache, int index)
 {
     _dataCache = dataCache;
     _nestedArray = dataCache._nestedArray;
     _index = index;
 }
 public MultiValueFacetDocIdSetIterator(MultiValueFacetDataCache dataCache, int index)
     : base(dataCache, index)
 {
     _nestedArray = dataCache._nestedArray;
 }           
 public MultiRandomAccessDocIdSet(MultiValueFacetDataCache dataCache, OpenBitSet bitset)
 {
     this.dataCache = dataCache;
     this.bitset = bitset;
     this.nestedArray = dataCache.NestedArray;
 }
 public MultiValueOrFacetDocIdSetIterator(MultiValueFacetDataCache dataCache, OpenBitSet bs)
     : base(dataCache, bs)
 {
     _nestedArray = dataCache.NestedArray;
 }           
 public MultiFacetDocComparer(MultiValueFacetDataCache dataCache)
 {
     m_dataCache = dataCache;
 }
 internal MultiValueDocScorer(MultiValueFacetDataCache dataCache, IFacetTermScoringFunctionFactory scoreFunctionFactory, float[] boostList)
     : base(scoreFunctionFactory.GetFacetTermScoringFunction(dataCache.valArray.Count, dataCache._nestedArray.size()), boostList)
 {
     _dataCache = dataCache;
     _array = _dataCache._nestedArray;
 }
Пример #16
0
 public MultiValueRandomAccessDocIdSet(MultiValueFacetDataCache dataCache, int index)
 {
     _dataCache = dataCache;
     _index = index;
     _nestedArray = dataCache.NestedArray;
 }
 public MultiValueFacetDocIdSetIterator(MultiValueFacetDataCache dataCache, int[] index, OpenBitSet bs)
     : base(dataCache, index, bs)
 {
     _nestedArray = dataCache._nestedArray;
 }           
 public MultiFacetDocComparator(MultiValueFacetDataCache dataCache)
 {
     _dataCache = dataCache;
 }