com.sksamuel.elastic4s

Type members

Classlikes

case class CommonRequestOptions(timeout: Duration, masterNodeTimeout: Duration)
Companion:
object
Companion:
class
object ElasticApi extends ElasticApi
Companion:
class
case class ElasticClient(client: HttpClient) extends AutoCloseable

An ElasticClient is used to execute HTTP requests against an ElasticSearch cluster. This class delegates the actual HTTP calls to an instance of HttpClient.

An ElasticClient is used to execute HTTP requests against an ElasticSearch cluster. This class delegates the actual HTTP calls to an instance of HttpClient.

Any third party HTTP client library can be made to work with elastic4s by creating an instance of the HttpClient typeclass wrapping the underlying client library and then creating the ElasticClient with it.

Value parameters:
client

the HTTP client library to use

object ElasticDsl extends ElasticDsl
Companion:
class
trait ElasticDslWithoutSearch extends ElasticApi with BulkHandlers with CatHandlers with CountHandlers with ClusterHandlers with DeleteHandlers with ExistsHandlers with ExplainHandlers with GetHandlers with IndexHandlers with IndexAdminHandlers with IndexAliasHandlers with IndexStatsHandlers with IndexTemplateHandlers with IngestHandlers with LocksHandlers with MappingHandlers with NodesHandlers with ReindexHandlers with RoleAdminHandlers with RoleHandlers with RolloverHandlers with SearchTemplateHandlers with SearchScrollHandlers with SettingsHandlers with SnapshotHandlers with StoredScriptHandlers with UpdateHandlers with TaskHandlers with TermVectorHandlers with UserAdminHandlers with UserHandlers with ValidateHandlers
case class ElasticNodeEndpoint(protocol: String, host: String, port: Int, prefix: Option[String])

Holds all of the variables needed to describe the HTTP endpoint of an elasticsearch node.

Holds all of the variables needed to describe the HTTP endpoint of an elasticsearch node.

Value parameters:
host

the hostname of the node

port

the port of the server process

prefix

an optional prefix that will be prepended to all requests

protocol

http or https

Companion:
class
case class ElasticProperties(endpoints: Seq[ElasticNodeEndpoint], options: Map[String, String])

Contains the endpoints of the nodes to connect to, as well as connection properties.

Contains the endpoints of the nodes to connect to, as well as connection properties.

Companion:
object
trait Executor[F[_]]
Companion:
object
object Executor
Companion:
class
trait Functor[F[_]]
Companion:
object
object Functor
Companion:
class
trait HttpClient extends AutoCloseable

A typeclass that an underlying http client can implement, so that it can be used by the ElasticClient implementation by elastic4s.

A typeclass that an underlying http client can implement, so that it can be used by the ElasticClient implementation by elastic4s.

In other words, this is a wrapper trait so that HTTP libraries such as Apache HTTP commons, Akka HTTP client, STTP or whatever can be used with elasticsearch. The wrapped client can then be passed into the ElasticClient.

case class RequestFailure(status: Int, body: Option[String], headers: Map[String, String], error: ElasticError) extends Response[Nothing]
case class RequestSuccess[U](status: Int, body: Option[String], headers: Map[String, String], result: U) extends Response[U]
sealed trait Response[+U]

Deprecated classlikes

Companion:
class
Deprecated
case class ElasticsearchClientUri(uri: String, hosts: List[(String, Int)], options: Map[String, String])

Uri used to connect to an Elasticsearch cluster. The general format is

Uri used to connect to an Elasticsearch cluster. The general format is

http(s)://host:port),host:port)?querystring

Multiple host:port combinations can be specified, seperated by commas. Options can be specified using standard uri query string syntax, eg cluster.name=superman

To use HTTPS when using the HTTP client, add ssl=true to the query parameters.

Companion:
object
Deprecated