Binary field type
Introduced 1.0
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"
}
}
}
}
copy
Index a document with a binary value:
PUT testindex/_doc/1
{
"binary_value" : "bGlkaHQtd29rfx4="
}
copy
Use =
as a padding character. Embedded newline characters are not allowed.
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 false . |
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 . |
当前内容版权归 OpenSearch 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 OpenSearch .