# Type name containing slash doesn't work with REST search api

**URL:** <https://discuss.elastic.co/t/type-name-containing-slash-doesnt-work-with-rest-search-api/45464>\
**Category:** Elasticsearch\
**Created:** [March 25, 2016, 4:29pm UTC](https://discuss.elastic.co/t/type-name-containing-slash-doesnt-work-with-rest-search-api/45464 "2016-03-25T16:29:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elas](https://avatars.discourse-cdn.com/v4/letter/e/ec9cab/32.png) [@elas](https://discuss.elastic.co/u/elas)\
**Post date:** [March 25, 2016, 4:29pm UTC](https://discuss.elastic.co/t/type-name-containing-slash-doesnt-work-with-rest-search-api/45464/1 "2016-03-25T16:29:19Z")

</div>

I switched from Java API to REST API. There is an index "derive" with type named "par/chi" containing "/".

curl -XGET '[http://localhost:9200/derive/par/chi/\_search?q=heart](http://localhost:9200/derive/par/chi/_search?q=heart)'

I can encode the "/" to "%2F" to make request valid for elasticsearch server. However, it wouldn't return me any results since the type is "par/chi", not "par%2Fchi".

How can I make it work using the REST API to handle the special type name?

I am using version 2.1

---

<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:** [July 5, 2017, 11:05pm UTC](https://discuss.elastic.co/t/type-name-containing-slash-doesnt-work-with-rest-search-api/45464/2 "2017-07-05T23:05:05Z")

</div>

Closed on July 5, 2017, 11:05pm UTC


