ElasticRequest

zio.elasticsearch.ElasticRequest$
See theElasticRequest companion trait

Attributes

Companion
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

Attributes

Supertypes
class Object
trait Matchable
class Any
sealed trait BulkRequest extends ElasticRequest[BulkResponse]

Attributes

Supertypes
class Object
trait Matchable
class Any
sealed trait CountRequest extends ElasticRequest[Int]

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
sealed trait CreateRequest extends BulkableRequest[DocumentId]

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
final case class DeleteIndex(name: IndexName) extends DeleteIndexRequest

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class DeleteIndex
sealed trait ExistsRequest extends ElasticRequest[Boolean]

Attributes

Supertypes
class Object
trait Matchable
class Any
sealed trait GetByIdRequest extends ElasticRequest[GetResult]

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
sealed trait SearchRequest extends ElasticRequest[SearchResult]

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

final def aggregate(index: IndexName, aggregation: ElasticAggregation): AggregateRequest

Constructs an instance of AggregateRequest using the specified parameters.

Constructs an instance of AggregateRequest using the specified parameters.

Value parameters

aggregation

the desired ElasticAggregation to perform

index

the name of the Elasticsearch index to aggregate on

Attributes

Returns

an instance of AggregateRequest that represents the aggregation to be performed.

final def bulk(requests: BulkableRequest[_]*): BulkRequest

Constructs an instance of BulkRequest using the specified requests.

Constructs an instance of BulkRequest using the specified requests.

Value parameters

requests

a list of requests that will be executed as a bulk

Attributes

Returns

an instance of BulkRequest that represents the bulk operation to be performed.

final def count(index: IndexName): CountRequest

Constructs an instance of CountRequest for whole specified index.

Constructs an instance of CountRequest for whole specified index.

Value parameters

index

the name of the index to count documents from

Attributes

Returns

an instance of CountRequest that represents the count operation to be performed.

final def count(index: IndexName, query: ElasticQuery[_]): CountRequest

Constructs an instance of CountRequest for counting documents satisfy the query.

Constructs an instance of CountRequest for counting documents satisfy the query.

Value parameters

index

the name of the Elasticsearch index to count documents from

query

the ElasticQuery object to query documents that will be counted

Attributes

Returns

an instance of CountRequest that represents the count operation to be performed.

final def create[A : Schema](index: IndexName, doc: A): CreateRequest

Constructs an instance of CreateRequest used for creating a document in the specified index.

Constructs an instance of CreateRequest used for creating a document in the specified index.

Type parameters

A

the type of the document to be created. An implicit Schema instance must be in scope for this type

Value parameters

doc

the document to be created, represented by an instance of type A

index

the name of the index to create the document in

Attributes

Returns

an instance of CreateRequest that represents the create operation to be performed.

final def create[A : Schema](index: IndexName, id: DocumentId, doc: A): CreateWithIdRequest

Constructs an instance of CreateWithIdRequest used for creating a document with specified ID in the specified index.

Constructs an instance of CreateWithIdRequest used for creating a document with specified ID in the specified index.

Type parameters

A

the type of the document to be created. An implicit Schema instance must be in scope for this type

Value parameters

doc

the document to be created, represented by an instance of type A

id

the ID of the new document

index

the name of the index to create the document in

Attributes

Returns

an instance of CreateRequest that represents the create with id operation to be performed.

Constructs an instance of CreateIndexRequest used for creating an empty index.

Constructs an instance of CreateIndexRequest used for creating an empty index.

Value parameters

name

the name of the index to be created

Attributes

Returns

an instance of CreateIndexRequest that represents the create index operation to be performed.

final def createIndex(name: IndexName, definition: String): CreateIndexRequest

Constructs an instance of CreateIndexRequest used for creating an index with a specified definition.

Constructs an instance of CreateIndexRequest used for creating an index with a specified definition.

Value parameters

definition

the settings for the index

name

the name of the index to be created

Attributes

Returns

an instance of CreateIndexRequest that represents the create index operation to be performed.

Constructs an instance of DeleteByIdRequest used for deleting a document from the specified index by specified ID.

Constructs an instance of DeleteByIdRequest used for deleting a document from the specified index by specified ID.

Value parameters

id

the ID of the document to be deleted

index

the name of the index to delete the document from

Attributes

Returns

an instance of DeleteByIdRequest that represents delete by id operation to be performed.

Constructs an instance of DeleteByQueryRequest used for deleting documents from the specified index that satisfy specified query.

Constructs an instance of DeleteByQueryRequest used for deleting documents from the specified index that satisfy specified query.

Value parameters

index

the name of the index to delete documents from

query

the ElasticQuery object to query documents which will be deleted

Attributes

Returns

an instance of DeleteByQueryRequest that represents delete by query operation to be performed.

Constructs an instance of DeleteIndexRequest used for deleting an index by specified name.

Constructs an instance of DeleteIndexRequest used for deleting an index by specified name.

Value parameters

name

the name of the index to be deleted

Attributes

Returns

an instance of DeleteIndexRequest that represents delete index operation to be performed.

final def exists(index: IndexName, id: DocumentId): ExistsRequest

Constructs an instance of ExistsRequest used for checking whether document exists.

Constructs an instance of ExistsRequest used for checking whether document exists.

Value parameters

id

the ID of the document to check for existence

index

the name of the index where the document may be located

Attributes

Returns

an instance of ExistsRequest that represents exists operation to be performed.

final def getById(index: IndexName, id: DocumentId): GetByIdRequest

Constructs an instance of GetByIdRequest used for retrieving the document from specified index, by specified ID.

Constructs an instance of GetByIdRequest used for retrieving the document from specified index, by specified ID.

Value parameters

id

the ID of the document to retrieve

index

the name of the index where the document is located

Attributes

Returns

an instance of GetByIdRequest that represents get by id operation to be performed.

final def search(index: IndexName, query: ElasticQuery[_]): SearchRequest

Constructs an instance of SearchRequest using the specified parameters.

Constructs an instance of SearchRequest using the specified parameters.

Value parameters

index

the name of the index to search in

query

the ElasticQuery object representing the search query to execute

Attributes

Returns

an instance of SearchRequest that represents search operation to be performed.

final def search(index: IndexName, query: ElasticQuery[_], aggregation: ElasticAggregation): SearchAndAggregateRequest

Constructs an instance of SearchAndAggregateRequest using the specified parameters.

Constructs an instance of SearchAndAggregateRequest using the specified parameters.

Value parameters

aggregation

an ElasticAggregation object for aggregating queried documents

index

the name of the index to search and aggregate in

query

an ElasticQuery object for querying documents

Attributes

Returns

an instance of SearchAndAggregateRequest that represents search and aggregate operations to be performed.

final def update[A : Schema](index: IndexName, id: DocumentId, doc: A): UpdateRequest

Constructs an instance of UpdateRequest used for updating the document in the specified index, by specified ID.

Constructs an instance of UpdateRequest used for updating the document in the specified index, by specified ID.

Type parameters

A

the type of the document to be updated. An implicit Schema instance must be in scope for this type

Value parameters

doc

the document to be updated, represented by an instance of type A

id

the ID of the document to update

index

the name of the index containing the document to update

Attributes

Returns

an instance of UpdateRequest that represents update operation to be performed.

Constructs an instance of UpdateByQueryRequest used for updating all documents in the specified index.

Constructs an instance of UpdateByQueryRequest used for updating all documents in the specified index.

Value parameters

index

the name of the index to update documents in

script

a script containing the update logic to apply

Attributes

Returns

an instance of UpdateByQueryRequest that represents update all operation to be performed.

final def updateByQuery(index: IndexName, query: ElasticQuery[_], script: Script): UpdateByQueryRequest

Constructs an instance of UpdateByQueryRequest used for satisfying documents matching specified query in the specified index.

Constructs an instance of UpdateByQueryRequest used for satisfying documents matching specified query in the specified index.

Value parameters

index

the name of the index to update documents in

query

an ElasticQuery object representing a search query used to find documents to update

script

a script containing the update logic to apply

Attributes

Returns

an instance of UpdateByQueryRequest that represents update by query operation to be performed.

final def updateByScript(index: IndexName, id: DocumentId, script: Script): UpdateRequest

Constructs an instance of UpdateRequest used for updating the document with specified ID in the specified index.

Constructs an instance of UpdateRequest used for updating the document with specified ID in the specified index.

Value parameters

id

the ID of the document to update

index

the name of the index containing the document to update

script

a script containing the update logic to apply to the document

Attributes

Returns

an instance of UpdateRequest that represents update by script operation to be performed.

final def upsert[A : Schema](index: IndexName, id: DocumentId, doc: A): CreateOrUpdateRequest

Constructs an instance of CreateOrUpdateRequest used for creating or updating the document in the specified index with specified ID.

Constructs an instance of CreateOrUpdateRequest used for creating or updating the document in the specified index with specified ID.

Type parameters

A

the type of the document to be created or updated. An implicit Schema instance must be in scope for this type

Value parameters

doc

the document to be created or updated, represented by an instance of type A

id

the ID of the document to be created or updated

index

the name of the index to create or update the document in

Attributes

Returns

an instance of CreateOrUpdateRequest that represents upsert operation to be performed.