I am trying to learn how to do more advanced Query construction with the QueryParser, especially working with prefixes. the problem is that it insists on breaking up any terms with non-AlphaNumeric characters.>searcher.py /tmp/wfs d647d4a0-57c0-11da-be78-080020b7eac9Performing query `Xapian::Query((d647d4a0:(pos=1) PHRASE 5 57c0:(pos=2) PHRASE 5 11da:(pos=3) PHRASE 5 be78:(pos=4) PHRASE 5 080020b7eac9:(pos=5)))' 0 results found dhcp-102-246:~/Documents/workspace/wfs>searcher.py /tmp/wfs UID:d647d4a0-57c0-11da-be78-080020b7eac9Performing query `Xapian::Query((UID:d647d4a0:(pos=1) PHRASE 5 UID:57c0:(pos=2) PHRASE 5 UID:11da:(pos=3) PHRASE 5 UID:be78:(pos=4) PHRASE 5 UID:080020b7eac9:(pos=5)))' 0 results found d647d4a0-57c0-11da-be78-080020b7eac9 is the complete term, UID: is the prefix, I want to search for, how can I get it to stop splitting on non-alphanumeric characters? btw: I am working with the Python bindings right now version svn6532. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.tartarus.org/pipermail/xapian-discuss/attachments/20060124/05f2a6e8/attachment.htm
On Tue, Jan 24, 2006 at 09:15:25AM -0500, jarrod roberson wrote:> d647d4a0-57c0-11da-be78-080020b7eac9 is the complete term, UID: is the > prefix, I want to search for, how can I get it to stop splitting on > non-alphanumeric characters?Currently you can't. The QueryParser ought to be more configurable in this regard, but at present it still assumes you're indexing like Omega does in various ways (originally it was part of Omega). A crude workaround for now might be to remove UID:... from the query which you pass to QueryParser (using a regexp say), and then add it back onto the result by hand using OP_FILTER. Cheers, Olly