[Xapian-tickets] [Xapian] #512: Default operator for Omega
Xapian
nobody at xapian.org
Sun Apr 10 06:19:36 BST 2011
#512: Default operator for Omega
--------------------+-------------------------------------------------------
Reporter: olly | Owner: olly
Type: defect | Status: new
Priority: normal | Milestone: 1.3.0
Component: Omega | Version: SVN trunk
Severity: normal | Keywords:
Blockedby: | Platform: All
Blocking: |
--------------------+-------------------------------------------------------
Comment(by olly):
Actually, only the first hunk of that patch is relevant here.
The second hunk is to do with how filters with the same prefix are
combined (which ought to be configurable - see ticket #234 - but that's
not the default operator for query parsing, it's about what happens with
multiple B CGI parameters specifying filter terms with the same term
prefix).
But if you build with your change, add $querydescription to the end of
templates/query and then run a query, you'll see that while the default is
now OP_AND, explicitly specifying DEFAULTOP=OR doesn't work:
{{{
#!sh
olly at atreus:~/svn/xapian/xapian-applications/omega$ echo
'$querydescription' >> templates/query
olly at atreus:~/svn/xapian/xapian-applications/omega$
OMEGA_CONFIG_FILE=omega.conf ./omega P='hello world' |tail -1
Xapian::Query((Zhello:(pos=1) AND Zworld:(pos=2)))
olly at atreus:~/svn/xapian/xapian-applications/omega$
OMEGA_CONFIG_FILE=omega.conf ./omega DEFAULTOP=OR P='hello world' |tail -1
Xapian::Query((Zhello:(pos=1) AND Zworld:(pos=2)))
}}}
We also need to change where default_op gets set from the DEFAULTOP CGI
parameter, in omega.cc. And the documentation needs updating to reflect
the new default too (ideally with a note that the default was OR in
versions prior to 1.3.0, or whenever this gets applied).
--
Ticket URL: <http://trac.xapian.org/ticket/512#comment:3>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list