https://bugzilla.wikimedia.org/show_bug.cgi?id=33705
Web browser: ---
Bug #: 33705
Summary: Sorting by property drops results where that property
value is not set
Product: MediaWiki extensions
Version: any
Platform: All
URL: http://tieteentermipankki.fi/wiki/Testisivu
OS/Version: All
Status: NEW
Severity: critical
Priority: Unprioritized
Component: Semantic MediaWiki
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
See the example page.
Apparently this is well known bug, but I couldn't find it from this bugzilla. I
was able to dig into the queries:
Default sort:
SELECT DISTINCT t3.smw_id AS id,t3.smw_title AS t,t3.smw_namespace AS
ns,t3.smw_iw AS iw,t3.smw_subobject AS so,t3.smw_sortkey AS sortkey
FROM `smw_ids` AS t3 INNER JOIN `smw_rels2` AS t0 ON t3.smw_id=t0.s_id
WHERE (t0.p_id='821' AND t0.o_id='6343')
ORDER BY t3.smw_sortkey ASC LIMIT 21;
Other sort:
SELECT DISTINCT t3.smw_id AS id,t3.smw_title AS t,t3.smw_namespace AS
ns,t3.smw_iw AS iw,t3.smw_subobject AS so,t3.smw_sortkey AS sortkey
FROM `smw_ids` AS t3 INNER JOIN `smw_rels2` AS t0 ON t3.smw_id=t0.s_id
INNER JOIN `smw_atts2` AS t5 ON t3.smw_id=t5.s_id
WHERE (t0.p_id='821' AND t0.o_id='6343') AND (t5.p_id='803')
ORDER BY t5.value_xsd ASC LIMIT 21;
By changing INNER JOIN to OUTER JOIN and removing the new AND condition I get
some results, but my SQL skills are not enough to determine whether it would
also return bogus results in some cases.
And even if that was the correct query, I'm not able to change the SMW query
generator to make such query.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l