Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Operation = Operation {
- action :: !Action
- index :: !ShortText
- id_ :: !MaybeShortText
- document :: !(SmallArray Member)
- data Action
- encode :: SmallArray Operation -> Builder
- encodeSmile :: SmallArray Operation -> Builder
Documentation
A single operation in a bulk request.
The action to be taken with the document.
encode :: SmallArray Operation -> Builder Source #
Encode returns a builder, not a JSON value, because the body of an Elasticsearch bulk requests is not JSON. Technically, it is ndjson, but since there is no common type for that, this module just converts it straight to a builder.
encodeSmile :: SmallArray Operation -> Builder Source #
Encode with SMILE. This does not use backreferences.