Method GetFloats
GetFloats(IndexReader, String)
Checks the internal cache for an appropriate entry, and if
none is found, reads the terms in field
as floats and returns an array
of size reader.MaxDoc
of the value each document
has in the given field.
Declaration
float[] GetFloats(IndexReader reader, String field)
Parameters
Type | Name | Description |
---|---|---|
Index |
reader | Used to get field values. |
System. |
field | Which field contains the floats. |
Returns
Type | Description |
---|---|
System. |
The values in the given field for each document. |
GetFloats(IndexReader, String, FloatParser)
Checks the internal cache for an appropriate entry, and if
none is found, reads the terms in field
as floats and returns an array
of size reader.MaxDoc
of the value each document
has in the given field.
Declaration
float[] GetFloats(IndexReader reader, String field, FloatParser parser)
Parameters
Type | Name | Description |
---|---|---|
Index |
reader | Used to get field values. |
System. |
field | Which field contains the floats. |
Float |
parser | Computes float for string values. |
Returns
Type | Description |
---|---|
System. |
The values in the given field for each document. |