Exemple #1
0
		/// <summary> Perform an inplace OR with the doc ids from a given DocIdSetIterator,
		/// setting the bit for each such doc id.
		/// These doc ids should be smaller than the maximum size passed to the
		/// constructor.
		/// </summary>
		public virtual void  InPlaceOr(DocIdSetIterator disi)
		{
			int doc;
			long size = Size();
			while ((doc = disi.NextDoc()) < size)
			{
				FastSet(doc);
			}
		}
Exemple #2
0
        /// <summary> Perform an inplace NOT with the doc ids from a given DocIdSetIterator,
        /// clearing all the bits for each such doc id.
        /// These doc ids should be smaller than the maximum size passed to the
        /// constructor.
        /// </summary>
        public virtual void  InPlaceNot(DocIdSetIterator disi)
        {
            int  doc;
            long size = Size();

            while ((doc = disi.NextDoc()) < size)
            {
                FastClear(doc);
            }
        }
Exemple #3
0
        /// <summary> Create a SortedVIntList.</summary>
        /// <param name="docIdSetIterator"> An iterator providing document numbers as a set of integers.
        /// This DocIdSetIterator is iterated completely when this constructor
        /// is called and it must provide the integers in non
        /// decreasing order.
        /// </param>
        public SortedVIntList(DocIdSetIterator docIdSetIterator)
        {
            SortedVIntListBuilder builder = new SortedVIntListBuilder(this);
            int doc;

            while ((doc = docIdSetIterator.NextDoc()) != DocIdSetIterator.NO_MORE_DOCS)
            {
                builder.AddInt(doc);
            }
            builder.Done();
        }
Exemple #4
0
		/// <summary> Perform an inplace AND with the doc ids from a given DocIdSetIterator,
		/// leaving only the bits set for which the doc ids are in common.
		/// These doc ids should be smaller than the maximum size passed to the
		/// constructor.
		/// </summary>
		public virtual void  InPlaceAnd(DocIdSetIterator disi)
		{
			int bitSetDoc = NextSetBit(0);
			int disiDoc;
			while (bitSetDoc != - 1 && (disiDoc = disi.Advance(bitSetDoc)) != DocIdSetIterator.NO_MORE_DOCS)
			{
				Clear(bitSetDoc, disiDoc);
				bitSetDoc = NextSetBit(disiDoc + 1);
			}
			if (bitSetDoc != - 1)
			{
				Clear(bitSetDoc, Size());
			}
		}
Exemple #5
0
        /// <summary> Perform an inplace AND with the doc ids from a given DocIdSetIterator,
        /// leaving only the bits set for which the doc ids are in common.
        /// These doc ids should be smaller than the maximum size passed to the
        /// constructor.
        /// </summary>
        public virtual void  InPlaceAnd(DocIdSetIterator disi)
        {
            int bitSetDoc = NextSetBit(0);
            int disiDoc;

            while (bitSetDoc != -1 && (disiDoc = disi.Advance(bitSetDoc)) != DocIdSetIterator.NO_MORE_DOCS)
            {
                Clear(bitSetDoc, disiDoc);
                bitSetDoc = NextSetBit(disiDoc + 1);
            }
            if (bitSetDoc != -1)
            {
                Clear(bitSetDoc, Size());
            }
        }
Exemple #6
0
 /// <summary>Construct an OpenBitSetDISI with its bits set
 /// from the doc ids of the given DocIdSetIterator.
 /// Also give a maximum size one larger than the largest doc id for which a
 /// bit may ever be set on this OpenBitSetDISI.
 /// </summary>
 public OpenBitSetDISI(DocIdSetIterator disi, int maxSize) : base(maxSize)
 {
     InPlaceOr(disi);
 }
Exemple #7
0
 internal AnonymousClassScorer(Mono.Lucene.Net.Search.Scorer scorer, Mono.Lucene.Net.Search.DocIdSetIterator docIdSetIterator, AnonymousClassWeight enclosingInstance, Mono.Lucene.Net.Search.Similarity Param1) : base(Param1)
 {
     InitBlock(scorer, docIdSetIterator, enclosingInstance);
 }
Exemple #8
0
 private void  InitBlock(Mono.Lucene.Net.Search.Scorer scorer, Mono.Lucene.Net.Search.DocIdSetIterator docIdSetIterator, AnonymousClassWeight enclosingInstance)
 {
     this.scorer            = scorer;
     this.docIdSetIterator  = docIdSetIterator;
     this.enclosingInstance = enclosingInstance;
 }
Exemple #9
0
 internal AnonymousClassFilteredDocIdSetIterator(FilteredDocIdSet enclosingInstance, Mono.Lucene.Net.Search.DocIdSetIterator Param1) : base(Param1)
 {
     InitBlock(enclosingInstance);
 }
Exemple #10
0
		/// <summary>Construct an OpenBitSetDISI with its bits set
		/// from the doc ids of the given DocIdSetIterator.
		/// Also give a maximum size one larger than the largest doc id for which a
		/// bit may ever be set on this OpenBitSetDISI.
		/// </summary>
		public OpenBitSetDISI(DocIdSetIterator disi, int maxSize):base(maxSize)
		{
			InPlaceOr(disi);
		}
Exemple #11
0
		/// <summary> Create a SortedVIntList.</summary>
		/// <param name="docIdSetIterator"> An iterator providing document numbers as a set of integers.
		/// This DocIdSetIterator is iterated completely when this constructor
		/// is called and it must provide the integers in non
		/// decreasing order.
		/// </param>
		public SortedVIntList(DocIdSetIterator docIdSetIterator)
		{
			SortedVIntListBuilder builder = new SortedVIntListBuilder(this);
			int doc;
			while ((doc = docIdSetIterator.NextDoc()) != DocIdSetIterator.NO_MORE_DOCS)
			{
				builder.AddInt(doc);
			}
			builder.Done();
		}