`ignore` in index creation


(Bhargavi Sri) #1

I have the following statement:

es.indices.create(index=index_name,ignore=[400,404])

In a sample program that I created, the index got created again though it was already existing on the cluster. So what exactly does 'ignore' do in the creation of index.


(David Pilato) #2

An index can not be created again if one already exists.


(Bhargavi Sri) #3

But the index did get created when I passed the ignore argument


(David Pilato) #4

I see.

Ignore parameter means here that if you get back a 400 or 404 status code, don't fail and continue.


(Bhargavi Sri) #5

So it just appends to the existing index? Cause that is what happened in my execution


(David Pilato) #6

It appends what?


(system) #7

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