Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between Sunspot keywords and fulltext

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?

like image 717
lulalala Avatar asked Dec 19 '11 03:12

lulalala


1 Answers

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.

like image 114
cristian Avatar answered Nov 03 '22 03:11

cristian