I have a TDB2 database with a dataset named "test". Via fuseki UI I can run 
SparQL queries without any problems. Now I want to index my dataset with the 
following command:

java -cp ./fuseki-server.jar jena.textindexer --desc=run/assembler.ttl

I get this error:

the root https://km-ps.com/model/data/myDataset has no most specific type that 
is a subclass of ja:Object
doing: root: https://km-ps.com/model/data/mytextDataset with type: 
http://jena.apache.org/text#TextDataset assembler class: class 
org.apache.jena.query.text.assembler.TextDatasetAssembler

This is my assembler.ttl:

@prefix :        <https://km-ps.com/model/data/> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix kgdomain:<https://km-ps.com/model/domain#> .
@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/2016/tdb#> .
@prefix text:    <http://jena.apache.org/text#> .
@prefix skos:    <http://www.w3.org/2004/02/skos/core#>
@prefix fuseki:  <http://jena.apache.org/fuseki#> .

[] rdf:type fuseki:Server ;
    fuseki:services (
        :myservice
    ) .

:myservice rdf:type fuseki:Service ;
    fuseki:name                       "test" ;     # e.g : `s-query 
--service=http://localhost:3030/myds "select * ..."`
    fuseki:serviceQuery               "query" ;    # SPARQL query service
    fuseki:serviceUpdate              "update" ;   # SPARQL update service
    fuseki:serviceReadWriteGraphStore "data" ;     # SPARQL Graph store 
protocol (read and write)
    fuseki:dataset                    :mytextDataset ;
    .

## ---------------------------------------------------------------

# A TextDataset is a regular dataset with a text index.
:mytextDataset rdf:type     text:TextDataset ;
    text:dataset   :myDataset ; # <-- replace `:my_dataset` with the desired URI
    text:index     <#indexLucene> ;
.

# A TDB dataset used for RDF storage
:myDataset rdf:type      tdb:DatasetTDB2 ; # <-- replace `:my_dataset` with the 
desired URI - as above
    tdb:location "/fuseki/run/databases/test" ;
    # tdb:unionDefaultGraph true ; # Optional
.

# Text index description
<#indexLucene> a text:TextIndexLucene ;
    text:directory <file:/fuseki/run/databases/test> ; # <file:path> ;  # <-- 
replace `<file:path>` with your path (e.g., `<file:/.../
    text:entityMap <#entMap> ;
    text:storeValues true ;
    text:analyzer [ a text:StandardAnalyzer ] ;
    text:queryAnalyzer [ a text:KeywordAnalyzer ] ;
    text:queryParser text:AnalyzingQueryParser ;
    text:multilingualSupport true ; # optional
.

# Entity map (see documentation for other options)
<#entMap> a text:EntityMap ;
    text:defaultField     "label" ;
    text:entityField      "uri" ;
    text:uidField         "uid" ;
    text:langField        "lang" ;
    text:graphField       "graph" ;
    text:map (
        [ text:field "label" ;
        text:predicate rdfs:label ]
    ) .


Is there an easy solution to this problem? I would be thankful for any help.


If you are not the addressee, please inform us immediately that you have 
received this e-mail by mistake, and delete it. We thank you for your support.

Reply via email to