|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectlux.index.IndexConfiguration
public class IndexConfiguration
Maintains a list of field definitions and index options that inform indexing and search. The configuration options and core indexing setup are immutable, but new fields may be added, fields may be renamed, and namespace mappings may be defined.
| Field Summary | |
|---|---|
static FieldDefinition |
ATT_QNAME
attribute QName field |
static FieldDefinition |
ATTRIBUTE_TEXT
attribute text field indexes all the text along with attribute QNames. |
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 IndexConfiguration |
DEFAULT
The default configuration instance |
static int |
DEFAULT_OPTIONS
the default indexing options |
static FieldDefinition |
ELEMENT_TEXT
element text field indexes all the text along with element QNames. |
static FieldDefinition |
ELT_QNAME
element QName field |
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 XML_TEXT, ELEMENT_TEXT, and ATTRIBUTE_TEXT fields,
causing element and attribute text to be indexed. |
static int |
INDEX_PATHS
enables the PATH field, causing element and attribute QName paths to be indexed. |
static int |
INDEX_QNAMES
enables the ELT_QNAME and ATT_QNAME fields, causing element and attribute
QNames to be indexed. |
static int |
INDEX_VALUES
enables the PATH_VALUE field (if INDEX_PATHS is set), and the 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 FieldDefinition |
PATH
path field |
static FieldDefinition |
PATH_VALUE
|
static FieldDefinition |
QNAME_VALUE
|
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 |
static FieldDefinition |
URI
unique identifier field that identifies a document |
static FieldDefinition |
XML_TEXT
full text field that indexes all the text in a document (not including attribute values). |
| Constructor Summary | |
|---|---|
protected |
IndexConfiguration()
|
protected |
IndexConfiguration(long options)
|
| Method Summary | |
|---|---|
void |
addField(FieldDefinition field)
adds a new field |
void |
defineNamespaceMapping(String prefix,
String namespaceURI)
|
String |
getDefaultFieldName()
|
FieldDefinition |
getField(FieldName fieldName)
|
FieldDefinition |
getField(String fieldName)
|
MultiFieldAnalyzer |
getFieldAnalyzers()
|
String |
getFieldName(FieldDefinition field)
Get the effective name of a field, given its definition. |
String |
getFieldName(FieldName field)
Get the effective name of a field, given its canonical name. |
Collection<FieldDefinition> |
getFields()
|
Map<String,String> |
getNamespaceMap()
|
boolean |
isIndexingEnabled()
|
boolean |
isOption(int option)
|
static IndexConfiguration |
makeIndexConfiguration(long options)
|
void |
renameField(FieldDefinition field,
String name)
rename an existing field; the new name is used in the index. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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
ELT_QNAME and ATT_QNAME fields, causing element and attribute
QNames to be indexed. If paths are indexed, this isn't really needed.
public static final int INDEX_PATHS
PATH field, causing element and attribute QName paths to be indexed.
public static final int INDEX_FULLTEXT
XML_TEXT, ELEMENT_TEXT, and ATTRIBUTE_TEXT fields,
causing element and attribute text to be indexed.
public static final int INDEX_VALUES
PATH_VALUE field (if INDEX_PATHS is set), and the QNAME_VALUE field (if
INDEX_QNAMES is set), causing values to be indexed. This is an experimental feature that is not
fully supported.
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 static final FieldDefinition URI
public static final FieldDefinition ELT_QNAME
public static final FieldDefinition ATT_QNAME
public static final FieldDefinition PATH
public static final FieldDefinition ELEMENT_TEXT
public static final FieldDefinition ATTRIBUTE_TEXT
public static final FieldDefinition XML_TEXT
public static final FieldDefinition PATH_VALUE
public static final FieldDefinition QNAME_VALUE
public static final IndexConfiguration DEFAULT
| Constructor Detail |
|---|
protected IndexConfiguration(long options)
protected IndexConfiguration()
| Method Detail |
|---|
public MultiFieldAnalyzer getFieldAnalyzers()
public static IndexConfiguration makeIndexConfiguration(long options)
options -
DEFAULT is returned.public void addField(FieldDefinition field)
field - the field to addpublic String getFieldName(FieldName field)
field - a field's canonical name
public String getFieldName(FieldDefinition field)
field - a field definition
public void renameField(FieldDefinition field,
String name)
field - the definition of a fieldname - the new name to usepublic Collection<FieldDefinition> getFields()
public FieldDefinition getField(FieldName fieldName)
public FieldDefinition getField(String fieldName)
public String getDefaultFieldName()
public boolean isOption(int option)
option - an option bit constant
public boolean isIndexingEnabled()
public Map<String,String> getNamespaceMap()
public void defineNamespaceMapping(String prefix,
String namespaceURI)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||