Skip to content

Commit

Permalink
Switch search to in boolean mode
Browse files Browse the repository at this point in the history
  • Loading branch information
cykod committed Apr 13, 2011
1 parent d188270 commit fc57daf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/content_node_value.rb
Expand Up @@ -35,7 +35,7 @@ def self.search(language, query, options)
values = []
total_results = 0
with_scope(:find => {
:conditions => ["language = ? AND content_nodes.published=1 AND MATCH (title,body) AGAINST (?)",language,query],
:conditions => ["language = ? AND content_nodes.published=1 AND MATCH (title,body) AGAINST (? IN BOOLEAN MODE)",language,query],
:include => [:content_node, :content_type],
:order => ["MATCH (title) AGAINST (",self.quote_value(query), ") DESC, MATCH (title,body) AGAINST (",self.quote_value(query), ") DESC"].join
}) do
Expand Down

0 comments on commit fc57daf

Please sign in to comment.