Form talk:Vendor query

From Guild Wars 2 Wiki
Jump to navigationJump to search

Question about the form use/results[edit]

Hi Chieftain Alex and Relyk ,

I was toying around with this Semantic MediaWiki forum, that I promoted on twitter and ended up in a weird situation:

If you use the form with:

  • Rarity=Exotic
  • Armor weight=Light
  • Armor type=Coat

You get a few items. Once you have the results, if you refine the search with the “currency”, it works for Ascalonian tears and Badges of Honor, but not for Karma. Do you know why that is?

--Stephane Lo Presti talk 22:15, 5 September 2014 (UTC)--66.162.136.17 22:15, 5 September 2014 (UTC)

As the note says, the query breaks with too many restrictions (as the warning flag indicates). The query is breaking on restricting by any currency, it breaks sooner on karma. This is primarily because the subqueries are expensive and it's querying all vendor subobjects for Property:Sells item for each property of the item page redundantly. I don't really have technical knowledge for whether this is the issue but I can revisit the issue (hopefully).--Relyk ~ talk < 23:24, 5 September 2014 (UTC)
Thanks for the clarification. This is an interesting form for various reasons so, although there's no urgency, it'd be interesting to revisit at some point. I also noticed that one of the currency is "<span" so it looks like some SMW data was entered incorrectly? --Stephane Lo Presti talk 23:35, 5 September 2014 (UTC)
I made some optimizations and the queries of that magnitude work now so yay? The "<span " popped up because someone used the {{coin}} for the parameter...--Relyk ~ talk < 00:45, 6 September 2014 (UTC)
Stephane's query plus Currency=Karma still doesn't work. It doesn't throw an SMW error, but it doesn't work, either. —Dr Ishmael User Dr ishmael Diablo the chicken.png 01:50, 6 September 2014 (UTC)
To filter for karma, you need to select the lower-case “karma” at the bottom of the list. Apparently the case is relevant, and there is a mixed set of data using either “Karma” or “karma” (the latter being correct). poke | talk 03:10, 6 September 2014 (UTC)
Aaand all the data with wrong case is gone. poke | talk 03:26, 6 September 2014 (UTC)
Oh, nice. —Dr Ishmael User Dr ishmael Diablo the chicken.png 04:25, 6 September 2014 (UTC)
I've now edited {{vendor table row}} to store currency as uppercase first (which will stick the bottom items amongst the list as expected). @Relyk, Template talk:Vendor query table. -Chieftain AlexUser Chieftain Alex sig.png 09:15, 6 September 2014 (UTC)
As some of you no doubt guessed, the top three entries in the Currency drop down (1 Fused/Winter/Dragon's Jade) are related to Black Lion Weapons Specialist having been moved without blanking the subobjects back in July 2013. -Chieftain AlexUser Chieftain Alex sig.png 09:37, 6 September 2014 (UTC)
^ Yeah, I tried to fix that somehow but couldn’t figure out where those objects are even stored, so I figured that. poke | talk 13:34, 6 September 2014 (UTC)

(Reset indent) Thanks everyone, looks like both improving the query and cleaning the SMW data is making this form better. Could the Semantic Drilldown (we'll push it live with the software upgrade in a few weeks) help? --Stephane Lo Presti talk 16:52, 8 September 2014 (UTC)

For browsing, absolutely. As to helping improve the form, probably not? -Chieftain AlexUser Chieftain Alex sig.png 17:31, 8 September 2014 (UTC)
Drilldown would perform a similar function as this form, but couldn't completely replace it. What Drilldown does is allow you to specify filters for categories - say for Category:Weapons, you would have filters on different semantic properties that are common to all pages in the category, like Has weapon type, Has equipment prefix, Has item rarity, and Has level requirement. These allow you to "drill down" within the category's contents to a specific subset of pages.
This form (and associated template) performs a multi-level query, which Drilldown can't do. Drilldown also doesn't know anything about subobjects, since they aren't actual pages that can be categorized, which means that it won't be nearly as useful as it could be due to our heavy usage of subobjects. —Dr Ishmael User Dr ishmael Diablo the chicken.png 18:10, 8 September 2014 (UTC)
Thanks for the explanation! There's a high potential for these forms to become an exciting new way to access information on the wiki, basically bringing back some sort of structure (I'm sure that DPL was able to do that but SMW and its extensions seem so much better at it). --Stephane Lo Presti talk 18:13, 8 September 2014 (UTC)

Special:UnusedProperties[edit]

just for the record, it was this form that populated the special page Special:UnusedProperties. It doesn't really matter but I'd love to know why. -Chieftain AlexUser Chieftain Alex sig.png 07:32, 29 November 2016 (UTC)

I think it's going to be related to passing whitespace (i.e. non-blank) parameters to Template:Vendor query table. Might be a requirement to use {{#ifeq: <params> || <!-- nothing --> | <!-- something --> }} -Chieftain AlexUser Chieftain Alex sig.png 07:37, 29 November 2016 (UTC)
If only you had a parser function for query errors instead of a html element that breaks wikicode...--Relyk ~ talk < 08:24, 29 November 2016 (UTC)
See if vanilla params and accepting blank parameters prevents the warning errors that would cause messed up semantic annotation.--Relyk ~ talk < 08:33, 29 November 2016 (UTC)
Nice work finding this Alex. If there's any way we can help from the backend, let us know (a bit after tomorrow's maintenance, as we'll be keeping an eye on the wiki working fine). I think understanding some of these fine SMW details could help us figure out why we have so many SMW entries (not sure that it will). --Stephane Lo Presti talk 01:12, 30 November 2016 (UTC)
Can't tell how to reproduce the issue. I don't know if Alex did anything else besides blanking the page or during the time when Justin noticed it was fixed while troubleshooting the other wiki issues.--Relyk ~ talk < 04:43, 30 November 2016 (UTC)
Yeah, I'm with relyk here, after blanking this form yesterday, Special:UnusedProperties is still filled with junk. (from what I recall, I blanked all the forms using values-from-property, and then it was a month or so before the UnusedProperties emptied. -Chieftain AlexUser Chieftain Alex sig.png 07:49, 30 November 2016 (UTC)
I'm wondering if there's a way for us to track where the additions to Special:UnusedProperties are coming from? Maybe by looking directly into the database for the property name? --Stephane Lo Presti talk 17:42, 1 December 2016 (UTC)
Well it's gone now. Maybe it gets removed once SMW does the daily cache purge? Which I was hoping it would do since it's semantic annotations being stored somewhere. I'm glad the properties don't get orphaned at least.--Relyk ~ talk < 10:07, 2 December 2016 (UTC)
Not getting the UnusedProperties yet. Pretty sure it happened immediately when I rollbacked the wipe. Vendor query table is working fine. Next thing would start adding back just the arguments for the field values. Probably all of them before 'values from property' like Alex suspects.--Relyk ~ talk < 10:25, 2 December 2016 (UTC)
Good. I'm leaving this problem solving process to you so that I don't go and repopulate wantedproperties. -Chieftain AlexUser Chieftain Alex sig.png 17:32, 2 December 2016 (UTC)