Database Reference
In-Depth Information
qname is the qualified name of the element or attribute (if you start it with an @
character) for which you want the text to be indexed. It can have a namespace
prefix (which must, of course, be defined).
Examples of qname usage are qname="tei:p" , qname="mytextelement" , and
qname="@title" .
• With match you can define the search context using a limited XPath-like expres‐
sion. Only the / and // operators are allowed, plus the wildcard * to match an
arbitrary element.
For instance, match="//tei:div/*" will put a full-text index on all direct child
elements of tei:div .
You may use either a qname or a match attribute, but not both:
• The boost attribute gives you the ability to influence the scoring of matches dur‐
ing indexing. It multiplies the default search score with this floating-point value.
There's more about search scores in “Scoring Searches” on page 296 .
analyzer allows you to change the Lucene analyzer class for this index. This is
explained in “Defining and Configuring the Lucene Analyzer” on page 298 .
Additionally, you can define how inline elements must be treated for this particular
index using nested inline and/or ignore elements. This is explained in “Handling
Mixed Content” on page 290 .
Choosing the correct context
Defining the correct context for your full-text index is critical. For example, take the
following XML fragment:
<Text>
<Heading> eXist index configuration </Heading>
<Content> eXist index configuration is done in
the collection.xconf file </Content>
</Text>
Assume we've indexed this with the following index configuration in collection.xconf :
<lucene>
<text qname= "Text" />
</lucene>
Passed to the indexer is the text value of the nodes identified by the qname attribute.
So, in this example the indexer will see "eXist index configuration eXist index
configuration is done in the collection.xconf file" . This is linked to the
Text element only; Lucene preserves no knowledge about the child elements of Text .
Search WWH ::




Custom Search