# Reindex select fields using Nest

**URL:** <https://discuss.elastic.co/t/reindex-select-fields-using-nest/135076>\
**Category:** Elasticsearch\
**Created:** [June 8, 2018, 3:41am UTC](https://discuss.elastic.co/t/reindex-select-fields-using-nest/135076 "2018-06-08T03:41:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kabcampbell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kabcampbell/32/137695_2.png) [@kabcampbell](https://discuss.elastic.co/u/kabcampbell)\
**Post date:** [June 8, 2018, 3:41am UTC](https://discuss.elastic.co/t/reindex-select-fields-using-nest/135076/1 "2018-06-08T03:41:55Z")

</div>

I can't figure out how to re-index select fields using the Nest client for Elasticsearch. Basically, I want to do this:

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

and can't figure out what the Nest syntax is to specify the \_source fields.

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [June 14, 2018, 12:41am UTC](https://discuss.elastic.co/t/reindex-select-fields-using-nest/135076/2 "2018-06-14T00:41:55Z")

</div>

It looks like it's missing from `ReindexOnServer(...)` on the high level client. [I've opened an issue to add it.](https://github.com/elastic/elasticsearch-net/issues/3288)

In the meantime, you can submit the request using the lowlevel client exposed on the high level, and still get back a high level response

```auto
var reindexResponse = client.LowLevel.Reindex<ReindexOnServerResponse>(@"{
      ""source"": {
        ""index"": ""twitter"",
        ""_source"": [""user"", ""_doc""]
      },
      ""dest"": {
        ""index"": ""new_twitter""
      }
    }");

```

---

<div class="post-metadata">

**Author:** ![kabcampbell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kabcampbell/32/137695_2.png) [@kabcampbell](https://discuss.elastic.co/u/kabcampbell)\
**Post date:** [June 14, 2018, 3:36am UTC](https://discuss.elastic.co/t/reindex-select-fields-using-nest/135076/3 "2018-06-14T03:36:29Z")

</div>

Thank you. This is perfect.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 12, 2018, 3:36am UTC](https://discuss.elastic.co/t/reindex-select-fields-using-nest/135076/4 "2018-07-12T03:36:31Z")

</div>

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