Filtering deleted pages seems not to work with SQLStore3 as well


I'm not aware that this issue still persists in 2.0. If you can a provide a producible scenario and post it on [0] with reference to this thread (together with the versions used MW/SMW/+ other SMW related extensions). [1] is related to the SPARQLStore and was fixed in SMW 2.1.



19:29, 8 January 2015

Thank you very much for looking into my test wiki and for your analysis. Since I think the answer you sent me might be interesting for other people as well, I post an extract of your mail here:

MWJames mailed on 9 January 2015 at 18:18: Your ask query actually means "give me all pages in namespace Test" because Test: is registered as separate NS.

{{#ask: [[Test:+]]
| ?attribute1
| ?attribute2

Since it is an unconditional query, it returns all possible pages even those deleted because the SQLStore doesn't delete a subject entry it sets it to be empty [0] leaving the subject (Page3/Page4) to remain in the smw_object_ids table. See also note [1], which states that "TODO: Possibly delete ID here (at least for non-properties/categories, if not used in any place in rels2)"

I added a simple condition to the query and got rid of the empty pages in the result:

{{#ask: [[Test:+]] [[attribute1::+]]
| ?attribute1
| ?attribute2

MWJames, thank you very much for your fast reply and your analysis.

20:44, 9 January 2015