[Xapian-discuss] Make Xapian accept all characters

Olly Betts olly at survex.com
Mon May 4 03:03:24 BST 2015


On Sun, May 03, 2015 at 07:34:32PM +0000, Lautaro M wrote:
> I'm using Xapian at work (PHP bindings) and I have to make it accept
> '##' as a term to index. We have a layer on top of xapian, but as far
> as I can tell, Xapian's QueryParser is removing them from the query.
> So, if I search for just '##' I get an empty query, after Xapian
> parsed it. I've seen the flags this class accepts, but I can't do what
> I want with those (
> http://xapian.org/docs/apidoc/html/classXapian_1_1QueryParser.html   ) 

QueryParser doesn't currently allow controlling the characters which
make up a word, but you can just construct a Query object directly
for any term you want:

$hashquery = new XapianQuery('##');

Cheers,
    Olly



More information about the Xapian-discuss mailing list