You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Laura Morales <la...@mail.com> on 2019/10/06 17:26:57 UTC

No such type:

I'm trying to enable full text search on a Fuseki v3.12 instance but I get the error shown below. The assembler is pretty much a copycat of the documentation, with a Lucene text index. The assembler contains the prefix "text: <http://jena.apache.org/text#>".
Is this a bug?

$ java -cp fuseki-server.jar jena.textindexer --desc=run/config.ttl
org.apache.jena.sparql.ARQException: No such type: <http://jena.apache.org/text#TextDataset>
	at org.apache.jena.sparql.core.assembler.AssemblerUtils.build(AssemblerUtils.java:134)
	at org.apache.jena.query.text.TextDatasetFactory.create(TextDatasetFactory.java:38)
	at jena.textindexer.processModulesAndArgs(textindexer.java:90)
	at jena.cmd.CmdArgModule.process(CmdArgModule.java:52)
	at jena.cmd.CmdMain.mainMethod(CmdMain.java:92)
	at jena.cmd.CmdMain.mainRun(CmdMain.java:58)
	at jena.cmd.CmdMain.mainRun(CmdMain.java:45)
	at jena.textindexer.main(textindexer.java:52)


Re: No such type:

Posted by Chris Tomlinson <ch...@gmail.com>.
Hello Laura,

Now that another issue is being examined some data and queries will be needed.

Thanks,
Chris

> On Oct 6, 2019, at 16:26, Laura Morales <la...@mail.com> wrote:
> 
> $ cat run/config.ttl
> @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#> .
> 
> [] rdf:type fuseki:Server ;
>    ja:context [ ja:cxtName "arq:queryTimeout" ;  ja:cxtValue "30000" ] .
> 
> 
> ----------
> 
> 
> $ cat run/configuration/demo.ttl
> PREFIX :        <#>
> PREFIX fuseki:  <http://jena.apache.org/fuseki#>
> PREFIX ja:      <http://jena.hpl.hp.com/2005/11/Assembler#>
> 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 text:    <http://jena.apache.org/text#>
> 
> :service a fuseki:Service ;
>    rdfs:label "demo" ;
>    fuseki:name "demo" ;
>    fuseki:serviceQuery "query" ;
>    fuseki:dataset :text_dataset .
> 
> :text_dataset a text:TextDataset ;
>    text:dataset :dataset ;
>    text:index   :dataset_index .
> 
> :dataset a a tdb:DatasetTDB ;
>    tdb:location "..." .
> 
> :dataset_index a text:TextIndexLucene ;
>    text:directory <file:/path/to/folder> ;
>    text:entityMap :index_map .
> 
> :index_map a text:EntityMap ;
>    text:entityField  "uri" ;
>    text:defaultField "field" ;
>    text:map ([
>        text:field     "field" ;
>        text:predicate rdfs:label ]) .
> 
> 
> ----------
> 
> 
> $ ./fuseki-server --version
> Jena:       VERSION: 3.12.0
> Jena:       BUILD_DATE: 2019-05-27T16:07:27+0000
> TDB:        VERSION: 3.12.0
> TDB:        BUILD_DATE: 2019-05-27T16:07:27+0000
> Fuseki:     VERSION: 3.12.0
> Fuseki:     BUILD_DATE: 2019-05-27T16:07:27+0000
> 
> 
> ----------
> 
> With the above configuration I do not get a "No such type" error, but I get a sort of mixed behavior. Sometimes it seems to work, while most of the times it returns zero results. And I cannot reproduce it either... it gives me zero results except a few times it magically starts working (returning results).
> I get the "No such type" error when using a RDFDataset instead of DatasetTDB, but at this point I'd love to understand what's going on here before trying to understand the RDFDataset error.
> 
> 
> 
>> Sent: Sunday, October 06, 2019 at 8:10 PM
>> From: "Chris Tomlinson" <ch...@gmail.com>
>> To: users@jena.apache.org
>> Subject: Re: No such type: <http://jena.apache.org/text#TextDataset>
>> 
>> Hi Laura,
>> 
>> It would be helpful to see the assembler file. Then we may get closer to whether there's a bug.
>> 
>> Regards,
>> Chris

Re: No such type:

Posted by Laura Morales <la...@mail.com>.
$ cat run/config.ttl
@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#> .

[] rdf:type fuseki:Server ;
    ja:context [ ja:cxtName "arq:queryTimeout" ;  ja:cxtValue "30000" ] .


----------


$ cat run/configuration/demo.ttl
PREFIX :        <#>
PREFIX fuseki:  <http://jena.apache.org/fuseki#>
PREFIX ja:      <http://jena.hpl.hp.com/2005/11/Assembler#>
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 text:    <http://jena.apache.org/text#>

:service a fuseki:Service ;
    rdfs:label "demo" ;
    fuseki:name "demo" ;
    fuseki:serviceQuery "query" ;
    fuseki:dataset :text_dataset .

:text_dataset a text:TextDataset ;
    text:dataset :dataset ;
    text:index   :dataset_index .

:dataset a a tdb:DatasetTDB ;
    tdb:location "..." .

:dataset_index a text:TextIndexLucene ;
    text:directory <file:/path/to/folder> ;
    text:entityMap :index_map .

:index_map a text:EntityMap ;
    text:entityField  "uri" ;
    text:defaultField "field" ;
    text:map ([
        text:field     "field" ;
        text:predicate rdfs:label ]) .


----------


$ ./fuseki-server --version
Jena:       VERSION: 3.12.0
Jena:       BUILD_DATE: 2019-05-27T16:07:27+0000
TDB:        VERSION: 3.12.0
TDB:        BUILD_DATE: 2019-05-27T16:07:27+0000
Fuseki:     VERSION: 3.12.0
Fuseki:     BUILD_DATE: 2019-05-27T16:07:27+0000


----------

With the above configuration I do not get a "No such type" error, but I get a sort of mixed behavior. Sometimes it seems to work, while most of the times it returns zero results. And I cannot reproduce it either... it gives me zero results except a few times it magically starts working (returning results).
I get the "No such type" error when using a RDFDataset instead of DatasetTDB, but at this point I'd love to understand what's going on here before trying to understand the RDFDataset error.



> Sent: Sunday, October 06, 2019 at 8:10 PM
> From: "Chris Tomlinson" <ch...@gmail.com>
> To: users@jena.apache.org
> Subject: Re: No such type: <http://jena.apache.org/text#TextDataset>
>
> Hi Laura,
>
> It would be helpful to see the assembler file. Then we may get closer to whether there's a bug.
>
> Regards,
> Chris

Re: No such type:

Posted by Chris Tomlinson <ch...@gmail.com>.
Hi Laura,

It would be helpful to see the assembler file. Then we may get closer to whether there's a bug.

Regards,
Chris

> On Oct 6, 2019, at 12:27, Laura Morales <la...@mail.com> wrote:
> 
> I'm trying to enable full text search on a Fuseki v3.12 instance but I get the error shown below. The assembler is pretty much a copycat of the documentation, with a Lucene text index. The assembler contains the prefix "text: <http://jena.apache.org/text#>".
> Is this a bug?
> 
> $ java -cp fuseki-server.jar jena.textindexer --desc=run/config.ttl
> org.apache.jena.sparql.ARQException: No such type: <http://jena.apache.org/text#TextDataset>
>    at org.apache.jena.sparql.core.assembler.AssemblerUtils.build(AssemblerUtils.java:134)
>    at org.apache.jena.query.text.TextDatasetFactory.create(TextDatasetFactory.java:38)
>    at jena.textindexer.processModulesAndArgs(textindexer.java:90)
>    at jena.cmd.CmdArgModule.process(CmdArgModule.java:52)
>    at jena.cmd.CmdMain.mainMethod(CmdMain.java:92)
>    at jena.cmd.CmdMain.mainRun(CmdMain.java:58)
>    at jena.cmd.CmdMain.mainRun(CmdMain.java:45)
>    at jena.textindexer.main(textindexer.java:52)
>