[Xapian-tickets] [Xapian] #407: Explicit "~" does not look for synonym when using FLAG_PARTIAL
Xapian
nobody at xapian.org
Mon Nov 16 08:41:05 GMT 2009
#407: Explicit "~" does not look for synonym when using FLAG_PARTIAL
-------------------------+--------------------------------------------------
Reporter: olinux | Owner: olly
Type: defect | Status: assigned
Priority: normal | Milestone: 1.0.17
Component: QueryParser | Version: 1.0.16
Severity: normal | Keywords:
Blockedby: | Platform: All
Blocking: |
-------------------------+--------------------------------------------------
Changes (by olly):
* milestone: 1.1.3 => 1.0.17
Comment:
Under: FLAG_BOOLEAN | FLAG_PARTIAL | FLAG_AUTO_SYNONYMS
{{{
// PROBLEM - EXPLICIT "~" SHOULD FORCE LOOK FOR A SYNONYM
// Xapian::Query(hello:(pos=1))
$query = $qp->parse_query('~hello', $xapianFlags);
}}}
I'm not sure I agree here. You didn't pass FLAG_SYNONYM, so the "~"
synonym operator isn't enabled, and the "~" is ignored as a spurious
character (like "%" would be in "%hello", for example). So this case is
handled just as {{{'hello'}}} is.
If you want "~" to be recognised as meaning "synonym this explicitly", I
think you should be passing FLAG_SYNONYM. FLAG_AUTO_SYNONYMS could imply
FLAG_SYNONYM, but then we lose the flexibility of not having "~"
recognised specially.
Similar arguments apply to: {{{world ~hello}}}
The other cases are fixed in trunk r13611.
Marking for backport to 1.1.17.
--
Ticket URL: <http://trac.xapian.org/ticket/407#comment:2>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list