trait Elastic[JsonR] extends AnyRef
Api to access root operation on elasticsearch.
- JsonR
a representation of json
- Alphabetic
- By Inheritance
- Elastic
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
aggregation[Q](index: Seq[String], type: Seq[String], query: Q, from: Option[Int] = None, size: Option[Int] = None, search_type: Option[SearchType] = None, request_cache: Boolean = false, terminate_after: Option[Int] = None, timeout: Option[Int] = None)(implicit qWrites: Writer[Q, String], jsonReader: Reader[String, SearchResponse[JsonR]], sReader: Reader[String, JsonR], ec: ExecutionContext): Future[SearchResponse[JsonR]]
Aggregation operation see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html
Aggregation operation see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html
- Q
query object type
- index
name of the index
- query
the query to execute
- from
The starting from index of the hits to return. Defaults to 0
- size
The number of hits to return. Defaults to 10
- search_type
The type of the search operation to perform
- request_cache
Set to true or false to enable or disable the caching of search results for requests
- terminate_after
The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early
- timeout
A search timeout, bounding the search request to be executed within the specified time value and bail with the hits accumulated up to that point when expired. Defaults to no timeout.
- qWrites
Query to json object conversion
- jsonReader
json string to json object conversion
- sReader
string to json conversion
- ec
ExecutionContext for future execution
- returns
-
abstract
def
analyse[Q](index: Option[String] = None, query: Q)(implicit qWrites: Writer[Q, JsonR], jWrites: Writer[JsonR, String], sReader: Reader[String, JsonR], ec: ExecutionContext): Future[JsonR]
Analyse of query.
Analyse of query.
- Q
query type
- query
the query to analyse
- qWrites
query to json string conversion
- jWrites
Json object to json string conversion
- sReader
json string to json object conversion
- ec
ExecutionContext for future execution
- returns
Json object
-
abstract
def
bulk[D](index: Option[String] = None, type: Option[String] = None, publisher: Publisher[Bulk[D]], batchSize: Int)(implicit sWrites: Writer[JsonR, String], docWriter: Writer[D, JsonR], bulkOpWriter: Writer[BulkOpType, JsonR], sReader: Reader[String, JsonR], bReader: Reader[JsonR, BulkResponse[JsonR]], ec: ExecutionContext): Publisher[BulkResponse[JsonR]]
Bulk operation see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html
Bulk operation see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html
- D
the type of the document
- index
name of the index
- publisher
a org.reactivestreams.Publisher (see reactive streams) of elastic.api.Bulk
- batchSize
the size of the packet of bulk operations to send to elastic
- sWrites
json to string conversion
- docWriter
document to json object conversion
- bulkOpWriter
elastic.api.Bulk to json object conversion
- sReader
string to json object conversion
- bReader
json object to elastic.api.BulkResponse conversion
- ec
ExecutionContext for future execution
- returns
a org.reactivestreams.Publisher (see reactive streams) of elastic.api.BulkResponse
-
abstract
def
bulkFlow[D](index: Option[String] = None, type: Option[String] = None, batchSize: Int)(implicit sWrites: Writer[JsonR, String], docWriter: Writer[D, JsonR], bulkOpWriter: Writer[BulkOpType, JsonR], sReader: Reader[String, JsonR], bReader: Reader[JsonR, BulkResponse[JsonR]], ec: ExecutionContext): Flow[Bulk[D], BulkResponse[JsonR], NotUsed]
A akka stream flow to bulk datas.
A akka stream flow to bulk datas.
- D
the type of the document
- index
name of the index
- batchSize
the size of the packet of bulk operations to send to elastic
- sWrites
json to string conversion
- docWriter
document to json object conversion
- bulkOpWriter
elastic.api.Bulk to json object conversion
- sReader
string to json object conversion
- bReader
json object to elastic.api.BulkResponse conversion
- ec
ExecutionContext for future execution
- returns
a akka.stream.scaladsl.Flow that ingest elastic.api.Bulk and out elastic.api.BulkResponse
-
abstract
def
clearCache(indices: Seq[String])(implicit sReader: Reader[String, JsonR], ec: ExecutionContext): Future[JsonR]
see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clearcache.html
see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clearcache.html
- indices
the names of the indices
- sReader
json string to json object conversion
- ec
ExecutionContext for future execution
- returns
a json object of the response
-
abstract
def
createAliases[S](settings: S)(implicit mWrites: Writer[S, String], sReader: Reader[String, JsonR], jsonReader: Reader[JsonR, IndexOps], ec: ExecutionContext): Future[IndexOps]
Aliases creation
Aliases creation
- S
alias settings type
- settings
of the aliases
- mWrites
settings to string conversion
- sReader
json string to json object conversion
- jsonReader
json to IndexOps conversion
- ec
ExecutionContext for future execution
- returns
IndexOps
-
abstract
def
createIndex[S](name: String, settings: Option[S])(implicit mWrites: Writer[S, String], sReader: Reader[String, JsonR], jsonReader: Reader[JsonR, IndexOps], ec: ExecutionContext): Future[IndexOps]
Index creation
Index creation
- S
settings type
- name
of the index
- settings
of the index
- mWrites
settings to string conversion
- sReader
json string to json object conversion
- jsonReader
json to IndexOps conversion
- ec
ExecutionContext for future execution
- returns
IndexOps
-
abstract
def
deleteIndex(name: String, type: Option[String] = None)(implicit sReader: Reader[String, JsonR], jsonReader: Reader[JsonR, IndexOps], ec: ExecutionContext): Future[IndexOps]
Delete index operation
Delete index operation
- name
name of the index
- sReader
json string to json object conversion
- jsonReader
json to IndexOps conversion
- ec
ExecutionContext for future execution
- returns
IndexOps
-
abstract
def
deleteTemplate(name: String)(implicit sReader: Reader[String, JsonR], jsonReader: Reader[JsonR, IndexOps], ec: ExecutionContext): Future[IndexOps]
Template deletion
Template deletion
- name
name of the template to delete
- sReader
string to json object conversion
- jsonReader
json object to IndexOps conversion
- ec
ExecutionContext for future execution
- returns
an IndexOps object
-
abstract
def
flush(indices: Seq[String], wait_if_ongoing: Boolean = false, force: Boolean = false)(implicit sReader: Reader[String, JsonR], jsonReader: Reader[JsonR, IndexResponse[JsonR]], ec: ExecutionContext): Future[IndexResponse[JsonR]]
Flush operation see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-flush.html
Flush operation see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-flush.html
- indices
a scala.Seq of indices names
- wait_if_ongoing
If set to true the flush operation will block until the flush can be executed if another flush operation is already executing.
- force
Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index
- sReader
json string to json object conversion
- jsonReader
json object to elastic.api.IndexResponse conversion
- ec
ExecutionContext for future execution
- returns
-
abstract
def
forceMerge(indices: Seq[String] = Seq.empty[String], max_num_segments: Option[Int] = None, only_expunge_deletes: Boolean = false, flush: Boolean = true)(implicit sReader: Reader[String, JsonR], jsonReader: Reader[JsonR, IndexResponse[JsonR]], ec: ExecutionContext): Future[IndexResponse[JsonR]]
Force merge operation see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html
Force merge operation see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html
- indices
indices
- max_num_segments
The number of segments to merge to
- only_expunge_deletes
Should the merge process only expunge segments with deletes in it.
- flush
Should a flush be performed after the forced merge
- sReader
json string to json object conversion
- jsonReader
json object to elastic.api.IndexResponse conversion
- ec
ExecutionContext for future execution
- returns
a elastic.api.IndexResponse response
-
abstract
def
getIndex(name: String)(implicit sReader: Reader[String, JsonR], ec: ExecutionContext): Future[JsonR]
Get the index
Get the index
- name
of the index
- sReader
json string to json object conversion
- ec
ExecutionContext for future execution
- returns
index as json object
-
abstract
def
getMapping(index: String, type: String)(implicit sReader: Reader[String, JsonR], ec: ExecutionContext): Future[JsonR]
Return the mapping of the index and type
Return the mapping of the index and type
- index
name of the index
- sReader
json string to json object conversion
- ec
ExecutionContext for future execution
- returns
the mapping as json object
-
abstract
def
getMappings(index: Seq[String], type: Seq[String])(implicit sReader: Reader[String, JsonR], ec: ExecutionContext): Future[JsonR]
Return the mappings definitions
Return the mappings definitions
- index
a Seq of index names
- sReader
json string to json object conversion
- ec
ExecutionContext for future execution
- returns
the mappings as json object
-
abstract
def
getTemplate(name: String)(implicit sReader: Reader[String, JsonR], ec: ExecutionContext): Future[JsonR]
get template
get template
- name
name of the template
- sReader
json string to json object conversion
- ec
ExecutionContext for future execution
- returns
Json representation of the template
-
abstract
def
index(typeDefinition: TypeDefinition): Index[JsonR]
Référence to the index
Référence to the index
- typeDefinition
the definiton of the index
- returns
an Index référence.
-
abstract
def
index(name: String, type: Option[String] = None): Index[JsonR]
Référence to the index
Référence to the index
- name
of the index
- returns
an Index référence.
-
abstract
def
mget(index: Option[String] = None, type: Option[String] = None, request: MGets)(implicit sWriter: Writer[JsonR, String], jsonWriter: Writer[MGets, JsonR], sReader: Reader[String, JsonR], jsonReader: Reader[JsonR, MGetResponse[JsonR]], ec: ExecutionContext): Future[MGetResponse[JsonR]]
Multiple get operation see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html
Multiple get operation see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html
- index
the name of the index
- request
multiple get request : elastic.api.MGets
- sWriter
json to string conversion
- jsonWriter
elastic.api.MGets to json object conversion
- sReader
string to json object conversion
- jsonReader
json object to elastic.api.MGetResponse conversion
- ec
ExecutionContext for future execution
- returns
a elastic.api.MGetResponse response
-
abstract
def
oneBulk[D](index: Option[String] = None, type: Option[String] = None, bulk: Seq[Bulk[D]])(implicit sWrites: Writer[JsonR, String], docWriter: Writer[D, JsonR], bulkOpWriter: Writer[BulkOpType, JsonR], sReader: Reader[String, JsonR], bReader: Reader[JsonR, BulkResponse[JsonR]], ec: ExecutionContext): Future[BulkResponse[JsonR]]
A atomic bulk opération see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html
A atomic bulk opération see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html
- D
the type of the document
- index
name of the index
- bulk
a Seq of elastic.api.Bulk to send in bulk
- sWrites
json to string conversion
- docWriter
document to json object conversion
- bulkOpWriter
elastic.api.Bulk to json object conversion
- sReader
string to json object conversion
- bReader
json object to elastic.api.BulkResponse conversion
- ec
ExecutionContext for future execution
- returns
-
abstract
def
putMapping[M](name: String, type: String, mapping: M, update_all_types: Boolean)(implicit mWrites: Writer[M, String], sReader: Reader[String, JsonR], jsonReader: Reader[JsonR, IndexOps], ec: ExecutionContext): Future[IndexOps]
Mapping modification
Mapping modification
- M
mapping type
- name
name of the index
- mapping
the mapping to update
- update_all_types
to update all type if conflicts
- mWrites
mapping to json string conversion
- sReader
json string to json object conversion
- jsonReader
json object to IndexOps conversion
- ec
ExecutionContext for future execution
- returns
IndexOps
-
abstract
def
putTemplate[T](name: String, template: T)(implicit mWrites: Writer[T, JsonR], jWrites: Writer[JsonR, String], sReader: Reader[String, JsonR], jsonReader: Reader[JsonR, IndexOps], ec: ExecutionContext): Future[IndexOps]
Add template with name
Add template with name
- T
template definition type
- name
name of the template
- template
template definition
- mWrites
json to string conversion
- jWrites
template to json object conversion
- sReader
json object to string conversion
- jsonReader
json object to IndexOps conversion
- ec
ExecutionContext for future execution
- returns
an IndexOps object
-
abstract
def
recovery(indices: Seq[String], detailed: Boolean = false, active_only: Boolean = false)(implicit sReader: Reader[String, JsonR], ec: ExecutionContext): Future[JsonR]
see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-recovery.html
see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-recovery.html
- indices
name of the indices
- detailed
detailed option
- active_only
active_only option
- sReader
json string to json object conversion
- ec
ExecutionContext for future execution
- returns
a json representation of the response
-
abstract
def
refresh(indices: String*)(implicit sReader: Reader[String, JsonR], jsonReader: Reader[JsonR, IndexResponse[JsonR]], ec: ExecutionContext): Future[IndexResponse[JsonR]]
see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html
see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html
- indices
the names of the indices
- sReader
json string to json object conversion
- ec
ExecutionContext for future execution
- returns
a json object of the response
-
abstract
def
scroll[Q](index: Seq[String] = Seq.empty, type: Seq[String] = Seq.empty, query: Q, scroll: String = "1m", size: Int = 20)(implicit qWrites: Writer[Q, String], jsonWriter: Writer[Scroll, JsonR], sWriter: Writer[JsonR, String], sReader: Reader[String, JsonR], jsonReader: Reader[JsonR, SearchResponse[JsonR]], ec: ExecutionContext): Source[SearchResponse[JsonR], NotUsed]
The scroll search return a org.reactivestreams.Publisher (see reactives streams) of result.
The scroll search return a org.reactivestreams.Publisher (see reactives streams) of result. All the result of the search are returned in an asynchronous stream.
- Q
the query object type
- index
name of the index
- query
the query to execute
- qWrites
Query to json object conversion
- sReader
string to json conversion
- jsonReader
json string to json object conversion
- ec
ExecutionContext for future execution
- returns
a org.reactivestreams.Publisher (see reactive streams) of elastic.api.SearchResponse
-
abstract
def
scrollPublisher[Q](index: Seq[String] = Seq.empty, type: Seq[String] = Seq.empty, query: Q, scroll: String = "1m", size: Int = 20)(implicit qWrites: Writer[Q, String], jsonWriter: Writer[Scroll, JsonR], sWriter: Writer[JsonR, String], sReader: Reader[String, JsonR], jsonReader: Reader[JsonR, SearchResponse[JsonR]], ec: ExecutionContext): Publisher[SearchResponse[JsonR]]
The scroll search return a org.reactivestreams.Publisher (see reactives streams) of result.
The scroll search return a org.reactivestreams.Publisher (see reactives streams) of result. All the result of the search are returned in an asynchronous stream.
- Q
the query object type
- index
name of the index
- query
the query to execute
- qWrites
Query to json object conversion
- sReader
string to json conversion
- jsonReader
json string to json object conversion
- ec
ExecutionContext for future execution
- returns
a org.reactivestreams.Publisher (see reactive streams) of elastic.api.SearchResponse
-
abstract
def
search[Q](index: Seq[String] = Seq.empty[String], type: Seq[String] = Seq.empty[String], query: Q, from: Int = 0, size: Int = 20, search_type: SearchType = QUERY_THEN_FETCH, request_cache: Boolean = false, terminate_after: Option[Int] = None, timeout: Option[Int] = None)(implicit qWrites: Writer[Q, String], sReader: Reader[String, JsonR], jsonReader: Reader[JsonR, SearchResponse[JsonR]], ec: ExecutionContext): Future[SearchResponse[JsonR]]
Search operation see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html
Search operation see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html
- Q
query object type
- index
name of the index
- query
the query to execute
- from
The starting from index of the hits to return. Defaults to 0
- size
The number of hits to return. Defaults to 10
- search_type
The type of the search operation to perform
- request_cache
Set to true or false to enable or disable the caching of search results for requests
- terminate_after
The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early
- timeout
A search timeout, bounding the search request to be executed within the specified time value and bail with the hits accumulated up to that point when expired. Defaults to no timeout.
- qWrites
Query to json object conversion
- sReader
string to json conversion
- jsonReader
json string to json object conversion
- ec
ExecutionContext for future execution
- returns
-
abstract
def
segments(indices: Seq[String], verbose: Boolean = false)(implicit sReader: Reader[String, JsonR], ec: ExecutionContext): Future[JsonR]
read segments see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-segments.html
read segments see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-segments.html
- indices
the names of the indices
- verbose
verbose response if true
- sReader
json string to json object conversion
- ec
ExecutionContext for future execution
- returns
a json representation of the segments
-
abstract
def
shardStores(indices: Seq[String], status: Option[String] = None)(implicit sReader: Reader[String, JsonR], ec: ExecutionContext): Future[JsonR]
Shard stores operation see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shards-stores.html
Shard stores operation see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shards-stores.html
- indices
the indices
- status
the status : green, yellow, red
- sReader
json string to json object conversion
- ec
ExecutionContext for future execution
- returns
a json object of the response
-
abstract
def
stats(indices: Seq[String])(implicit sReader: Reader[String, JsonR], ec: ExecutionContext): Future[JsonR]
see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html
see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html
- indices
the names of the indices
- sReader
json string to json object conversion
- ec
ExecutionContext for future execution
-
abstract
def
upgrade(index: String, only_ancient_segments: Boolean = false)(implicit sReader: Reader[String, JsonR], ec: ExecutionContext): Future[JsonR]
Upgrade operation see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html
Upgrade operation see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html
- index
the name if the index
- sReader
json string to json object conversion
- ec
ExecutionContext for future execution
- returns
a json objet of the response
-
abstract
def
upgradeStatus(index: String)(implicit sReader: Reader[String, JsonR], ec: ExecutionContext): Future[JsonR]
Upgrade operation status see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html
Upgrade operation status see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html
- index
the name if the index
- sReader
json string to json object conversion
- ec
ExecutionContext for future execution
- returns
a json objet of the response
-
abstract
def
verifyIndex(name: String)(implicit sReader: Reader[String, JsonR], ec: ExecutionContext): Future[Boolean]
Verify if the index exists
Verify if the index exists
- name
of the index
- sReader
json string to json object conversion
- ec
ExecutionContext for future execution
- returns
Boolean
-
abstract
def
verifyTemplate(name: String)(implicit sReader: Reader[String, JsonR], ec: ExecutionContext): Future[Boolean]
Verify if the template exists
Verify if the template exists
- name
name of the template
- sReader
json string to json object conversion
- ec
ExecutionContext for future execution
- returns
true if exists
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
createIndex[S](name: String)(implicit mWrites: Writer[S, String], sReader: Reader[String, JsonR], jsonReader: Reader[JsonR, IndexOps], ec: ExecutionContext): Future[IndexOps]
Index creation
Index creation
- S
settings type
- name
of the index
- mWrites
settings to string conversion
- sReader
json string to json object conversion
- jsonReader
json to IndexOps conversion
- ec
ExecutionContext for future execution
- returns
IndexOps
-
def
createIndex[S](name: String, settings: S)(implicit mWrites: Writer[S, String], sReader: Reader[String, JsonR], jsonReader: Reader[JsonR, IndexOps], ec: ExecutionContext): Future[IndexOps]
Index creation
Index creation
- S
settings type
- name
of the index
- settings
of the index
- mWrites
settings to string conversion
- sReader
json string to json object conversion
- jsonReader
json to IndexOps conversion
- ec
ExecutionContext for future execution
- returns
IndexOps
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getMapping(typeDefinition: TypeDefinition)(implicit sReader: Reader[String, JsonR], ec: ExecutionContext): Future[JsonR]
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
putMapping[M](typeDefinition: TypeDefinition, mapping: M, update_all_types: Boolean = false)(implicit mWrites: Writer[M, String], sReader: Reader[String, JsonR], jsonReader: Reader[JsonR, IndexOps], ec: ExecutionContext): Future[IndexOps]
- M
mapping type
- mapping
the mapping to update
- update_all_types
to update all type if conflicts
- mWrites
mapping to json string conversion
- sReader
json string to json object conversion
- jsonReader
json object to IndexOps conversion
- ec
ExecutionContext for future execution
- returns
IndexOps
-
def
putMapping[M](name: String, type: String, mapping: M)(implicit mWrites: Writer[M, String], sReader: Reader[String, JsonR], jsonReader: Reader[JsonR, IndexOps], ec: ExecutionContext): Future[IndexOps]
Mapping modification
Mapping modification
- M
mapping type
- name
name of the index
- mapping
the mapping to update
- mWrites
mapping to json string conversion
- sReader
json string to json object conversion
- jsonReader
json object to IndexOps conversion
- ec
ExecutionContext for future execution
- returns
IndexOps
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )