0

Is it possible to set particular nested fields for reindexing? According to docs https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html#docs-reindex-filter-source, selected fields are array.

    POST _reindex
    {
      "source": {
        "index": "twitter",
        "_source": ["user", "_doc"]
      },
      "dest": {
        "index": "new_twitter"
      }
    }

For example, we need reindex only nested fields of user like "name" and "birthdate": How could it be done? We need something like this:

    POST _reindex
    {
      "source": {
        "index": "twitter",
        "_source": { "user": ["name", "birthdate"], "_doc"]
      },
      "dest": {
        "index": "new_twitter"
      }
    }

1 Answer 1

2
POST _reindex 
{
      "source": {
        "index": "twitter",
        "_source": [ "user.name", "user. birthdate", "_doc"]
      },
      "dest": {
        "index": "twitter_new"
      }
    }
}

You need to use . to refer them.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.