org.apache.lucene.search.function
Class ShortFieldSource
- java.lang.Object
-
- org.apache.lucene.search.function.ValueSource
-
- org.apache.lucene.search.function.FieldCacheSource
-
- org.apache.lucene.search.function.ShortFieldSource
-
- All Implemented Interfaces:
- java.io.Serializable
public class ShortFieldSource extends FieldCacheSource
Expert: obtains short field values from theFieldCacheusinggetShorts()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.
- See Also:
for requirements on the field., Serialized Form
-
-
Constructor Summary
Constructors 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleancachedFieldSourceEquals(FieldCacheSource o)Check if equals to anotherFieldCacheSource, already knowing that cache and field are equal.intcachedFieldSourceHashCode()Return a hash code of aFieldCacheSource, without the hash-codes of the field and the cache (those are taken care of elsewhere).java.lang.Stringdescription()description of field, used in explain()DocValuesgetCachedFieldValues(FieldCache cache, java.lang.String field, IndexReader reader)Return cached DocValues for input field and reader.-
Methods inherited from class org.apache.lucene.search.function.FieldCacheSource
equals, getValues, hashCode
-
Methods inherited from class org.apache.lucene.search.function.ValueSource
toString
-
-
-
-
Constructor Detail
-
ShortFieldSource
public ShortFieldSource(java.lang.String field)
Create a cached short field source with default string-to-short parser.
-
ShortFieldSource
public ShortFieldSource(java.lang.String field, FieldCache.ShortParser parser)Create a cached short field source with a specific string-to-short parser.
-
-
Method Detail
-
description
public java.lang.String description()
Description copied from class:ValueSourcedescription of field, used in explain()- Overrides:
descriptionin classFieldCacheSource
-
getCachedFieldValues
public DocValues getCachedFieldValues(FieldCache cache, java.lang.String field, IndexReader reader) throws java.io.IOException
Description copied from class:FieldCacheSourceReturn cached DocValues for input field and reader.- Specified by:
getCachedFieldValuesin classFieldCacheSource- Parameters:
cache- FieldCache so that values of a field are loaded once per reader (RAM allowing)field- Field for which values are required.- Throws:
java.io.IOException- See Also:
ValueSource
-
cachedFieldSourceEquals
public boolean cachedFieldSourceEquals(FieldCacheSource o)
Description copied from class:FieldCacheSourceCheck if equals to anotherFieldCacheSource, already knowing that cache and field are equal.- Specified by:
cachedFieldSourceEqualsin classFieldCacheSource- See Also:
Object.equals(java.lang.Object)
-
cachedFieldSourceHashCode
public int cachedFieldSourceHashCode()
Description copied from class:FieldCacheSourceReturn a hash code of aFieldCacheSource, without the hash-codes of the field and the cache (those are taken care of elsewhere).- Specified by:
cachedFieldSourceHashCodein classFieldCacheSource- See Also:
Object.hashCode()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG