public abstract class ValueSource
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
(package private) class |
ValueSource.ValueSourceComparator
Implement a
FieldComparator that works
off of the DocValues for a ValueSource
instead of the normal Lucene FieldComparator that works off of a FieldCache. |
(package private) class |
ValueSource.ValueSourceComparatorSource |
(package private) class |
ValueSource.ValueSourceSortField |
Modifier and Type | Field and Description |
---|---|
private static org.apache.lucene.search.FieldComparatorSource |
dummyComparator |
Constructor and Description |
---|
ValueSource() |
Modifier and Type | Method and Description |
---|---|
void |
createWeight(java.util.Map context,
org.apache.lucene.search.Searcher searcher)
Implementations should propagate createWeight to sub-ValueSources which can optionally store
weight info in the context.
|
abstract java.lang.String |
description()
description of field, used in explain()
|
abstract boolean |
equals(java.lang.Object o) |
org.apache.lucene.search.SortField |
getSortField(boolean reverse)
EXPERIMENTAL: This method is subject to change.
|
DocValues |
getValues(org.apache.lucene.index.IndexReader reader)
Deprecated.
|
DocValues |
getValues(java.util.Map context,
org.apache.lucene.index.IndexReader reader)
Gets the values for this reader and the context that was previously
passed to createWeight()
|
abstract int |
hashCode() |
static java.util.Map |
newContext()
Returns a new non-threadsafe context map.
|
java.lang.String |
toString() |
private static org.apache.lucene.search.FieldComparatorSource dummyComparator
@Deprecated public DocValues getValues(org.apache.lucene.index.IndexReader reader) throws java.io.IOException
java.io.IOException
public DocValues getValues(java.util.Map context, org.apache.lucene.index.IndexReader reader) throws java.io.IOException
java.io.IOException
public abstract boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public abstract int hashCode()
hashCode
in class java.lang.Object
public abstract java.lang.String description()
public java.lang.String toString()
toString
in class java.lang.Object
public void createWeight(java.util.Map context, org.apache.lucene.search.Searcher searcher) throws java.io.IOException
java.io.IOException
public static java.util.Map newContext()
public org.apache.lucene.search.SortField getSortField(boolean reverse) throws java.io.IOException
Get the SortField for this ValueSource. Uses the getValues(java.util.Map, IndexReader)
to populate the SortField.
reverse
- true if this is a reverse sort.SortField
for the ValueSourcejava.io.IOException
- if there was a problem reading the values.