Harsha Vamsi Kalluri ddbb16599b
Updated doc_values for fields (#5619)
Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>
2023-11-16 17:51:38 -05:00

1.3 KiB

layout, title, parent, nav_order, has_children, redirect_from
layout title parent nav_order has_children redirect_from
default Binary Supported field types 12 false
/opensearch/supported-field-types/binary/
/field-types/binary/

Binary field type

A binary field type contains a binary value in Base64 encoding that is not searchable.

Example

Create a mapping with a binary field:

PUT testindex 
{
  "mappings" : {
    "properties" :  {
      "binary_value" : {
        "type" : "binary"
      }
    }
  }
}

{% include copy-curl.html %}

Index a document with a binary value:

PUT testindex/_doc/1 
{
  "binary_value" : "bGlkaHQtd29rfx4="
}

{% include copy-curl.html %}

Use = as a padding character. Embedded newline characters are not allowed. {: .note }

Parameters

The following table lists the parameters accepted by binary field types. All parameters are optional.

Parameter Description
doc_values A Boolean value that specifies whether the field should be stored on disk so that it can be used for aggregations, sorting, or scripting. Optional. Default is true.
store A Boolean value that specifies whether the field value should be stored and can be retrieved separately from the _source field. Optional. Default is false.