Search for multiple words, across multiple models

前端 未结 1 934
感情败类
感情败类 2021-01-25 04:11

I\'m trying to create search functionality in a site, and I want the user to be able to search for multiple words, performing substring matching against criteria which exist in

相关标签:
1条回答
  • 2021-01-25 04:51

    I strongly recommend using a proper search engine for something like this, it will make life a lot easier for you. I had a similar problem and I thought "Boy, I bet setting up something like Sphinx means I have to read thousands of manuals and tutorials first". Well, that's not the case.

    Thinking Sphinx is a Rails gem I recommend which makes it very easy to integrate Sphinx. You don't need to have much experience at all to get started:

    http://freelancing-god.github.com/ts/en/

    I haven't tried other search engines, but I'm very satisfied with Sphinx. I managed to set up a relatively complex real-time search in less than a day.

    0 讨论(0)
提交回复
热议问题