# 検索時にインデックスごとに返却するフィールドを分けたい

**URL:** <https://discuss.elastic.co/t/topic/149924>\
**Category:** 日本語による質問・議論はこちら\
**Created:** [September 26, 2018, 4:54am UTC](https://discuss.elastic.co/t/topic/149924 "2018-09-26T04:54:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![tsgkdt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsgkdt/32/39151_2.png) [@tsgkdt](https://discuss.elastic.co/u/tsgkdt)\
**Post date:** [September 26, 2018, 6:37am UTC](https://discuss.elastic.co/t/topic/149924/2 "2018-09-26T06:37:35Z")

</div>

ドキュメントを見る限りだと、出来ないようにも見えます...

過去、類似の発言もありましたが、回答がつかずにCloseになっていました。

> [@Different source filtering when searching accross multiple indices](https://discuss.elastic.co/t/different-source-filtering-when-searching-accross-multiple-indices/136487):
>
> We are trying to query across multiple indices and using source , includes and excludes to get the required fields in the \_source is it possible to specify the includes and excludes per index i.e. different set of includes,excludes for each index in elastic search 5.6.4

例示なので実際には違うのでしょうけども、  
index1のnameとindex2のnameが、違うものを指す、異なる内容のものだとすれば、  
違うフィールド名にして取り扱うことで、\_sourceで悩まなくても良いと思ったところです。

---

_[View the full topic](https://discuss.elastic.co/t/topic/149924)._
