Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (12 sloc) 1.23 KB
* Improved compatibility with Rails' pagination feature, <tt>Model::fulltext_search</tt> now takes a <tt>:count</tt> parameter which will return the number of matches for your query instead of retrieving the actual documents and instantiating the results.
* Added compatibility with Rails' STI feature. The base class of an inherited model is stored in the type_base attribute, so please reindex your STI models after applying this update. After that, the following is possible (presuming <tt>CommentNotification</tt> descends from <tt>Notification</tt>):
CommentNotification.fulltext_search('') # Returns all indexed CommentNotification records
Notification.fulltext_search('') # Returns both CommentNotification records and Notification
# records as well as any other indexed child objects
* Force query conditions to support HE's simple format. Queries like these work now:
Article.fulltext_search('mau*') # Matches 'mau' at the beginning of a word
Article.fulltext_search('*ris') # Matches 'ris' at the end of a word
Article.fulltext_search('*^m.*is$*') # Regular expression to match words that begin with 'm' and end in 'is'
* Initial release
Jump to Line
Something went wrong with that request. Please try again.