[][src]Struct elasticsearch::indices::Indices

pub struct Indices<'a> { /* fields omitted */ }

Namespace client for Indices APIs

Methods

impl<'a> Indices<'a>[src]

pub fn new(client: &'a Elasticsearch) -> Self[src]

Creates a new instance of Indices

pub fn analyze<'b>(
    &'a self,
    parts: IndicesAnalyzeParts<'b>
) -> IndicesAnalyze<'a, 'b, ()>
[src]

Indices Analyze API

Performs the analysis process on a text and return the tokens breakdown of the text.

pub fn clear_cache<'b>(
    &'a self,
    parts: IndicesClearCacheParts<'b>
) -> IndicesClearCache<'a, 'b, ()>
[src]

Indices Clear Cache API

Clears all or specific caches for one or more indices.

pub fn clone<'b>(
    &'a self,
    parts: IndicesCloneParts<'b>
) -> IndicesClone<'a, 'b, ()>
[src]

Indices Clone API

Clones an index

pub fn close<'b>(
    &'a self,
    parts: IndicesCloseParts<'b>
) -> IndicesClose<'a, 'b, ()>
[src]

Indices Close API

Closes an index.

pub fn create<'b>(
    &'a self,
    parts: IndicesCreateParts<'b>
) -> IndicesCreate<'a, 'b, ()>
[src]

Indices Create API

Creates an index with optional settings and mappings.

Examples

Create an index with a mapping

let client = Elasticsearch::default();
let response = client
    .indices()
    .create(IndicesCreateParts::Index("test_index"))
    .body(json!({
        "mappings" : {
            "properties" : {
                "field1" : { "type" : "text" }
            }
        }
    }))
    .send()
    .await?;
    

pub fn delete<'b>(
    &'a self,
    parts: IndicesDeleteParts<'b>
) -> IndicesDelete<'a, 'b>
[src]

Indices Delete API

Deletes an index.

pub fn delete_alias<'b>(
    &'a self,
    parts: IndicesDeleteAliasParts<'b>
) -> IndicesDeleteAlias<'a, 'b>
[src]

Indices Delete Alias API

Deletes an alias.

pub fn delete_template<'b>(
    &'a self,
    parts: IndicesDeleteTemplateParts<'b>
) -> IndicesDeleteTemplate<'a, 'b>
[src]

Indices Delete Template API

Deletes an index template.

pub fn exists<'b>(
    &'a self,
    parts: IndicesExistsParts<'b>
) -> IndicesExists<'a, 'b>
[src]

Indices Exists API

Returns information about whether a particular index exists.

pub fn exists_alias<'b>(
    &'a self,
    parts: IndicesExistsAliasParts<'b>
) -> IndicesExistsAlias<'a, 'b>
[src]

Indices Exists Alias API

Returns information about whether a particular alias exists.

pub fn exists_template<'b>(
    &'a self,
    parts: IndicesExistsTemplateParts<'b>
) -> IndicesExistsTemplate<'a, 'b>
[src]

Indices Exists Template API

Returns information about whether a particular index template exists.

pub fn exists_type<'b>(
    &'a self,
    parts: IndicesExistsTypeParts<'b>
) -> IndicesExistsType<'a, 'b>
[src]

Indices Exists Type API

Returns information about whether a particular document type exists. (DEPRECATED)

pub fn flush<'b>(
    &'a self,
    parts: IndicesFlushParts<'b>
) -> IndicesFlush<'a, 'b, ()>
[src]

Indices Flush API

Performs the flush operation on one or more indices.

pub fn flush_synced<'b>(
    &'a self,
    parts: IndicesFlushSyncedParts<'b>
) -> IndicesFlushSynced<'a, 'b, ()>
[src]

Indices Flush Synced API

Performs a synced flush operation on one or more indices. Synced flush is deprecated and will be removed in 8.0. Use flush instead

pub fn forcemerge<'b>(
    &'a self,
    parts: IndicesForcemergeParts<'b>
) -> IndicesForcemerge<'a, 'b, ()>
[src]

Indices Forcemerge API

Performs the force merge operation on one or more indices.

pub fn freeze<'b>(
    &'a self,
    parts: IndicesFreezeParts<'b>
) -> IndicesFreeze<'a, 'b, ()>
[src]

Indices Freeze API

Freezes an index. A frozen index has almost no overhead on the cluster (except for maintaining its metadata in memory) and is read-only.

pub fn get<'b>(&'a self, parts: IndicesGetParts<'b>) -> IndicesGet<'a, 'b>[src]

Indices Get API

Returns information about one or more indices.

pub fn get_alias<'b>(
    &'a self,
    parts: IndicesGetAliasParts<'b>
) -> IndicesGetAlias<'a, 'b>
[src]

Indices Get Alias API

Returns an alias.

pub fn get_field_mapping<'b>(
    &'a self,
    parts: IndicesGetFieldMappingParts<'b>
) -> IndicesGetFieldMapping<'a, 'b>
[src]

Indices Get Field Mapping API

Returns mapping for one or more fields.

pub fn get_mapping<'b>(
    &'a self,
    parts: IndicesGetMappingParts<'b>
) -> IndicesGetMapping<'a, 'b>
[src]

Indices Get Mapping API

Returns mappings for one or more indices.

pub fn get_settings<'b>(
    &'a self,
    parts: IndicesGetSettingsParts<'b>
) -> IndicesGetSettings<'a, 'b>
[src]

Indices Get Settings API

Returns settings for one or more indices.

pub fn get_template<'b>(
    &'a self,
    parts: IndicesGetTemplateParts<'b>
) -> IndicesGetTemplate<'a, 'b>
[src]

Indices Get Template API

Returns an index template.

pub fn get_upgrade<'b>(
    &'a self,
    parts: IndicesGetUpgradeParts<'b>
) -> IndicesGetUpgrade<'a, 'b>
[src]

Indices Get Upgrade API

The _upgrade API is no longer useful and will be removed.

pub fn open<'b>(
    &'a self,
    parts: IndicesOpenParts<'b>
) -> IndicesOpen<'a, 'b, ()>
[src]

Indices Open API

Opens an index.

pub fn put_alias<'b>(
    &'a self,
    parts: IndicesPutAliasParts<'b>
) -> IndicesPutAlias<'a, 'b, ()>
[src]

Indices Put Alias API

Creates or updates an alias.

pub fn put_mapping<'b>(
    &'a self,
    parts: IndicesPutMappingParts<'b>
) -> IndicesPutMapping<'a, 'b, ()>
[src]

Indices Put Mapping API

Updates the index mappings.

Examples

Put a mapping into an existing index, assuming the index does not have a mapping, or that any properties specified do not conflict with existing properties

let client = Elasticsearch::default();
let response = client
    .indices()
    .put_mapping(IndicesPutMappingParts::Index(&["test_index"]))
    .body(json!({
        "properties" : {
            "field1" : { "type" : "text" }
        }
    }))
    .send()
    .await?;
    

pub fn put_settings<'b>(
    &'a self,
    parts: IndicesPutSettingsParts<'b>
) -> IndicesPutSettings<'a, 'b, ()>
[src]

Indices Put Settings API

Updates the index settings.

pub fn put_template<'b>(
    &'a self,
    parts: IndicesPutTemplateParts<'b>
) -> IndicesPutTemplate<'a, 'b, ()>
[src]

Indices Put Template API

Creates or updates an index template.

pub fn recovery<'b>(
    &'a self,
    parts: IndicesRecoveryParts<'b>
) -> IndicesRecovery<'a, 'b>
[src]

Indices Recovery API

Returns information about ongoing index shard recoveries.

pub fn refresh<'b>(
    &'a self,
    parts: IndicesRefreshParts<'b>
) -> IndicesRefresh<'a, 'b, ()>
[src]

Indices Refresh API

Performs the refresh operation in one or more indices.

pub fn reload_search_analyzers<'b>(
    &'a self,
    parts: IndicesReloadSearchAnalyzersParts<'b>
) -> IndicesReloadSearchAnalyzers<'a, 'b, ()>
[src]

Indices Reload Search Analyzers API

Reloads an index's search analyzers and their resources.

pub fn rollover<'b>(
    &'a self,
    parts: IndicesRolloverParts<'b>
) -> IndicesRollover<'a, 'b, ()>
[src]

Indices Rollover API

Updates an alias to point to a new index when the existing index is considered to be too large or too old.

pub fn segments<'b>(
    &'a self,
    parts: IndicesSegmentsParts<'b>
) -> IndicesSegments<'a, 'b>
[src]

Indices Segments API

Provides low-level information about segments in a Lucene index.

pub fn shard_stores<'b>(
    &'a self,
    parts: IndicesShardStoresParts<'b>
) -> IndicesShardStores<'a, 'b>
[src]

Indices Shard Stores API

Provides store information for shard copies of indices.

pub fn shrink<'b>(
    &'a self,
    parts: IndicesShrinkParts<'b>
) -> IndicesShrink<'a, 'b, ()>
[src]

Indices Shrink API

Allow to shrink an existing index into a new index with fewer primary shards.

pub fn split<'b>(
    &'a self,
    parts: IndicesSplitParts<'b>
) -> IndicesSplit<'a, 'b, ()>
[src]

Indices Split API

Allows you to split an existing index into a new index with more primary shards.

pub fn stats<'b>(&'a self, parts: IndicesStatsParts<'b>) -> IndicesStats<'a, 'b>[src]

Indices Stats API

Provides statistics on operations happening in an index.

pub fn unfreeze<'b>(
    &'a self,
    parts: IndicesUnfreezeParts<'b>
) -> IndicesUnfreeze<'a, 'b, ()>
[src]

Indices Unfreeze API

Unfreezes an index. When a frozen index is unfrozen, the index goes through the normal recovery process and becomes writeable again.

pub fn update_aliases<'b>(&'a self) -> IndicesUpdateAliases<'a, 'b, ()>[src]

Indices Update Aliases API

Updates index aliases.

pub fn upgrade<'b>(
    &'a self,
    parts: IndicesUpgradeParts<'b>
) -> IndicesUpgrade<'a, 'b, ()>
[src]

Indices Upgrade API

The _upgrade API is no longer useful and will be removed.

pub fn validate_query<'b>(
    &'a self,
    parts: IndicesValidateQueryParts<'b>
) -> IndicesValidateQuery<'a, 'b, ()>
[src]

Indices Validate Query API

Allows a user to validate a potentially expensive query without executing it.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Indices<'a>

impl<'a> Send for Indices<'a>

impl<'a> Sync for Indices<'a>

impl<'a> Unpin for Indices<'a>

impl<'a> !UnwindSafe for Indices<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.