# Eclipse J2E: IndexNotFoundException\[no such index\]

**URL:** <https://discuss.elastic.co/t/eclipse-j2e-indexnotfoundexception-no-such-index/59426>\
**Category:** Elasticsearch\
**Created:** [August 31, 2016, 1:05pm UTC](https://discuss.elastic.co/t/eclipse-j2e-indexnotfoundexception-no-such-index/59426 "2016-08-31T13:05:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sen](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@sen](https://discuss.elastic.co/u/sen)\
**Post date:** [August 31, 2016, 1:05pm UTC](https://discuss.elastic.co/t/eclipse-j2e-indexnotfoundexception-no-such-index/59426/1 "2016-08-31T13:05:05Z")

</div>

Hello folks,

I have create a java client to connect to elasticsearch and request a document in several indexes called analytics-%{+YYYY.MM.dd}. Here is my code:

```
    try {
        client = TransportClient.builder().build()
                .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(serverIpAddr), serverPort));
    } catch (UnknownHostException e) {
        e.printStackTrace();
    }
    GetResponse response = client.prepareGet("analytics*", "logs", "AVbgot3mAQOAFbgN9Rtz")
            .setOperationThreaded(false)
            .get();    

```

However, I got the following error: [analytics\*] IndexNotFoundException[no such index]

It works when I try with: 'analytics-2016.08.31' . However, for my purpose I need to request on multiple indexes.

Do you know how I can solve that ?

Thank you fopr your attention and your help.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 31, 2016, 3:28pm UTC](https://discuss.elastic.co/t/eclipse-j2e-indexnotfoundexception-no-such-index/59426/2 "2016-08-31T15:28:56Z")

</div>

If you don't know the index name, then you can't run a GET by ID which supposes you know index/type/id but you need to search across multiple indices.

You can have a look at [https://www.elastic.co/guide/en/elasticsearch/reference/2.3/query-dsl-ids-query.html](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/query-dsl-ids-query.html)

Equivalent in Java: [https://www.elastic.co/guide/en/elasticsearch/client/java-api/2.3/java-term-level-queries.html#java-query-dsl-ids-query](https://www.elastic.co/guide/en/elasticsearch/client/java-api/2.3/java-term-level-queries.html#java-query-dsl-ids-query)

---

<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, 10:23pm UTC](https://discuss.elastic.co/t/eclipse-j2e-indexnotfoundexception-no-such-index/59426/3 "2017-07-05T22:23:32Z")

</div>


