Contextual Search+discussion
1. You can currently only do this using the "+" approach. However, you can use contextual names to display these in very flexible ways.
2. You can use "_self", "_left", etc as WQL values. For example {"refer_to":"_self"}
3. I fixed this. I'm beginning to thing something went wrong with escaped inclusions in our recent migration from postgres to mysql as part of the architecture shift. The problem was that there was a reference to {{_self}} that was intended to show as text but was triggering a recursive inclusion!
Here what I want to do:
{"type": "Source", "content": "_self"}
So I want to search for the name of the card in which the search results are to be shown. How can I make this work?
--Philipp.....Mon Mar 26 12:40:28 +0000 2012
so can you give me an example of a card and what you want to see on it?
The "_self" basically gets replaced with the name of the card in question. So the above would be searching for cards where the content is exactly equal to its name.
--Ethan McCutchen.....Mon Mar 26 17:38:57 +0000 2012
See the first query in:
http://wagn.wikirate.org/Oil_Gas
instead of having to write the card's name "Oil & Gas" I want to use _self.
This is what I currently use:
{"type": "Source", "right_plus":[{},{"content": ["match","Oil & Gas"]}]}
This is what I would want to use:
{"type": "Source", "right_plus":[{},{"content": ["match","_self"]}]}
Is that maybe a problem with the "&" ?
--Philipp.....Fri Mar 30 22:42:55 +0000 2012
oh, now I get what you were saying in the other ticket. More on this soon...
--Ethan McCutchen.....Sat Mar 31 03:48:09 +0000 2012
What's the name of this card? If it's "Source - Oil & Gas", then the second search is really equivalent to ....["match","Source -- Oil & Gas"], which would rule out anything that didn't match "Source". I'm guessing it's that "Source" and not the ampersand causing the problem.
--Ethan McCutchen.....Sat Mar 31 20:09:40 +0000 2012
i think i get it now. I think what i should use is "_left".
--Philipp.....Sun Apr 01 03:13:26 +0000 2012
contextual names (_self, _left, _right, etc) are a little weird in the case of searches. Normally in A+B, _self refers to "A+B", but in the case of searches it refers to "A".
This is a legacy issue. I could explain how it got this way, but suffice it to say that there was a reason, and that reason has been wiped away.
We have a ticket to fix it. It's simple in the code; the problem is migrating all the old searches.
See make refer to self in plus card Searches
--Ethan McCutchen.....Sun Apr 01 03:38:10 +0000 2012
by the way, if you ever just want to see what _self is in a given search context, you can just use this WQL:
{"name":"_self"}
--Ethan McCutchen.....Sun Apr 01 03:38:55 +0000 2012