mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-30 12:20:35 +00:00
Fix search queries with slash causing or-condition (#26699)
This commit is contained in:
parent
9bb2fb6b14
commit
0008458128
|
@ -25,7 +25,7 @@ class SearchQueryTransformer < Parslet::Transform
|
||||||
def clause_to_query(clause)
|
def clause_to_query(clause)
|
||||||
case clause
|
case clause
|
||||||
when TermClause
|
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
|
when PhraseClause
|
||||||
{ match_phrase: { text: { query: clause.phrase } } }
|
{ match_phrase: { text: { query: clause.phrase } } }
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue