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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
//! Solrstice is a Solr 8+ client for Rust.
//! Take a look at [AsyncSolrCloudClient](crate::clients::async_cloud_client::AsyncSolrCloudClient) and [SelectQuery](crate::queries::select::SelectQuery) for more documentation
//! # Examples
//! ```no_run
//! use serde::{Deserialize, Serialize};
//! use solrstice::AsyncSolrCloudClient;
//! use solrstice::SolrSingleServerHost;
//! use solrstice::SolrBasicAuth;
//! use solrstice::{SolrServerContextBuilder};
//! use solrstice::Error;
//! use solrstice::{DeleteQuery, UpdateQuery};
//! use solrstice::SelectQuery;
//! use std::path::Path;
//!
//! #[derive(Serialize, Deserialize, Debug)]
//! struct TestData {
//! id: String,
//! }
//!
//! #[tokio::test]
//! pub async fn example() -> Result<(), Error> {
//!
//! //Create a solr client. You can also use a list of zookeeper hosts instead of a single server.
//! let context = SolrServerContextBuilder::new(SolrSingleServerHost::new("http://localhost:8983"))
//! .with_auth(SolrBasicAuth::new("solr", Some("SolrRocks"))).build();
//! let client = AsyncSolrCloudClient::new(context);
//!
//! // Upload config
//! client
//! .upload_config("example_config", Path::new("/path/to/config"))
//! .await?;
//!
//! // Create collection
//! client
//! .create_collection("example_collection", "example_config", 1, 1)
//! .await?;
//!
//! // Index document
//! let docs = vec![TestData {
//! id: "example_document".to_string(),
//! }];
//! client
//! .index(
//! &UpdateQuery::new(),
//! "example_collection",
//! docs.as_slice(),
//! )
//! .await?;
//!
//! // Search and retrieve the document
//! let docs = client
//! .select(
//! &SelectQuery::new().fq(["id:example_document"]),
//! "example_collection",
//! )
//! .await?
//! .get_docs_response()
//! .ok_or("No response provided")?
//! .get_docs::<TestData>()?;
//!
//! // Delete the document
//! client
//! .delete(
//! &DeleteQuery::new().ids(["example_document"]),
//! "example_collection",
//! )
//! .await?;
//! Ok(())
//! }
//! ```
/// Solr Clients
pub use *;
pub use *;
/// Host types
pub use crate*;
pub use crate*;
pub use crate*;
/// Model structs
pub use *;
pub use *;
pub use *;
/// Query types
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
/// Tokio Runtime for blocking usage
/// Error types for the library.
pub
pub use Error;