Page MenuHomePhabricator

Filter for ask output
Closed, DeclinedPublic

Description

Author: dasch

Description:
Well like you can see on this page
http://www.wecowi.de/wiki/1941
there are some double entries and this look very uggly. Maybe there could be something like a filter-option to change the behaviour how to handle doublets and other things


Version: unspecified
Severity: enhancement

Details

Reference
bz22547

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:00 PM
bzimport set Reference to bz22547.

Normally, SMW does never display duplicate values. If you look at the generated database query (format=debug) you can see that it uses "SELECT DISTINCT" and that the fields that it selects are only those that determine the result page. So no page should occur twice unless (1) MySQL returns the same results twice in spite of "DISTINCT," or (2) the database contains multiple instances of that page with different values (as MySQL sees them) but these values still are translated into the same page link when displayed.

I did some tests on your site and I think I can exclude (2) since it would also show on other queries. In particular, the problem on your site only occurs when sorting is used. Yet, (1) is also fairly improbable, since this would be a major MySQL bug. So we do not have any likely explanation.

I have been trying to reproduce the problem on other wikis but without success. On your site, the problem only occurs when sorting by the property "Datum (Geschichte)." The duplicated page has two values for this property, where one is inherited by a subproperty "Ende (Geschichte)." This modelling seems to be the main problem, yet I cannot reproduce the problem when reproducing such a situation elsewhere. I am not sure if you are aware of the ramifications of your the way that dates are modelled in your wiki -- in general, I would not consider it very good practice to order query results by a property that is likely to have more than one value for a page, so maybe you want to change this anyway.

There are two possible ways forward: (a) you change the way that super properties are used for sorting in your wiki, maybe by using some other property for sorting, or (b) you manage to reproduce the problem on sandbox.sematnic-mediawiki.org where I have a chance to inspect it more closely for finding a fix. For now, I have to close this as worksforme.