Search for a synonym using apache solr

I tried to search using Apache SOLR. I did with PHP client code to implement with apache solr. I indexed using the solrUpdate function and got search results using funcion solrQuery.

now i want to search using synonymous search i.e. I previously indexed the heading as “money,” then I turn to the search keyword “ money ” and the results will be nice. but I want to do with a system search search ("money" => "cash" or "currency").

Now I turn to the search with the keyword " cash ", the results will not appear? but I expect results that will only be returned "money."

What should I do? my document format is xml "id" = 123 "name" = Money "description" = Sample description example.

Any suggestion of ideas is most welcome.

Thanx in advance.

+5
source share
1 answer

If your looking for are equivalent of "money", "money" and "currency", they must be separated by a comma in the synonyms file: money, cash, currency.

See the SynonymFilterFactory documentation for more information .

+14
source

All Articles