Hi Shri,

Question: Why do you have a TransactionalGraphManager as, in your code, you are 
not writing anything to disk? This makes me believe that you have another 
snippet of code that is writing data to the graph. Are you sure all your data 
is in the graph? -- How did you construct "dataset" (from new 
Neo4jGraph("dataset")).

Thanks,
Marko.

http://markorodriguez.com

On Aug 31, 2011, at 6:37 AM, shri wrote:

> Hi all,
> 
> 
> 
>  I am working with Neo4j system and Sparql queries as a part of my thesis
> and I am very very new these concepts. I have loaded the RDF dataset into
> Neo4j and now trying to query the results. My problem is, only half of my
> query is working and giving results but the query as a whole is not
> returning any result. this is leaving me clueless and I have no idea why
> this is happening..Kindly help me out with a solution.Thanks in advance!!
> 
> I have used the Sail interface for query parsing and evaluating
> 
> Here is the snippet:
> 
> 
> Neo4jGraph neo = new Neo4jGraph("dataset");
>     Sail sail = new GraphSail(neo);
>     sail.initialize();
>     CommitManager manager =
> TransactionalGraphHelper.createCommitManager(neo, 10000);
>       SailConnection sc= sail.getConnection();
>       Query1 ext=new Query1();
>       SPARQLParser parser = new SPARQLParser();
>     CloseableIteration<? extends BindingSet, QueryEvaluationException>
> sparqlResults;
> 
> String queryString = "PREFIX bsbm:
> &lt;http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/&gt; " +
> "PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; " +
> "PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; " +
> "SELECT DISTINCT ?product ?label " +
> "WHERE { " +
> " ?product rdf:type
> &lt;http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductType2&gt;
> . " +
> " ?product rdfs:label ?label . }";
> /*"?product bsbm:productFeature
> &lt;http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductFeature35&gt;.";
> + 
> "?product bsbm:productFeature
> &lt;http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductFeature36&gt;
> . " +
> "?product bsbm:productPropertyNumeric1 ?value1 . " +
> "FILTER (?value1 > 3) } " +
> "ORDER BY ?label " +
> "LIMIT 10";*/
>     try {
> 
> ParsedQuery query = parser.parseQuery(queryString,
> "http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/";);
>         System.out.println("\nSPARQL: " + queryString);
> 
>     sparqlResults = sc.evaluate(query.getTupleExpr(), query.getDataset(),
> new EmptyBindingSet(), false);
>     while (sparqlResults.hasNext()) {
>         System.out.println(sparqlResults.next());
>     }
> 
> 
> IS IT ANY THING TO DO WITH INDEXING ??
> 
> 
> P.S  The commented portion of my query in the snippet is NOT working
> 
> 
> cheers,
> shri
> 
> 
> --
> View this message in context: 
> http://neo4j-community-discussions.438527.n3.nabble.com/problem-in-SPARQL-querying-tp3298204p3298204.html
> Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
> _______________________________________________
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user

_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to