Ejemplo n.º 1
0
		static DocIdSet()
		{
			EMPTY_DOCIDSET = new AnonymousClassDocIdSet();
		}
Ejemplo n.º 2
0
		/// <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());
			}
		}
Ejemplo n.º 3
0
		/// <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;
		}
Ejemplo n.º 4
0
 public AnonymousFilteredDocIdSet(DocIdSet innerSet, IndexReader r) : base(innerSet)
 {
     this.r = r;
 }
Ejemplo n.º 5
0
		/// <summary> Constructor.</summary>
		/// <param name="innerSet">Underlying DocIdSet
		/// </param>
		public FilteredDocIdSet(DocIdSet innerSet)
		{
			_innerSet = innerSet;
		}