Commit b9927c42 authored by Joerg-Holger Panzer's avatar Joerg-Holger Panzer
Browse files

Modify title page identification

parent 43ab4261
......@@ -946,8 +946,16 @@ func WriteToGDZIndex(esDoc types.ESDoc) {
}
}
// TODO check this
if pos := firstOccurence(solrDoc.LogType, []string{"titlepage", "title_page", "title-page"}); pos != -1 {
solrDoc.TitlePage = physPageKey[pos]
ppos := solrDoc.LogStartPageIndex[pos]
if (ppos < 0) || (int(ppos)-1) >= len(physPageKey) {
log.Printf("ERROR index out of range in %s -> pos: %v, ppos: %v, len(physPageKey): %v\nphysPageKey: %v\nsolrDoc.LogStartPageIndex: %v", solrDoc.ID, pos, ppos, len(physPageKey), physPageKey, solrDoc.LogStartPageIndex)
} else {
solrDoc.TitlePage = physPageKey[ppos-1]
}
}
if len(solrLogChildDocs) > 0 {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment