0

I have a MySQL database, working with Python, with some entries for products such as Samsung Television, Samsung Galaxy Phone etc. Now, if a user searches for Samsung T.V or just T.V, is there any way to return the entry for Samsung Television?

Do full text search libraries like Solr or Haystack support such features? If not, then how do I actually proceed with this?

Thanks.

drunkenfist
  • 2,958
  • 12
  • 39
  • 73

2 Answers2

0

yes, Solr will surely allow you to do this and much more.You can start Here

and SolrCloud is a really good way to provide for High Availabilty to end users.

javacreed
  • 958
  • 1
  • 8
  • 20
0

You should have a look at the SynonymFilterFactory for your analyzer. When reading the documentation you will find this section that rather sounds like the scenario you describe.

Even when you aren't worried about multi-word synonyms, idf differences still make index time synonyms a good idea. Consider the following scenario:

  • An index with a "text" field, which at query time uses the SynonymFilter with the synonym TV, Televesion and expand="true"
  • Many thousands of documents containing the term "text:TV"
  • A few hundred documents containing the term "text:Television"

You should keep in mind to have separate analyzers for index and query time, as described in this SO question How to make solr synonyms work.

Community
  • 1
  • 1
cheffe
  • 9,345
  • 2
  • 46
  • 57
  • Thanks cheffe. I haven't started looking into solr yet, but I wanted to know one thing before begin. Do I have to manually make documents from the data in MySQL database and put it on to the solr server for it to work or is there any way that it this can be done automatically? – drunkenfist Apr 17 '14 at 19:43
  • You might use [the DataImportHandler](http://wiki.apache.org/solr/DataImportHandler) to get your records from MySQL to Solr. – cheffe Apr 17 '14 at 20:31