Closed andrecastro0o closed 4 years ago
You do not get any results in your ask-query since your are 1. searching in the reference though the key is sorted in the resource and 2. You are sorting by a property not set and not asked for output. This query should get you results:
{{#ask:
[[-Citation resource::+]]
|?Citation key
|format=broadtable
|limit=50
|offset=0
|link=subject
|sort=Citation key
|order=asc
|headers=show
|searchlabel=... further results
|class=sortable wikitable smwtable
}}
Note that the citation resource is a container property acting like a subobject. Thus the -
in front.
Indeed, I think some query examples should be added to the docs to make things easier for starters.
Thank you @kghbln . The sorting property, was plain distraction from my side. I think the new/foreign element in this case is the citation resource being a "container property", that acts like a subobject. This is something I did not come across before in SMW (don't know it is even mentioned in the user documentation). But it explains why the factsbox of a Citation resource does not showing the properties of the resurce. (ie. http://oooooooooo.io/index.php/Byrne_2008).
Examples are always helpful. And I think it would be useful to explain somewhere what is a "container property" and the role of [[-Property::+]]
in an ask query.
Thanks
Setup and configuration
Issue: Ask failing to return Property
Citation reference
valuesI am playing around with Semantic Cite. Have a couple of citation resources and a couple of Citation references in a page
When I run an simple ask query, to find what Citation references are in the wiki, i get no results.
I reproduce the same query in SPARQL query and I get the correct results
What seems to be causing it is SPARQL query performed by the Ask query adds a the condition
?result bibo:title ?v2 .
to every query, although the property is being queried, as is the case shown in the Ask's SPARQLStore debug output:Why would this condition be there?
Ask debug:
SPARQLStore debug output
ASK Query
[[Citation reference::+]]
'Ask query
SPARQL query & Results