Hi,
I have been trying to set up a text search but unfortunately with limited
success so far. I attached the assembler file and the exception I am getting.I
have an already existing TDB store and I just want to add text search on the
predicate "nci:Preferred_Name". I copied the example file and changed the
following pieces:
- The default URI Preifx
- tdb:location
- tdb:unionDefaultGraph
- text:predicate
The error I am getting seems to be related to bad syntax. However, I cannot
spot it. Some help would be very much appreciated!
Other questions:
- text:entityField - What does that need to point to? There is no field "uri"
in my ontology. Is this supposed to distinguish one concept from another? Or is
"uri" an implicit field for any subject's URI?
- In TDB assembler examples in general, could you replace the tdb:location "DB"
with something more meaningful, e.g. a relative path to the TDB store or
something like that. "DB" could be anything but as I understand it is the path
to the directory of the already created TDB store.
Thanks!
Wolfgang
C:\>java -cp %FUSEKI_HOME%\fuseki-server.jar jena.textindexer
--desc=C:\Development\Ontology\jena_assembler.ttl
WARN [line: 28, col: 20] Bad IRI:
<C:\Development\Ontology\jena_assembler.ttl#dataset> Code: 4/UNWISE_CHARACTER
in PATH: The character matches no gr
WARN [line: 29, col: 20] Bad IRI:
<C:\Development\Ontology\jena_assembler.ttl#indexLucene> Code:
4/UNWISE_CHARACTER in PATH: The character matches n
WARN [line: 35, col: 1 ] Bad IRI:
<C:\Development\Ontology\jena_assembler.ttl#dataset> Code: 4/UNWISE_CHARACTER
in PATH: The character matches no gr
WARN [line: 41, col: 1 ] Bad IRI:
<C:\Development\Ontology\jena_assembler.ttl#indexLucene> Code:
4/UNWISE_CHARACTER in PATH: The character matches n
WARN [line: 42, col: 20] Bad IRI: <file:Lucene> Code:
57/REQUIRED_COMPONENT_MISSING in AUTHORITY: A component that is required by the
scheme is miss
WARN [line: 44, col: 20] Bad IRI:
<C:\Development\Ontology\jena_assembler.ttl#entMap> Code: 4/UNWISE_CHARACTER in
PATH: The character matches no gra
WARN [line: 50, col: 1 ] Bad IRI:
<C:\Development\Ontology\jena_assembler.ttl#entMap> Code: 4/UNWISE_CHARACTER in
PATH: The character matches no gra
WARN Attempt to enable execution logging but the logger
'com.hp.hpl.jena.arq.exec' is not logging at level INFO
com.hp.hpl.jena.assembler.exceptions.AssemblerException: caught: Encountered "
"<" "< "" at line 3, column 3.
Was expecting one of:
<IRIref> ...
<PNAME_NS> ...
<PNAME_LN> ...
<BLANK_NODE_LABEL> ...
<VAR1> ...
<VAR2> ...
"select" ...
"values" ...
"graph" ...
"optional" ...
"minus" ...
"bind" ...
"service" ...
"filter" ...
"true" ...
"false" ...
<INTEGER> ...
<DECIMAL> ...
<DOUBLE> ...
<INTEGER_POSITIVE> ...
<DECIMAL_POSITIVE> ...
<DOUBLE_POSITIVE> ...
<INTEGER_NEGATIVE> ...
<DECIMAL_NEGATIVE> ...
<DOUBLE_NEGATIVE> ...
<STRING_LITERAL1> ...
<STRING_LITERAL2> ...
<STRING_LITERAL_LONG1> ...
<STRING_LITERAL_LONG2> ...
"(" ...
<NIL> ...
"{" ...
"}" ...
"[" ...
<ANON> ...
doing:
root: C:\Development\Ontology\jena_assembler.ttl#entMap with type:
http://jena.apache.org/text#EntityMap assembler class: class org.apache.jena.q
root: C:\Development\Ontology\jena_assembler.ttl#indexLucene with type:
http://jena.apache.org/text#TextIndexLucene assembler class: class org.ap
root: http://eurocat.org/test#text_dataset with type:
http://jena.apache.org/text#TextDataset assembler class: class
org.apache.jena.query.text.a
at
com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:138)
at
com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:117)
at
com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:81)
at
com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:52)
at
com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:48)
at
org.apache.jena.query.text.assembler.TextIndexLuceneAssembler.open(TextIndexLuceneAssembler.java:74)
at
org.apache.jena.query.text.assembler.TextIndexLuceneAssembler.open(TextIndexLuceneAssembler.java:44)
at
com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:130)
at
com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:117)
at
com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:81)
at
com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:52)
at
com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:48)
at
org.apache.jena.query.text.assembler.TextDatasetAssembler.open(TextDatasetAssembler.java:56)
at
org.apache.jena.query.text.assembler.TextDatasetAssembler.open(TextDatasetAssembler.java:35)
at
com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:130)
at
com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:117)
at
com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:81)
at
com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:52)
at
com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:48)
at
com.hp.hpl.jena.sparql.core.assembler.AssemblerUtils.build(AssemblerUtils.java:101)
at
org.apache.jena.query.text.TextDatasetFactory.create(TextDatasetFactory.java:38)
at jena.textindexer.processModulesAndArgs(textindexer.java:93)
at arq.cmdline.CmdArgModule.process(CmdArgModule.java:51)
at arq.cmdline.CmdMain.mainMethod(CmdMain.java:100)
at arq.cmdline.CmdMain.mainRun(CmdMain.java:63)
at arq.cmdline.CmdMain.mainRun(CmdMain.java:50)
at jena.textindexer.main(textindexer.java:55)
Caused by: com.hp.hpl.jena.query.QueryParseException: Encountered " "<" "< ""
at line 3, column 3.
Was expecting one of:
<IRIref> ...
<PNAME_NS> ...
<PNAME_LN> ...
<BLANK_NODE_LABEL> ...
<VAR1> ...
<VAR2> ...
"select" ...
"values" ...
"graph" ...
"optional" ...
"minus" ...
"bind" ...
"service" ...
"filter" ...
"true" ...
"false" ...
<INTEGER> ...
<DECIMAL> ...
<DOUBLE> ...
<INTEGER_POSITIVE> ...
<DECIMAL_POSITIVE> ...
<DOUBLE_POSITIVE> ...
<INTEGER_NEGATIVE> ...
<DECIMAL_NEGATIVE> ...
<DOUBLE_NEGATIVE> ...
<STRING_LITERAL1> ...
<STRING_LITERAL2> ...
<STRING_LITERAL_LONG1> ...
<STRING_LITERAL_LONG2> ...
"(" ...
<NIL> ...
"{" ...
"}" ...
"[" ...
<ANON> ...
at
com.hp.hpl.jena.sparql.lang.ParserSPARQL11.perform(ParserSPARQL11.java:102)
at
com.hp.hpl.jena.sparql.lang.ParserSPARQL11.parse$(ParserSPARQL11.java:53)
at com.hp.hpl.jena.sparql.lang.SPARQLParser.parse(SPARQLParser.java:37)
at com.hp.hpl.jena.query.QueryFactory.parse(QueryFactory.java:139)
at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:79)
at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:52)
at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:40)
at
org.apache.jena.query.text.assembler.EntityMapAssembler.open(EntityMapAssembler.java:70)
at
org.apache.jena.query.text.assembler.EntityMapAssembler.open(EntityMapAssembler.java:40)
at
com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:130)
... 26 more