# Search all indices and exclude one

**URL:** <https://discuss.elastic.co/t/search-all-indices-and-exclude-one/284498>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [September 17, 2021, 3:55pm UTC](https://discuss.elastic.co/t/search-all-indices-and-exclude-one/284498 "2021-09-17T15:55:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![schawla](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@schawla](https://discuss.elastic.co/u/schawla)\
**Post date:** [September 17, 2021, 3:55pm UTC](https://discuss.elastic.co/t/search-all-indices-and-exclude-one/284498/1 "2021-09-17T15:55:53Z")

</div>

How can we search all indices across elastic search and exlude one from the list.

Something like  
Nest.Indices search = "\_all,-kibana"

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [September 17, 2021, 4:17pm UTC](https://discuss.elastic.co/t/search-all-indices-and-exclude-one/284498/2 "2021-09-17T16:17:54Z")

</div>

Think this should work `*,-.*,-kibana`

`*` include all indexes  
`-.*` exclude any system indexes  
`-kibana` exclude a specific index

---

<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:** [September 20, 2021, 4:39am UTC](https://discuss.elastic.co/t/search-all-indices-and-exclude-one/284498/3 "2021-09-20T04:39:06Z")

</div>

[Multi-target syntax | Elasticsearch Guide [7.14] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.14/multi-index.html) goes into this more on the Elasticsearch side.

[Indices paths | Elasticsearch.Net and NEST: the .NET clients [7.x] | Elastic](https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/indices-paths.html) might also be applicable (caveat - I'm not a .net dev!).

---

<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:** [October 18, 2021, 4:39am UTC](https://discuss.elastic.co/t/search-all-indices-and-exclude-one/284498/4 "2021-10-18T04:39:51Z")

</div>

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