On 14/04/15 18:51, Yang Yuanzhe wrote:
Hi there,
Sorry to trouble you again. Last month I wrote to you to figure out the
bug in text search for TDB. Given the following configuration, text
search works with TDB:
...
Comments inline:
Now we want to use text search for in-memory datasets, but we failed
after some trials, the configuration file we use is as follows:
@prefix : <#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix text: <http://jena.apache.org/text#> .
@prefix spatial: <http://jena.apache.org/spatial#> .
[] a fuseki:Server ;
fuseki:services (
<#memory>
) .
<#memory> a fuseki:Service ;
fuseki:name "memory" ;
fuseki:serviceQuery "sparql" ;
fuseki:serviceQuery "query" ;
fuseki:serviceUpdate "update" ; # SPARQL query
service -- /memory/update
fuseki:serviceUpload "upload" ; # Non-SPARQL upload
service
fuseki:serviceReadWriteGraphStore "data" ;
fuseki:serviceReadGraphStore "get" ; # Graph store
protocol (read only) -- /memory/get
fuseki:dataset :text_dataset ;
.
<#dataset> rdf:type ja:RDFDataset ;
ja:defaultGraph
[
a ja:MemoryModel ;
ja:content [ja:externalContent <file:dcat-vl.ttl> ] ;
] .
That is going to load the data each time the server starts but does not
attach it anyway to the text index.
Is it the same data as is loaded (separately) into the text index?
Similarly for the inference setup (which is in a different Lucene index
file:Text) ...
Andy
# Text
[] ja:loadClass "org.apache.jena.query.text.TextQuery" .
text:TextDataset rdfs:subClassOf ja:RDFDataset .
text:TextIndexLucene rdfs:subClassOf text:TextIndex .
:text_dataset a text:TextDataset ;
text:dataset <#dataset> ;
text:index <#textIndexLucene> ;
.
# Text index description
<#textIndexLucene> a text:TextIndexLucene ;
text:directory <file:Lucene> ;
##text:directory "mem" ;
text:entityMap <#entMap> ;
.
<#entMap> a text:EntityMap ;
text:entityField "uri" ;
text:defaultField "text" ;
text:map (
[ text:field "text" ; text:predicate rdfs:label ]
) .
...
All the tests are based on the 2.0.1 SNAPSHOT built on April 8th. Any
clue or any suggestion for this issue? Thank you very much and have a
nice day.
Regards,
Yang