1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//! A typed Rust client for Elasticsearch, generated from the Elasticsearch
//! specification.
//!
//! The README's quick start (`examples/quickstart.rs`) does semantic search
//! over your own documents in a dozen lines; `examples/rag.rs` is the
//! retrieval half of a RAG application on any license.
//!
//! This crate re-exports the others behind features. The defaults are the
//! AI-search set: `search`, `docs`, `mapping` and `inference`; `analysis`
//! and `tasks` are the other areas generated so far. `derive` adds
//! the typed document layer's derive macro, `helpers` the point-in-time
//! scan and the bulk loader, and `transport-reqwest` the default HTTP
//! transport.
//!
//! The [`Client`] sends the generated requests over a [`Transport`], such as
//! the one in `transport-reqwest`. [`Query`] and [`Retriever`] build the
//! common queries and retrievers in one call each, `fusion` fuses
//! retrievers' results on the client when the cluster's license doesn't
//! include the `rrf` and `linear` retrievers, and `document` reads and
//! writes your own document types.
//!
//! For what isn't covered yet, implement [`Endpoint`] for your own request
//! (`Route::segments` and `Body::json` help), write a query, retriever or
//! value as a `Raw` variant, or send any request with `Client::send_raw`;
//! `examples/escape_hatches.rs` shows each.
//!
//! The transport's layers are opt-in: `transport_reqwest`'s builder adds
//! several nodes with failover, retries, sniffing, credentials and
//! compression, [`auth`] signs requests with credentials that refresh, and
//! a layer of your own is a [`Transport`] that wraps another. [`telemetry`]
//! records a span per request and its duration through the `tracing` and
//! `metrics` facades, for oxtel or any other exporter.
//!
//! Every API is generated whatever the cluster's license. A request for a
//! feature the license doesn't include, such as the `rrf` retriever or
//! ELSER on Basic, fails with [`Error::License`].
//!
//! This release is generated from the Elasticsearch specification's 9.5
//! branch and tested against Elasticsearch 9.5; the README's version table
//! lists each release's branch.
//!
//! oxsearch is not affiliated with or endorsed by Elastic. Elasticsearch is
//! a trademark of Elasticsearch B.V.
// The derive macros' code names this crate `::oxsearch`, in its own tests too.
extern crate self as oxsearch;
pub use *;
/// The crate under every area. Its common types are re-exported here at
/// the root, and its other types in their area's module; through it are
/// the types of areas not generated yet, such as `indices`.
pub use oxsearch_core;
pub use ;
pub use ;
pub use oxsearch_analysis as analysis;
pub use oxsearch_derive as derive;
pub use oxsearch_docs as docs;
pub use oxsearch_inference as inference;
pub use oxsearch_mapping as mapping;
pub use oxsearch_search as search;
pub use fusion;
pub use oxsearch_tasks as tasks;
pub use oxsearch_transport_reqwest as transport_reqwest;