[−][src]Struct elasticsearch::indices::Indices
Namespace client for Indices APIs
Implementations
impl<'a> Indices<'a>
[src]
pub fn new(transport: &'a Transport) -> Self
[src]
Creates a new instance of Indices
pub fn transport(&self) -> &Transport
[src]
pub fn analyze<'b>(
&'a self,
parts: IndicesAnalyzeParts<'b>
) -> IndicesAnalyze<'a, 'b, ()>
[src]
&'a self,
parts: IndicesAnalyzeParts<'b>
) -> IndicesAnalyze<'a, 'b, ()>
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]
&'a self,
parts: IndicesClearCacheParts<'b>
) -> IndicesClearCache<'a, 'b, ()>
Clears all or specific caches for one or more indices.
pub fn clone<'b>(
&'a self,
parts: IndicesCloneParts<'b>
) -> IndicesClone<'a, 'b, ()>
[src]
&'a self,
parts: IndicesCloneParts<'b>
) -> IndicesClone<'a, 'b, ()>
Clones an index
pub fn close<'b>(
&'a self,
parts: IndicesCloseParts<'b>
) -> IndicesClose<'a, 'b, ()>
[src]
&'a self,
parts: IndicesCloseParts<'b>
) -> IndicesClose<'a, 'b, ()>
Closes an index.
pub fn create<'b>(
&'a self,
parts: IndicesCreateParts<'b>
) -> IndicesCreate<'a, 'b, ()>
[src]
&'a self,
parts: IndicesCreateParts<'b>
) -> IndicesCreate<'a, 'b, ()>
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]
&'a self,
parts: IndicesDeleteParts<'b>
) -> IndicesDelete<'a, 'b>
Deletes an index.
pub fn delete_alias<'b>(
&'a self,
parts: IndicesDeleteAliasParts<'b>
) -> IndicesDeleteAlias<'a, 'b>
[src]
&'a self,
parts: IndicesDeleteAliasParts<'b>
) -> IndicesDeleteAlias<'a, 'b>
Deletes an alias.
pub fn delete_template<'b>(
&'a self,
parts: IndicesDeleteTemplateParts<'b>
) -> IndicesDeleteTemplate<'a, 'b>
[src]
&'a self,
parts: IndicesDeleteTemplateParts<'b>
) -> IndicesDeleteTemplate<'a, 'b>
Deletes an index template.
pub fn exists<'b>(
&'a self,
parts: IndicesExistsParts<'b>
) -> IndicesExists<'a, 'b>
[src]
&'a self,
parts: IndicesExistsParts<'b>
) -> IndicesExists<'a, 'b>
Returns information about whether a particular index exists.
pub fn exists_alias<'b>(
&'a self,
parts: IndicesExistsAliasParts<'b>
) -> IndicesExistsAlias<'a, 'b>
[src]
&'a self,
parts: IndicesExistsAliasParts<'b>
) -> IndicesExistsAlias<'a, 'b>
Returns information about whether a particular alias exists.
pub fn exists_template<'b>(
&'a self,
parts: IndicesExistsTemplateParts<'b>
) -> IndicesExistsTemplate<'a, 'b>
[src]
&'a self,
parts: IndicesExistsTemplateParts<'b>
) -> IndicesExistsTemplate<'a, 'b>
Returns information about whether a particular index template exists.
pub fn exists_type<'b>(
&'a self,
parts: IndicesExistsTypeParts<'b>
) -> IndicesExistsType<'a, 'b>
[src]
&'a self,
parts: IndicesExistsTypeParts<'b>
) -> IndicesExistsType<'a, 'b>
Returns information about whether a particular document type exists. (DEPRECATED)
pub fn flush<'b>(
&'a self,
parts: IndicesFlushParts<'b>
) -> IndicesFlush<'a, 'b, ()>
[src]
&'a self,
parts: IndicesFlushParts<'b>
) -> IndicesFlush<'a, 'b, ()>
Performs the flush operation on one or more indices.
pub fn flush_synced<'b>(
&'a self,
parts: IndicesFlushSyncedParts<'b>
) -> IndicesFlushSynced<'a, 'b, ()>
[src]
&'a self,
parts: IndicesFlushSyncedParts<'b>
) -> IndicesFlushSynced<'a, 'b, ()>
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]
&'a self,
parts: IndicesForcemergeParts<'b>
) -> IndicesForcemerge<'a, 'b, ()>
Performs the force merge operation on one or more indices.
pub fn freeze<'b>(
&'a self,
parts: IndicesFreezeParts<'b>
) -> IndicesFreeze<'a, 'b, ()>
[src]
&'a self,
parts: IndicesFreezeParts<'b>
) -> IndicesFreeze<'a, 'b, ()>
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]
Returns information about one or more indices.
pub fn get_alias<'b>(
&'a self,
parts: IndicesGetAliasParts<'b>
) -> IndicesGetAlias<'a, 'b>
[src]
&'a self,
parts: IndicesGetAliasParts<'b>
) -> IndicesGetAlias<'a, 'b>
Returns an alias.
pub fn get_field_mapping<'b>(
&'a self,
parts: IndicesGetFieldMappingParts<'b>
) -> IndicesGetFieldMapping<'a, 'b>
[src]
&'a self,
parts: IndicesGetFieldMappingParts<'b>
) -> IndicesGetFieldMapping<'a, 'b>
Returns mapping for one or more fields.
pub fn get_mapping<'b>(
&'a self,
parts: IndicesGetMappingParts<'b>
) -> IndicesGetMapping<'a, 'b>
[src]
&'a self,
parts: IndicesGetMappingParts<'b>
) -> IndicesGetMapping<'a, 'b>
Returns mappings for one or more indices.
pub fn get_settings<'b>(
&'a self,
parts: IndicesGetSettingsParts<'b>
) -> IndicesGetSettings<'a, 'b>
[src]
&'a self,
parts: IndicesGetSettingsParts<'b>
) -> IndicesGetSettings<'a, 'b>
Returns settings for one or more indices.
pub fn get_template<'b>(
&'a self,
parts: IndicesGetTemplateParts<'b>
) -> IndicesGetTemplate<'a, 'b>
[src]
&'a self,
parts: IndicesGetTemplateParts<'b>
) -> IndicesGetTemplate<'a, 'b>
Returns an index template.
pub fn get_upgrade<'b>(
&'a self,
parts: IndicesGetUpgradeParts<'b>
) -> IndicesGetUpgrade<'a, 'b>
[src]
&'a self,
parts: IndicesGetUpgradeParts<'b>
) -> IndicesGetUpgrade<'a, 'b>
The _upgrade API is no longer useful and will be removed.
pub fn open<'b>(
&'a self,
parts: IndicesOpenParts<'b>
) -> IndicesOpen<'a, 'b, ()>
[src]
&'a self,
parts: IndicesOpenParts<'b>
) -> IndicesOpen<'a, 'b, ()>
Opens an index.
pub fn put_alias<'b>(
&'a self,
parts: IndicesPutAliasParts<'b>
) -> IndicesPutAlias<'a, 'b, ()>
[src]
&'a self,
parts: IndicesPutAliasParts<'b>
) -> IndicesPutAlias<'a, 'b, ()>
Creates or updates an alias.
pub fn put_mapping<'b>(
&'a self,
parts: IndicesPutMappingParts<'b>
) -> IndicesPutMapping<'a, 'b, ()>
[src]
&'a self,
parts: IndicesPutMappingParts<'b>
) -> IndicesPutMapping<'a, 'b, ()>
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]
&'a self,
parts: IndicesPutSettingsParts<'b>
) -> IndicesPutSettings<'a, 'b, ()>
Updates the index settings.
pub fn put_template<'b>(
&'a self,
parts: IndicesPutTemplateParts<'b>
) -> IndicesPutTemplate<'a, 'b, ()>
[src]
&'a self,
parts: IndicesPutTemplateParts<'b>
) -> IndicesPutTemplate<'a, 'b, ()>
Creates or updates an index template.
pub fn recovery<'b>(
&'a self,
parts: IndicesRecoveryParts<'b>
) -> IndicesRecovery<'a, 'b>
[src]
&'a self,
parts: IndicesRecoveryParts<'b>
) -> IndicesRecovery<'a, 'b>
Returns information about ongoing index shard recoveries.
pub fn refresh<'b>(
&'a self,
parts: IndicesRefreshParts<'b>
) -> IndicesRefresh<'a, 'b, ()>
[src]
&'a self,
parts: IndicesRefreshParts<'b>
) -> IndicesRefresh<'a, 'b, ()>
Performs the refresh operation in one or more indices.
pub fn reload_search_analyzers<'b>(
&'a self,
parts: IndicesReloadSearchAnalyzersParts<'b>
) -> IndicesReloadSearchAnalyzers<'a, 'b, ()>
[src]
&'a self,
parts: IndicesReloadSearchAnalyzersParts<'b>
) -> IndicesReloadSearchAnalyzers<'a, 'b, ()>
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]
&'a self,
parts: IndicesRolloverParts<'b>
) -> IndicesRollover<'a, 'b, ()>
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]
&'a self,
parts: IndicesSegmentsParts<'b>
) -> IndicesSegments<'a, 'b>
Provides low-level information about segments in a Lucene index.
pub fn shard_stores<'b>(
&'a self,
parts: IndicesShardStoresParts<'b>
) -> IndicesShardStores<'a, 'b>
[src]
&'a self,
parts: IndicesShardStoresParts<'b>
) -> IndicesShardStores<'a, 'b>
Provides store information for shard copies of indices.
pub fn shrink<'b>(
&'a self,
parts: IndicesShrinkParts<'b>
) -> IndicesShrink<'a, 'b, ()>
[src]
&'a self,
parts: IndicesShrinkParts<'b>
) -> IndicesShrink<'a, 'b, ()>
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]
&'a self,
parts: IndicesSplitParts<'b>
) -> IndicesSplit<'a, 'b, ()>
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]
Provides statistics on operations happening in an index.
pub fn unfreeze<'b>(
&'a self,
parts: IndicesUnfreezeParts<'b>
) -> IndicesUnfreeze<'a, 'b, ()>
[src]
&'a self,
parts: IndicesUnfreezeParts<'b>
) -> IndicesUnfreeze<'a, 'b, ()>
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]
Updates index aliases.
pub fn upgrade<'b>(
&'a self,
parts: IndicesUpgradeParts<'b>
) -> IndicesUpgrade<'a, 'b, ()>
[src]
&'a self,
parts: IndicesUpgradeParts<'b>
) -> IndicesUpgrade<'a, 'b, ()>
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]
&'a self,
parts: IndicesValidateQueryParts<'b>
) -> IndicesValidateQuery<'a, 'b, ()>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,