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

Finally had time to get back to this. I did try the Decko v0.3.2 gem and it works! Much faster also. Ideally we'd wait until the 1.0 release on cldstr, but we're really running out of time so I'll continue with this (unless you anticipate releasing soon). Any advice for setting up a simple production server (beyond the standard steps here or on the github readme)?

--Lake Watkins.....2017-11-15 07:52:19 UTC

Cldstr is phasing out. We do plan to support the next generation, UBOS work that flows from it, but we don't have a timetable for that and we have many other commitments, so I wouldn't plan around it.


Though it's not brilliantly organized, wagn in production has a lot of community-contributed material about setting up production servers. I'd pay particular attention to the "Optimizing" section (memcache is key!)

--Ethan McCutchen.....2017-11-15 16:26:51 UTC