Query Languages
Sindice currently offers two ways to search for semantic data: Term Search and Advanced Search.
Term Search
The Term query language allows you to search for keywords and URIs in both the original and inferred content of indexed documents. This means that, for example, if you look for paolo it will match both documents containing this word in a URI, like:
<http://paolo.capriotti.name/foaf.rdf#me> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>
and those containing it in a literal:
<http://paolo.capriotti.name/foaf.rdf#me> <http://xmlns.com/foaf/0.1/givenName> "Paolo"
You can combine simple queries using boolean operators (AND, OR) and parentheses for example:
(tim AND berners AND lee) OR timbl OR http://www.w3.org/People/Berners-Lee/card
also note that the AND operator is automatically assumed when entering multiple terms.
You can additionally restrict your query by using field operators. For example, a query like 'washington' would match people with this name, the city, the football team, and so on. If you want to just look for people, you can try:
Or, if you want to exclude people from the results, you can use the '-' operator, like:
Other domain operators include:
- label, words in the title of the document
- domain, e.g. www.deri.ie
- format, RDF or MICROFORMAT
- ontology, such as skos, foaf...
Advanced Search
Sindice can also leverage the full power of the triple concepts through the advanced query language. The syntax of this query language is simple to use: the basic element is a triple pattern. A triple pattern is a complete or partial representation of a triple:
* <http://xmlns.com/foaf/0.1/weblog> * * <http://xmlns.com/foaf/0.1/name> "Renaud Delbru" * <http://xmlns.com/foaf/0.1/name> 'Renaud AND Delbru' * * "Renaud Delbru"
The symbol '*' stands for a wildcard matching one of the elements of a triple. A triple pattern composed of three '*' is not allowed, and will return no results.
The query language enables boolean combination of triple patterns using binary operators:
- AND: intersection
- OR: Union
- -: Complement (Include - Exclude)
- (): Grouping
For example, you can try combining two triple queries:
* <http://sindice.com/exfn/0.1/friend> <http://klogs.org> AND * <http://sindice.com/exfn/0.1/friend> <http://www.isaacmao.com>
But you can also use the same operators in a literal pattern defined by single quotes, for example try this query:
* <http://sindice.com/hlisting/0.1/itemName>
'ipod AND (nano OR shuffle)'
If a literal element is enclosed in double quotes, an exact match will be performed. The query language also allows multiple operators, for example:
(* <http://xmlns.com/foaf/0.1/givenname> "Giovanni" AND * <http://xmlns.com/foaf/0.1/family_name> "Tummarello") OR * <http://xmlns.com/foaf/0.1/name> "Giovanni Tummarello"
will find matches for either a pair of given and family name, or a single full name.
Api Documentation
- Query Languages
- API Documentation
- Ping Submission
- SIOC API
- RDFizer API
- Microformat Support
