Hey Markus, Good to hear from you!
We had to change our architecture in the meantime. I could not solve the query problem, so we are using again the default SQL store. For external queries form Java, we import the RDF export of SMW into JENA framework and then perform the queries "in memory". Of course a bad design, but it (currently) works for our use case. However, I will try the "format=debug" trick on a test system to maybe give some feedback on the issue. Thank you for this hint -- my SMW skills are bit rusty :) Best, Kai P.S.: Congratulations to your research grant -- it is great to have inspiring people like you in such positions! -----Ursprüngliche Nachricht----- Von: Markus Krötzsch [mailto:mar...@semantic-mediawiki.org] Gesendet: Montag, 23. September 2013 12:01 An: Hüner Kai Cc: semediawiki-devel@lists.sourceforge.net Betreff: Re: [SMW-devel] No response for inline query with RDF store Hi Kai, On 10/09/13 19:22, Hüner Kai wrote: > Dear SMW developers, > > I already posted this question to the SMW user group, but maybe it is more > development related. > Sorry for double posting, but I really have no idea how to proceed. > > I want to use SMW (MW: 1.21.1, SMW: 1.8.0.5) together with a Sesame RDF > database. > Everything works fine, data from SMW is updated in the RDF database, and > SPARQL queries (e.g. from Java API) are answered correctly. > > Exception: Inline queries in the wiki itself, if categories are used! > (1) '{{#ask: [[Germany]] | ?Has official name }}' works fine (obvious test > scenario: Set of countries). > (2) But '{{#ask: [[Category:Country]] | ?Has official name }}' does not > provide any result. > > If I disable the RDF store (i.e. comment $smwgDefaultStore = > 'SMWSparqlStore'; in LocalSettings.php), both inline queries work absolutely > fine. If I enable the RDF store again: No results for (2). > Of course, I run SMW_refreshData.php -ftpv and -v multiple times. > > If there is no "easy" reason for this problem, can anybody recommend another > RDF store? I just want to have a simple SPARQL endpoint for SMW with a Java > API. In general, there are two possible intermediate causes why a query might fail to return results: (1) the data was not stored correctly in the RDF store or (2) the query is not understood correctly by the RDF store (which might also be due to the query not being generated correctly by SMW). To debug, please run your query with "format=debug". This will give you the SPARQL query that SMW is using. You can then ask this query against your store directly to see if you get any results. If not, try to find out if there is data missing in the store (by running modified queries that show the stored data) or if the query is somehow wrong (e.g., using another URI when querying Categories than when storing them). One more thing: SMW in SQL supports a category hierarchy like a class hierarchy. When searching for things in Category:Country, you will also find all things that are in subcategories of country (say Category:EU_Country). This is done by SMW for SQL. For RDF, SMW relies on the RDF's store ability to interpret subclassOf -- if it does not do this, then subcategories will be ignored. Cheers, Markus ------------------------------------------------------------------------------ LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk _______________________________________________ Semediawiki-devel mailing list Semediawiki-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-devel