Serializablepublic class FloatFieldSource extends FieldCacheSource
FieldCache
using getFloats() and makes those values
available as other numeric types, casting as needed.for requirements
on the field.
NOTE: with the switch in 2.9 to segment-based
searching, if is invoked with a
composite (multi-segment) reader, this can easily cause
double RAM usage for the values in the FieldCache. It's
best to switch your application to pass only atomic
(single segment) readers to this API.,
Serialized Form| Constructor | Description |
|---|---|
FloatFieldSource(String field) |
Create a cached float field source with default string-to-float parser.
|
FloatFieldSource(String field,
FieldCache.FloatParser parser) |
Create a cached float field source with a specific string-to-float parser.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
cachedFieldSourceEquals(FieldCacheSource o) |
Check if equals to another
FieldCacheSource, already knowing that cache and field are equal. |
int |
cachedFieldSourceHashCode() |
Return a hash code of a
FieldCacheSource, without the hash-codes of the field
and the cache (those are taken care of elsewhere). |
String |
description() |
description of field, used in explain()
|
DocValues |
getCachedFieldValues(FieldCache cache,
String field,
IndexReader reader) |
Return cached DocValues for input field and reader.
|
equals, getValues, hashCodeclone, finalize, getClass, notify, notifyAll, wait, wait, waittoStringpublic FloatFieldSource(String field)
public FloatFieldSource(String field, FieldCache.FloatParser parser)
public String description()
ValueSourcedescription in class FieldCacheSourcepublic DocValues getCachedFieldValues(FieldCache cache, String field, IndexReader reader) throws IOException
FieldCacheSourcegetCachedFieldValues in class FieldCacheSourcecache - FieldCache so that values of a field are loaded once per reader (RAM allowing)field - Field for which values are required.IOExceptionValueSourcepublic boolean cachedFieldSourceEquals(FieldCacheSource o)
FieldCacheSourceFieldCacheSource, already knowing that cache and field are equal.cachedFieldSourceEquals in class FieldCacheSourceObject.equals(java.lang.Object)public int cachedFieldSourceHashCode()
FieldCacheSourceFieldCacheSource, without the hash-codes of the field
and the cache (those are taken care of elsewhere).cachedFieldSourceHashCode in class FieldCacheSourceObject.hashCode()Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.