On Sat, Feb 28, 2015 at 4:28 PM, Andy Seaborne <[email protected]> wrote:
> On 28/02/15 14:25, Charles Abela wrote: > >> Re-hi, >> still at it with no success, unfortunately. >> > > This does not look right: > > iii. I start the server > > ./fuseki-server --update --mem /ds > That's an in-memory dataset. > I don't see where it's getting any data from, let alone some triples. > > I would have expected: > > ./fuseki-server --config=config-tdb-text.ttl > > Did you do anything else after starting the server? > I load the books.ttl via the upload feature in the fuseki control panel. > How are you executing the query? > using the sprql query endpoint. Later on I will be doing this programmatically. C > > Andy > > > The process I'm following is the following: >> i. I'm calling the tdb loader which executes fine as below: >> java -cp fuseki-server.jar tdb.tdbloader --loc=DB data/books.ttl >> INFO -- Start triples data phase >> INFO ** Load into triples table with existing data >> INFO -- Start quads data phase >> INFO ** Load empty quads table >> INFO Load: data/books.ttl -- 2015/02/28 15:04:33 CET >> INFO -- Finish triples data phase >> INFO ** Data: 17 triples loaded in 0.47 seconds [Rate: 36.17 >> per >> second] >> INFO -- Finish quads data phase >> INFO -- Start triples index phase >> INFO -- Finish triples index phase >> INFO -- Finish triples load >> INFO ** Completed: 17 triples loaded in 0.57 seconds [Rate: >> 30.04 >> per second] >> INFO -- Finish quads load >> >> ii. Im then calling the textindexer which seems to execute of as well, >> since it says that 7 properties were indexed: >> java -cp fuseki-server.jar jena.textindexer >> --desc=config-tdb-text.ttl >> INFO 7 (7 per second) properties indexed >> >> iii. I start the server >> ./fuseki-server --update --mem /ds >> 15:05:27 INFO Dataset: in-memory15:05:28 INFO Dataset path = /ds >> 15:05:28 INFO Fuseki 1.1.1 2014-10-02T16:36:17+0100 >> 15:05:28 INFO Started 2015/02/28 15:05:28 CET on port 3030 >> >> When I execute the query without including text:query >> >> PREFIX text: <http://jena.apache.org/text#> >> PREFIX dc: <http://purl.org/dc/elements/1.1/> >> PREFIX book: <http://example.org/book/> >> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> >> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> >> >> SELECT ?s { ?s dc:title ?x . } >> >> the query executes fine and the result is all the book instances >> >> however whenever I include ....text:query in any of the mentioned ways, >> the >> result returns nothing. >> >> the assembler I;'m using is the config-tdb-text as follows: >> >> # TDB >> [] ja:loadClass "com.hp.hpl.jena.tdb.TDB" . >> tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset . >> tdb:GraphTDB rdfs:subClassOf ja:Model . >> >> # Text >> [] ja:loadClass "org.apache.jena.query.text.TextQuery" . >> text:TextDataset rdfs:subClassOf ja:RDFDataset . >> #text:TextIndexSolr rdfs:subClassOf text:TextIndex . >> text:TextIndexLucene rdfs:subClassOf text:TextIndex . >> >> ##------------------------------------------------------------------ >> >> <#service_text_tdb> rdf:type fuseki:Service ; >> rdfs:label "TDB/text service" ; >> fuseki:name "ds" ; >> fuseki:serviceQuery "query" ; >> fuseki:serviceQuery "sparql" ; >> fuseki:serviceUpdate "update" ; >> fuseki:serviceUpload "upload" ; >> fuseki:serviceReadGraphStore "get" ; >> fuseki:serviceReadWriteGraphStore "data" ; >> fuseki:dataset <#books> ; >> . >> >> <#books> rdf:type text:TextDataset ; >> text:dataset <#dataset> ; >> ##text:index <#indexSolr> ; >> text:index <#indexLucene> ; >> . >> >> <#dataset> rdf:type tdb:DatasetTDB ; >> tdb:location "DB" ; >> ##tdb:unionDefaultGraph true ; >> . >> >> <#indexLucene> a text:TextIndexLucene ; >> text:directory <file:Lucene> ; >> ##text:directory "mem" ; >> text:entityMap <#entMap> ; >> . >> >> <#entMap> I've defined in my previous email. >> >> any ideas as to why I'm not getting any results is greatly appreciated. >> >> cheers >> >> >> On Fri, Feb 27, 2015 at 11:43 PM, Charles Abela <[email protected]> >> wrote: >> >> I did not understand your question re the assembler and how it is >>> connecting the dataset to the index. Can you elaborate pls? >>> Re the queries I had tried them already. This one >>> >>> SELECT ?s { ?s dc:title ?x } >>> >>> returned fine, while others did not return anything. >>> >>> >>> On Fri, Feb 27, 2015 at 9:42 PM, Andy Seaborne <[email protected]> wrote: >>> >>> On 27/02/15 14:07, Charles Abela wrote: >>>> >>>> Hi, >>>>> I've managed to configure and run jena-fuseki. I used the >>>>> config-tdb-text.ttl and created a lucene index over the books.ttl >>>>> example >>>>> (7 properties were indexed). However when I execute the query >>>>> >>>>> PREFIX text: <http://jena.apache.org/text#> >>>>> PREFIX dc: <http://purl.org/dc/elements/1.1/> >>>>> PREFIX book: <http://example.org/book/> >>>>> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> >>>>> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> >>>>> >>>>> SELECT ?s >>>>> { ?s dc:title ?x . >>>>> ?s text:query (dc:title 'Harry') ; >>>>> } >>>>> >>>>> no tuples are returned. >>>>> >>>>> I've configured <#entMap> as follows: >>>>> >>>>> >>>> How is the assembler connecting the dataset to the text index? >>>> >>>> >>>> <#entMap> a text:EntityMap ; >>>>> text:entityField "uri" ; >>>>> text:defaultField "text" ; ## Should be defined in the >>>>> text:map. >>>>> text:map ( >>>>> [ text:field "text" ; >>>>> text:predicate dc:title; >>>>> text:analyzer [ >>>>> a text:StandardAnalyzer ; >>>>> text:stopWords ("a" "an" "and" "but") >>>>> ] >>>>> ] >>>>> ) . >>>>> >>>>> am I on the right track here? >>>>> >>>>> >>>> Yes >>>> >>>> >>>> am I missing or doing something wrong? >>>>> >>>>> >>>> Not obviously to me. >>>> >>>> >>>> thanks in advance >>>>> >>>>> >>>>> Try some debugging: these queries will poke into the database: >>>> >>>> SELECT ?s { ?s dc:title ?x } >>>> >>>> SELECT ?s { ?s text:query ('Harry') } >>>> >>>> SELECT ?s { ?s text:query (dc:title 'Harry') } >>>> >>>> Andy >>>> >>>> >>>> >>>> >>> >> >
