0
tire gem's DSL example 다음 코드가 주어졌습니다.ElasticSearch percolate 세트
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