buda-base / lds-pdi

http://purl.bdrc.io BDRC Linked Data Server
Apache License 2.0
2 stars 0 forks source link

blank prefLabelMatch in rootSearchGraph #164

Closed berger-n closed 4 years ago

berger-n commented 4 years ago

see http://purl.bdrc.io/lib/rootSearchGraph?LG_NAME=fr&I_LIM=500&L_NAME=%22comparaison%20des%20versions%20chinoise%22

{ 
  xml:lang: "fr",
  type: "http://purl.bdrc.io/ontology/tmp/prefLabelMatch",
  value: ""
}
berger-n commented 4 years ago

same here: http://purl.bdrc.io/lib/rootSearchGraph?LG_NAME=en&I_LIM=500&L_NAME=%22university%22&format=json

berger-n commented 4 years ago

same here (with altLabelMatch): http://purl.bdrc.io/lib/rootSearchGraph?LG_NAME=en&I_LIM=500&L_NAME=%22Noble%20Mah%C4%81y%C4%81na%20S%C5%ABtra%22&format=json

eroux commented 4 years ago

@xristy would you have time to take a look? this prevents a nice display of the English results (of 84000 for instance), it would be really cool to have a demo of that for next week if it's not too complex (if it's not there it's not a huge deal)

eroux commented 4 years ago

boils down to

PREFIX text: <http://jena.apache.org/text#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>

select ?s ?score ?textres ?prefLabel where {
  (?s ?score ?textres) text:query ( skos:prefLabel "\"university\""@en "highlight:" ) .
  ?s skos:prefLabel ?prefLabel .
  FILTER (LANG(?prefLabel) = "en")
}

(removing the "highlight:" makes it work)

xristy commented 4 years ago

I've narrowed the issue to TextIndexLucene.java L676.

The generated TokenStream is not correctly formed. The problem appears to be that the effectiveField is label instead of label_en.

xristy commented 4 years ago

fixed via jena 8a415ea

berger-n commented 4 years ago

Great! Thanks