Hello, I have an index of this shape :
{
"_index": "df_extrait",
"_type": "_doc",
"_id": "27685",
"_version": 1,
"_seq_no": 0,
"_primary_term": 1,
"_score": 1,
"_source": {
"source": "avatar",
"target": "toutpublic",
"confidence_Score": "-",
"Ref": "10716926",
"Databases": "OCS:1234",
"Taxon": "Film",
"Interaction_Method": "Dialogue",
"ID_method": [ "M0004" ],
"Source_film": "OCS"
}
}
{
"_index": "df_extrait",
"_type": "_doc",
"_id": "82335",
"_version": 1,
"_seq_no": 10,
"_primary_term": 1,
"_score": 1,
"_source": {
"Source_film": "TF1Studio",
"source": "avatar",
"target": "toutpublic",
"Taxon": "Film",
"Ref": [
"20936779",
"10716926",
"12970366",
"32203420"
],
"ID_method": [
"M0398",
"M0428",
"M0096",
"M0019",
"M0018",
"M0059",
"M0045",
"M0004",
"M0004",
"M0007"
],
"Interaction_Method": [
"Projection interactive",
"Animation",
"Animation virtuelle",
"Modelage",
"Projection anime",
"Fond vert",
"Extraction paysage",
"Dialogue",
"Dialogue",
"Fond rouge"
]
}
}
I would like to reunite the different index according to the source and target fields and create a new index in this case acquiere only one index :
expected results in this cases :
{
"_index": "new_index",
"_type": "_doc",
"_id": "82335",
"_version": 1,
"_seq_no": 10,
"_primary_term": 1,
"_score": 1,
"_source": {
"Source_film": ["OCS,"TF1Studio"]
"source": "avatar",
"target": "toutpublic",
"Taxon": "Film",
"Ref": [
"20936779",
"10716926",
"12970366",
"32203420"
],
"ID_method": [
"M0398",
"M0428",
"M0096",
"M0019",
"M0018",
"M0059",
"M0045",
"M0004",
"M0007"
],
"Interaction_Method": [
"Projection interactive",
"Animation",
"Animation virtuelle",
"Modelage",
"Projection anime",
"Fond vert",
"Extraction paysage",
"Dialogue",
"Fond rouge"
]
}
}
I tried to do by aggregation or by reindexation but I fall back on my starting index, can you help me.
Thanks for you help,
Vivian Robin