Skip to main content

create_es_client

Function create_es_client 

Source
pub fn create_es_client(
    url: &str,
    username: String,
    password: String,
) -> Result<Arc<Elasticsearch>, SearchConfigError>
Expand description

Creates an Elasticsearch client using the provided URL and credentials.

ยงErrors

Returns SearchConfigError::UrlParseError if url is not a valid URL.

Returns a SearchConfigError if the Elasticsearch transport cannot be constructed.