Support Ticket

+status
answered
+tags
 
+issue

I just changed the format for a set of cards (the "source"-cards), which obviously affected existing source-cards. The change was in regards to tagging. the orignal tagging-card, +tags, is not in the format anymore, so all the previous tags do not show up in old source cards anymore. however, the WQL search still shows me those source cards, even though they are not tagged anymore. Does WQL even retrieve cards if older versions of cards included the search term?

 

further, the new form includes pointer cards, which I defined in one of the "Source"-cards, but when I create a new Source card the format does not offer the Pointers, but just starts again with basic cards.


The potentially confusing thing here is that a card like "Wikipedia on BP+tags" can still exist even if "Wikipedia on BP" doesn't include it. Have a look; it's still there! This is extremely useful, because it means you can gather lots of data that you don't actually show.

 

The current search is for all "right plus" cards -- whether or not they are included.

 

If you only want to show cards that are included on the Wikipedia on BP, you can specify that in the WQL with {"included_by":"Wikipedia on BP"}.

  --Ethan McCutchen.....Sat Mar 31 20:26:35 +0000 2012


thanks Ethan, very helpful.

on the second point I raised: i defined the tags to be pointers, with multiselect for a subset of cards (by type). however, when I create a new "source" card, those definitions of tags are not showing, it simply gives me "basic" cards instead.

here an example source card with the proper set up:

http://wagn.wikirate.org/BP_on_Pollution

and if you create a new one, its not there:

http://wagn.wikirate.org/new/Source

  --Philipp.....Sun Apr 01 03:26:41 +0000 2012


If I look at this card: http://wagn.wikirate.org/BP_on_Pollution+Industry_tag

 

I see that it's a Pointer, but if I look at its options tab, it doesn't appear to be configured to be a pointer -- the *default setting is still Basic.

 

So my first guess is that you changed the type of the Card to be a pointer directly, is that not the case?

 

If so, it will probably clear things up if you create the *default rule and change it to be a pointer. At that point you may have to reload the options tab to see all the pointer rules, but they should still be there.

  --Ethan McCutchen.....Sun Apr 01 03:44:10 +0000 2012


perfect, I think I am starting to get it, and also I am starting to get how it all moves together...

one more question, why does the following search:

http://wagn.wikirate.org/Oil_Gas+Environment+Pollution_Toxics+Search_for_Sources

not deliver the following source?

http://wagn.wikirate.org/BP_on_Pollution

I would think that by definition of how the tag and the related search is set up that this source would show up.

  --Philipp.....Sun Apr 01 03:58:44 +0000 2012


Wow, you are finding your way into all the most complex stuff very quickly!

 

The thing to remember here is that _left and _right are divided by the rightmost plus sign. So _left doesn't mean the leftmost name, it means everything to the left of the rightmost "+".

 

e.g. if "A+B+C+D" is _self, then _left is "A+B+C", and _right is "D"

 

This division is important because the rightmost card often labels the card to its left.

 

So you have this name: "Oil & Gas+Environment+Pollution Toxics+Search for Sources". In a search context,

 

_self = "Oil & Gas+Environment+Pollution Toxics", and

_left = "Oil & Gas+Environment"

 

So when you refer to _left in that search, you're looking for "Oil & Gas".

 

One way to refer to that card is "_LL" (meaning left's left). It's a recursive notation, and you could also use it to identify "Environment" as "_LR" (left's right).

 

It's sometimes simpler in times like these to use the numeric notation: _1, _2, _3, etc. In this case you could use _1 to refer to "Oil & Gas".

 

  --Ethan McCutchen.....Sun Apr 01 04:21:02 +0000 2012


it works when only looking for "Oil & Gas". but when looking for combinations, like "Oil & Gas+Environment", it does not unfortunately. What am I missing? the sources are tagged with the exact card names (e.g. "Oil & Gas+Environment" etc.

  --Philipp.....Sun Apr 01 22:08:17 +0000 2012


so when I change your "_ll" to "_left" it does not work anymore, even though http://wagn.wikirate.org/BP_on_Pollution is properly tagged.

  --Philipp.....Sun Apr 01 22:09:02 +0000 2012


or actually it should be "_self", per your explanations above, but same issue

  --Philipp.....Sun Apr 01 22:09:57 +0000 2012


Hmm, good point. I think that had something to do with "match", which we really only use in the search bar, because doing a matching test involves much more processing (and potential confusion) than references (like include and link_to) which are faster and more precise for something like tags.

 

I would still have thought that what you did would have worked. Will look into it.

  --Ethan McCutchen.....Mon Apr 02 00:55:43 +0000 2012


One more question :-)

 

Why does this search:

http://wagn.wikirate.org/Gasoline+Environment+Pollution_Toxics+Air_Pollution+BP+Search_for_Sources

 

Not show me this source:

http://wagn.wikirate.org/BP_caused_a_massive_oil_spill_in_the_Gulf_of_Mexico

  --Philipp.....Mon Apr 09 00:16:54 +0000 2012


Short answer: The same "match" issue, presumably with ampersands. Still have to debug that one.

 

In any case, you pretty much never want to use "match". It's really intended only for the search bar.

 

If you want to debug this kind of thing, go to the innermost searches and see if they're working. In this case we can see that this search isn't returning any results:

 

{"content": ["match", "_left"]}

  --Ethan McCutchen.....Mon Apr 09 17:51:25 +0000 2012


ok, got a short memory I guess. refer_to works.

however, I want to do a search for claims that are tagged with two things at the same time. the search terms individually work, but together don't. please look again at

http://wagn.wikirate.org/Gasoline+Environment+Pollution_Toxics+Air_Pollution+BP+Search_for_Claims

it seems to ignore the first "right_plus" query.

  --Philipp.....Tue Apr 10 16:27:27 +0000 2012


ah, right. you can only have one of a given key in a given card definition. This is actually a restriction that is imposed both by JSON and ruby objects -- the two forms of WQL. in fact, most key-value pairs have this restriction.

there are a number of workarounds -- I put in a simple one with "and".

  --Ethan McCutchen.....Wed Apr 11 00:00:33 +0000 2012