Пример #1
0
        private SpanFilterResult GetCachedResult(IndexReader reader)
        {
            object coreKey    = reader.FieldCacheKey;
            object delCoreKey = reader.HasDeletions ? reader.DeletesCacheKey : coreKey;

            SpanFilterResult result = cache.Get(reader, coreKey, delCoreKey);

            if (result != null)
            {
                hitCount++;
                return(result);
            }

            missCount++;
            result = filter.BitSpans(reader);

            cache.Put(coreKey, delCoreKey, result);
            return(result);
        }
Пример #2
0
        public override DocIdSet GetDocIdSet(IndexReader reader)
        {
            SpanFilterResult result = GetCachedResult(reader);

            return(result != null?result.DocIdSet:null);
        }
Пример #3
0
        public override DocIdSet GetDocIdSet(IndexReader reader)
        {
            SpanFilterResult result = BitSpans(reader);

            return(result.DocIdSet);
        }