|
From: ron.vandenbranden <ron...@ka...> - 2013-11-25 17:17:37
|
Hi, I have a question about the configuration of the current range index (eXist-2.1). Is it possible to exclude nodes from a range index using <ignore/>, or is this specific to the Lucene index? I thought I had used in range index definitions in the past, but may be misremembering. Given following test collection configuration: <collection xmlns="http://exist-db.org/collection-config/1.0"> <index xmlns:tei="http://www.tei-c.org/ns/1.0"> <fulltext default="none" attributes="no" alphanum="false"/> <lucene> <analyzer class="org.apache.lucene.analysis.standard.StandardAnalyzer"> <param name="stopwords" type="java.util.Set"/> </analyzer> <analyzer id="ws" class="org.apache.lucene.analysis.WhitespaceAnalyzer"/> <text qname="p"> <ignore qname="ignore"/> </text> <text qname="ignore"/> </lucene> <create qname="p" type="xs:string"> <ignore qname="ignore"/> </create> <create qname="prefix" type="xs:string"/> </index> </collection> ...and a test collection with following document in /db/test/test.xml: <p><ignore>ignore me</ignore>this is paragraph text</p> When this xquery is executed: let $coll := collection('/db/test') let $lucene := $coll//p[ft:query(., <query><regex>^this</regex></query>)] let $range := $coll//p[matches(., '^this')] return ($lucene, $range) ...only 1 paragraph element is returned, namely the one selected in the $lucene variable. The expression in the $range variable doesn't select anything. This suggests that <ignore/> does not apply to the range index, but I wanted to confirm this (it is not explicitly stated in the documentation for the range index). Also, I found no indexing errors in the logs. Additionally, if <ignore/> is restricted to Lucene, does this mean that it will be possible to ignore elements from the new range index (eXist-develop branch)? I really hope to find some testing time soon... Best, Ron |