public class

SetBasedFieldSelector

extends Object
implements FieldSelector
java.lang.Object
   ↳ org.apache.lucene.document.SetBasedFieldSelector

Class Overview

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

Summary

Public Constructors
SetBasedFieldSelector(Set<String> fieldsToLoad, Set<String> lazyFieldsToLoad)
Pass in the Set of Field names to load and the Set of Field names to load lazily.
Public Methods
FieldSelectorResult accept(String fieldName)
Indicate whether to load the field with the given name or not.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.lucene.document.FieldSelector

Public Constructors

public SetBasedFieldSelector (Set<String> fieldsToLoad, Set<String> 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

Public Methods

public FieldSelectorResult accept (String fieldName)

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

Parameters
fieldName The Field name to check
Returns