import ( "github.com/blevesearch/bleve/index/store" "github.com/blevesearch/bleve/index/store/kv" ) func main() { config := map[string]interface{}{ "path": "/path/to/data/store", } writer, err := kv.NewKVStoreWriter("mystore", config) if err != nil { panic(err) } // Write some key-value data writer.Set([]byte("key1"), []byte("value1")) writer.Set([]byte("key2"), []byte("value2")) // Close the writer to safely close the connection to the data store writer.Close() }As demonstrated in the example, the KVWriter Close method is called once all desired key-value data has been written. This package library is useful for applications that need to persist small amounts of data in a simple, key-value format.