Last modified: 2012-02-11 15:44:01 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 T32989, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30989 - SMW 1.6.1 - Query Modification date property fails when using SMWSparqlStore
SMW 1.6.1 - Query Modification date property fails when using SMWSparqlStore
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-19 12:59 UTC by Matt Voysey
Modified: 2012-02-11 15:44 UTC (History)
2 users (show)

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


Attachments

Description Matt Voysey 2011-09-19 12:59:19 UTC
When using SMQSparqlStore to store data in external triplestore, an ask query of the form:

{{#ask: [[Modification date::>2011-09-05]]
| ?Modification date
}}

fails to return any results. The same query functions properly if $smwgDefaultStore is set back to "SMWSQLStore2".

This is because the SPARQL query that gets generated for the above #ask query is incorrect:

SELECT DISTINCT ?result WHERE {
?result swivt:wikiPageSortKey ?resultsk .
?result property:Modification_date-23aux ?v1 .
{ FILTER( ?v1 >= "2455809.5"^^xsd:double )
}}

The above SPARQL refers to "property:Modification_date-23aux" whereas in fact the page modification date is represented in the RDF triplestore by the property <http://semantic-mediawiki.org/swivt/1.0#wikiPageModificationDate>. This has always been the case and is the same for the RDF export functionality.

I guess "Modification date" needs to be handled as a special case, not a standard property?
Comment 1 Markus Krötzsch 2012-02-11 15:44:01 UTC
Fixed in r111241.

However, the problem was not in the wrong query. The query is actually mostly correct. SMW stores dates redundantly in RDF because many RDF stores do not support dates, or only support them in a limited range (in contrast, SMW's date type can store remote past and future times as well as current events). Therefore, every SMW date is also stored in a numerical form that is used for sorting and querying. This had been missing for Modification date, hence the query did not find results.

The fix was to store the required data. Therefore, the update will only take effect for new modifications but not fix the entries for existing pages. A general SMW data update (Special:SMWAdmin) could be used to refresh all pages' data.

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


Navigation
Links