Honestly, I'd just map em both the same thing in the index.
sprayer, washer => sprayer
or
sprayer, washer => sprayer_washer
At both index and query time. Now if the source document includes either
'sprayer' or 'washer', it'll get indexed as 'sprayer_washer'. And if
the user enters either 'sprayer' or 'washer', it'll search the index for
'sprayer_washer', and find source documents that included either
'sprayer' or 'washer'.
Of course, if you really use "sprayer_washer", then if the user actually
enters "sprayer_washer" they'll also find "sprayer", "washer", and
"sprayer_washer".
So it's probably best to actually use either 'sprayer' or 'washer' as
the destination, even though it seems odd:
sprayer, washer => washer
Will do what you want, pretty sure.
On 2/23/2012 1:03 AM, remi tassing wrote:
Same question here...
On Wednesday, February 22, 2012, geeky2<gee...@hotmail.com> wrote:
hello all,
i need to support the following:
if the user enters "sprayer" in the desc field - then they get results for
BOTH "sprayer" and "washer".
and in the other direction
if the user enters "washer" in the desc field - then they get results for
BOTH "washer" and "sprayer".
would i set up my synonym file like this?
assuming expand = true..
sprayer => washer
washer => sprayer
thank you,
mark
--
View this message in context:
http://lucene.472066.n3.nabble.com/need-to-support-bi-directional-synonyms-tp3767990p3767990.html
Sent from the Solr - User mailing list archive at Nabble.com.