lux.index.field
Class XPathField<T>
java.lang.Object
lux.index.field.FieldDefinition
lux.index.field.XPathField<T>
- Type Parameters:
T - the type of value stored in or indexed by the field; must correspond with the FieldDefinition.Type:
STRING => String, and INT => Integer
public class XPathField<T>
- extends FieldDefinition
Indexes the values of the XPath expression evaluated with the document as the context item
|
Constructor Summary |
XPathField(String name,
String xpath,
org.apache.lucene.analysis.Analyzer analyzer,
org.apache.lucene.document.Field.Store isStored,
FieldDefinition.Type type)
create a new indexed field whose values are given by evaluating an XPath expression |
XPathField
public XPathField(String name,
String xpath,
org.apache.lucene.analysis.Analyzer analyzer,
org.apache.lucene.document.Field.Store isStored,
FieldDefinition.Type type)
- create a new indexed field whose values are given by evaluating an XPath expression
- Parameters:
name - the name of the field; although Lucene naming conventions are fairly loose,
it will go easier if you restrict yourself to [A-Za-z0-9_.-]xpath - the xpath to evaluateanalyzer - String-valued fields may be subject to further textual analysis, or pass null
if the field is not to be analyzed.isStored - whether the field values are stored (and may be retrieved)type - the type of data indexed by the field
getValues
public Iterable<T> getValues(XmlIndexer indexer)
- Description copied from class:
FieldDefinition
- The Solr XmlUpdateProcessor calls this. If it returns null, the caller should use the values
from getFieldValues() instead.
- Overrides:
getValues in class FieldDefinition
- Parameters:
indexer - the indexer that holds the field values
- Returns:
- the accumulated values of the field, as primitive objects (String or Integer). If
Copyright © 2013. All Rights Reserved.