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 <[email protected]> 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 > @dadoonet | @elasticsearchfr > > > Le 10 février 2014 at 11:03:27, Nick Chang ([email protected]) 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 [email protected]. >> To view this discussion on the web visit >> 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. -- 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 [email protected]. To view this discussion on the web visit 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. -- 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 [email protected]. To view this discussion on the web visit 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.
