org.apache.lucene.document
public class: SetBasedFieldSelector [javadoc |
source]
java.lang.Object
org.apache.lucene.document.SetBasedFieldSelector
All Implemented Interfaces:
FieldSelector
Declare what fields to load normally and what fields to load lazily
| Constructor: |
public SetBasedFieldSelector(Set fieldsToLoad,
Set lazyFieldsToLoad) {
this.fieldsToLoad = fieldsToLoad;
this.lazyFieldsToLoad = 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 from org.apache.lucene.document.SetBasedFieldSelector Summary: |
|---|
|
accept |
| Method from org.apache.lucene.document.SetBasedFieldSelector Detail: |
public FieldSelectorResult accept(String fieldName) {
FieldSelectorResult result = FieldSelectorResult.NO_LOAD;
if (fieldsToLoad.contains(fieldName) == true){
result = FieldSelectorResult.LOAD;
}
if (lazyFieldsToLoad.contains(fieldName) == true){
result = FieldSelectorResult.LAZY_LOAD;
}
return result;
}
|