Database Reference
In-Depth Information
Ignoring inline content
You can tell eXist to completely ignore inline content by using the ignore element.
This is useful when, for instance, your content contains editorial notes like:
<p> Columbus discovered Finland in 1492
<note> I don't think the year is correct, could someone check this? </note></p>
Ignoring the note elements within the p elements can be done with:
<lucene>
<text qname= "p" >
<ignore qname= "note" />
</text>
</lucene>
Or, when note should be ignored in all documents in the collection:
<lucene>
<text qname= "p" />
<!-- other text indexes -->
<ignore qname= "note" />
</lucene>
An ignore element only ignores descendants of the indexed element. This means that
a seemingly contradictory index definition like this one is perfectly valid:
<lucene>
<text qname= "p" />
<text qname= "note" />
<ignore qname= "note" />
</lucene>
With this definition, the following query would return nothing:
// p [ ft:query (., 'check this' )]
But an editor searching on notes within paragraphs would get a result by using:
// p [ ft:query ( note , 'check this' )]
Maintaining the Full-Text Index
Basic maintenance of the full-text index is the same as for the other indexes (see
“Maintaining Indexes” on page 278 ): once defined, eXist maintains them
automatically for the most part. But when you create a new one or change a configu‐
ration, you have to reindex manually.
In previous versions of eXist it was necessary to call ft:optimize
now and then for optimal performance. This is no longer the case.
Search WWH ::




Custom Search