System.out.println("ARQ Example: "+Utils.classShortName(ExLucene2.class)) ;
System.out.println("ARQ: "+ARQ.VERSION) ;
System.out.println() ;
Model model = ModelFactory.createDefaultModel() ;
IndexLARQ index = ExLucene1.buildIndex(model, "src/test/resources/LARQ/data-1.ttl") ;
// Search for string
String searchString = "+document" ;
// This time, find documents with a matching DC title.
String queryString = StrUtils.strjoin("\n",
"PREFIX pf: <http://jena.hpl.hp.com/ARQ/property#>",
"PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>" ,
"PREFIX dc: <http://purl.org/dc/elements/1.1/>",
"PREFIX : <http://example/>" ,
"SELECT ?doc ?title {" ,
" ?title pf:textMatch '"+searchString+"'.",
" ?doc dc:title ?title",
"}") ;
// Two of three documents should match.
ExLucene1.performQuery(model, index, queryString) ;
index.close() ;
}