I have tried search using Apache SOLR. I have done with the PHP client code for to implement with apache solr. I have indexed using the function solrUpdate and got search results using the funcion solrQuery.
now i want to search using synonym search , i.e in previously I ve indexed the title as “money” then, I go to search keyword is “money” the results will came nicely. but i want to do with sysnonym search (“money” => “cash” or “currency”).
Now i go to search with keyword “cash” no results will came? but i am expecting results which have only “money” will be returned.
What should i ve to do? my xml document format is
“id” = 123
“name” = Money
“description” = Some sample description.
any ideas suggestion most welcome.
Thanx in advance.
If “money”, “cash” and “currency” are equivalent in your searches, they should be just separated with comma in your synonyms file:
money, cash, currency.For more information see the documentation on SynonymFilterFactory.