# Elasticsearch index settings in pig?

**URL:** <https://discuss.elastic.co/t/elasticsearch-index-settings-in-pig/22905>\
**Category:** Elasticsearch\
**Created:** [March 25, 2015, 7:45pm UTC](https://discuss.elastic.co/t/elasticsearch-index-settings-in-pig/22905 "2015-03-25T19:45:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saipa](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@saipa](https://discuss.elastic.co/u/saipa)\
**Post date:** [March 25, 2015, 7:45pm UTC](https://discuss.elastic.co/t/elasticsearch-index-settings-in-pig/22905/1 "2015-03-25T19:45:31Z")

</div>

Is it possible using the elasticsearch-hadoop connector in pig to create an  
index or set settings when the index autocreates such that it applies the  
following setting?

$ curl -XPUT '[http://localhost:9200/twitter/](http://localhost:9200/twitter/)' -d '{

"settings" : {

```
"index" : {

    "number_of_shards" : 3,

    "number_of_replicas" : 2

}

```

}

}'

Or does the index have to be created before the pig script is run?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/542e654e-f0a8-429e-8e0a-52297d0459ab%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/542e654e-f0a8-429e-8e0a-52297d0459ab%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:23am UTC](https://discuss.elastic.co/t/elasticsearch-index-settings-in-pig/22905/2 "2017-07-06T00:23:58Z")

</div>

Closed on July 6, 2017, 12:23am UTC


