Page MenuHomePhabricator

query doesn't return pages where object is in category namespace
Closed, ResolvedPublic

Description

Author: info

Description:
I noticed the query on the http://ontoworld.org/wiki/Property:Has_category page doesn't return anything, yet there are many instances of this property. I suspect the magic word "category" in the property name "has category" causes problems, as a query for [[Has instance::+]] works fine; or maybe there's a problem retrieving objects of properties in the namespace "Category:".

I tried to reproduce this on my own install, and the query worked with one test relation [[Has category::Germany]] in the wiki but failed with the test relation [[Has test::Category:Germany]] in the wiki.

Feel free to reassign this back to me for more research.


Version: unspecified
Severity: minor
URL: http://ontoworld.org/wiki/Property:Has_category

Details

Reference
bz12253

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:58 PM
bzimport set Reference to bz12253.

info wrote:

I think it's my latter hypothesis; when the object of the property is in the namespace "Category:", queries for that property don't return it. See the test at http://ontoworld.org/wiki/SMW_unit_test:Test_relation2.

Do you have to specify the namespace for the objects of queries?

Also see the query in http://ontoworld.org/wiki/Property:Has_subclass, it leaves out a number of pages with this property.

A standard feature of SMW is to restrict sematnic queries to certain namespaces. By default, these namespaces are MAIN and IMAGE, and thus category pages are not considered in page positions in queries. This can be changed manually for single queries, or globally by extending the default namespace settings of the wiki. It is also possible to disable this filtering feature completely. I have added details on how to do that to http://ontoworld.org/wiki/SMW_unit_test:Test_relation2.

info wrote:

The bug is now FIXED because shortly before SMW 1.0 Markus changed the default to $smwgQDefaultNamespaces = NULL, so there are no default namespace restrictions for queries.