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.document
Class SetBasedFieldSelector

    java.lang.Object
      org.apache.lucene.document.SetBasedFieldSelector

All Implemented Interfaces:
  Serializable, FieldSelector

    public class SetBasedFieldSelector

extends Object
implements FieldSelector

Declare what fields to load normally and what fields to load lazily

See Also:
  Serialized Form

Constructor Summary
`SetBasedFieldSelector(Set fieldsToLoad, Set lazyFieldsToLoad)` Pass in the Set of `Field` names to load and the Set of `Field` names to load lazily.

Method Summary
`FieldSelectorResult` | `accept(String fieldName)` Indicate whether to load the field with the given name or not.

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

Constructor Detail

### SetBasedFieldSelector

    public SetBasedFieldSelector(Set fieldsToLoad,
                                 Set lazyFieldsToLoad)

  Pass in the Set of `Field` names to load and the Set of `Field` names to load lazily. If both are null, the Document will not have any `Field` on it.

  Parameters:
    `fieldsToLoad` - A Set of `String` field names to load. May be empty, but not null
    `lazyFieldsToLoad` - A Set of `String` field names to load lazily. May be empty, but not null

Method Detail

### accept

    public FieldSelectorResult accept(String fieldName)

  Indicate whether to load the field with the given name or not. If the `AbstractField.name()` is not in either of the initializing Sets, then `FieldSelectorResult.NO_LOAD` is returned. If a Field name is in both `fieldsToLoad` and `lazyFieldsToLoad`, lazy has precedence.

  Specified by:
    `accept` in interface `FieldSelector`
  Parameters:
    `fieldName` - The `Field` name to check
  Returns:
    The `FieldSelectorResult`

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.