Try to fix search quer
This commit is contained in:
parent
bb3168e5b8
commit
43bc0b4cac
1 changed files with 1 additions and 7 deletions
|
@ -349,13 +349,7 @@ class SearchQueryTransformer < Parslet::Transform
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_query
|
def to_query
|
||||||
if @statuses_index_only
|
if @negated
|
||||||
if @negated
|
|
||||||
{ bool: { must_not: [{ term: { _index: StatusesIndex.index_name } }, { @type => { @filter => @term } }] } }
|
|
||||||
else
|
|
||||||
{ bool: { must: [{ term: { _index: StatusesIndex.index_name } }, { @type => { @filter => @term } }] } }
|
|
||||||
end
|
|
||||||
elsif @negated
|
|
||||||
{ bool: { must_not: { @type => { @filter => @term } } } }
|
{ bool: { must_not: { @type => { @filter => @term } } } }
|
||||||
else
|
else
|
||||||
{ @type => { @filter => @term } }
|
{ @type => { @filter => @term } }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue