Fix search queries with slash causing or-condition (#26699)

lolsob-rspec
Eugen Rochko 2023-08-31 19:04:44 +02:00 committed by GitHub
parent dcd8d25ac1
commit a189771256
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ class SearchQueryTransformer < Parslet::Transform
def clause_to_query(clause)
case clause
when TermClause
{ multi_match: { type: 'most_fields', query: clause.term, fields: ['text', 'text.stemmed'] } }
{ multi_match: { type: 'most_fields', query: clause.term, fields: ['text', 'text.stemmed'], operator: 'and' } }
when PhraseClause
{ match_phrase: { text: { query: clause.phrase } } }
else