static DocIdSet() { EMPTY_DOCIDSET = new AnonymousClassDocIdSet(); }
/// <summary>Provide the DocIdSet to be cached, using the DocIdSet provided /// by the wrapped Filter. /// This implementation returns the given DocIdSet. /// </summary> protected internal virtual DocIdSet DocIdSetToCache(DocIdSet docIdSet, IndexReader reader) { if (docIdSet == null) { // this is better than returning null, as the nonnull result can be cached return DocIdSet.EMPTY_DOCIDSET; } else if (docIdSet.IsCacheable()) { return docIdSet; } else { DocIdSetIterator it = docIdSet.Iterator(); // null is allowed to be returned by iterator(), // in this case we wrap with the empty set, // which is cacheable. return (it == null) ? DocIdSet.EMPTY_DOCIDSET : new OpenBitSetDISI(it, reader.MaxDoc()); } }
/// <summary> </summary> /// <param name="docIdSet">The DocIdSet for the Filter /// </param> /// <param name="positions">A List of {@link Mono.Lucene.Net.Search.SpanFilterResult.PositionInfo} objects /// </param> public SpanFilterResult(DocIdSet docIdSet, System.Collections.IList positions) { this.docIdSet = docIdSet; this.positions = positions; }
public AnonymousFilteredDocIdSet(DocIdSet innerSet, IndexReader r) : base(innerSet) { this.r = r; }
/// <summary> Constructor.</summary> /// <param name="innerSet">Underlying DocIdSet /// </param> public FilteredDocIdSet(DocIdSet innerSet) { _innerSet = innerSet; }