Hi Deleting triples still leaves them in the Lucene text search index. This leads to some questions
1) Is this expected behaviour?
2) If it's not, what did I do wrong?
3) If it is, do I have to re-run jena.textindexer again to keep it
up-to-date? This is a pain, because I have to stop fuseki in order to
do it.
Steps to replicate
I'm running:
Fuseki 2.3.0 2015-07-25T17:11:28+0000
Attached is my config to set up the spatial index
1a) Insert a triple into an empty database
INSERT DATA {
<urn:uuid:abc> rdfs:label "abc"@en
}
1b) Query for it with the text label
SELECT ?s
{ ?s text:query "abc" .
}
returns
------------------
| s |
==================
| <urn:uuid:abc> |
------------------
1c) ASK if there are any triples with subject <urn:uuid:abc>
ASK
{
?s ?p ?o . filter(?s = <urn:uuid:abc>)
}
Returns "yes"
2a) Then delete it:
DELETE {?s rdfs:label ?label}
WHERE
{
?s rdfs:label ?label . filter(?s = <urn:uuid:abc>)
}
3a) And run the ASK again, returns "no"
3b) Run the text query again returns
------------------
| s |
==================
| <urn:uuid:abc> |
------------------
--
Technology Lead, Iotic Labs
+44 7973 674404
[email protected]
https://www.iotic-labs.com
## Example of a TDB dataset and text index published using Fuseki @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#> . @prefix geosparql: <http://www.opengis.net/ont/geosparql#> . # TDB [] ja:loadClass "org.apache.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:TextIndexLucene rdfs:subClassOf text:TextIndex . ## --------------------------------------------------------------- <#dataset> rdf:type tdb:DatasetTDB ; tdb:location "/home/fuseki/run/databases/graphs" . ## --------------------------------------------------------------- <#service_text_tdb> rdf:type fuseki:Service ; rdfs:label "TDB/text service" ; fuseki:name "text" ; fuseki:serviceQuery "query" ; fuseki:serviceQuery "sparql" ; fuseki:serviceUpdate "update" ; fuseki:serviceUpload "upload" ; fuseki:serviceReadGraphStore "get" ; fuseki:serviceReadWriteGraphStore "data" ; fuseki:dataset <#text_dataset> ; . ## --------------------------------------------------------------- <#text_dataset> rdf:type text:TextDataset ; text:dataset <#dataset> ; text:index <#indexTextLucene> ; . <#indexTextLucene> a text:TextIndexLucene ; text:directory <file:graphs_text_index> ; text:entityMap <#entMap> ; . <#entMap> a text:EntityMap ; text:entityField "uri" ; text:defaultField "text" ; ## Should be defined in the text:map. text:langField "lang" ; text:map ( [ text:field "text" ; text:predicate rdfs:label ] [ text:field "text" ; text:predicate rdfs:comment ] ) .
signature.asc
Description: OpenPGP digital signature
