1
0
Fork 0
forked from gitea/nas
This commit is contained in:
KMY 2023-09-16 08:33:18 +09:00
parent 0ad0dcc8fd
commit a7a6c62440

View file

@ -350,9 +350,9 @@ class SearchQueryTransformer < Parslet::Transform
def to_query
if @statuses_index_only
if @negated
{ bool: { must_not: [_index => StatusesIndex.index_name, @type => { @filter => @term }] } }
{ bool: { must_not: [{ term: { _index => StatusesIndex.index_name } }, { @type => { @filter => @term } }] } }
else
{ bool: { must: [_index => StatusesIndex.index_name, @type => { @filter => @term }] } }
{ bool: { must: [{ term: { _index => StatusesIndex.index_name } }, { @type => { @filter => @term } }] } }
end
elsif @negated
{ bool: { must_not: { @type => { @filter => @term } } } }