Fix `#hashtag` matching on individual components in search (#26835)
parent
8a9d7aeb1e
commit
a90b0056cc
|
@ -121,7 +121,7 @@ class SearchQueryTransformer < Parslet::Transform
|
||||||
|
|
||||||
def to_query
|
def to_query
|
||||||
if @term.start_with?('#')
|
if @term.start_with?('#')
|
||||||
{ match: { tags: { query: @term } } }
|
{ match: { tags: { query: @term, operator: 'and' } } }
|
||||||
else
|
else
|
||||||
{ multi_match: { type: 'most_fields', query: @term, fields: ['text', 'text.stemmed'], operator: 'and' } }
|
{ multi_match: { type: 'most_fields', query: @term, fields: ['text', 'text.stemmed'], operator: 'and' } }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue