Hi,
Not sure if this is possible, but does anyone know if it is possible
to have a term in multiple synonym definitions, such that the they
aren't associative? Here is my example:
bike, motorcycle
bike, bicycle
The key thing is that I don't want bicycle and motorcycle to be
synonyms for each other.
Probably not really helpful but anyway: What you are probably looking for is
called 'hypernyms' from a linguistic's point of view. Hypernyms define a 'is
a kind of' relationship between a hyponym (the special term) and a hypernym
(the broader term). In your case 'motorcycle' and 'bicycle' are a kind of
'bike'. You would get motorcycles and bicycles if you search for bikes but
you would not get bikes or motorbikes if you search for bicycles.
I had this requirement in a Lucene based project (2.4.x back then) and ended
up implementing this as one step in a custom query parser (i.e. query time
synonym expansion). I have not checked whether there are standard solutions
available for that (I did not find one back then).
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.