You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The language-client does not support composite runtime fields. The spec states for the Search API, that runtime_mappings should support "composite" fields. This is not the case with the language-client:
`runtime_mappings
(Optional, object of objects) Defines one or more [runtime fields](https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime-search-request.html) in the search request. These fields take precedence over mapped fields with the same name.
Properties of runtime_mappings objects
<field-name>
(Required, object) Configuration for the runtime field. The key is the field name.
Properties of <field-name>
type
(Required, string) [Field type](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html), which can be any of the following:
boolean
composite
date
double
geo_point
ip
keyword
long
[lookup](https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime-retrieving-fields.html#lookup-runtime-fields)
script
(Optional, string) [Painless script](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting-using.html) executed at query time. The script has access to the entire context of a document, including the original _source and any mapped fields plus their values.`
Imho, the change to the spec would be easy:
_types/mapping/RuntimeFields.ts:
import { Dictionary } from '@spec_utils/Dictionary'
import { Field } from '@_types/common'
import { Script } from '@_types/Scripting'
export type RuntimeFields = Dictionary<Field, RuntimeField>
export class RuntimeField {
fields?: Dictionary<string, Dictionary<string, RuntimeFieldType>>;
format?: string
script?: Script
type: RuntimeFieldType
}
export enum RuntimeFieldType {
boolean = 0,
composite = 1
date = 2,
double = 3,
geo_point = 4,
ip = 5,
keyword = 6,
long = 7,
lookup
}
Java API client version
8.5.2
Java version
11
Elasticsearch Version
8.5.2
Problem description
The language-client does not support composite runtime fields. The spec states for the Search API, that runtime_mappings should support "composite" fields. This is not the case with the language-client:
`runtime_mappings
Imho, the change to the spec would be easy:
_types/mapping/RuntimeFields.ts:
The JSON-Output would be:
Maybe, the "Dictionary" would have to be replaced with "SingleKeyDictionary".
The class "RuntimeField.java" would need to serialize the "field" field with:
What is the reason, that composite runtime fields are not supported?
Unfortunately, I was not able to check the Java result, because I could not find the code-generator project.
The text was updated successfully, but these errors were encountered: