public abstract class

FieldValueHitQueue

extends PriorityQueue<T>
java.lang.Object
   ↳ org.apache.lucene.util.PriorityQueue<T>
     ↳ org.apache.lucene.search.FieldValueHitQueue

Class Overview

Expert: A hit queue for sorting by hits by terms in more than one field. Uses FieldCache.DEFAULT for maintaining internal term lookup tables. NOTE: This API is experimental and might change in incompatible ways in the next release.

Summary

Fields
protected final FieldComparator[] comparators
protected final SortField[] fields Stores the sort criteria being used.
protected final int[] reverseMul
[Expand]
Inherited Fields
From class org.apache.lucene.util.PriorityQueue
Public Methods
static FieldValueHitQueue create(SortField[] fields, int size)
Creates a hit queue sorted by the given list of fields.
Protected Methods
abstract boolean lessThan(FieldValueHitQueue.Entry a, FieldValueHitQueue.Entry b)
Determines the ordering of objects in this priority queue.
[Expand]
Inherited Methods
From class org.apache.lucene.util.PriorityQueue
From class java.lang.Object

Fields

protected final FieldComparator[] comparators

protected final SortField[] fields

Stores the sort criteria being used.

protected final int[] reverseMul

Public Methods

public static FieldValueHitQueue create (SortField[] fields, int size)

Creates a hit queue sorted by the given list of fields.

NOTE: The instances returned by this method pre-allocate a full array of length numHits.

Parameters
fields SortField array we are sorting by in priority order (highest priority first); cannot be null or empty
size The number of hits to retain. Must be greater than zero.
Throws
IOException

Protected Methods

protected abstract boolean lessThan (FieldValueHitQueue.Entry a, FieldValueHitQueue.Entry b)

Determines the ordering of objects in this priority queue. Subclasses must define this one method.