Full-Text Search

Top  Previous  Next

Full-text search against topic labels and property values is supported through an extension predicate <http://www.networkedplanet.com/web3/tmsparql/providers/fulltext/matches>. This predicate maps a topic as the subject of the predicate to a full-text search term as the object of the predicate. The full-text search term must be specified as a literal string value.

 

For example, the following query finds all topics of a particular type that also have a label or property value that matches a full-text search query:

 

PREFIX ont: <http://www.networkedplanet.com/ontology/employment/>
PREFIX tms: <http://www.networkedplanet.com/tmsparql/>
PREFIX ft: <http://www.networkedplanet.com/web3/tmsparql/providers/fulltext/>
 
SELECT ?person ?employer WHERE {
  ?person a ont:person .
  ?person ft:matches "alf"
}

The full-text search string currently supports a list of space-separated search terms where each term can be either a complete word or a prefix followed by a * (e.g. alf* to match "Alfred", "Alfie" and "Alf").