aboutsummaryrefslogtreecommitdiffstats
path: root/skate
diff options
context:
space:
mode:
Diffstat (limited to 'skate')
-rw-r--r--skate/map.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/skate/map.go b/skate/map.go
index 737c9af..0c55eed 100644
--- a/skate/map.go
+++ b/skate/map.go
@@ -24,9 +24,11 @@ type TitleDoc struct {
Title string `json:"title"`
}
-// ContainerTitleDoc is a document with a title.
+// ContainerTitleDoc is a document with a container title.
type ContainerTitleDoc struct {
- ContainerTitle string `json:"container_title"`
+ Biblio struct {
+ ContainerTitle string `json:"container_title"`
+ } `json:"biblio"`
}
// PartialDoc for docs, that do not have DOI or title. E.g. we found 49701699
@@ -204,7 +206,7 @@ func MapperContainerTitle(p []byte) ([][]byte, error) {
if err := json.Unmarshal(p, &doc); err != nil {
return nil, err
} else {
- key = []byte(wsReplacer.Replace(strings.TrimSpace(doc.ContainerTitle)))
+ key = []byte(wsReplacer.Replace(strings.TrimSpace(doc.Biblio.ContainerTitle)))
}
return [][]byte{key, p}, nil
}