Alexander Lind wrote:> Suppose we have two queries that look like this:
> query 1: "color:green AND shape:square"
> query 2: "(color:green) AND shape:square"
>
> Should these two queries always return the same result set? They don't
> for me. On my index, query 1 returns 4 results and query 2 returns only
> 3 results.
> The 4 records returned on query 1 are correct (they all have the correct
> keywords set).
> The 3 records returned on query 2 are all from the 4 above, but one is
> missing for no apparent reason.
>
> Is this a bug, or am I missing something?
(You can get a description of the resulting queries by using the
"get_description()" method on them. This will show if there is a
difference in the parsed queries - if there is no difference, the
results should be identical.)
On my system, both these queries parse to the same thing (assuming I add
a prefix for "color" and for "shape"). This is with SVN
HEAD. It's
possible there's a bug causing this in an earlier version - which
version of Xapian are you using?
--
Richard