https://bugzilla.wikimedia.org/show_bug.cgi?id=19198

       Web browser: ---
           Summary: SMW Comparators use sortkey instead of page name
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: Semantic MediaWiki
        AssignedTo: [email protected]
        ReportedBy: [email protected]


In semantic mediawiki queries, the comparators appear to act on a page's
sortkey rather than the actual page name.

It's not clear to me if this is an error or if it is on purpose, but if it is
on purpose, it does not appear to be documented in the user manual.

Take a hypothetical example: one page named "John Smith" and another named
"Mary Smith." The page John Smith has the semantic property [[has mother::Mary
Smith]]. This property has type page.

Now I want to have a semantic query and return all pages that have a mother
that isn't Mary Smith. This should be done with {{#ask: [[has mother::!Mary
Smith]]}}.

That query works fine and will not return the page John Smith, as expected.

However, if Mary Smith has a sortkey specified (i.e., {{DEFAULTSORTKEY:Smith,
Mary}} somewhere in the page), this doesn't work. The query above will return
the page John Smith, which it shouldn't do.

However, the query {{#ask: [[has mother::!Smith, Mary]]}} will not.

Therefore the comparator appears to be acting on the sortkey rather than the
name of the page itself.

However, this is not the behavior without the comparator. {{#ask: [[has
mother::Mary Smith]]}} will return John Smith whether or not there is a sort
key on the Mary Smith page.

I have tested this on a private network. It is running mediawiki 1.15.0 and
semantic mediawiki 1.4.2.

As I said, it's not clear to me if this is on purpose: I can see how it would
be useful for alphabetic searching with > or < operators, for example. However,
it seems that at least the not operator ought to behave the same way as the
equality operator.


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to