Remote Reindexing and New Fields

Hi All,

I'm setting up my new elastic cloud account and migrating stuff from a qbox account, the process is pretty straightforward so far but I have a problem, so far I've only been using my current index for search but now I want to be able to analyze the data from it and then it hit me, I had no .raw mapping for the fields that I need to analyze. Searching the web it seems that the only option right now it's to reindex, which I'm doing anyways since I'm migrating. My question is: what do I have to do to create this new mappings when doing the remote reindex from elastic? I want to create a raw version of an analysed field on my new elastic cloud index, any help is much appreciated.

If you didn't add a mapping template, did you get a .keyword field automatically in place of .raw? It would serve the same function.

I read about it but unfortunately no, I don't have either of those, the thing is that I didn't create the index originally and the process will take to much time to create an index from scratch due to different constraints so I would rather reindex the data I already have on my qbox index using the remote index api, but that one only seems to make an exact copy of the original index, which is not properly set up. Thanks for your input though, hopefully I can get a few more ideas.

No, no. You can reindex into a new mapping. All you have to do is create the index and add the mapping in advance. Then reindex into this newly created index.

Got it, do I have the create all the mappings or can I create just the mapping I need and run the reindex? I'm thinking it might read my mapping and then overlap the rest of the mappings in the old index correct? Thanks!

I'm trying to accurately understand what you're asking.

Scenario 1: You have a remote index, and you want to change the mapping on the data in that index as you reindex it to a new local index.

In this case, the old mapping is not preserved at all. The new mapping will apply to your data as it is indexed into the new, local index.

Scenario 2: You have already reindexed from a remote index, and you want to change the mapping on the data in that index.

In this case, you would perhaps not even be able to do what you're describing. You'd have to reindex locally to a new local index, with the new mapping.

To answer the "mapping I need" question, I presume you're talking about mapping out the fields that have specific, non-text mappings (numbers, booleans, keyword [formerly raw], etc.). So long as you're okay with the default auto-mapped values, then you're probably okay to do that: map just the "must-have" mappings, and accept the default on others.

You could, theoretically, download the mapping from the remote side, and just edit it to reflect newer mapping ideas.

Ok I think I understand now, thanks so much. I'm about to reindex to my new local index should be simple enough then. Again thanks for the direction.

Please check my update above ^^^

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