Skip to content

Commit

Permalink
Added support for "q.alt" for wildcard queries
Browse files Browse the repository at this point in the history
  • Loading branch information
kuahyeow committed Aug 24, 2009
1 parent d055508 commit 033ac41
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/sunspot/query/base_query.rb
Expand Up @@ -23,6 +23,10 @@ def to_params
params = {}
if @keywords
params[:q] = @keywords
if @keywords.match(/\*\Z/)
params['q.alt'] = @keywords
params.delete(:q)
end
params[:fl] = '* score'
params[:fq] = types_phrase
params[:qf] = text_field_names.join(' ')
Expand Down

0 comments on commit 033ac41

Please sign in to comment.