public class ShortFieldSource extends FieldCacheSource
FieldCache
using getShorts()
and makes those values
available as other numeric types, casting as needed.
WARNING: The status of the search.function package is experimental. The APIs introduced here might change in the future and will not be supported anymore in such a case.
Constructor and Description |
---|
ShortFieldSource(java.lang.String field)
Create a cached short field source with default string-to-short parser.
|
ShortFieldSource(java.lang.String field,
FieldCache.ShortParser parser)
Create a cached short field source with a specific string-to-short parser.
|
Modifier and Type | Method and 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). |
java.lang.String |
description()
description of field, used in explain()
|
DocValues |
getCachedFieldValues(FieldCache cache,
java.lang.String field,
IndexReader reader)
Return cached DocValues for input field and reader.
|
equals, getValues, hashCode
toString
public ShortFieldSource(java.lang.String field)
public ShortFieldSource(java.lang.String field, FieldCache.ShortParser parser)
public java.lang.String description()
ValueSource
description
in class FieldCacheSource
public DocValues getCachedFieldValues(FieldCache cache, java.lang.String field, IndexReader reader) throws java.io.IOException
FieldCacheSource
getCachedFieldValues
in class FieldCacheSource
cache
- FieldCache so that values of a field are loaded once per reader (RAM allowing)field
- Field for which values are required.java.io.IOException
ValueSource
public boolean cachedFieldSourceEquals(FieldCacheSource o)
FieldCacheSource
FieldCacheSource
, already knowing that cache and field are equal.cachedFieldSourceEquals
in class FieldCacheSource
Object.equals(java.lang.Object)
public int cachedFieldSourceHashCode()
FieldCacheSource
FieldCacheSource
, without the hash-codes of the field
and the cache (those are taken care of elsewhere).cachedFieldSourceHashCode
in class FieldCacheSource
Object.hashCode()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.