Query language
About Sindice search
Sindice supports two query notations:- Simple - Search based on keywords and URIs
- Advanced - Search based on our advanced query language to express complex requests by combining keyword search, structured (ntriple) queries and filtering options
Keyword query
Keyword query allows you to find all the relevant documents that contain either a keyword or a URI using full-text search syntax. For example, you can search for all documents mentioning Berlin (click to try) or referencing Tim Berners Lee's FOAF file (click to try)
Basic keyword queries made up of words, URIs and quoted phrases will match documents containing all terms in the query. Example:
Simple boolean queries with some words or phrases preceded by a '+' to indicate that a word or phrase must be present for a document to match, or by a '-' to indicate that it must not be present. If a '+' is present, words or phrases that are not preceded by a '+' or '-' in the query are interpreted as 'optional', i.e., they are not required for documents to match. For example, the following query will match all documents which must contain the word 'pet' and must not contain the word 'snakes' and may contain the words 'cat', 'dog', 'fish', 'rabbit':
Full Boolean queries, using any combination of the Boolean operators AND, OR, NOT and an unlimited number of matching parentheses. The AND and OR operators may be any case, but the NOT operator must always be upper case. Configuration settings can be used to alter these defaults. For example,
QName queries makes the search of URIs easier by using abreviations for well known namespaces:
The following abbreviations are supported:
- foaf=http://xmlns.com/foaf/0.1/
- dc=http://purl.org/dc/elements/1.1/,http://purl.org/dc/terms/
- owl=http://www.w3.org/2002/07/owl#
- rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#
- rdfs=http://www.w3.org/2000/01/rdf-schema#
- skos=http://www.w3.org/2004/02/skos/core#
- pimo=http://www.semanticdesktop.org/ontologies/2007/11/01/pimo#
- swc=http://data.semanticweb.org/ns/swc/ontology#
- sioct=http://rdfs.org/sioc/types#
- void=http://rdfs.org/ns/void#
- sioc=http://rdfs.org/sioc/ns#
- dbpedia=http://dbpedia.org/resource/,http://dbpedia.org/dbprop/,http://dbpedia.org/property/
- bio=http://purl.org/vocab/bio/0.1/,http://vocab.org/bio/0.1/
- doap=http://usefulinc.com/ns/doap#
- og=http://opengraphprotocol.org/schema/
- gr=http://purl.org/goodrelations/v1#
Ntriple Query
Ntriple queries produce precise search results using simple, but powerful triple patterns to represent partial or complete triples. A “triple pattern” is a complete or partial representation of a triple s, p, o, where one can use the wildcard symbol "*" to substitute any part of the triple:
find people called Renaud Delbru:
Full-text search is supported on any part of the triple, which means that you can use the previously described 'Keyword Query' syntax to describe your subject, property or object. One should encompass the keyword query between '<' and '>' for URI patterns or between single quotes for literal patterns. The use of double quotes for a literal indicates a phrase query.
find offers for iPods with boolean operators:
Triple patterns can be combined with boolean operators (AND, OR, NOT) and matching parentheses:
find someone called "Giovanni Tummarello" ignoring the wording:
Filter Query
The advanced search interface also provides options to filter search results using filter queries. A filter query is a keyword query over a particular metadata of the data collection. A filter query must always be used in conjunction with a keyword or a ntriple query. Sindice currently proposes filter queries over seven metadata fields:
- url: The url of the document
- domain: The domain of the document
- class: The list of classes used in the document
- predicate: The list of predicates used in the document
- ontology: The list of ontologies used in the document (based on our ontology closure mechanism)
- format: The data formats (RDF, MICROFORMAT, RDFA, ...) detected in the document
- date: A period of time (today, yesterday, last_week, ...) the document has been indexed
Full-text search is supported for filter queries, which means that one can restrict the search results by the previously described 'Keyword Query' syntax over a metadata field.
Boolean queries should be encompassed by parenthesis:
Combining keyword, ntriple and filter queries
It is possible to combine keyword, ntriple and filter queries using our advanced or guru query interface. This interface will help you to easily create complex queries. Sindice will perform an intersection between the keyword, ntriple and filter queries.
Need help?If you experience problems with our search or you're not clear about the features, ask us in our sindice-dev group.
Api Documentation
- Sindice API
- Query language
- Sindice Search API
- Sindice Cache API
- Sindice Live API
- Ping Submission API
- Metadata extractions
Tools
- AJAX Search Widget
- Third Party Libraries
- Siren indexing technology
- Web Data Inspector
- Any23 Library
- OpenSearch Plugin