From 687e6d6a46aeb01c230e2183f465ae0ec074aff7 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Thu, 27 May 2021 23:23:53 +0200 Subject: update notes --- skate/map.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'skate/map.go') diff --git a/skate/map.go b/skate/map.go index 1584acd..316b8ee 100644 --- a/skate/map.go +++ b/skate/map.go @@ -197,21 +197,21 @@ func MapperTitleSandcrawler(p []byte) (fields [][]byte, err error) { return fields, nil } -// MapperContainerName extracts (container_title, doc). +// MapperContainerName extracts (container_name, doc). func MapperContainerName(p []byte) ([][]byte, error) { var ( - doc ContainerNameDoc + doc PartialDoc key []byte ) if err := json.Unmarshal(p, &doc); err != nil { return nil, err } else { - key = []byte(wsReplacer.Replace(strings.TrimSpace(doc.Biblio.ContainerName))) + key = []byte(wsReplacer.Replace(strings.TrimSpace(doc.ContainerName))) } return [][]byte{key, p}, nil } -// MapperContainerNameSandcrawler extracts (container_title, doc). +// MapperContainerNameSandcrawler extracts (container_name, doc). func MapperContainerNameSandcrawler(p []byte) (fields [][]byte, err error) { if fields, err = MapperContainerName(p); err != nil { return nil, err @@ -242,7 +242,5 @@ func MapperURLFromRef(p []byte) (fields [][]byte, err error) { // MapperPartial works on partial documents. func MapperPartial(p []byte) (fields [][]byte, err error) { - // TODO: slugify authors, how to compare two author strings? How do these - // things look like? return nil, nil } -- cgit v1.2.3