public class IndexConfiguration extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BUILD_DOCUMENT
causes a document node to be built during indexing.
|
static int |
COMPUTE_OFFSETS
enables the computation and storage of term offsets in the index.
|
static int |
DEFAULT_OPTIONS
the default indexing options
|
static int |
INDEX_EACH_PATH
experimental: index each occurrence of each path as an unparsed string,
rather than indexing unique paths and tokenizing
|
static int |
INDEX_FULLTEXT
enables the lux_text, lux_elt_text, and lux_att_text fields,
causing element and attribute text to be indexed.
|
static int |
INDEX_PATHS
enables the lux_path field, causing element and attribute QName paths to be indexed.
|
static int |
INDEX_QNAMES
enables the lux_elt_name and lux_att_name fields, causing element and attribute
QNames to be indexed.
|
static int |
INDEX_VALUES
enables the lux_path_value field (if INDEX_PATHS is set), and the lux_qname_value field (if
INDEX_QNAMES is set), causing values to be indexed.
|
static int |
INDEXES
mask covering all of the indexing options
|
static org.apache.lucene.util.Version |
LUCENE_VERSION |
static int |
NAMESPACE_AWARE
causes QNames indexes to include the full namespace uri.
|
static int |
SOLR
Configure for use in solr; eg TinyBinarySolrField instead of TinyBinaryField
|
static int |
STORE_DOCUMENT
causes a document to be stored in the index.
|
static int |
STORE_TINY_BINARY
indicates that documents are to be stored in
TinyBinary format. |
static int |
STRIP_NAMESPACES
causes all namespace information to be stripped from incoming documents
|
FieldDefinition |
URI
unique identifier field that identifies a document
|
| Constructor and Description |
|---|
IndexConfiguration() |
IndexConfiguration(long options) |
public static final org.apache.lucene.util.Version LUCENE_VERSION
public static final int BUILD_DOCUMENT
public static final int SOLR
public static final int NAMESPACE_AWARE
public static final int STORE_DOCUMENT
public static final int STORE_TINY_BINARY
TinyBinary format. If this is not set,
documents are stored as serialized XML.public static final int INDEX_QNAMES
public static final int INDEX_PATHS
public static final int INDEX_FULLTEXT
public static final int INDEX_VALUES
public static final int COMPUTE_OFFSETS
public static final int STRIP_NAMESPACES
public static final int INDEX_EACH_PATH
public static final int INDEXES
public static final int DEFAULT_OPTIONS
public final FieldDefinition URI
public IndexConfiguration(long options)
public IndexConfiguration()
public MultiFieldAnalyzer getFieldAnalyzers()
public void addField(FieldDefinition field)
field - the field to addpublic String getFieldName(FieldRole role)
role - public void renameField(FieldDefinition field, String name)
field - the definition of a fieldname - the new name to usepublic Collection<FieldDefinition> getFields()
public FieldDefinition getField(FieldRole fieldName)
public FieldDefinition getField(String fieldName)
public String getDefaultFieldName()
public boolean isOption(int option)
option - an option bit constantpublic boolean isIndexingEnabled()
public String getUriFieldName()
public String getXmlFieldName()
public String getTextFieldName()
public String getElementTextFieldName()
public String getAttributeTextFieldName()
public ElementVisibility getElementVisibility(String clarkName)
clarkName - the name of an element in clark-notation: {namespace}local-name, or simply local-name
if the element name is in no namespace.public void setElementVisibility(String clarkName, ElementVisibility vis)
clarkName - the name of an element in clark-notation: {namespace}local-name, or simply local-name
if the element name is in no namespace.vis - the visibility of the element's content from the perspective of containing elements.
visibility.public ElementVisibility getDefaultVisibility()
ElementVisibility.OPAQUE.public void configureElementVisibility(XmlTokenStreamBase tokens)
Copyright © 2013. All Rights Reserved.