Closed kirrg001 closed 10 months ago
NQL returns a wrong parsed result if filters are wrapped with outer brackets.
Let's assume you pass this filter: filter=featured:true,(tags:animal+tags:classic)
filter=featured:true,(tags:animal+tags:classic)
It results in:
{"$or":[{"featured":true},{"$and":[{"tags":"animal"},{"tags":"classic"}]}]}
Which is correct!
But if you pass a filter like this: filter=(tags:animal+tags:classic)
filter=(tags:animal+tags:classic)
{"yg":{"$and":[{"tags":"animal"},{"tags":"classic"}]}}
Which is wrong.
Reference: yg expression, see.
yg
NQL returns a wrong parsed result if filters are wrapped with outer brackets.
Let's assume you pass this filter:
filter=featured:true,(tags:animal+tags:classic)
It results in:
{"$or":[{"featured":true},{"$and":[{"tags":"animal"},{"tags":"classic"}]}]}
Which is correct!
But if you pass a filter like this:
filter=(tags:animal+tags:classic)
It results in:
{"yg":{"$and":[{"tags":"animal"},{"tags":"classic"}]}}
Which is wrong.
Reference:
yg
expression, see.