public abstract class ValueSource extends Object implements Serializable
Constructor and Description |
---|
ValueSource() |
Modifier and Type | Method and Description |
---|---|
void |
createWeight(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 String |
description()
description of field, used in explain()
|
abstract boolean |
equals(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(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 Map |
newContext()
Returns a new non-threadsafe context map.
|
String |
toString() |
@Deprecated public DocValues getValues(org.apache.lucene.index.IndexReader reader) throws IOException
IOException
public DocValues getValues(Map context, org.apache.lucene.index.IndexReader reader) throws IOException
IOException
public abstract String description()
public void createWeight(Map context, org.apache.lucene.search.Searcher searcher) throws IOException
IOException
public static Map newContext()
public org.apache.lucene.search.SortField getSortField(boolean reverse) throws 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 ValueSourceIOException
- if there was a problem reading the values.