ShortFieldSource (Lucene 2.4.1 API)
Keywords: org.apache.lucene.search.function.ShortFieldSource class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:
  Serializable

    public class ShortFieldSource

extends FieldCacheSource

Expert: obtains short field values from the `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.

See Also:
  `for requirements on the field.`, Serialized Form

Constructor Summary
`ShortFieldSource(String field)` Create a cached short field source with default string-to-short parser.
`ShortFieldSource(String field, FieldCache.ShortParser parser)` Create a cached short field source with a specific string-to-short parser.

Method Summary
`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.

Methods inherited from class org.apache.lucene.search.function.FieldCacheSource
`equals, getValues, hashCode`

Methods inherited from class org.apache.lucene.search.function.ValueSource
`toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ShortFieldSource

    public ShortFieldSource(String field)

  Create a cached short field source with default string-to-short parser.

### ShortFieldSource

    public ShortFieldSource(String field,
                            FieldCache.ShortParser parser)

  Create a cached short field source with a specific string-to-short parser.

Method Detail

### description

    public String description()

  Description copied from class: `ValueSource`
  description of field, used in explain()

  Overrides:
    `description` in class `FieldCacheSource`

### getCachedFieldValues

    public DocValues getCachedFieldValues(FieldCache cache,
                                          String field,
                                          IndexReader reader)
                                   throws IOException

  Description copied from class: `FieldCacheSource`
  Return cached DocValues for input field and reader.

  Specified by:
    `getCachedFieldValues` in class `FieldCacheSource`
  Parameters:
    `cache` - FieldCache so that values of a field are loaded once per reader (RAM allowing)
    `field` - Field for which values are required.
  Throws:
    `IOException`
  See Also:
    `ValueSource`

### cachedFieldSourceEquals

    public boolean cachedFieldSourceEquals(FieldCacheSource o)

  Description copied from class: `FieldCacheSource`
  Check if equals to another `FieldCacheSource`, already knowing that cache and field are equal.

  Specified by:
    `cachedFieldSourceEquals` in class `FieldCacheSource`
  See Also:
    `Object.equals(java.lang.Object)`

### cachedFieldSourceHashCode

    public int cachedFieldSourceHashCode()

  Description copied from class: `FieldCacheSource`
  Return a hash code of a `FieldCacheSource`, without the hash-codes of the field and the cache (those are taken care of elsewhere).

  Specified by:
    `cachedFieldSourceHashCode` in class `FieldCacheSource`
  See Also:
    `Object.hashCode()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2009 Apache Software Foundation. All Rights Reserved.