[Xapian-discuss] Using special characters in query terms

Lars Kruse lists at sumpfralle.de
Wed Apr 2 04:56:57 BST 2008


I would like to search for filenames in a xapian database.

For now my query for "foo-bar.po" turns into the following:
  Xapian::Query((foo:(pos=1) PHRASE 3 bar:(pos=2) PHRASE 3 po:(pos=3)))

This query is successful, if I used the term generator to tokenize "foo-bar.po"
during indexing.

The problem is: this workaround makes it impossible to distinguish between
"foo-bar.po" and "foo/bar.po".

A similar problem was described here:
But I couldn't follow the link to the bug database
(http://www.xapian.org/cgi-bin/bugzilla/show_bug.cgi?id=22), since bugzilla
seems to be unavailable at the moment.

My question: is there any way to protect special characters in a query?

thanks for your time,

More information about the Xapian-discuss mailing list