Sign up Sign in Samples Blog contact support
Nested $keyword in Search Fails

Support Ticket


{"match":"$keyword"} works fine for the :search card, but nesting even one level fails.  We would specifically like to set a search card to this: 

{"part":"General", "refer_to":{"match":"$keyword"}, "sort":"relevance", "view":"closed"}

And have it return all cards that refer to the matched keyword and have General as a part.  The keyword is provided by the standard query string ?utf8=✓&_keyword=RPG.




For example, {"and":{"type":"Basic", "match":"$keyword"}} fails to match the given keyword, returning instead all basic cards.  Replacing the keyword manually in the WQL search works as intended.


You're right that this should work, and I confirmed that it doesn't.  We'll look into it!

Any progress on this, btw? Maybe we can debug it if you can point us in the right direction...

--Lake Watkins.....2017-07-31 08:24:09 UTC

Sorry for the slow reply. We're ramping back up to full speed after a diffuse August!


The good news is that I think this pull request fixes the problem: (issue is that vars were not being made available to subqueries.)


The less purely good news is that we're working on a big Decko 1.0 release, and there are enough big changes in there (incl. Rails 5 upgrade) that it will be a few more weeks before we get that change into a formal release. Are you able to use this change as is for now? I hadn't planned to go back and make any more wagn point releases before rebranding to decko, but we can consider it if it's really important to you.

--Ethan McCutchen.....2017-08-21 19:32:24 UTC

I'll try this change now and get back to you. We've got a deadline tomorrow so don't worry about trying to push a release out. Great to hear Decko 1.0 is rolling out soon, looking forward to it!

--Lake Watkins.....2017-08-29 18:18:31 UTC