## org.apache.lucene.util
Class ScorerDocQueue

    java.lang.Object
      org.apache.lucene.util.ScorerDocQueue

Deprecated.

    @Deprecated
    public class ScorerDocQueue

extends Object

A ScorerDocQueue maintains a partial ordering of its Scorers such that the least Scorer can always be found in constant time. Put()'s and pop()'s require log(size) time. The ordering is by Scorer.doc().

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
`ScorerDocQueue(int maxSize)` Deprecated. Create a ScorerDocQueue with a maximum size.

Method Summary
`void` `adjustTop()` Deprecated. Should be called when the scorer at top changes doc() value.
`void` `clear()` Deprecated. Removes all entries from the ScorerDocQueue.
`boolean` `insert(Scorer scorer)` Deprecated. Adds a Scorer to the ScorerDocQueue in log(size) time if either the ScorerDocQueue is not full, or not lessThan(scorer, top()).
`Scorer` `pop()` Deprecated. Removes and returns the least scorer of the ScorerDocQueue in log(size) time.
`void` `put(Scorer scorer)` Deprecated. Adds a Scorer to a ScorerDocQueue in log(size) time.
`int` `size()` Deprecated. Returns the number of scorers currently stored in the ScorerDocQueue.
`Scorer` `top()` Deprecated. Returns the least Scorer of the ScorerDocQueue in constant time.
`int` `topDoc()` Deprecated. Returns document number of the least Scorer of the ScorerDocQueue in constant time.
`boolean` `topNextAndAdjustElsePop()` Deprecated.
`float` `topScore()` Deprecated.
`boolean` `topSkipToAndAdjustElsePop(int target)` Deprecated.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ScorerDocQueue

    public ScorerDocQueue(int maxSize)

  Deprecated.
  Create a ScorerDocQueue with a maximum size.

Method Detail

### put

    public final void put(Scorer scorer)

  Deprecated.
  Adds a Scorer to a ScorerDocQueue in log(size) time. If one tries to add more Scorers than maxSize a RuntimeException (ArrayIndexOutOfBound) is thrown.

### insert

    public boolean insert(Scorer scorer)

  Deprecated.
  Adds a Scorer to the ScorerDocQueue in log(size) time if either the ScorerDocQueue is not full, or not lessThan(scorer, top()).

  Parameters:
    `scorer` -
  Returns:
    true if scorer is added, false otherwise.

### top

    public final Scorer top()

  Deprecated.
  Returns the least Scorer of the ScorerDocQueue in constant time. Should not be used when the queue is empty.

### topDoc

    public final int topDoc()

  Deprecated.
  Returns document number of the least Scorer of the ScorerDocQueue in constant time. Should not be used when the queue is empty.

### topScore

    public final float topScore()
                         throws IOException

  Deprecated.
  Throws:
    `IOException`

### topNextAndAdjustElsePop

    public final boolean topNextAndAdjustElsePop()
                                          throws IOException

  Deprecated.
  Throws:
    `IOException`

### topSkipToAndAdjustElsePop

    public final boolean topSkipToAndAdjustElsePop(int target)
                                            throws IOException

  Deprecated.
  Throws:
    `IOException`

### pop

    public final Scorer pop()

  Deprecated.
  Removes and returns the least scorer of the ScorerDocQueue in log(size) time. Should not be used when the queue is empty.

### adjustTop

    public final void adjustTop()

  Deprecated.
  Should be called when the scorer at top changes doc() value. Still log(n) worst case, but it's at least twice as fast to

        { pq.top().change(); pq.adjustTop(); }

  instead of

        { o = pq.pop(); o.change(); pq.push(o); }

### size

    public final int size()

  Deprecated.
  Returns the number of scorers currently stored in the ScorerDocQueue.

### clear

    public final void clear()

  Deprecated.
  Removes all entries from the ScorerDocQueue.