karmi/tire — Issue #181: Wildcard search for email
Author: zirni
Created: 2011-12-22 18:10:47+00:00
State: open

Hello,

we're trying to do a wildcard search within email addresses.
Everything works well as long as the query string doesn't contain
a @.

irb(main):005:0> User.search('email:*user_100@*').results.count
=> 0

Do you have any suggestions how to solve this?
Our model mapping looks like this

tire.mapping do
indexes :id, :type => 'string', :index => 'not_analyzed', :include_in_all => false
indexes :email, :type => 'string'
end

Cheers,
zirni