Note that there are some explanatory texts on larger screens.

plurals
  1. PODifferent number of results with sesame2 and jena
    primarykey
    data
    text
    <p>I'm writing some queries which are being run on both jena and sesame2. Most of them are working correctly under sesame2 except when i specify the depth of a path. For example, if I run this query under sesame it gives me 8 results whereas jena gives 217 (the correct number).</p> <pre><code>PREFIX edge: &lt;http://danielfrentz.com/edge#&gt; PREFIX property: &lt;http://danielfrentz.com/property#&gt; select distinct ?start ?reached where{ ?start property:id \"v1\". ?start (edge:uses | edge:implements | edge:extends)+ ?reached. filter(?start != ?reached)} </code></pre> <p>So my question is, does sesame2 have a different definition of the path depth syntax? or is there another reason why I might be getting different results?</p> <p>Thanks. </p> <p>Additional details:</p> <p>I'm using 2.6.10 and trying out 2.7 beta.</p> <p>The smallest example graph I have is the following (sorry its so long):</p> <pre><code>@prefix edge: &lt;http://danielfrentz.com/edge#&gt;. @prefix edge: &lt;http://danielfrentz.com/property#&gt;. &lt;http://danielfrentz.com/v2&gt; &lt;http://danielfrentz.com/property#name&gt; "Class3". &lt;http://danielfrentz.com/v2&gt; &lt;http://danielfrentz.com/property#abstract&gt; "false". &lt;http://danielfrentz.com/v2&gt; &lt;http://danielfrentz.com/property#type&gt; "class". &lt;http://danielfrentz.com/v2&gt; &lt;http://danielfrentz.com/property#namespace&gt; "com.example". &lt;http://danielfrentz.com/v2&gt; &lt;http://danielfrentz.com/property#id&gt; "v2". &lt;http://danielfrentz.com/v1&gt; &lt;http://danielfrentz.com/property#name&gt; "Class2". &lt;http://danielfrentz.com/v1&gt; &lt;http://danielfrentz.com/property#abstract&gt; "false". &lt;http://danielfrentz.com/v1&gt; &lt;http://danielfrentz.com/property#type&gt; "class". &lt;http://danielfrentz.com/v1&gt; &lt;http://danielfrentz.com/property#namespace&gt; "com.example". &lt;http://danielfrentz.com/v1&gt; &lt;http://danielfrentz.com/property#id&gt; "v1". &lt;http://danielfrentz.com/v3&gt; &lt;http://danielfrentz.com/property#name&gt; "Class4". &lt;http://danielfrentz.com/v3&gt; &lt;http://danielfrentz.com/property#abstract&gt; "false". &lt;http://danielfrentz.com/v3&gt; &lt;http://danielfrentz.com/property#type&gt; "class". &lt;http://danielfrentz.com/v3&gt; &lt;http://danielfrentz.com/property#namespace&gt; "com.example". &lt;http://danielfrentz.com/v3&gt; &lt;http://danielfrentz.com/property#id&gt; "v3". &lt;http://danielfrentz.com/v4&gt; &lt;http://danielfrentz.com/property#name&gt; "AbstractClass1". &lt;http://danielfrentz.com/v4&gt; &lt;http://danielfrentz.com/property#abstract&gt; "true". &lt;http://danielfrentz.com/v4&gt; &lt;http://danielfrentz.com/property#type&gt; "class". &lt;http://danielfrentz.com/v4&gt; &lt;http://danielfrentz.com/property#namespace&gt; "com.example". &lt;http://danielfrentz.com/v4&gt; &lt;http://danielfrentz.com/property#id&gt; "v4". &lt;http://danielfrentz.com/v0&gt; &lt;http://danielfrentz.com/property#name&gt; "Class1". &lt;http://danielfrentz.com/v0&gt; &lt;http://danielfrentz.com/property#abstract&gt; "false". &lt;http://danielfrentz.com/v0&gt; &lt;http://danielfrentz.com/property#type&gt; "class". &lt;http://danielfrentz.com/v0&gt; &lt;http://danielfrentz.com/property#namespace&gt; "com.example". &lt;http://danielfrentz.com/v0&gt; &lt;http://danielfrentz.com/property#id&gt; "v0". &lt;http://danielfrentz.com/v5&gt; &lt;http://danielfrentz.com/property#name&gt; "Interface1". &lt;http://danielfrentz.com/v5&gt; &lt;http://danielfrentz.com/property#abstract&gt; "true". &lt;http://danielfrentz.com/v5&gt; &lt;http://danielfrentz.com/property#type&gt; "interface". &lt;http://danielfrentz.com/v5&gt; &lt;http://danielfrentz.com/property#namespace&gt; "com.example". &lt;http://danielfrentz.com/v5&gt; &lt;http://danielfrentz.com/property#id&gt; "v5". &lt;http://danielfrentz.com/v3&gt; &lt;http://danielfrentz.com/edge#extends&gt; &lt;http://danielfrentz.com/v4&gt;. &lt;http://danielfrentz.com/v2&gt; &lt;http://danielfrentz.com/edge#uses&gt; &lt;http://danielfrentz.com/v3&gt;. &lt;http://danielfrentz.com/v4&gt; &lt;http://danielfrentz.com/edge#uses&gt; &lt;http://danielfrentz.com/v2&gt;. &lt;http://danielfrentz.com/v5&gt; &lt;http://danielfrentz.com/edge#uses&gt; &lt;http://danielfrentz.com/v0&gt;. &lt;http://danielfrentz.com/v1&gt; &lt;http://danielfrentz.com/edge#implements&gt; &lt;http://danielfrentz.com/v5&gt;. &lt;http://danielfrentz.com/v0&gt; &lt;http://danielfrentz.com/edge#uses&gt; &lt;http://danielfrentz.com/v1&gt;. </code></pre> <p>The query is:</p> <pre><code>PREFIX edge: &lt;http://danielfrentz.com/edge#&gt; PREFIX property: &lt;http://danielfrentz.com/property#&gt; select distinct ?start ?reached where{ ?start property:id \"v1\". ?start (edge:uses | edge:implements | edge:extends){1,3} ?reached. FILTER (?start != ?reached)} </code></pre> <p>and the results are:</p> <pre><code>start start=http://danielfrentz.com/v1 reached reached=http://danielfrentz.com/v5 </code></pre> <p>there should be 2 results not 1. </p> <p>I should also add that when I dont use a property path (ie i use + instead of {1,3}) it gives the correct number of results.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload