Search code examples
ruby-on-railsthinking-sphinx

How to search for plural/singular of word


I am using the Thinking Sphinx gem. Is there a way to configure it so that it includes the plural and singular word in the search results?

For example: "Dog" will find "Dogs" "Service" will find "Services"

I believe any search capability should have this sort of action.


Solution

  • You have to add morphology to the thinking sphinx yml file.

    development:
      morphology: stem_en