Documentation ¶
Overview ¶
Package doi helps to find DOI in JSON documents.
Index ¶
Constants ¶
View Source
const PatDOI = "10[.][0-9]{2,6}/[^ \"\u001f\u001e]{3,}"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MapSniffer ¶
MapSniffer tries to find values in a map.
func (*MapSniffer) SearchMap ¶
func (s *MapSniffer) SearchMap(doc map[string]interface{}) []string
type Sniffer ¶
type Sniffer struct { Reader io.Reader Writer io.Writer MapSniffer *MapSniffer IdentifierKey string UpdateKey string // if set, update the document in place SkipUnmatched bool ForceOverwrite bool // if set, overwrite existing values in "UpdateKey" PostProcess func(s string) string BatchSize int NumWorkers int }
Sniffer can read, transform and write a stream of newline delimited JSON documents.
func NewSniffer ¶
NewSniffer sets up a new sniffer with defaults keys matching the current SOLR schema. Can process around 20K docs/s.
Click to show internal directories.
Click to hide internal directories.