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 FieldSelectorResultaccept(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_LOADis returned. If a Field name is in bothfieldsToLoadandlazyFieldsToLoad, lazy has precedence.- Specified by:
acceptin interfaceFieldSelector- Parameters:
fieldName- TheFieldname to check- Returns:
- The
FieldSelectorResult
-
-