# How to check whether index exists in Elasticsearch or not, using SparkR

**URL:** <https://discuss.elastic.co/t/how-to-check-whether-index-exists-in-elasticsearch-or-not-using-sparkr/85728>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [May 15, 2017, 9:27am UTC](https://discuss.elastic.co/t/how-to-check-whether-index-exists-in-elasticsearch-or-not-using-sparkr/85728 "2017-05-15T09:27:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![newbie\_here](https://avatars.discourse-cdn.com/v4/letter/n/dbc845/32.png) [@newbie\_here](https://discuss.elastic.co/u/newbie_here)\
**Post date:** [May 15, 2017, 9:27am UTC](https://discuss.elastic.co/t/how-to-check-whether-index-exists-in-elasticsearch-or-not-using-sparkr/85728/1 "2017-05-15T09:27:39Z")

</div>

Hi,

I don't know if this the correct forum to ask, but still here goes.

While I was using R, i used the elastic package to check the existence of an index.  
Following were the commands :-

library(elastic)  
index\_exists(index\_name)  
it returns either "TRUE" or "FALSE.

Can I find something similar for SparkR, without using the elastic package.

Thanks in advance

---

<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 12, 2017, 9:42am UTC](https://discuss.elastic.co/t/how-to-check-whether-index-exists-in-elasticsearch-or-not-using-sparkr/85728/2 "2017-06-12T09:42:57Z")

</div>

Closed on June 12, 2017, 9:42am UTC

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