Last modified: 2011-03-31 15:51:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T30311, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28311 - Distorted results for comparator queries using < and > on pages with a custom {{DEFAULTSORT: }}
Distorted results for comparator queries using < and > on pages with a custom...
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Normal critical (vote)
: ---
Assigned To: Markus Krötzsch
http://offene-naturfuehrer.de
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-29 21:54 UTC by Andreas Plank
Modified: 2011-03-31 15:51 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Andreas Plank 2011-03-29 21:54:53 UTC
Hi Markus,

there is a problem in getting the rigth ask query results with pages that have a {{DEFAULTSORT: ...}}, especially with the SMW comparator syntax, let’s say, [[pagename::<searched page name]]. If there is no {{DEFAULTSORT: ...}} on those pages, the results are all fine. See example 1 of our wiki. In example 2 with a {{DEFAULTSORT: word-2, word-1}} results are messed up or some pages that should be fetched, are missing. Is there any possibility to fix this odd sorting, or at least to verify this error? Is there a wiki to test this too, placing some {{DEFAULTSORT: word-2, word-1}} on pages, http://sandbox.semantic-mediawiki.org?

We are using SMW r82579 together with MediaWiki r79596.

I hope it can be fixed, because with this comparator query we construct an auto navigation, which at the moment does not work (all the bumblebee pages for Bombus on our wiki)

Kind regards
Andreas

Example 1 searches for [[Kategorie:Literatur]][[Seitenname::<Curtis J. 1838]] and gets the right pages:
Adolphi 1995, Angermann et al. 1995, Arnold & Ovenden 2004, Benton 2000, Benton 2006, Buchenau 1936, Buttler et al. 2010, Bährmann 1995, Bährmann 2008, Chinery 1993, Christensen 2005, Curtis J. 1838
http://offene-naturfuehrer.de/web/Spezial:Semantische_Suche?title=Spezial%3ASemantische+Suche&q=%5B%5BKategorie%3ALiteratur%5D%5D%5B%5BSeitenname%3A%3A%3CCurtis+J.+1838%5D%5D&po=&sort_num=&order_num=ASC&eq=yes&p%5Bformat%5D=list&p%5Blimit%5D=20&p%5Bheaders%5D=&p%5Bmainlabel%5D=&p%5Blink%5D=&p%5Bintro%5D=&p%5Boutro%5D=&p%5Bdefault%5D=&p%5Bsep%5D=&p%5Btemplate%5D=&p%5Buserparam%5D=&p%5Bintrotemplate%5D=&p%5Boutrotemplate%5D=&eq=yes&uselang=en 

Example 2:
All Bombus pages have a {{DEFAULTSORT: ...}} with “word-2, word-1” (like “campestris, Bombus” etc.). The query [[Kategorie:Bombus – Hummeln]][[Seitenname::<Bombus vestalis]] just fetches "Bombus barbutellus". I wonder, where are the other pages in-between (Bombus barbutellus, Bombus campestris, Bombus hortorum, ...)?
http://offene-naturfuehrer.de/web/Spezial:Semantische_Suche?title=Spezial%3ASemantische+Suche&q=%5B%5BKategorie%3ABombus+%E2%80%93+Hummeln%5D%5D%5B%5BSeitenname%3A%3A%3CBombus+campestris%5D%5D&po=&sort_num=&order_num=ASC&eq=yes&p%5Bformat%5D=list&p%5Blimit%5D=20&p%5Bheaders%5D=&p%5Bmainlabel%5D=&p%5Blink%5D=&p%5Bintro%5D=&p%5Boutro%5D=&p%5Bdefault%5D=&p%5Bsep%5D=&p%5Btemplate%5D=&p%5Buserparam%5D=&p%5Bintrotemplate%5D=&p%5Boutrotemplate%5D=&eq=yes&uselang=en
Comment 1 Markus Krötzsch 2011-03-31 15:51:46 UTC
String-based searches on page-type properties always refer to the sortkey. This is intentional. So in your case, the query item [[Seitenname::<Bombus vestalis]] compares the string "Bombus vestalis" with your chosen sortkey "vestalis, Bombus". This explains why only "barbutellus, Bombus" is matching. There is no error here, just some confusion.

You may want to reconsider (a) if the sortkey is the right property for searching what you want here, and (b) if the sortkey is actually a good choice. I tried to find "Bombus vestalis" in the list of values on the page "Attribut:Seitenname" and found this very unintuitive (you may want to try it; it is really there!). So it seems that the current sortkey creates confusion in sorting and searching alike.

If you really want the sortkey to be as it is, you can always add a string property with the real pagename as its value instead. Maybe this was your intention with "Seitenname" -- as the name suggests.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links