Hi Satya, during these days I'm working at this problem, and as far as I understood, this is an hard problem to solve. You can add in different ways synonyms in your index but the query parser is unable to match them.
I have read many articles around, this is the best I found: http://lucidworks.com/blog/automatic-phrase-tokenization-improving-lucene-search-precision-by-more-precise-linguistic-analysis/ For me there is only one big problem with this solution, I use edismax. OTOH, the search handler available in this project extends the QParserPlugin which is an abstract class that can be used to define customized user query process. Basically it only explains how to fix the problem. This is interesting but not very much useful, so I have modified the plugin, now AutoPhrasingQParserPlugin extends ExtendedDismaxQParserPlugin adding auto phrasing capability to edismax. https://github.com/freedev/auto-phrase-tokenfilter Consider that the code has been modified to work with SolrCloud 4.8.1. But there is not very much work to adapt the code to another SolrCloud version. Best, Vincenzo On Thu, Sep 17, 2015 at 12:57 PM, < satyasaihariharaprasad.pulip...@cognizant.com> wrote: > Hi, > > > I'm trying to set up some basic synonyms in Solr. I'm facing an issue with > following entries in synonyms.txt file > > Castle=> Castle,Cinderella Castle,Le Chateau de la Belle au Bois Dormant > > When a user searches for castle, he gets back documents containing Le > Chateau de la Belle au Bois Dormant but not for Castle and Cinderella > Castle. > > How do I get results for other two keywords? > > > Regards, > > Satya > > > This e-mail and any files transmitted with it are for the sole use of the > intended recipient(s) and may contain confidential and privileged > information. If you are not the intended recipient(s), please reply to the > sender and destroy all copies of the original message. Any unauthorized > review, use, disclosure, dissemination, forwarding, printing or copying of > this email, and/or any action taken in reliance on the contents of this > e-mail is strictly prohibited and may be unlawful. Where permitted by > applicable law, this e-mail and other e-mail communications sent to and > from Cognizant e-mail addresses may be monitored. > -- Vincenzo D'Amore email: v.dam...@gmail.com skype: free.dev mobile: +39 349 8513251