0
I tried to index as follows:
body: {
name: form.value.name,
title: form.value.title,
description: form.value.description,
published: new Date().toLocaleString(),
stash: {
"title": this.alternativeFields.value,
"type": "object",
"dynamic": true
}
}
Basically this.alternativeFields.value
is an array that contains, for example:
["field1", "field2", "field3"]
And for each position of this array, I would like to create a field in the Elastic document.
Is there any way to do this?
I don’t get it. You want to save each array value
alternativeFields
as a separate field? What names will these fields have? Why not save as values within the fieldtitle
or another?– Ricardo Moraleida
Why these figures will be able to be filled in later.
– Matheus Ribeiro
You can fill in the values after rewriting the field or by using Scripted Updates to update list items: https://www.elastic.co/guide/elasticsearch/reference/5.6/docs-update.html#_scripted_updates
– Ricardo Moraleida
I’ll take a look, thanks
– Matheus Ribeiro