I have a synonyms.txt
file which contains my synonyms keywords. When I search using wild card, the synonym is not matching the word.
Eg, my synonyms.txt
:
cable,rope, wire, chain, cordage
When I search cable
, the synonyms are getting build as expected, but when I search cable*
, I am not getting synonyms generated.
Please let me know if there is any work around for this, or is there a way to build custom SynonymsFactory
.
You can make search like this:
This way Solr will search the exactly term
cable
and your synonyms andcable*
will search every terms that starts withcable
.