20 using System.Runtime.InteropServices;
23 namespace Lucene.Net.Search
57 throw new System.ArgumentException(
"DeletesMode.DYNAMIC is not supported");
59 this.cache =
new AnonymousFilterCache(deletesMode);
68 protected override SpanFilterResult MergeDeletes(
IndexReader reader, SpanFilterResult docIdSet)
70 throw new System.ArgumentException(
"DeletesMode.DYNAMIC is not supported");
77 return result != null?result.
DocIdSet:null;
85 object coreKey = reader.FieldCacheKey;
86 object delCoreKey = reader.HasDeletions ? reader.DeletesCacheKey : coreKey;
95 result = filter.BitSpans(reader);
97 cache.Put(coreKey, delCoreKey, result);
104 return GetCachedResult(reader);
107 public override System.String ToString()
109 return "CachingSpanFilter(" + filter +
")";
112 public override bool Equals(System.Object o)
116 return this.filter.Equals(((CachingSpanFilter) o).filter);
119 public override int GetHashCode()
121 return filter.GetHashCode() ^ 0x1117BF25;