~cytrogen/masto-fe

a90b0056cc5a306b8cd39304b1801b8b9a742f53 — Eugen Rochko 2 years ago 8a9d7ae
Fix `#hashtag` matching on individual components in search (#26835)

1 files changed, 1 insertions(+), 1 deletions(-)

M app/lib/search_query_transformer.rb
M app/lib/search_query_transformer.rb => app/lib/search_query_transformer.rb +1 -1
@@ 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