# Dot prefix in index name gives me an error (?)

**URL:** <https://discuss.elastic.co/t/dot-prefix-in-index-name-gives-me-an-error/180675>\
**Category:** Elasticsearch\
**Created:** [May 11, 2019, 10:11pm UTC](https://discuss.elastic.co/t/dot-prefix-in-index-name-gives-me-an-error/180675 "2019-05-11T22:11:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Martins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_martins/32/46040_2.png) [@David\_Martins](https://discuss.elastic.co/u/David_Martins)\
**Post date:** [May 11, 2019, 10:11pm UTC](https://discuss.elastic.co/t/dot-prefix-in-index-name-gives-me-an-error/180675/1 "2019-05-11T22:11:37Z")

</div>

Hey guys,

I've a quick question about a behavior of elasticsearch indexes.

So, I use logstash to import data into my AWS elasticsearch cluster.

When I create a normal index and insert, lets say, 10 rows, everything works fine. docs.count tells me that I have 10 rows, \_search request works like normal, everything is fine.

When I do the exact same insert, but prefix the index name by a dot ".", it seems like it's working, but now my docs.count tell me 0. And when I try to GET \_search the data, I've nothing inserted. (hits.total : 0)

Why does that happens ? I didn't find anything special on the internet about prefixing the index name by a ".".

Thank you !

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 13, 2019, 6:04am UTC](https://discuss.elastic.co/t/dot-prefix-in-index-name-gives-me-an-error/180675/2 "2019-05-13T06:04:26Z")

</div>

I believe dot prefixed indices are assumed to be internal system indices, e.g. `.kibana`, which may explain why there are restrictions on them.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [May 13, 2019, 7:37am UTC](https://discuss.elastic.co/t/dot-prefix-in-index-name-gives-me-an-error/180675/3 "2019-05-13T07:37:11Z")

</div>

What @Christian_Dahlqvist says is right, Elasticsearch generally uses dot-prefixed index names to distinguish "internal" from "external" indices. It's probably best to avoid dot-prefixed names for your own indices.

However, I do not think they behave specially in this regard:

```auto
$ curl 'http://localhost:9200/.i/_bulk?pretty' -H 'Content-type: application/x-ndjson' --data-binary $'{"index":{}}\n{}\n{"index":{}}\n{}\n'
{
  "took" : 286,
  "errors" : false,
  "items" : [
    {
      "index" : {
        "_index" : ".i",
        "_type" : "_doc",
        "_id" : "PZwcsGoB1z9Opyf6E_C4",
        "_version" : 1,
        "result" : "created",
        "_shards" : {
          "total" : 2,
          "successful" : 1,
          "failed" : 0
        },
        "_seq_no" : 0,
        "_primary_term" : 1,
        "status" : 201
      }
    },
    {
      "index" : {
        "_index" : ".i",
        "_type" : "_doc",
        "_id" : "PpwcsGoB1z9Opyf6E_C4",
        "_version" : 1,
        "result" : "created",
        "_shards" : {
          "total" : 2,
          "successful" : 1,
          "failed" : 0
        },
        "_seq_no" : 1,
        "_primary_term" : 1,
        "status" : 201
      }
    }
  ]
}
$ curl 'http://localhost:9200/_cat/shards?v'
index shard prirep state docs store ip node
.i 0 p STARTED 2 2.5kb 127.0.0.1 node-0
.i 0 r UNASSIGNED

```

All indices will report that they contain no documents until they are first [refreshed](https://www.elastic.co/guide/en/elasticsearch/reference/7.0/docs-refresh.html). Normally a refresh happens automatically after some time, but it might be disabled by a template that sets `refresh_interval` to `-1`. Are you sure that the index still looks empty after a refresh?

---

<div class="post-metadata">

**Author:** ![David\_Martins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_martins/32/46040_2.png) [@David\_Martins](https://discuss.elastic.co/u/David_Martins)\
**Post date:** [May 13, 2019, 8:37pm UTC](https://discuss.elastic.co/t/dot-prefix-in-index-name-gives-me-an-error/180675/4 "2019-05-13T20:37:51Z")

</div>

Thank you !

So I kept digging, and I actually made had a mistake in my .conf file and forgot to prefix my index name..

But as you said, I'll avoid to prefix an index with a dot.

---

<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 10, 2019, 8:37pm UTC](https://discuss.elastic.co/t/dot-prefix-in-index-name-gives-me-an-error/180675/5 "2019-06-10T20:37:52Z")

</div>

Closed on June 10, 2019, 8:37pm UTC

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