## org.apache.lucene.search.function
Class MultiValueSource

    java.lang.Object
      org.apache.lucene.search.function.ValueSource
          org.apache.lucene.search.function.MultiValueSource

All Implemented Interfaces:
  java.io.Serializable

Deprecated. This class is temporary, to ease the migration to segment-based searching. Please change your code to not pass composite readers to these APIs.

    public final class MultiValueSource

extends ValueSource

This class wraps another ValueSource, but protects against accidental double RAM usage in FieldCache when a composite reader is passed to `getValues(org.apache.lucene.index.IndexReader)`.

NOTE: this class adds a CPU penalty to every lookup, as it must resolve the incoming document to the right sub-reader using a binary search.

See Also:
  Serialized Form

Constructor Summary
`MultiValueSource(ValueSource other)` Deprecated.

Method Summary
`java.lang.String` `description()` Deprecated. description of field, used in explain()
`boolean` `equals(java.lang.Object o)` Deprecated. Needed for possible caching of query results - used by `ValueSourceQuery.equals(Object)`.
`DocValues` `getValues(IndexReader reader)` Deprecated. Return the DocValues used by the function query.
`int` `hashCode()` Deprecated. Needed for possible caching of query results - used by `ValueSourceQuery.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

### MultiValueSource

    public MultiValueSource(ValueSource other)

  Deprecated.

Method Detail

### getValues

    public DocValues getValues(IndexReader reader)
                        throws java.io.IOException

  Deprecated.
  Description copied from class: `ValueSource`
  Return the DocValues used by the function query.

  Specified by:
    `getValues` in class `ValueSource`
  Parameters:
    `reader` - the IndexReader used to read these values. If any caching is involved, that caching would also be IndexReader based.
  Throws:
    `java.io.IOException` - for any error.

### description

    public java.lang.String description()

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

  Specified by:
    `description` in class `ValueSource`

### equals

    public boolean equals(java.lang.Object o)

  Deprecated.
  Description copied from class: `ValueSource`
  Needed for possible caching of query results - used by `ValueSourceQuery.equals(Object)`.

  Specified by:
    `equals` in class `ValueSource`
  See Also:
    `Object.equals(Object)`

### hashCode

    public int hashCode()

  Deprecated.
  Description copied from class: `ValueSource`
  Needed for possible caching of query results - used by `ValueSourceQuery.hashCode()`.

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

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