public interface LuceneIndexFactory
LuceneService.createIndexFactory()
.
Configure the index using the add methods, and then call create(String, String)
to
create the index.Modifier and Type | Method and Description |
---|---|
LuceneIndexFactory |
addField(String name)
Add a field to be indexed
|
LuceneIndexFactory |
addField(String name,
org.apache.lucene.analysis.Analyzer analyzer)
Add a field to be indexed, using the specified analyzer.
|
void |
create(String indexName,
String regionPath)
Create the index on this member.
|
LuceneIndexFactory |
setFields(Map<String,org.apache.lucene.analysis.Analyzer> fieldMap)
Set the list of fields to be indexed.
|
LuceneIndexFactory |
setFields(String... fields)
Set the list of fields to be indexed.
|
LuceneIndexFactory |
setLuceneSerializer(LuceneSerializer luceneSerializer)
Configure the way objects are converted to lucene documents for this lucene index
|
LuceneIndexFactory addField(String name)
name
- A field of the object to index. Only fields listed here will be stored in the
index. Fields should map to PDX fieldNames if the object is serialized with PDX, or to
java fields on the object otherwise. The special field name
LuceneService.REGION_VALUE_FIELD
indicates that the entire value should be
stored as a single field in the index.LuceneIndexFactory setFields(String... fields)
fields
- Fields of the object to index. Only fields listed here will be stored in the
index. Fields should map to PDX fieldNames if the object is serialized with PDX, or to
java fields on the object otherwise. The special field name
LuceneService.REGION_VALUE_FIELD
indicates that the entire value should be
stored as a single field in the index.LuceneIndexFactory addField(String name, org.apache.lucene.analysis.Analyzer analyzer)
name
- A field of the object to index. Only fields listed here will be stored in the
index. Fields should map to PDX fieldNames if the object is serialized with PDX, or to
java fields on the object otherwise. The special field name
LuceneService.REGION_VALUE_FIELD
indicates that the entire value should be
stored as a single field in the index.analyzer
- The analyzer to use for this this field. Analyzers are used by Lucene to
tokenize your field into individual words.LuceneIndexFactory setFields(Map<String,org.apache.lucene.analysis.Analyzer> fieldMap)
fieldMap
- Fields of the object to index, with the analyzer to be used for each field.
Only fields listed here will be stored in the index. Fields should map to PDX fieldNames
if the object is serialized with PDX, or to java fields on the object otherwise. The
special field name LuceneService.REGION_VALUE_FIELD
indicates that the entire
value should be stored as a single field in the index.void create(String indexName, String regionPath)
indexName
- name of the index.regionPath
- The region to index. The entries added to this region will be indexes.LuceneIndexFactory setLuceneSerializer(LuceneSerializer luceneSerializer)
luceneSerializer
- A callback which converts a region value to a lucene document or
documents to be stored in the index.