Building a simple eXist index
Posted by jamie on 10 May 2011 in Activity log
Went through the process (with help from MH) of building a simple index using the Lucene text search engine for the FrancoToile rebuild:
<?xml version="1.0" encoding="UTF-8"?>
<collection xmlns="http://exist-db.org/collection-config/1.0" xmlns:tei="http://www.tei-c.org/ns/1.0">
<index>
<lucene>
<analyzer class="org.apache.lucene.analysis.standard.StandardAnalyzer"/>
<analyzer id="ws" class="org.apache.lucene.analysis.WhitespaceAnalyzer"/>
<text qname="tei:body" analyzer="ws">
<ignore qname="tei:note"/>
</text>
</lucene>
</index>
</collection>
The important notes are:
- You need to declare the namespaces you use in your documents in the <collection> element (e.g. xmlns:tei above)
- Use the full element names with namespaces when adding the indexes (e.g. tei:body)
Used these Exist docs as guides:
This entry was posted by Jamie and filed under Activity log.