org.apache.lucene.document
Class SetBasedFieldSelector
- java.lang.Object
-
- org.apache.lucene.document.SetBasedFieldSelector
-
- All Implemented Interfaces:
- java.io.Serializable, FieldSelector
public class SetBasedFieldSelector extends java.lang.Object implements FieldSelector
Declare what fields to load normally and what fields to load lazily- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description SetBasedFieldSelector(java.util.Set fieldsToLoad, java.util.Set lazyFieldsToLoad)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description FieldSelectorResultaccept(java.lang.String fieldName)Indicate whether to load the field with the given name or not.
-
-
-
Constructor Detail
-
SetBasedFieldSelector
public SetBasedFieldSelector(java.util.Set fieldsToLoad, java.util.Set lazyFieldsToLoad)Pass in the Set ofFieldnames to load and the Set ofFieldnames to load lazily. If both are null, the Document will not have anyFieldon it.- Parameters:
fieldsToLoad- A Set ofStringfield names to load. May be empty, but not nulllazyFieldsToLoad- A Set ofStringfield names to load lazily. May be empty, but not null
-
-
Method Detail
-
accept
public FieldSelectorResult accept(java.lang.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
-
-
DataMelt 3.0 © DataMelt by jWork.ORG