【发布时间】:2013-12-02 15:37:15
【问题描述】:
我目前正在使用 Tire 来访问我的 ES 数据,但是我无法让它进行精确匹配,例如
User.search :per_page => 10 do
query do
boolean do
must { match :first_name, 'tom'}
must { match :last_name, 'smith'}
end
end
end
但是,当我希望它只匹配 tom 时,它会返回 tom、tomas、tommy 和 tomiena 的名字。
【问题讨论】:
-
这取决于使用的分析仪。你的mapping 是什么?
标签: ruby elasticsearch tire