Reputation: 135
I have a allegrograph knowledgebase that has hundreds of triples in it. Each triple contains subject predicate and object .I need to sort out/Index of objects based on predicate for example
Sub. Pred. Obj
d1. hasName. "abc"
Id5 hasName "bac"
Id6. hasName. "cab"
If I search with "a" it should return "abc" only, that name starts with a in above example
If I search with "b" it should return "bac" only, that name starts with b
If I search with "c" it should return "cab" only, that name starts with c
Currently I have created anindex through allegro webview but it returns all statements wherever appears "a" in the record if I search with "a*" in string query. I want only the name that start with "a" Thanks
Upvotes: 0
Views: 52
Reputation: 16630
SPARQL 1.1 has many operations:
SELECT * {
?s ?p ?o .
FILTER(strstarts(?o, "a")
}
Upvotes: 1