# How to change name?

**URL:** <https://discuss.elastic.co/t/how-to-change-name/15689>\
**Category:** Elasticsearch\
**Created:** [February 10, 2014, 10:03am UTC](https://discuss.elastic.co/t/how-to-change-name/15689 "2014-02-10T10:03:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nick\_Chang](https://avatars.discourse-cdn.com/v4/letter/n/a8b319/32.png) [@Nick\_Chang](https://discuss.elastic.co/u/Nick_Chang)\
**Post date:** [February 10, 2014, 10:03am UTC](https://discuss.elastic.co/t/how-to-change-name/15689/1 "2014-02-10T10:03:21Z")

</div>

Hello All

I have two index.

index1 :  
GET /\_all/\_search?pretty  
{  
"facets": {  
"terms": {  
"terms": {  
"field": "prdId",  
"size": 90000,  
"order": "count",

```
    "exclude": []
  },
  "facet_filter": {
    "fquery": {
      "query": {
        "filtered": {
          "query": {
            "bool": {
              "should": [
                {
                  "query_string": {
                    "query": "!springhouse.qa AND !springhouse111 AND 

```

!bd4book001 AND !shejiajia705 AND !springhouse.qa001 AND !kollect AND  
!bd1test001"  
}  
}  
]  
}  
},  
"filter": {  
"bool": {  
"must": [  
{  
"match\_all": {}  
},  
{  
"terms": {  
"dlFrom": [  
2  
]  
}  
},  
{  
"range": {  
"timestamp": {  
"from": "2013-11-01T00:00:00.000Z",  
"to": "2014-01-31T15:59:59.999Z"  
}  
}  
},  
{  
"bool": {  
"must": [  
{  
"match\_all": {}  
}  
]  
}  
}  
]  
}  
}  
}  
}  
}  
}  
}  
},  
"size": 0  
}

output content :  
{  
"took": 18,  
"timed\_out": false,  
"\_shards": {  
"total": 21,  
"successful": 21,  
"failed": 0  
},  
"hits": {  
"total": 913222,  
"max\_score": 0,  
"hits": []  
},  
"facets": {  
"terms": {  
"\_type": "terms",  
"missing": 0,  
"total": 11635,  
"other": 0,  
"terms": [  
{  
"term": "0100202638",  
"count": 338  
},  
{  
"term": "0100203758",  
"count": 330  
},

index2 :  
POST /bookdatas/\_search  
{  
"query": {"match\_all": {}}  
}

Output content :  
{  
"took": 1,  
"timed\_out": false,  
"\_shards": {  
"total": 5,  
"successful": 5,  
"failed": 0  
},  
"hits": {  
"total": 26560,  
"max\_score": 1,  
"hits": [  
{  
"\_index": "bookdatas",  
"\_type": "bookdatas",  
"\_id": "JtJ1l7z4QU-dnQuHGuEcJA",  
"\_score": 1,  
"\_source": {  
"productName": "TEST\_Stuff",  
"productId": "0100202638"  
}  
},  
{  
"\_index": "bookdatas",  
"\_type": "bookdatas",  
"\_id": "J\_WipyB0Tl-F44ChCSBgxg",  
"\_score": 1,  
"\_source": {  
"productName": "book1",  
"productId": "0100001733"  
}  
},

I want to change "term": "0100202638" to "productName": "TEST\_Stuff".

output content like to :  
"term": "TEST\_Stuff",  
"count": 338

Do you have any suggest??

Thanks

--  
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/c9a3c3e4-09a9-4e49-8754-999952a948fa%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c9a3c3e4-09a9-4e49-8754-999952a948fa%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 10, 2014, 11:27am UTC](https://discuss.elastic.co/t/how-to-change-name/15689/2 "2014-02-10T11:27:07Z")

</div>

Can't you add productName in your first documents (first index) in addition or in place of productId?

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 10 février 2014 at 11:03:27, Nick Chang (nick.chang@kland.com.tw) a écrit:

Hello All

I have two index.

index1 :  
GET /\_all/\_search?pretty  
{  
"facets": {  
"terms": {  
"terms": {  
"field": "prdId",  
"size": 90000,  
"order": "count",

```
    "exclude": []
  },
  "facet_filter": {
    "fquery": {
      "query": {
        "filtered": {
          "query": {
            "bool": {
              "should": [
                {
                  "query_string": {
                    "query": "!springhouse.qa AND !springhouse111 AND !bd4book001 AND !shejiajia705 AND !springhouse.qa001 AND !kollect AND !bd1test001"
                  }
                }
              ]
            }
          },
          "filter": {
            "bool": {
              "must": [
                {
                  "match_all": {}
                },
                {
                  "terms": {
                    "dlFrom": [
                      2
                    ]
                  }
                },
                {
                  "range": {
                    "timestamp": {
                      "from": "2013-11-01T00:00:00.000Z",
                      "to": "2014-01-31T15:59:59.999Z"
                    }
                  }
                },
                {
                  "bool": {
                    "must": [
                      {
                        "match_all": {}
                      }
                    ]
                  }
                }
              ]
            }
          }
        }
      }
    }
  }
}

```

},  
"size": 0  
}

output content :  
{  
"took": 18,  
"timed\_out": false,  
"\_shards": {  
"total": 21,  
"successful": 21,  
"failed": 0  
},  
"hits": {  
"total": 913222,  
"max\_score": 0,  
"hits": []  
},  
"facets": {  
"terms": {  
"\_type": "terms",  
"missing": 0,  
"total": 11635,  
"other": 0,  
"terms": [  
{  
"term": "0100202638",  
"count": 338  
},  
{  
"term": "0100203758",  
"count": 330  
},

index2 :  
POST /bookdatas/\_search  
{  
"query": {"match\_all": {}}  
}

Output content :  
{  
"took": 1,  
"timed\_out": false,  
"\_shards": {  
"total": 5,  
"successful": 5,  
"failed": 0  
},  
"hits": {  
"total": 26560,  
"max\_score": 1,  
"hits": [  
{  
"\_index": "bookdatas",  
"\_type": "bookdatas",  
"\_id": "JtJ1l7z4QU-dnQuHGuEcJA",  
"\_score": 1,  
"\_source": {  
"productName": "TEST\_Stuff",  
"productId": "0100202638"  
}  
},  
{  
"\_index": "bookdatas",  
"\_type": "bookdatas",  
"\_id": "J\_WipyB0Tl-F44ChCSBgxg",  
"\_score": 1,  
"\_source": {  
"productName": "book1",  
"productId": "0100001733"  
}  
},

I want to change "term": "0100202638" to "productName": "TEST\_Stuff".

output content like to :  
"term": "TEST\_Stuff",  
"count": 338

Do you have any suggest??

## Thanks

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/c9a3c3e4-09a9-4e49-8754-999952a948fa%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c9a3c3e4-09a9-4e49-8754-999952a948fa%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/etPan.52f8b78b.643c9869.17289%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.52f8b78b.643c9869.17289%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Nick\_Chang](https://avatars.discourse-cdn.com/v4/letter/n/a8b319/32.png) [@Nick\_Chang](https://discuss.elastic.co/u/Nick_Chang)\
**Post date:** [February 11, 2014, 4:02am UTC](https://discuss.elastic.co/t/how-to-change-name/15689/3 "2014-02-11T04:02:56Z")

</div>

Hello

From Mongodb and MySQL.  
It's a different input data.

So, I can't add ProductName to first documents.

Thanks

David Pilato於 2014年2月10日星期一UTC+8下午7時27分07秒寫道：

> Can't you add productName in your first documents (first index) in  
> addition or in place of productId?
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 10 février 2014 at 11:03:27, Nick Chang (nick....@kland.com.tw\<javascript:\>)  
> a écrit:
> 
> Hello All
> 
> I have two index.
> 
> index1 :  
> GET /\_all/\_search?pretty  
> {  
> "facets": {  
> "terms": {  
> "terms": {  
> "field": "prdId",  
> "size": 90000,  
> "order": "count",
> 
> ```
> "exclude": []
> },
> "facet_filter": {
> "fquery": {
> "query": {
> "filtered": {
> "query": {
> "bool": {
> "should": [
> {
> "query_string": {
> "query": "!springhouse.qa AND !springhouse111 AND 
> 
> ```
> 
> !bd4book001 AND !shejiajia705 AND !springhouse.qa001 AND !kollect AND  
> !bd1test001"  
> }  
> }  
> ]  
> }  
> },  
> "filter": {  
> "bool": {  
> "must": [  
> {  
> "match\_all": {}  
> },  
> {  
> "terms": {  
> "dlFrom": [  
> 2  
> ]  
> }  
> },  
> {  
> "range": {  
> "timestamp": {  
> "from": "2013-11-01T00:00:00.000Z",  
> "to": "2014-01-31T15:59:59.999Z"  
> }  
> }  
> },  
> {  
> "bool": {  
> "must": [  
> {  
> "match\_all": {}  
> }  
> ]  
> }  
> }  
> ]  
> }  
> }  
> }  
> }  
> }  
> }  
> }  
> },  
> "size": 0  
> }
> 
> output content :  
> {  
> "took": 18,  
> "timed\_out": false,  
> "\_shards": {  
> "total": 21,  
> "successful": 21,  
> "failed": 0  
> },  
> "hits": {  
> "total": 913222,  
> "max\_score": 0,  
> "hits":   
> },  
> "facets": {  
> "terms": {  
> "\_type": "terms",  
> "missing": 0,  
> "total": 11635,  
> "other": 0,  
> "terms": [  
> {  
> "term": "0100202638",  
> "count": 338  
> },  
> {  
> "term": "0100203758",  
> "count": 330  
> },
> 
> index2 :  
> POST /bookdatas/\_search  
> {  
> "query": {"match\_all": {}}  
> }
> 
> Output content :  
> {  
> "took": 1,  
> "timed\_out": false,  
> "\_shards": {  
> "total": 5,  
> "successful": 5,  
> "failed": 0  
> },  
> "hits": {  
> "total": 26560,  
> "max\_score": 1,  
> "hits": [  
> {  
> "\_index": "bookdatas",  
> "\_type": "bookdatas",  
> "\_id": "JtJ1l7z4QU-dnQuHGuEcJA",  
> "\_score": 1,  
> "\_source": {  
> "productName": "TEST\_Stuff",  
> "productId": "0100202638"  
> }  
> },  
> {  
> "\_index": "bookdatas",  
> "\_type": "bookdatas",  
> "\_id": "J\_WipyB0Tl-F44ChCSBgxg",  
> "\_score": 1,  
> "\_source": {  
> "productName": "book1",  
> "productId": "0100001733"  
> }  
> },
> 
> I want to change "term": "0100202638" to "productName": "TEST\_Stuff".
> 
> output content like to :  
> "term": "TEST\_Stuff",  
> "count": 338
> 
> Do you have any suggest??
> 
> ## Thanks
> 
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/c9a3c3e4-09a9-4e49-8754-999952a948fa%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c9a3c3e4-09a9-4e49-8754-999952a948fa%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/c54b9656-17b9-4efd-8208-1df6eaca9eab%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c54b9656-17b9-4efd-8208-1df6eaca9eab%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 11, 2014, 4:56am UTC](https://discuss.elastic.co/t/how-to-change-name/15689/4 "2014-02-11T04:56:15Z")

</div>

Which process pull your data from MongoDB and MySQL and push to elasticsearch?  
If you can't do that at index time, then I guess you will need to manage that on a client level.

I mean that using response you already have, do a second call to elasticsearch (multisearch) to get names.  
BTW, if you can modify your bookdatas ids and set \_id=productId at index time, you will BE able to use multiget instead of multisearch.

My 2 cents

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 11 févr. 2014 à 05:02, Nick Chang [nick.chang@kland.com.tw](mailto:nick.chang@kland.com.tw) a écrit :

Hello

From Mongodb and MySQL.  
It's a different input data.

So, I can't add ProductName to first documents.

Thanks

David Pilato於 2014年2月10日星期一UTC+8下午7時27分07秒寫道：

> Can't you add productName in your first documents (first index) in addition or in place of productId?
> 
> --  
> David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
> @dadoonet | @elasticsearchfr
> 
> Le 10 février 2014 at 11:03:27, Nick Chang (nick....@kland.com.tw) a écrit:
> 
> > Hello All
> > 
> > I have two index.
> > 
> > index1 :  
> > GET /\_all/\_search?pretty  
> > {  
> > "facets": {  
> > "terms": {  
> > "terms": {  
> > "field": "prdId",  
> > "size": 90000,  
> > "order": "count",
> > 
> > ```
> > "exclude": []
> > },
> > "facet_filter": {
> > "fquery": {
> > "query": {
> > "filtered": {
> > "query": {
> > "bool": {
> > "should": [
> > {
> > "query_string": {
> > "query": "!springhouse.qa AND !springhouse111 AND !bd4book001 AND !shejiajia705 AND !springhouse.qa001 AND !kollect AND !bd1test001"
> > }
> > }
> > ]
> > }
> > },
> > "filter": {
> > "bool": {
> > "must": [
> > {
> > "match_all": {}
> > },
> > {
> > "terms": {
> > "dlFrom": [
> > 2
> > ]
> > }
> > },
> > {
> > "range": {
> > "timestamp": {
> > "from": "2013-11-01T00:00:00.000Z",
> > "to": "2014-01-31T15:59:59.999Z"
> > }
> > }
> > },
> > {
> > "bool": {
> > "must": [
> > {
> > "match_all": {}
> > }
> > ]
> > }
> > }
> > ]
> > }
> > }
> > }
> > }
> > }
> > }
> > }
> > 
> > ```
> > 
> > },  
> > "size": 0  
> > }
> > 
> > output content :  
> > {  
> > "took": 18,  
> > "timed\_out": false,  
> > "\_shards": {  
> > "total": 21,  
> > "successful": 21,  
> > "failed": 0  
> > },  
> > "hits": {  
> > "total": 913222,  
> > "max\_score": 0,  
> > "hits":   
> > },  
> > "facets": {  
> > "terms": {  
> > "\_type": "terms",  
> > "missing": 0,  
> > "total": 11635,  
> > "other": 0,  
> > "terms": [  
> > {  
> > "term": "0100202638",  
> > "count": 338  
> > },  
> > {  
> > "term": "0100203758",  
> > "count": 330  
> > },
> > 
> > index2 :  
> > POST /bookdatas/\_search  
> > {  
> > "query": {"match\_all": {}}  
> > }
> > 
> > Output content :  
> > {  
> > "took": 1,  
> > "timed\_out": false,  
> > "\_shards": {  
> > "total": 5,  
> > "successful": 5,  
> > "failed": 0  
> > },  
> > "hits": {  
> > "total": 26560,  
> > "max\_score": 1,  
> > "hits": [  
> > {  
> > "\_index": "bookdatas",  
> > "\_type": "bookdatas",  
> > "\_id": "JtJ1l7z4QU-dnQuHGuEcJA",  
> > "\_score": 1,  
> > "\_source": {  
> > "productName": "TEST\_Stuff",  
> > "productId": "0100202638"  
> > }  
> > },  
> > {  
> > "\_index": "bookdatas",  
> > "\_type": "bookdatas",  
> > "\_id": "J\_WipyB0Tl-F44ChCSBgxg",  
> > "\_score": 1,  
> > "\_source": {  
> > "productName": "book1",  
> > "productId": "0100001733"  
> > }  
> > },
> > 
> > I want to change "term": "0100202638" to "productName": "TEST\_Stuff".
> > 
> > output content like to :  
> > "term": "TEST\_Stuff",  
> > "count": 338
> > 
> > Do you have any suggest??
> > 
> > ## Thanks
> > 
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/c9a3c3e4-09a9-4e49-8754-999952a948fa%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c9a3c3e4-09a9-4e49-8754-999952a948fa%40googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/c54b9656-17b9-4efd-8208-1df6eaca9eab%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c54b9656-17b9-4efd-8208-1df6eaca9eab%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/F7DC7691-1424-40CC-BA38-B16329065627%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/F7DC7691-1424-40CC-BA38-B16329065627%40pilato.fr).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Nick\_Chang](https://avatars.discourse-cdn.com/v4/letter/n/a8b319/32.png) [@Nick\_Chang](https://discuss.elastic.co/u/Nick_Chang)\
**Post date:** [February 13, 2014, 2:54am UTC](https://discuss.elastic.co/t/how-to-change-name/15689/5 "2014-02-13T02:54:20Z")

</div>

Hello

If I push to same index, but different type with elasticsearch.  
Can I do it??

Thanks

David Pilato於 2014年2月11日星期二UTC+8下午12時56分15秒寫道：

> Which process pull your data from MongoDB and MySQL and push to  
> elasticsearch?  
> If you can't do that at index time, then I guess you will need to manage  
> that on a client level.
> 
> I mean that using response you already have, do a second call to  
> elasticsearch (multisearch) to get names.  
> BTW, if you can modify your bookdatas ids and set \_id=productId at index  
> time, you will BE able to use multiget instead of multisearch.
> 
> My 2 cents
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 11 févr. 2014 à 05:02, Nick Chang \<nick....@kland.com.tw \<javascript:\>\>  
> a écrit :
> 
> Hello
> 
> From Mongodb and MySQL.  
> It's a different input data.
> 
> So, I can't add ProductName to first documents.
> 
> Thanks
> 
> David Pilato於 2014年2月10日星期一UTC+8下午7時27分07秒寫道：
> 
> > Can't you add productName in your first documents (first index) in  
> > addition or in place of productId?
> > 
> > --  
> > _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)  
> > [http://Elasticsearch.com](http://Elasticsearch.com)_  
> > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> > 
> > Le 10 février 2014 at 11:03:27, Nick Chang (nick....@kland.com.tw) a  
> > écrit:
> > 
> > Hello All
> > 
> > I have two index.
> > 
> > index1 :  
> > GET /\_all/\_search?pretty  
> > {  
> > "facets": {  
> > "terms": {  
> > "terms": {  
> > "field": "prdId",  
> > "size": 90000,  
> > "order": "count",
> > 
> > ```
> > "exclude": []
> > },
> > "facet_filter": {
> > "fquery": {
> > "query": {
> > "filtered": {
> > "query": {
> > "bool": {
> > "should": [
> > {
> > "query_string": {
> > "query": "!springhouse.qa AND !springhouse111 
> > 
> > ```
> > 
> > AND !bd4book001 AND !shejiajia705 AND !springhouse.qa001 AND !kollect AND  
> > !bd1test001"  
> > }  
> > }  
> > ]  
> > }  
> > },  
> > "filter": {  
> > "bool": {  
> > "must": [  
> > {  
> > "match\_all": {}  
> > },  
> > {  
> > "terms": {  
> > "dlFrom": [  
> > 2  
> > ]  
> > }  
> > },  
> > {  
> > "range": {  
> > "timestamp": {  
> > "from": "2013-11-01T00:00:00.000Z",  
> > "to": "2014-01-31T15:59:59.999Z"  
> > }  
> > }  
> > },  
> > {  
> > "bool": {  
> > "must": [  
> > {  
> > "match\_all": {}  
> > }  
> > ]  
> > }  
> > }  
> > ]  
> > }  
> > }  
> > }  
> > }  
> > }  
> > }  
> > }  
> > },  
> > "size": 0  
> > }
> > 
> > output content :  
> > {  
> > "took": 18,  
> > "timed\_out": false,  
> > "\_shards": {  
> > "total": 21,  
> > "successful": 21,  
> > "failed": 0  
> > },  
> > "hits": {  
> > "total": 913222,  
> > "max\_score": 0,  
> > "hits":   
> > },  
> > "facets": {  
> > "terms": {  
> > "\_type": "terms",  
> > "missing": 0,  
> > "total": 11635,  
> > "other": 0,  
> > "terms": [  
> > {  
> > "term": "0100202638",  
> > "count": 338  
> > },  
> > {  
> > "term": "0100203758",  
> > "count": 330  
> > },
> > 
> > index2 :  
> > POST /bookdatas/\_search  
> > {  
> > "query": {"match\_all": {}}  
> > }
> > 
> > Output content :  
> > {  
> > "took": 1,  
> > "timed\_out": false,  
> > "\_shards": {  
> > "total": 5,  
> > "successful": 5,  
> > "failed": 0  
> > },  
> > "hits": {  
> > "total": 26560,  
> > "max\_score": 1,  
> > "hits": [  
> > {  
> > "\_index": "bookdatas",  
> > "\_type": "bookdatas",  
> > "\_id": "JtJ1l7z4QU-dnQuHGuEcJA",  
> > "\_score": 1,  
> > "\_source": {  
> > "productName": "TEST\_Stuff",  
> > "productId": "0100202638"  
> > }  
> > },  
> > {  
> > "\_index": "bookdatas",  
> > "\_type": "bookdatas",  
> > "\_id": "J\_WipyB0Tl-F44ChCSBgxg",  
> > "\_score": 1,  
> > "\_source": {  
> > "productName": "book1",  
> > "productId": "0100001733"  
> > }  
> > },
> > 
> > I want to change "term": "0100202638" to "productName": "TEST\_Stuff".
> > 
> > output content like to :  
> > "term": "TEST\_Stuff",  
> > "count": 338
> > 
> > Do you have any suggest??
> > 
> > ## Thanks
> > 
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/c9a3c3e4-09a9-4e49-8754-999952a948fa%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c9a3c3e4-09a9-4e49-8754-999952a948fa%40googlegroups.com)  
> > .  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/c54b9656-17b9-4efd-8208-1df6eaca9eab%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c54b9656-17b9-4efd-8208-1df6eaca9eab%40googlegroups.com)  
> > .  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/122d42be-1f59-4df2-b8de-4054499385b6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/122d42be-1f59-4df2-b8de-4054499385b6%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 13, 2014, 5:43am UTC](https://discuss.elastic.co/t/how-to-change-name/15689/6 "2014-02-13T05:43:06Z")

</div>

I don't think you can.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 13 févr. 2014 à 03:54, Nick Chang [nick.chang@kland.com.tw](mailto:nick.chang@kland.com.tw) a écrit :

Hello

If I push to same index, but different type with elasticsearch.  
Can I do it??

Thanks

David Pilato於 2014年2月11日星期二UTC+8下午12時56分15秒寫道：

> Which process pull your data from MongoDB and MySQL and push to elasticsearch?  
> If you can't do that at index time, then I guess you will need to manage that on a client level.
> 
> I mean that using response you already have, do a second call to elasticsearch (multisearch) to get names.  
> BTW, if you can modify your bookdatas ids and set \_id=productId at index time, you will BE able to use multiget instead of multisearch.
> 
> My 2 cents
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 11 févr. 2014 à 05:02, Nick Chang [nick....@kland.com.tw](mailto:nick....@kland.com.tw) a écrit :
> 
> Hello
> 
> From Mongodb and MySQL.  
> It's a different input data.
> 
> So, I can't add ProductName to first documents.
> 
> Thanks
> 
> David Pilato於 2014年2月10日星期一UTC+8下午7時27分07秒寫道：
> 
> > Can't you add productName in your first documents (first index) in addition or in place of productId?
> > 
> > --  
> > David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
> > @dadoonet | @elasticsearchfr
> > 
> > Le 10 février 2014 at 11:03:27, Nick Chang (nick....@kland.com.tw) a écrit:
> > 
> > > Hello All
> > > 
> > > I have two index.
> > > 
> > > index1 :  
> > > GET /\_all/\_search?pretty  
> > > {  
> > > "facets": {  
> > > "terms": {  
> > > "terms": {  
> > > "field": "prdId",  
> > > "size": 90000,  
> > > "order": "count",
> > > 
> > > ```
> > > "exclude": []
> > > },
> > > "facet_filter": {
> > > "fquery": {
> > > "query": {
> > > "filtered": {
> > > "query": {
> > > "bool": {
> > > "should": [
> > > {
> > > "query_string": {
> > > "query": "!springhouse.qa AND !springhouse111 AND !bd4book001 AND !shejiajia705 AND !springhouse.qa001 AND !kollect AND !bd1test001"
> > > }
> > > }
> > > ]
> > > }
> > > },
> > > "filter": {
> > > "bool": {
> > > "must": [
> > > {
> > > "match_all": {}
> > > },
> > > {
> > > "terms": {
> > > "dlFrom": [
> > > 2
> > > ]
> > > }
> > > },
> > > {
> > > "range": {
> > > "timestamp": {
> > > "from": "2013-11-01T00:00:00.000Z",
> > > "to": "2014-01-31T15:59:59.999Z"
> > > }
> > > }
> > > },
> > > {
> > > "bool": {
> > > "must": [
> > > {
> > > "match_all": {}
> > > }
> > > ]
> > > }
> > > }
> > > ]
> > > }
> > > }
> > > }
> > > }
> > > }
> > > }
> > > }
> > > 
> > > ```
> > > 
> > > },  
> > > "size": 0  
> > > }
> > > 
> > > output content :  
> > > {  
> > > "took": 18,  
> > > "timed\_out": false,  
> > > "\_shards": {  
> > > "total": 21,  
> > > "successful": 21,  
> > > "failed": 0  
> > > },  
> > > "hits": {  
> > > "total": 913222,  
> > > "max\_score": 0,  
> > > "hits":   
> > > },  
> > > "facets": {  
> > > "terms": {  
> > > "\_type": "terms",  
> > > "missing": 0,  
> > > "total": 11635,  
> > > "other": 0,  
> > > "terms": [  
> > > {  
> > > "term": "0100202638",  
> > > "count": 338  
> > > },  
> > > {  
> > > "term": "0100203758",  
> > > "count": 330  
> > > },
> > > 
> > > index2 :  
> > > POST /bookdatas/\_search  
> > > {  
> > > "query": {"match\_all": {}}  
> > > }
> > > 
> > > Output content :  
> > > {  
> > > "took": 1,  
> > > "timed\_out": false,  
> > > "\_shards": {  
> > > "total": 5,  
> > > "successful": 5,  
> > > "failed": 0  
> > > },  
> > > "hits": {  
> > > "total": 26560,  
> > > "max\_score": 1,  
> > > "hits": [  
> > > {  
> > > "\_index": "bookdatas",  
> > > "\_type": "bookdatas",  
> > > "\_id": "JtJ1l7z4QU-dnQuHGuEcJA",  
> > > "\_score": 1,  
> > > "\_source": {  
> > > "productName": "TEST\_Stuff",  
> > > "productId": "0100202638"  
> > > }  
> > > },  
> > > {  
> > > "\_index": "bookdatas",  
> > > "\_type": "bookdatas",  
> > > "\_id": "J\_WipyB0Tl-F44ChCSBgxg",  
> > > "\_score": 1,  
> > > "\_source": {  
> > > "productName": "book1",  
> > > "productId": "0100001733"  
> > > }  
> > > },
> > > 
> > > I want to change "term": "0100202638" to "productName": "TEST\_Stuff".
> > > 
> > > output content like to :  
> > > "term": "TEST\_Stuff",  
> > > "count": 338
> > > 
> > > Do you have any suggest??
> > > 
> > > ## Thanks
> > > 
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/c9a3c3e4-09a9-4e49-8754-999952a948fa%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c9a3c3e4-09a9-4e49-8754-999952a948fa%40googlegroups.com).  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/c54b9656-17b9-4efd-8208-1df6eaca9eab%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c54b9656-17b9-4efd-8208-1df6eaca9eab%40googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/122d42be-1f59-4df2-b8de-4054499385b6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/122d42be-1f59-4df2-b8de-4054499385b6%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/AEC35E21-0702-472F-A5AC-BC11D3AD8568%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/AEC35E21-0702-472F-A5AC-BC11D3AD8568%40pilato.fr).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 1:50am UTC](https://discuss.elastic.co/t/how-to-change-name/15689/7 "2017-07-06T01:50:37Z")

</div>


