Documentation ¶
Index ¶
- Variables
- func BulkIndex(docs []string, options Options) error
- func CreateIndex(options Options) error
- func DeleteIndex(options Options) error
- func PutMapping(options Options, body io.Reader) error
- func Worker(id string, options Options, lines chan string, wg *sync.WaitGroup)
- type BulkResponse
- type Item
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrParseCannotServerAddr = errors.New("cannot parse server address")
Functions ¶
func BulkIndex ¶ added in v0.3.0
BulkIndex takes a set of documents as strings and indexes them into elasticsearch.
func CreateIndex ¶ added in v0.3.5
CreateIndex creates a new index.
func DeleteIndex ¶ added in v0.3.5
DeleteIndex removes an index.
func PutMapping ¶ added in v0.3.5
PutMapping applies a mapping from a reader.
Types ¶
type BulkResponse ¶ added in v0.4.1
type BulkResponse struct { Took int `json:"took"` HasErrors bool `json:"errors"` Items []Item `json:"items"` }
BulkResponse is a response to a bulk request.
type Item ¶ added in v0.4.1
type Item struct { IndexAction struct { Index string `json:"_index"` Type string `json:"_type"` ID string `json:"_id"` Status int `json:"status"` Error struct { Type string `json:"type"` Reason string `json:"reason"` } `json:"error"` } }
Item represents a bulk action.
Click to show internal directories.
Click to hide internal directories.