# \_source\_exclude does not work with msearch and NodeJS client

**URL:** <https://discuss.elastic.co/t/-source-exclude-does-not-work-with-msearch-and-nodejs-client/53218>\
**Category:** Elasticsearch\
**Created:** [June 18, 2016, 7:51pm UTC](https://discuss.elastic.co/t/-source-exclude-does-not-work-with-msearch-and-nodejs-client/53218 "2016-06-18T19:51:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohannad\_Saeed](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@Mohannad\_Saeed](https://discuss.elastic.co/u/Mohannad_Saeed)\
**Post date:** [June 18, 2016, 7:51pm UTC](https://discuss.elastic.co/t/-source-exclude-does-not-work-with-msearch-and-nodejs-client/53218/1 "2016-06-18T19:51:39Z")

</div>

Greetings,

The following query does not work with msearch and NodeJS client:

{  
\_type: 'Account',  
\_source\_exclude: ['timestamp', 'mainUserId']  
},  
{query: {constant\_score: {filter: {term: {mainUserId: params.mainUserId}}}}}

I also tried \_sourceExclude, \_source: {exclude: ...}, and [...].join() with no luck

Regards

---

<div class="post-metadata">

**Author:** ![Mohannad\_Saeed](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@Mohannad\_Saeed](https://discuss.elastic.co/u/Mohannad_Saeed)\
**Post date:** [June 19, 2016, 10:11pm UTC](https://discuss.elastic.co/t/-source-exclude-does-not-work-with-msearch-and-nodejs-client/53218/2 "2016-06-19T22:11:54Z")

</div>

Actually source filtering in general does not always work with multi search JavaScript Node API.

No answer? 😥

---

<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 5, 2017, 10:42pm UTC](https://discuss.elastic.co/t/-source-exclude-does-not-work-with-msearch-and-nodejs-client/53218/3 "2017-07-05T22:42:29Z")

</div>


