[Xapian-devel] how to change the default operator?
Olly Betts
olly at survex.com
Fri Mar 25 04:34:06 GMT 2011
On Fri, Mar 25, 2011 at 06:04:26AM +0800, Shen Li wrote:
> Thanks very much for your advice! I've managed to explicitly set the
> default operator each time with php binding instead of changing the
> Xapian core.
Incidentally, OR as the default operator does seem like the wrong choice
now (though it was reasonable 10+ years ago when we chose it). It's
just rather disruptive to change now.
I've been wondering if it's something we should change for a Xapian 2
release though. There are likely to be API incompatibilities there
anyway, and this one has an easy fix which works with the current API
(i.e. setting the operator to OR explicitly). I suspect that almost
everyone sets it to AND anyway, so few people would be affected, but
it would give us the saner default going forwards.
> However, I'm still wondering that whether it's possible
> to use multiple operators like a operators chain in queryparser. And
> if it is, how should I implement that? I really appreciate your help
> and maybe some reference would be even better!
I'm not sure what you mean by an "operators chain" - can you give an
example?
Cheers,
Olly
More information about the Xapian-devel
mailing list