Package 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
Constructors Constructor Description SetBasedFieldSelector(Set<String> fieldsToLoad, Set<String> lazyFieldsToLoad)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FieldSelectorResult
accept(String fieldName)
Indicate whether to load the field with the given name or not.
-
-
-
Method Detail
-
accept
public FieldSelectorResult accept(String fieldName)
Indicate whether to load the field with the given name or not. If theAbstractField.name()
is not in either of the initializing Sets, thenFieldSelectorResult.NO_LOAD
is returned. If a Field name is in bothfieldsToLoad
andlazyFieldsToLoad
, lazy has precedence.- Specified by:
accept
in interfaceFieldSelector
- Parameters:
fieldName
- TheField
name to check- Returns:
- The
FieldSelectorResult
-
-