lucy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Karman <>
Subject Re: [lucy-user] query parsing
Date Fri, 28 Dec 2012 03:54:59 GMT
Anil Pachuri wrote on 12/27/12 2:06 PM:
> Hi,
> I was wondering how I could use Lucy for the following example: a phrase query "baby
diaper color" is able to match the following phrases in the documents:
> baby's diaper color
> baby diaper's color
> color of baby diaper
> color of the baby diaper
> coloring of baby diaper
> color of the diaper of the baby
> baby diaper colour (with extra 'u')
> baby diaper including color
> baby diaper with color
> I tried to explore Lucy phrasequery parser for this but it looks like phrasequery parser
may not work entirely in this case due to its strict word order rule. I am not sure if I need
to pass those phrases to Lucy as explicit synonyms in some way, or is there is better way?
Please advise.

You might want to try the Search::Query::Parser with the term_expander feature
and the Lucy dialect:

You probably also want to use LucyX::Search::ProximityQuery instead of
PhraseQuery, since ProximityQuery will allow for different word orders.

Peter Karman  .  .

View raw message