9

I am refactoring my code and found out that I use both keywords and fulltext to search. The use of fulltext is used at Readme and keywords is used in Wiki. There was a discussion mentioning that those are different ways of doing the same thing, however it does not explain what the differences are. Plus I can't find keywords in the API doc.

So can those two be used inter-changeably? What are the differences between them? What are the limitations of each? Anything to watch out for?

lulalala
  • 17,572
  • 15
  • 110
  • 169

1 Answers1

21

There is no difference between them, keywords is an alias for fulltext

alias_method :keywords, :fulltext

The line above is defined in sunspot/lib/sunspot/dsl/standard_query.rb.

webwurst
  • 4,830
  • 3
  • 23
  • 32
cristian
  • 8,676
  • 3
  • 38
  • 44