Package org.apache.lucene.document
Class MapFieldSelector
- java.lang.Object
-
- org.apache.lucene.document.MapFieldSelector
-
- All Implemented Interfaces:
Serializable,FieldSelector
public class MapFieldSelector extends Object implements FieldSelector
AFieldSelectorbased on a Map of field names toFieldSelectorResults- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MapFieldSelector(String... fields)Create a a MapFieldSelectorMapFieldSelector(List<String> fields)Create a a MapFieldSelectorMapFieldSelector(Map<String,FieldSelectorResult> fieldSelections)Create a a MapFieldSelector
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FieldSelectorResultaccept(String field)Load field according to its associated value in fieldSelections
-
-
-
Constructor Detail
-
MapFieldSelector
public MapFieldSelector(Map<String,FieldSelectorResult> fieldSelections)
Create a a MapFieldSelector- Parameters:
fieldSelections- maps from field names (String) toFieldSelectorResults
-
MapFieldSelector
public MapFieldSelector(List<String> fields)
Create a a MapFieldSelector- Parameters:
fields- fields to LOAD. List of Strings. All other fields are NO_LOAD.
-
MapFieldSelector
public MapFieldSelector(String... fields)
Create a a MapFieldSelector- Parameters:
fields- fields to LOAD. All other fields are NO_LOAD.
-
-
Method Detail
-
accept
public FieldSelectorResult accept(String field)
Load field according to its associated value in fieldSelections- Specified by:
acceptin interfaceFieldSelector- Parameters:
field- a field name- Returns:
- the fieldSelections value that field maps to or NO_LOAD if none.
-
-