Skip to content

BulkIndexer throw error when es.Client not provided ? #462

@mayankvaid88

Description

@mayankvaid88

Currently, NewBulkInderxer function creates a elasticsearch.Client with default ES URL=localhost:9200 in case if it is not provided by the consumer. In most of the PROD ready applications ES Url address would be different from the default address and it makes sense to give a feedback in terms of error rather than creating it to default. This will help in getting an early feedback to the consumer to course correct it.
https://github.com/elastic/go-elasticsearch/blob/main/esutil/bulk_indexer.go#L190

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions