Indices.Exists returns false even if the index exists for ES 7.2.0
See original GitHub issueNEST/Elasticsearch.Net version: 7.0.1 Elasticsearch version: 7.2.0 Description of the problem including expected versus actual behavior: Regardless of whether the index exists or not the function
Indices.Exists("IndexName").Exists
always returns false.
This can be observed for Indices.ExistsAsync too.
Calling HEAD accesslogs
in the dev console will return “200 - OK”
Steps to reproduce:
- Create an index in dev console
- Write a console app that calls “Indices.Exists().Exists” function for index created in step 1
- Observe that the return is false instead of expected true
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Indices.Exists returns false even if the index exists for ES ...
Indices.Exists returns false even if the index exists for ES 7.2.0 · Create an index in dev console · Write a console app...
Read more >Upgrading to Elastic Search NEST 7.0.1 breaks code that ...
When testing following code with elasticsearch 7.2.0 and NEST 7.0.1 ... Index created, exists?: True Index deleted, exists?: False.
Read more >Exists API | Elasticsearch Guide [8.9]
Checks if a data stream, index, or alias exists. response = client.indices.exists( ... This behavior applies even if the request targets other open...
Read more >Exists API | Elasticsearch Guide [7.17]
Checks if a data stream, index, or alias exists. HEAD my-data-stream ... This behavior applies even if the request targets other open indices....
Read more >API Documentation - Elasticsearch DSL - Read the Docs
Returns True if the index already exists in elasticsearch. Any additional keyword arguments will be passed to Elasticsearch.indices.exists unchanged.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same problem here. It has re-emerged. Also .NET Core and latest NEST.
I am reproducing this consistently with Elasticsearch 7.3.0 and NEST 7.1.0
With code like:
result.IsValid comes back false, as does result.Exists. result.ServerError is null.
The index definitely exists, I can see (returns 200) it when calling
I am getting this response:
That makes no sense, how can the response be invalid but also return 200?
BTW, other operations (search, actually creating the index, etc.) work fine, so it’s not as if I’m not connecting properly.
This is definitely a bug and the client is not behaving as expected. Please re-open.