THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
public LuceneIndexFactory { /** * Configure the way objects are converted to lucene documents for this lucene index * @param luceneSerializer A callback which converts a region value to a * Lucene document or documents to be stored in the index. */ public LuceneIndexFactory setLuceneSerializer(LuceneSerializer luceneSerializer); } /** * An interface for writing the fields of an object into a lucene document * The region key will be added as a field to the returned documents. */ public interface LuceneSerializer { Collection<Document> toDocuments(Object value); } |
XML Configuration
<cache |
xmlns
xmlns
xmlns
xsi
http
http
http
version version="1.0"> |
<region <region name="region" |
refid="PARTITION"> |
<lucene <lucene:index name="index"> <lucene:field name="a" |
analyzer="org.apache.lucene.analysis.core.KeywordAnalyzer"/> <lucene:field name="b" |
analyzer="org.apache.lucene.analysis.core.SimpleAnalyzer"/> <lucene:field name="c" |
analyzer="org.apache.lucene.analysis.standard.ClassicAnalyzer"/> |
<lucene: |
serializer> <class-name>org |
=
"org.apache.geode.cache.lucene. |
test.MySerializer</class-name> </lucene:serializer> |
/>
</lucene:index> |
<
</ |
>
region> </ |
>
If serializer is not specified, it will use the default HeterogeneousLuceneSerializer.
cache> |
- We will provide a built-in implementation for LuceneSerializer. Use fieldnameAtLevel1.fieldnameAtLevel2 to specify a field in the nested object both for indexing and querying.
...