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