# Spark - reading index with no type

**URL:** <https://discuss.elastic.co/t/spark-reading-index-with-no-type/272843>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [May 12, 2021, 7:05pm UTC](https://discuss.elastic.co/t/spark-reading-index-with-no-type/272843 "2021-05-12T19:05:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elan1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elan1/32/78300_2.png) [@Elan1](https://discuss.elastic.co/u/Elan1)\
**Post date:** [May 12, 2021, 7:05pm UTC](https://discuss.elastic.co/t/spark-reading-index-with-no-type/272843/1 "2021-05-12T19:05:07Z")

</div>

Hi I am using ES 7.1 and created an index. Now I am trying to read it from Spark but getting an error because my index does not have a type.

I am following the examples located here [GitHub - elastic/elasticsearch-hadoop: Elasticsearch real-time search and analytics natively integrated with Hadoop](https://github.com/elastic/elasticsearch-hadoop#apache-spark). How can an index be read with no type?

e.g.

instead of

```auto
val sc = new SparkContext(conf)
sc.esRDD("radio/artists", "?q=me*")

```

I want to do

```auto
val sc = new SparkContext(conf)
sc.esRDD("radio", "?q=me*")

```

---

<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 9, 2021, 7:05pm UTC](https://discuss.elastic.co/t/spark-reading-index-with-no-type/272843/2 "2021-06-09T19:05:29Z")

</div>

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