Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
subugoe
metsimporter
Commits
b9927c42
Commit
b9927c42
authored
Dec 03, 2020
by
Joerg-Holger Panzer
Browse files
Modify title page identification
parent
43ab4261
Changes
1
Hide whitespace changes
Inline
Side-by-side
indexer/solr/solr.go
View file @
b9927c42
...
...
@@ -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
\n
physPageKey: %v
\n
solrDoc.LogStartPageIndex: %v"
,
solrDoc
.
ID
,
pos
,
ppos
,
len
(
physPageKey
),
physPageKey
,
solrDoc
.
LogStartPageIndex
)
}
else
{
solrDoc
.
TitlePage
=
physPageKey
[
ppos
-
1
]
}
}
if
len
(
solrLogChildDocs
)
>
0
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment