Document for define an ElasticSearch index


Hello Elastic Search experts,

Tried to find a complete guide of JSON format for how to define an ElasticSearch index. But can only find some ad-hoc samples, and if anyone have any good documents, appreciate for sharing.

thanks in advance,

(Joshua Rich) #2

You don't really need to use JSON to create an index, a simple PUT foobar REST API call would create an index called foobar.

If you are knew to Elasticsearch and you've already got it installed and running, I'd suggest you start reading at the Finding your feet chapter of the definitive guide and follow that through. It will guide you through some basic concepts like creating an index, indexing a document and search for that document. It should hopefully get you started and show you where JSON comes into play.


Thanks @Joshua_Rich,

I read through the document, and I met with issues like how to find what means _source, what means _all when define an index? If you know where can find the reference for them, it will be great.


(Joshua Rich) #4

All of the documentation is available on the Elastic web site, you can easily search through it to find snippets of information like this. However, it sounds like you are just beginning with Elasticsearch, so I'd highly recommend just reading the Definitive Guide to get up to speed about how Elasticsearch is designed and what things like _source and _all are for, rather than randomly picking up bits here and there. As you read through the guide, you will hopefully begin to understand a lot more and you can always come here to the forums for any further clarification :smile:


Very helpful, thanks @Joshua_Rich!

Have a good night,

(system) #6