[Xapian-devel] FLAG_PARTIAL and subset words

Greg freediving at gmail.com
Mon May 16 21:47:35 BST 2011


On Mon, May 16, 2011 at 10:27 PM, Olly Betts <olly at survex.com> wrote:
> On Mon, May 16, 2011 at 01:14:27PM +0200, Greg wrote:
>> "volvo v"::
>> Xapian::Query((Zvolvo:(pos=1) AND ((v90:(pos=2) SYNONYM volvo:(pos=2))
>> OR Zv:(pos=2))))
>> as you can see here the trailing "v" expands into volvo and get
>> matched to "volvo s60"
>
> Yes, this is what I was trying to explain in my previous message.
>
>> [...]
>> I'm not sure if that's intended ie. having both volvo and v match the same term.
>
> Well, "volvo" starts with a "v", so it's certainly a valid completion of
> the query.
>
> Cheers,
>    Olly
Alright, though to be honest intuitively as a user I don't expect that
to happen. Not sure if that could be changed but perhaps not allowing
partial words to be expanded into already existant terms in the query
could be an easy 'fix' or I'm not sure if that might cause other
issues.

I was thinking of actually getting the query description and just
clearing the expanded 'volvo' myself and create a new non FLAG_PARTIAL
query but it's pretty ugly since in a big database it would involve
marshalling and manipulating a pretty big string.

In any case I could live with it.

Thanks.



More information about the Xapian-devel mailing list