Skip to content
Sections
Personal tools
You are here: Home » Documentation » Searching Gnowsis

Searching Gnowsis

Document Actions
Gnowsis has a search service that can be queried using several methods

Searching Gnowsis

In principal there are two different approaches to search in gnowsis, which support basic human ways of searching.

  • Browsing search, Navigational Search
  • Fulltext search, Query search

A quite old fact: when people know where a file is, they will walk there along a short path and find the file. If the location of the file is not known or a walk fails, people use fulltext search [1]. For the browsing or navigational search, we have build the enquire2 RDF browser. It allows to jump from one resource to another based on links between resources. The browser has a basic smushing support, meaning it relates and aggregates resources based on inverse functional properties.

Fulltext and query search is provided by the query search service, which is described below.

The main interface to gnowsis search will be a web interface that looks like this.

[1] Finding and Reminding: File Organization from the Desktop, Deborah Barreau and Bonnie A. Nardi

Query Search Service

The search service is a special service inside gnowsis that is responsible for crawling the data sources and storing the data in a RDF database. The reason for a crawling and searching service is simple: the adapters are often too simple and not fast enough to provide a good search interface. The search service has the following features

  • crawling adapters
  • storing search data in a RDF database buffer
  • providing access to the buffered data

Crawling adapters

once you have your adapters configured, the crawler can index them for RDF querying. The crawler has to be started manually, through the enquire2 user interface and the search options pane there. The crawler will use the adapter implementation and call methods of it to extract the rdf from the adapter

Search RDF Database

all extracted data is stored in a searchable RDF database. At the moment, the standard RDF database is a text file that is loaded into memory. You can confiugre the search database to use a MySQL backed model (which is recommended when you intend to use the service). To configure the search database, look at the Search Service Documentation

Searching the database

The database is accessible either through a Java api or through a web interface. The Java api is accessed through Gnowsis.getSearch(), to run a query against this model you would use the usual Jena querying facilities on this model: Gnowsis.getSearch().getSearchModel()

Alternatively, you can use our SPARQL and Joseki bindings to search the search service. This is the recommended way if you want to build GUI applications that interact with gnowsis. The Joseki binding is a web service, meaning it is a service that runs on a local http port (usually 9998) and answers to the Joseki specification (see Joseki). You have to download the gnoJoseki service for gnowsis, configure it a little and open this local website: http://localhost:9998/gnoJoseki/query.html. The search servlet itself will run under an address that is configured in the gnoJoseki module.

Query examples for SPARQL are:

get the names of all persons using SPARQL

PREFIX dc:      
PREFIX foaf:    
PREFIX rdfs:    
SELECT ?person ?name WHERE { $person foaf:name $name}

using our new quadstore it works like this

PREFIX dc:      
PREFIX foaf:    
PREFIX rdfs:    
SELECT ?person ?name ?source WHERE {GRAPH ?source { $person foaf:name $name}}

get leo

PREFIX dc:      
PREFIX foaf:    
PREFIX rdfs:    
SELECT ?person WHERE { ?person foaf:mbox . }

describe leo

PREFIX dc:      
PREFIX foaf:    
PREFIX rdfs:    
DESCRIBE ?person WHERE { ?person foaf:mbox . }

be a bad spambot

PREFIX dc:      
PREFIX foaf:    
PREFIX rdfs:    
SELECT ?mbox WHERE { ?person foaf:mbox ?mbox. }

what emails were sent to mr schwarz?

PREFIX dc:      
PREFIX foaf:    
PREFIX rdfs:    
PREFIX mail:    
SELECT ?x ?subject WHERE 
{ 
 ?x mail:subject ?subject.
 ?x mail:to ?person. 
 ?person foaf:mbox . 
}

what emails were sent to mr schwarz?

PREFIX dc:      
PREFIX foaf:    
PREFIX rdfs:    
PREFIX mail:    
SELECT ?x ?subject WHERE 
{GRAPH ?source
{ 
 ?x mail:subject ?subject.
 ?x mail:to ?person. 
 ?person foaf:mbox . 
}
}

all appointments

PREFIX rdfs:    
PREFIX rdf:     
PREFIX mail:    
PREFIX ical:    
DESCRIBE ?x WHERE 
{?x rdf:type .}

all files

PREFIX rdf:  
                        PREFIX rdfs: 
                        SELECT ?source ?x  
                        WHERE { GRAPH ?source { 
                        { ?x rdf:type  }  }}

Created by manager
Last modified 2005-06-22 12:05 PM
 

Powered by Plone

This site conforms to the following standards: