Fix `#hashtag` matching on individual components in search (#26835)

lolsob-rspec
Eugen Rochko 2023-09-07 12:53:41 +02:00 committed by GitHub
parent e8427d32cb
commit 2ac7f10374
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ class SearchQueryTransformer < Parslet::Transform
def to_query
if @term.start_with?('#')
{ match: { tags: { query: @term } } }
{ match: { tags: { query: @term, operator: 'and' } } }
else
{ multi_match: { type: 'most_fields', query: @term, fields: ['text', 'text.stemmed'], operator: 'and' } }
end