Class ValueSource
Instantiates FunctionValues for a particular reader.
Often used when creating a FunctionQuery.
Inheritance
System.Object
ValueSource
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Lucene.Net.Queries.Function
Assembly: Lucene.Net.Queries.dll
Syntax
public abstract class ValueSource
Methods
| Improve this Doc View SourceCreateWeight(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 |
---|---|---|
System.Collections.IDictionary | context | |
IndexSearcher | searcher |
Equals(Object)
Declaration
public abstract override bool Equals(object o)
Parameters
Type | Name | Description |
---|---|---|
System.Object | o |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
System.Object.Equals(System.Object)
|
Improve this Doc
View Source
GetDescription()
description of field, used in Explain()
Declaration
public abstract string GetDescription()
Returns
Type | Description |
---|---|
System.String |
GetHashCode()
Declaration
public abstract override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
System.Object.GetHashCode()
|
Improve this Doc
View Source
GetSortField(Boolean)
EXPERIMENTAL: This method is subject to change.
Get the SortField for this ValueSource. Uses the GetValues(IDictionary, AtomicReaderContext) to populate the SortField.
Declaration
public virtual SortField GetSortField(bool reverse)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | reverse |
|
Returns
Type | Description |
---|---|
SortField | The 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 |
---|---|---|
System.Collections.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 |
---|---|
System.Collections.IDictionary |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.Object.ToString()