Add excerpts of any complex publication to ALLTEXT field

This commit is contained in:
Georgy Litvinov 2021-02-26 16:57:25 +01:00
parent 88443e073f
commit cfc3e7dd65

View file

@ -3,10 +3,10 @@
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
:vivodocumentModifier_excerptsInArticles
:vivodocumentModifier_excerptsInComplexPublications
a <java:edu.cornell.mannlib.vitro.webapp.searchindex.documentBuilding.SelectQueryDocumentModifier> ,
<java:edu.cornell.mannlib.vitro.webapp.searchindex.documentBuilding.DocumentModifier> ;
rdfs:label "Elenph article excerpts" ;
rdfs:label "Populate complex publications with excerpts" ;
:hasTargetField "ALLTEXT" ;
:hasSelectQuery """
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
@ -14,11 +14,10 @@
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?value
WHERE {
?uri rdf:type ts:elenphArticle .
?uri ts:hasTOC ?toc .
?toc (ts:hasTOCItem/ts:pointsTo)+/ts:hasText ?elenphExcerpt .
?toc (ts:hasTOCItem/ts:pointsTo)+/ts:hasText ?excerpt .
VALUES ?property { ts:works ts:bibliography ts:htmlExcerpt ts:keywords }
?elenphExcerpt ?property ?value .
?excerpt ?property ?value .
}
""" .