Module search

Source
Expand description

Search APIs are used to search and aggregate data stored in Elasticsearch indices and data streams. For an overview and related tutorials, see Search your data.

Most search APIs support multi-target syntax, with the exception of the explain API.

https://www.elastic.co/guide/en/elasticsearch/reference/current/search.html

Re-exports§

pub use self::aggregations::*;
pub use self::collapse::*;
pub use self::highlight::*;
pub use self::knn::*;
pub use self::params::*;
pub use self::queries::params::*;
pub use self::queries::*;
pub use self::request::*;
pub use self::rescoring::*;
pub use self::runtime_mappings::*;
pub use self::script_fields::*;
pub use self::sort::*;
pub use self::suggesters::*;

Modules§

aggregations
An aggregation summarizes your data as metrics, statistics, or other analytics.
collapse
Collapse search results
highlight
Highlighters enable you to get highlighted snippets from one or more fields in your search results so you can show users where the query matches are.
knn
A k-nearest neighbor (kNN) search finds the k nearest vectors to a query vector, as measured by a similarity metric.
params
Value types accepted by leaf query clauses
queries
Allows constructing Elasticsearch search query.
request
Allows you to execute a search query and get back search hits that match the query.
rescoring
Rescore clause to run second query over original one results and that way give more accuracy for final results https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-rescore.html
runtime_mappings
You can specify a runtime_mappings section in a search request to create runtime fields that exist only as part of the query. You specify a script as part of the runtime_mappings section, just as you would if adding a runtime field to the mappings.
script_fields
You can use the script_fields parameter to retrieve a script evaluation (based on different fields) for each hit.
sort
Allows you to add one or more sorts on specific fields. Each sort can be reversed as well. The sort is defined on a per field level, with special field name for _score to sort by score, and _doc to sort by index order.
suggesters
Suggests similar looking terms based on a provided text by using a suggester.

Structs§

ClusterStatistics
Cluster statistics
CompletionSuggestOption
Suggester response item option
ErrorCause
Error cause
Explanation
Score explanation
Hit
Represents a single matched document
HitsMetadata
Matched hits
InnerHitsResult
Represents inner hits
NestedIdentity
Nested document metadata
PhraseSuggestOption
Phrase suggester response item option
SearchResponse
Search response
ShardFailure
Shard failure details
ShardStatistics
Number of shards touched with their states
Source
Document source with delayed deserialization
Suggest
Suggester response item
TermSuggestOption
Term suggester response item option
TotalHits
Total number of matched documents

Enums§

SuggestOption
Suggester response option variants
TotalHitsRelation
Relation to total number of matched documents