-
Notifications
You must be signed in to change notification settings - Fork 637
Closed
Labels
Description
Hello,
The BulkIndexerConfig ask for a Client *elasticsearch.Client
// BulkIndexerConfig represents configuration of the indexer.
type BulkIndexerConfig struct {
...
Client *elasticsearch.Client // The Elasticsearch client.
...
}Even though it only use the transport part :
func (r BulkRequest) Do(ctx context.Context, transport Transport) (*Response, error)So, if you use a TypedClient, you can't use it in BulkIndexerConfig, you will have to instantiate a Client only for the BulkIndexerConfig.
What I propose is to change the BulkIndexerConfig to ask for a Transport so it can be compatible with both Client and TypedClient
// BulkIndexerConfig represents configuration of the indexer.
type BulkIndexerConfig struct {
...
Transport esapi.Transport // The Elasticsearch transport.
...If you want, I already push the changes in a branch => https://github.com/ludovic-franconieri/go-elasticsearch/tree/bulk_indexer_transport
Thanks
strider2038, emahiro, JessedeJonge, jgoodall, shayanderson and 1 more