Merge indexes


I have got two types of log files that contains differents information about calls so I got two indexes. The common field between the two files types is the call id that is unique. I want to create a new index that will contains some fileds obtained by the first index and some others obtains by the other index. It's that possible ?

You can use the scroll API to query across both indices using a sort on the common ID field and in your client code (python, whatever) you can fuse the docs together into a new one you insert into a new index

Alternatively if you are searching on the basis of those common parameters, you can make use of the multi search API ( The documents can be fused together at the application layer.

Thank you for answers but I don't understand what I should do to merge my two indexes. My first index is cdr_sbc and my second is cdr_oem. I want to automatically create a new index that will contains some fields from cdr_sbc and some from cdr_oem. The common field is Call_id. For example if cdr_sbc contains these fields :

"call station", "called station", "Call_id"

and the cdr_oem contains

"call_time", "codec", "media type", "Call_id".

I want to automatically build a new index called for exemaple index3 that will contains

"call station", "called station", "call_time", "codec", "media type", "Call_id".

I haven't seen any API yet that provides this functionality. For this functionality, you need to write a logic that pulls documents, combines them and them pushes the combined one into another index.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.