Class ScaleSingleFunction
Scales values to be between min
and max
.
This implementation currently traverses all of the source values to obtain
their min and max.
This implementation currently cannot distinguish when documents have been
deleted or documents that have no value, and 0.0 values will be used for
these cases. This means that if values are normally all greater than 0.0, one can
still end up with 0.0 as the min value to map from. In these cases, an
appropriate map() function could be used as a workaround to change 0.0
to a value in the real range.
NOTE: This was ScaleFloatFunction in Lucene
Inheritance
System.Object
ScaleSingleFunction
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Lucene.Net.Queries.dll
Syntax
public class ScaleSingleFunction : ValueSource
Constructors
|
Improve this Doc
View Source
ScaleSingleFunction(ValueSource, Single, Single)
Declaration
public ScaleSingleFunction(ValueSource source, float min, float max)
Parameters
Type |
Name |
Description |
ValueSource |
source |
|
System.Single |
min |
|
System.Single |
max |
|
Fields
|
Improve this Doc
View Source
m_max
Declaration
protected readonly float m_max
Field Value
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
m_min
Declaration
protected readonly float m_min
Field Value
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
m_source
Declaration
protected readonly ValueSource m_source
Field Value
Methods
|
Improve this Doc
View Source
CreateWeight(IDictionary, IndexSearcher)
Declaration
public override void CreateWeight(IDictionary context, IndexSearcher searcher)
Parameters
Type |
Name |
Description |
System.Collections.IDictionary |
context |
|
Lucene.Net.Search.IndexSearcher |
searcher |
|
Overrides
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override bool Equals(object o)
Parameters
Type |
Name |
Description |
System.Object |
o |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
|
Improve this Doc
View Source
GetDescription()
Declaration
public override string GetDescription()
Returns
Type |
Description |
System.String |
|
Overrides
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
|
Improve this Doc
View Source
GetValues(IDictionary, AtomicReaderContext)
Declaration
public override FunctionValues GetValues(IDictionary context, AtomicReaderContext readerContext)
Parameters
Type |
Name |
Description |
System.Collections.IDictionary |
context |
|
Lucene.Net.Index.AtomicReaderContext |
readerContext |
|
Returns
Overrides