IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Binary field type
editBinary field type
editThe binary
type accepts a binary value as a
Base64 encoded string. The field is not
stored by default and is not searchable:
response = client.indices.create( index: 'my-index-000001', body: { mappings: { properties: { name: { type: 'text' }, blob: { type: 'binary' } } } } ) puts response response = client.index( index: 'my-index-000001', id: 1, body: { name: 'Some binary blob', blob: 'U29tZSBiaW5hcnkgYmxvYg==' } ) puts response
PUT my-index-000001 { "mappings": { "properties": { "name": { "type": "text" }, "blob": { "type": "binary" } } } } PUT my-index-000001/_doc/1 { "name": "Some binary blob", "blob": "U29tZSBiaW5hcnkgYmxvYg==" }
Parameters for binary
fields
editThe following parameters are accepted by binary
fields:
Should the field be stored on disk in a column-stride fashion, so that it
can later be used for sorting, aggregations, or scripting? Accepts |
|
Whether the field value should be stored and retrievable separately from
the |