I want to use only SPARQL Query where i have to search within Triples for either of the input values. I mean similar to SQL's IN Clause.
SQL - select * from employee where empid IN ('1','2','3');
I want looking for a pure SPARQL query similar to above one.
Thanks and Regards,
SPARQL 1.1 supports an IN clause:
This SPARQL 1.1 feature is available in the latest Jena Adapter.
For SEM_MATCH, you will need to use the SPARQL 1.0 approach of multiple expressions OR'ed together:
filter ( ?x = v1:123 || ?x = v1:222 || ?x = v1:333 )
There is a slight problem with the suggested filter (?x = v1:123 || v1:222 || v1:333 ) approach.
This filter becomes ( (?x = v1:123) || EBV(v1:222) || EBV(v1:333) ), where EBV is SPARQL effective boolean value:
This means that ?x is only compared with v1:123, as EBV tests on a URI will never evaluate to TRUE.
Hope this helps,