Beginner help: Elasticsearch -> Kibana || GoLang

I am trying to create a new index using go. Here's what I have right now (very simple) :

createindex, err := client.CreateIndex("test_ind").BodyString(mapping).Do(ctx)
	if err != nil {
		// Handle Error
		panic(err)
	}
	if !createindex.Acknowledged {
		//Not acknowledged
	}

When I search for indexes with my code, the new index "test_ind" appears, yet I am not able to see it on kibana. Any help is appreciated!

If you go to Dev Tools > Console in Kibana and run

GET _cat/indices

Is the index listed in the response?

I suspect you're referring to not seeing it in the Discover menu. For it to appear here, you need to set up an Index Pattern for it.

I do see it when I run GET _cat/indices however when I go to management in kibana and try to define my index pattern, it is not showing up

There's one of two reasons for this

  1. The index pattern defined does not match any indices. You can check this by using the exact name of the index you are looking for

  2. The index does not contain any documents and therefore a mapping that Kibana can use. You can check this by running

    GET test_ind/_count 
    

    in Dev Tools and checking that a count greater than 0 comes back in the response.

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