views:

38

answers:

1

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.

A: 

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.

Mauricio Scheffer
once again thanks, its working fine with created synonyms.txt file in /conf location. I need this now to be more sophisticated e.g. I need to be able to create synonym sets with an XML format here. is it possible?
prabu
@prabu: please post another question with more details.
Mauricio Scheffer
@prabu What will be the semantic difference between a text file based and a xml file based synonym definition?
cuh
@prabu: if my answer was helpful, please upvote. If the answer was correct, please accept it.
Mauricio Scheffer