[Xapian-tickets] [Xapian] #414: QueryParser corner cases
Xapian
nobody at xapian.org
Mon Jul 8 04:38:03 BST 2024
#414: QueryParser corner cases
-------------------------+-------------------------------
Reporter: Olly Betts | Owner: Olly Betts
Type: defect | Status: assigned
Priority: normal | Milestone: 2.0.0
Component: QueryParser | Version:
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: All
-------------------------+-------------------------------
Changes (by Olly Betts):
* milestone: 1.5.0 => 2.0.0
Old description:
> There are quite a few cases which we probably don't handle as well as we
> could (sometimes it's not totally clear what the behaviour should be), so
> let's make a list here and see if we can find resolutions, or decide the
> current behaviour is fine.
>
> With FLAG_SYNONYM these cause reparsing so parse as {{{foo abc def}}} (we
> just ignore ~ unless the next character is a word character, so without
> the "foo:" prefix, ~ is just ignored):
>
> {{{
> ~foo:(abc def)
> ~foo:"abc def"
> }}}
>
> Assuming "foo" is set as a non-boolean prefix, the first should probably
> parse as synonyms for the two terms, so the same as:
>
> {{{
> ~foo:abc ~foo:def
> }}}
>
> And the second should probably do a multi-word synonym expansion.
New description:
There are quite a few cases which we probably don't handle as well as we
could (sometimes it's not totally clear what the behaviour should be), so
let's make a list here and see if we can find resolutions, or decide the
current behaviour is fine.
With FLAG_SYNONYM this causes reparsing so parse as {{{foo abc def}}} (we
just ignore ~ unless the next character is a word character, so without
the "foo:" prefix, ~ is just ignored):
{{{
~foo:(abc def)
}}}
Assuming "foo" is set as a non-boolean prefix, it should probably parse as
synonyms for the two terms, so the same as:
{{{
~foo:abc ~foo:def
}}}
--
Comment:
Replying to [comment:8 Olly Betts]:
> > `~foo:"abc def"` [...] should probably do a multi-word synonym
expansion.
>
> I actually have a patch which implements this part so we can easily do
this part for 1.5.0.
Applied in 8c723ec78753e9ae701261eb388ef4b7855aff5e. The other case
probably isn't for 1.5.0.
--
Ticket URL: <https://trac.xapian.org/ticket/414#comment:9>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list