FILTER NOT EXISTS not supported?

68 views
Skip to first unread message

Alberto Simoes

unread,
Jun 12, 2013, 4:50:17 PM6/12/13
to 4store-...@googlegroups.com
Hello

I know SPARQL 1.1 Update is not fully implemented. But it might be implemented and I just not knowing how to use, or it might be easy to implement or fix.
Or, probably, there is another way to obtain the same behavior.

This query:

     PREFIX w: <http://dicionario-aberto.net/rdf/w#>
     PREFIX r: <http://dicionario-aberto.net/rdf/r#>

     WITH <http://dicionario-aberto.net/rdf/>
     INSERT { ?x r:SYN ?y }
     WHERE {
        ?y r:SYN ?x.
        FILTER NOT EXISTS { ?x r:SYN ?y }
     }

The idea is to add inverse relations (in this case, reflexive), just in case they do not exist.

Before trying it I tried with construct:

     PREFIX w: <http://dicionario-aberto.net/rdf/w#>
     PREFIX r: <http://dicionario-aberto.net/rdf/r#>

     CONSTRUCT { ?x r:SYN ?y }
     WHERE {
        ?y r:SYN ?x.
        FILTER NOT EXISTS { ?x r:SYN ?y }
     }

But I get:

   parser error: syntax error, unexpected NOT on line 7

Any hint?

Thank you
Alberto



Steve Harris

unread,
Jun 13, 2013, 5:06:09 AM6/13/13
to 4store-...@googlegroups.com
Use MINUS instead of FILTER NOT EXISTS.

You need a recent 4store, and recent rasqal though.

- Steve

--
You received this message because you are subscribed to the Google Groups "4store-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 4store-support+u...@googlegroups.com.
To post to this group, send email to 4store-sup...@googlegroups.com.
Visit this group at http://groups.google.com/group/4store-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

-- 
Steve Harris
Experian
Registered in England and Wales 653331 VAT # 887 1335 93
80 Victoria Street, London, SW1E 5JL

Alberto Simões

unread,
Jun 13, 2013, 6:58:09 AM6/13/13
to 4store-...@googlegroups.com
Hello

Will try with MINUS. I confess I've read the standard, but wasn't able to really understand the difference :-)
Using 4store-git-head, but latest release of rasqal.

Will report soon.
Thanks



--
You received this message because you are subscribed to a topic in the Google Groups "4store-support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/4store-support/k0ny4w8nZ9w/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to 4store-suppor...@googlegroups.com.
To post to this group, send email to 4store-...@googlegroups.com.



--
Alberto Simões

Steve Harris

unread,
Jun 13, 2013, 7:29:36 AM6/13/13
to 4store-...@googlegroups.com
The difference is *extremely* subtle to the end user, but for complex reasons MINUS is both easier to implement, and much more efficient in 4store.

- Steve

Andrew Frank

unread,
Jun 7, 2014, 2:05:25 AM6/7/14
to 4store-...@googlegroups.com
i appreciated the answer to this post and it would be EXTREMELY helpful if 4store would post on their page which parts of SPARQL 1.1 are implemented and which not. I do not have a problem with using MINUS, except for the loss of time till i found the answer here.

andrew

Reply all
Reply to author
Forward
0 new messages