Click here to Skip to main content
15,945,334 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
following is my query string, i want to do fulltext search from eclipse end to sparql engin.


C#
String queryString3 =   "select  ?object WHERE { ?subject ?predicate ?object FILTER ( ?object contains  "+"'"+SearchObject+"'"+")";


error::
XML
com.hp.hpl.jena.query.QueryParseException: Encountered " "CONTAINS" "contains "" at line 1, column 70.
Was expecting one of:
    "in" ...
    <NOT_IN> ...
    <INTEGER_POSITIVE> ...
    <DECIMAL_POSITIVE> ...
    <DOUBLE_POSITIVE> ...
    <INTEGER_NEGATIVE> ...
    <DECIMAL_NEGATIVE> ...
    <DOUBLE_NEGATIVE> ...
    ")" ...
    "=" ...
    "!=" ...
    ">" ...
    "<" ...
    "<=" ...
    ">=" ...
    "||" ...
    "&&" ...
    "+" ...
    "-" ...
    "*" ...
    "/" ...

    com.hp.hpl.jena.sparql.lang.ParserSPARQL11.perform(ParserSPARQL11.java:87)
    com.hp.hpl.jena.sparql.lang.ParserSPARQL11.parse(ParserSPARQL11.java:40)
    com.hp.hpl.jena.query.QueryFactory.parse(QueryFactory.java:132)
    com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:69)
    com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:40)
    com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:28)
    eventlog.logsearchservlet.doPost(logsearchservlet.java:87)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
Posted
Comments
Sudhakar Shinde 25-Jun-13 7:57am    
Check the syntax of SELECT statement which is wrong.
Shubhashish_Mandal 25-Jun-13 8:14am    
syntax of contain should be like
CONTAINS(string literal arg1, string literal arg2)
Here is the link that may help you
http://www.w3.org/TR/sparql11-query/#func-contains
Member 3369145 25-Jun-13 8:27am    
i followed this syntax from the link
http://www.w3.org/2009/sparql/wiki/Feature:FullText#Feature:_Full_Text_Search
but not working, :(


?s ?p ?o .
FILTER ( ?p IN (dct:title, foaf:name, rdfs:label)) .
FILTER ( ?o contains "foo*" ) .

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900