Ejemplo n.º 1
0
        /// <summary>
        /// Perform an inplace NOT with the doc ids from a given <see cref="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 = Length; // LUCENENET specific - using Length in place of Size (since they are the same)

            while ((doc = disi.NextDoc()) < size)
            {
                FastClear(doc);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Encode the document ids from a DocIdSetIterator. </summary>
 /// <param name="disi"> This DocIdSetIterator should provide document ids that are consistent
 ///              with <c>numValues</c> and <c>upperBound</c> as provided to the constructor.   </param>
 public virtual void EncodeFromDisi(DocIdSetIterator disi)
 {
     while (efEncoder.numEncoded < efEncoder.numValues)
     {
         int x = disi.NextDoc();
         if (x == DocIdSetIterator.NO_MORE_DOCS)
         {
             throw new System.ArgumentException("disi: " + disi.ToString() + "\nhas " + efEncoder.numEncoded + " docs, but at least " + efEncoder.numValues + " are required.");
         }
         efEncoder.EncodeNext(x);
     }
 }