Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

synonym search using apache solr

Tags:

solr

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.

like image 343
prabu Avatar asked Oct 02 '10 11:10

prabu


People also ask

How do you check synonyms in Solr?

Testing synonym matching in Solr To see how synonyms are applied you can use the “Analysis” option available on the Solr dashboard page.

How does Apache Solr search work?

Solr works by gathering, storing and indexing documents from different sources and making them searchable in near real-time. It follows a 3-step process that involves indexing, querying, and finally, ranking the results – all in near real-time, even though it can work with huge volumes of data.

What is full-text search in Solr?

Searching is the most powerful capability of Solr. Once we have the documents indexed in our repository, we can search for keywords, phrases, date ranges, etc. The results are sorted by relevance (score).


1 Answers

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.

like image 96
Mauricio Scheffer Avatar answered Sep 19 '22 14:09

Mauricio Scheffer