aboutsummaryrefslogtreecommitdiffstats
path: root/skate/map.go
diff options
context:
space:
mode:
Diffstat (limited to 'skate/map.go')
-rw-r--r--skate/map.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/skate/map.go b/skate/map.go
index 0c55eed..a72ad89 100644
--- a/skate/map.go
+++ b/skate/map.go
@@ -24,10 +24,10 @@ type TitleDoc struct {
Title string `json:"title"`
}
-// ContainerTitleDoc is a document with a container title.
-type ContainerTitleDoc struct {
+// ContainerNameDoc is a document with a container title.
+type ContainerNameDoc struct {
Biblio struct {
- ContainerTitle string `json:"container_title"`
+ ContainerName string `json:"container_title"`
} `json:"biblio"`
}
@@ -197,23 +197,23 @@ func MapperTitleSandcrawler(p []byte) (fields [][]byte, err error) {
return fields, nil
}
-// MapperContainerTitle extracts (container_title, doc).
-func MapperContainerTitle(p []byte) ([][]byte, error) {
+// MapperContainerName extracts (container_title, doc).
+func MapperContainerName(p []byte) ([][]byte, error) {
var (
- doc ContainerTitleDoc
+ doc ContainerNameDoc
key []byte
)
if err := json.Unmarshal(p, &doc); err != nil {
return nil, err
} else {
- key = []byte(wsReplacer.Replace(strings.TrimSpace(doc.Biblio.ContainerTitle)))
+ key = []byte(wsReplacer.Replace(strings.TrimSpace(doc.Biblio.ContainerName)))
}
return [][]byte{key, p}, nil
}
-// MapperContainerTitleSandcrawler extracts (container_title, doc).
-func MapperContainerTitleSandcrawler(p []byte) (fields [][]byte, err error) {
- if fields, err = MapperContainerTitle(p); err != nil {
+// MapperContainerNameSandcrawler extracts (container_title, doc).
+func MapperContainerNameSandcrawler(p []byte) (fields [][]byte, err error) {
+ if fields, err = MapperContainerName(p); err != nil {
return nil, err
}
key := string(fields[0])