Hey there!
i’m using my own custom snippet to dynamically filter the collection got by getResources. e.g User can filter out resources by date interval (from publishedon to publishedon) AND keyword contained in pagetitle or content. Then i generate JSON and put it to &where parameter and here comes my question.
my where param looks like this:
{"publishedon:>=":"1289865600", "AND:publishedon:<=":"1291075200", "AND:pagetitle:LIKE":"%test%", "OR:content:LIKE":"%test%"}
which is obviously producing wrong results, the correct query should look like:
"publishedon:>=":"1289865600", "AND:publishedon:<=":"1291075200" and ("pagetitle:LIKE":"%test%", "OR:content:LIKE":"%test%")
What are my routes to solve this problem?
Thanks
btw, i checked source code and there’s following comment: &where=`{{"alias:LIKE":"foo%", "OR:alias:LIKE":"%bar"},{"OR:pagetitle:=":"foobar", "AND:description:=":"raboof"}}` <-- this would not work, json_decode won’t parse that