0
从tire gem's DSL example给出以下代码。ElasticSearch通过集合过滤
index = Tire.index('weather') do
delete
create
# First, a query named _warning_,
register_percolator_query('warning', :tags => ['warning']) { string 'warning OR severe OR extreme' }
# a query named _tsunami_,
register_percolator_query('tsunami', :tags => ['tsunami']) { string 'tsunami' }
end
matches = index.percolate(:message => '[Warning] Extreme flooding expected after tsunami wave.')
我想知道如何将匹配条件设置为一组条件而不是ORed字符串。
例如string 'warning weather OR severe weather OR extreme weather'
将匹配warning
或weather
而不是两个warning weather
在一起。
找到你的解决方案了吗?看到我的答案?你怎么修好它的? – Benj