nepomuksearch

nepomuksearch

Sebastian Trüg

Revision 1.0.0 (2010-09-10)

Overview

The nepomuksearch protocol allows to search the Nepomuk meta data store for files or any other type of resource (although files is the most important use case since we are talking about virtual file systems here).

Note

For it to work the Nepomuk system needs to be activated. Activating the Strigi file indexer provides better results and way more search possibilities.

Typically nepomuksearch is used transparently to the user through an application like Dolphin which provide GUI elements to construct the necessary query and the corresponding URL. However, it is also possible to write a query URL manually. There are two different possibilities which might be of interest to the user (be aware that queries created as presented below are not restricted to files):

nepomuksearch:/?query=Nepomuk

will look for anything containing the word "Nepomuk". "Nepomuk" can be replaced with anything the simple the section called “Nepomuk Query Syntax” allows.

nepomuksearch:/?sparql=select ?r where { ?r nao:hasTag ?tag . ?tag nao:prefLabel 'Nepomuk'^^xsd:string . }

will execute the SPARQL query which in this case looks for all resources that are tagged with a tag that has the label "Nepomuk". Be aware that the query needs to be percent-encoded, i.e. a URI like <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#Tag> would have to be written as %3chttp:%2f%2fwww.semanticdesktop.org%2fontologies%2f2007%2f08%2f15%2fnao#Tag%3e.

Nepomuk Query Syntax

Nepomuk Query Syntax

The syntax is fairly simple. Multiple query terms can be combined with the keywords AND or OR, terms can be excluded by prefixing them with a minus, and specific properties can be searched by combining the property name with a comparator and the value.

Tip

This syntax can also be used in standard search fields such as the Dolphin one.

Examples

Nepomuk KDE or Nepomuk AND KDE

search for everything containing the words "Nepomuk" and "KDE" in any of their properties (this includes the content of files).

Nepomuk OR KDE

search for everything containing either the word "Nepomuk" or the word "KDE" in any of their properties.

"Nepomuk KDE"

search for everything containing the exact phrase "Nepomuk KDE" in any of their properties.

hastag:Nepomuk

search for everything that is tagged with a tag named "Nepomuk".

+hastag:nepomuk AND -hastag:scribo

search for everything that has a tag labeled "nepomuk" but not a tag labeled "scribo".