# Can we send a query with ignorable field to Elasticsearch?

**URL:** <https://discuss.elastic.co/t/can-we-send-a-query-with-ignorable-field-to-elasticsearch/272975>\
**Category:** Elasticsearch\
**Created:** [May 14, 2021, 5:28am UTC](https://discuss.elastic.co/t/can-we-send-a-query-with-ignorable-field-to-elasticsearch/272975 "2021-05-14T05:28:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anonymous\_Soul](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anonymous_soul/32/77423_2.png) [@Anonymous\_Soul](https://discuss.elastic.co/u/Anonymous_Soul)\
**Post date:** [May 14, 2021, 5:28am UTC](https://discuss.elastic.co/t/can-we-send-a-query-with-ignorable-field-to-elasticsearch/272975/1 "2021-05-14T05:28:41Z")

</div>

Hi Team,

Suppose we are a team with 100 other teams querying our cluster, either through Kibana or Elasticsearch APIs  
Can we identify those with a special field like a uniqueID specific to one team but those fields are not indexed or queried, just pass it to every query and Elasticsearch silently ignores the field.  
We will log these queries and plot based on the uniqueID.

Can this be done? Or is there any better way?

Any help is appreciated. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 17, 2021, 10:54pm UTC](https://discuss.elastic.co/t/can-we-send-a-query-with-ignorable-field-to-elasticsearch/272975/2 "2021-05-17T22:54:52Z")

</div>

Welcome to our community! 😃

Check the `stats` field as mentioned here - [Search API | Elasticsearch Guide [7.12] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html)

---

<div class="post-metadata">

**Author:** ![Anonymous\_Soul](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anonymous_soul/32/77423_2.png) [@Anonymous\_Soul](https://discuss.elastic.co/u/Anonymous_Soul)\
**Post date:** [May 18, 2021, 11:59pm UTC](https://discuss.elastic.co/t/can-we-send-a-query-with-ignorable-field-to-elasticsearch/272975/3 "2021-05-18T23:59:26Z")

</div>

@warkolm  
Just to be clear with the requirement

**Please find below scenario:**

Consider there are 100 teams hitting a single Elasticsearch cluster either through Kibana or Elasticsearch APIs. We need to identify the usage of Elasticsearch by each team.

One solution is that we could allocate one ID to one Team.

**Questions:**

- Can we pass this ID in search queries to identify how many queries each team has hit for a day?
- However we do not want this ID to be either indexed or used in scoring of each query. Can this ID be a silent field, which we can just log and calculate the frequency per Team?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 19, 2021, 1:04am UTC](https://discuss.elastic.co/t/can-we-send-a-query-with-ignorable-field-to-elasticsearch/272975/4 "2021-05-19T01:04:45Z")

</div>

Did you read that documentation link? I'm pretty sure that's what you want.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 19, 2021, 2:18am UTC](https://discuss.elastic.co/t/can-we-send-a-query-with-ignorable-field-to-elasticsearch/272975/5 "2021-05-19T02:18:44Z")

</div>

The only way I can see to do this if Kibana queries need to be counted would probably be to define separate users per team and track this through audit logging.

You may also be able to do it through an external proxy but I am not aware of any way to otherwise do this directly in Elasticsearch.

---

<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:** [June 16, 2021, 2:19am UTC](https://discuss.elastic.co/t/can-we-send-a-query-with-ignorable-field-to-elasticsearch/272975/6 "2021-06-16T02:19:06Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
