// IndexExists allows to check if the index exists or not.
// http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-exists.html
IndexExists allows to check if the index exists or not.
// IndexExists allows to check if the index exists or not . // http : // www . elasticsearch . org / guide / en / elasticsearch / reference / current / indices - exists . html
func (c *Client) IndexExists() (bool, error) {
	if checkIndexName(c) {
		return false, c.Error
	}
	_client := &http.Client{}
	resp, err := _client.Head(c.hostDB.String())
	if err != nil {
		c.Error = err
		return false, err
	}
	return resp.StatusCode == http.StatusOK, nil
}
func ( c * Client ) IndexExists ( ) ( bool , error ) { if checkIndexName ( c ) { return false , c . Error } _client := & http . Client { } resp , err := _client . Head ( c . hostDB . String ( ) ) if err != nil { c . Error = err return false , err } return resp . StatusCode == http . StatusOK , nil }
IndexExists allows to check if the index exists or not.
IndexExists allows to check if the index exists or not .