Hi Sorin,
I'm curious as to why you are indexing a URI and what you see the
benefit of that. You might at least want to set the analyser carefully.
Andy
PS I fixed the cause of the "UnsupportedOperationException" but only in
the sense that it now issues a warning and skips the non-literal. The
test for being a literal or not was there ... but after calling getLiteral.
On 28/04/16 15:47, Sorin Gheorghiu wrote:
Hello,
Jena text index returned the following error:
# java -cp /opt/apache-jena-fuseki-2.3.1/fuseki-server.jar
jena.textindexer --desc=/etc/default/fuseki/jena-text-config.ttl
java.lang.UnsupportedOperationException:
http://d-nb.info/standards/elementset/gnd#SeriesOfConferenceOrEvent is
not a literal node
at org.apache.jena.graph.Node.getLiteral(Node.java:100)
at
org.apache.jena.query.text.TextQueryFuncs.entityFromQuad(TextQueryFuncs.java:80)
at
org.apache.jena.query.text.TextQueryFuncs.entityFromQuad(TextQueryFuncs.java:67)
at jena.textindexer.exec(textindexer.java:122)
at jena.cmd.CmdMain.mainMethod(CmdMain.java:93)
at jena.cmd.CmdMain.mainRun(CmdMain.java:58)
at jena.cmd.CmdMain.mainRun(CmdMain.java:45)
at jena.textindexer.main(textindexer.java:51)
when attempted to index entries like:
@prefix gndo: <http://d-nb.info/standards/elementset/gnd#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<http://d-nb.info/gnd/1-2> gndo:gndIdentifier "1-2" ;
gndo:variantNameForTheConferenceOrEvent "Conferentie van
Niet-Kernwapenstaten" , "Conference on Non-Nuclear Weapon States" ;
gndo:preferredNameForTheConferenceOrEvent "Conference of
Non-Nuclear Weapon States" ;
a gndo:SeriesOfConferenceOrEvent .
Here is the EntityMap assembler setup:
<#entMap> a text:EntityMap ;
text:entityField "gndUri" ;
text:defaultField "prefName" ; ## Must be defined in the text:map
text:map (
[ text:field "prefName";
text:predicate gndo:preferredNameForTheSubjectHeading
]
[ text:field "type";
text:predicate rdf:type
]
...
'type' contains an URL, but a literal node is expected instead.
There is no difference if 'type' is defined as 'text' or 'string' in
Solr schema.xml.
How is possible to fix it?
Thank you in advance,
Sorin