Solr synonyms - Issue with word containing wild card

346 views Asked by At

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.

1

There are 1 answers

2
Bruno dos Santos On

You can make search like this:

cable OR cable*

This way Solr will search the exactly term cable and your synonyms and cable* will search every terms that starts with cable.