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.
Testing synonym matching in Solr To see how synonyms are applied you can use the “Analysis” option available on the Solr dashboard page.
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.
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).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With