We're having trouble figuring out how to escape the hyphen character when using Lucene search. We're using double backslash to escape:
- the Sparql backslash
- the hyphen in Lucene
In this query everything after the hyphen is ignored.
It'd be much appreciated if anybody could give us advice on how to incorporate the dash in the search term or to ignore the dash.
SELECT DISTINCT * WHERE {
{
?text tm: "empa\\-reg"^^xsd:string .
?trial a linkedct:trial;
?predicate1 ?text.
}
UNION
{
?text tm: "empa\\-reg"^^xsd:string .
?trial a linkedct:trial;
?predicate1 [?predicate2 ?text].
}
}