Hi Joachim!

You need to set "text:storeValues true" for the text:TextIndexLucene instance and rebuild your text index. You also need to set langField, but you already seem to have that.

This is explained in the jena-text documentation:
https://jena.apache.org/documentation/query/text-query.html#storing-literal-values

-Osma

08.02.2016, 10:17, Neubert, Joachim kirjoitti:
I've tried one of the text search syntaxes described in 
http://jena.apache.org/documentation/query/text-query.html, namely

(?s ?score ?literal) text:query 'word' # ... and original literal value

It works fine for ?score, but the ?literal variable remains unbound. 
(fuseki-2.3.0)

Any ideas?

My index definition is like that:

:gnd rdf:type      text:TextDataset ;
     text:dataset <#gndDb> ;
     text:index   <#gndIndex> ;
     .

<#gndIndex> a text:TextIndexLucene ;
     text:directory <file:/opt/thes/var/gnd/latest/tdb_lucene> ;
     text:entityMap <#entMapFull> ;
     .

<#entMapFull> a text:EntityMap ;
     text:entityField      "uri" ;
     text:defaultField     "text" ;
     text:defaultPredicate rdfs:label ;
     text:uidField         "uid" ; ## recommended for Skosmos 1.4+
     text:langField        "lang" ; ## required for Skosmos 1.4

     text:map (

         # skos:prefLabel
          [ text:field "keyword" ;
            text:predicate skos:prefLabel ;
            text:analyzer [ a text:LowerCaseKeywordAnalyzer ]
          ]

# ....
   ) .

An executable query is at

http://zbw.eu/beta/sparql-lab/?endpoint=http://zbw.eu/beta/sparql/gnd/query&queryRef=https://api.github.com/repos/jneubert/sparql-queries/contents/gnd/search_corporate_body.rq





--
Osma Suominen
D.Sc. (Tech), Information Systems Specialist
National Library of Finland
P.O. Box 26 (Kaikukatu 4)
00014 HELSINGIN YLIOPISTO
Tel. +358 50 3199529
[email protected]
http://www.nationallibrary.fi

Reply via email to