From: Jochen G. <joc...@un...> - 2010-02-23 12:08:32
|
Hi, a question concerning ft:query (describing the Query with XML), the StandardAnalyzer and Lucenes Query String Optimization: Having a XML with punctuation like this: <text> <string>string. string</string> <string>string-string</string> <string>string_string</string> <string>string, string</string> <string>string/string</string> </text> Querying it by: //string[ft:query(., 'string')] or //string[ft:query(., 'string/')] or //string[ft:query(., 'string-string')] ... always leads to 5 results because Lucene's Standard Analyzer and obviously the Query Parser too ignore / filter out punctuation. If one describes Queries in XML (a feature which has great possibilities in my eyes), obviously the Query Parser does not do Optimizations any more. //string[ft:query(., <query><term>string.</term></query>)] or //string[ft:query(., <query><wildcard>string-*</wildcard></query>)] ... always returns an empty sequence. One exception is the "Phrase-Search": //string[ft:query(., <query><phrase>string-string</phrase></query>)] which returns 5 results as above. So my question is: Is it planned from your side to add this Query Optimization to the XML based Fulltext Query on a low level or am I responsible for this optimizations myself within my application? Best, Jochen Tested with: eXist-setup-1.4.0-rev10440.jar <collection xmlns="http://exist-db.org/collection-config/1.0"> <index> <fulltext default="none" attributes="no"/> <lucene> <analyzer class="org.apache.lucene.analysis.standard.StandardAnalyzer"/> <text qname="string"/> </lucene> </index> </collection> |