Class ValueSource
Instantiates FunctionValues for a particular reader.
Often used when creating a FunctionQuery.Inheritance
Inherited Members
Namespace: Lucene.Net.Queries.Function
Assembly: Lucene.Net.Queries.dll
Syntax
public abstract class ValueSource
Methods
CreateWeight(IDictionary, IndexSearcher)
Implementations should propagate CreateWeight to sub-ValueSources which can optionally store weight info in the context. The context object will be passed to GetValues() where this info can be retrieved.
Declaration
public virtual void CreateWeight(IDictionary context, IndexSearcher searcher)
Parameters
Type | Name | Description |
---|---|---|
IDictionary | context | |
IndexSearcher | searcher |
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override abstract bool Equals(object o)
Parameters
Type | Name | Description |
---|---|---|
object | o |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
GetDescription()
description of field, used in Explain()
Declaration
public abstract string GetDescription()
Returns
Type | Description |
---|---|
string |
GetHashCode()
Serves as the default hash function.
Declaration
public override abstract int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
GetSortField(bool)
EXPERIMENTAL: This method is subject to change.
Get the Lucene.Net.Search.SortField for this ValueSource. Uses the GetValues(IDictionary, AtomicReaderContext) to populate the Lucene.Net.Search.SortField.Declaration
public virtual SortField GetSortField(bool reverse)
Parameters
Type | Name | Description |
---|---|---|
bool | reverse |
|
Returns
Type | Description |
---|---|
SortField | The Lucene.Net.Search.SortField for the ValueSource |
GetValues(IDictionary, AtomicReaderContext)
Gets the values for this reader and the context that was previously passed to CreateWeight(IDictionary, IndexSearcher)
Declaration
public abstract FunctionValues GetValues(IDictionary context, AtomicReaderContext readerContext)
Parameters
Type | Name | Description |
---|---|---|
IDictionary | context | |
AtomicReaderContext | readerContext |
Returns
Type | Description |
---|---|
FunctionValues |
NewContext(IndexSearcher)
Returns a new non-threadsafe context map.
Declaration
public static IDictionary NewContext(IndexSearcher searcher)
Parameters
Type | Name | Description |
---|---|---|
IndexSearcher | searcher |
Returns
Type | Description |
---|---|
IDictionary |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current object. |