Skip to content

Commit 0e044b1

Browse files
Removed the experimental-vector-search feature
1 parent a4e50c9 commit 0e044b1

File tree

3 files changed

+6
-20
lines changed

3 files changed

+6
-20
lines changed

Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ wasm-bindgen-futures = "0.4"
4040
[features]
4141
default = ["reqwest"]
4242
reqwest = ["dep:reqwest", "pin-project-lite", "bytes"]
43-
experimental-vector-search = []
4443

4544
[dev-dependencies]
4645
futures-await-test = "0.3"

src/search.rs

-8
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ pub enum Selectors<T> {
138138
All,
139139
}
140140

141-
#[cfg(feature = "experimental-vector-search")]
142141
#[derive(Debug, Serialize, Clone)]
143142
#[serde(rename_all = "camelCase")]
144143
pub struct HybridSearch<'a> {
@@ -347,13 +346,11 @@ pub struct SearchQuery<'a, Http: HttpClient> {
347346

348347
/// EXPERIMENTAL
349348
/// Defines whether to utilise previously defined embedders for semantic searching
350-
#[cfg(feature = "experimental-vector-search")]
351349
#[serde(skip_serializing_if = "Option::is_none")]
352350
pub hybrid: Option<HybridSearch<'a>>,
353351

354352
/// EXPERIMENTAL
355353
/// Defines what vectors an userprovided embedder has gotten for semantic searching
356-
#[cfg(feature = "experimental-vector-search")]
357354
#[serde(skip_serializing_if = "Option::is_none")]
358355
pub vector: Option<&'a [f32]>,
359356
}
@@ -384,9 +381,7 @@ impl<'a, Http: HttpClient> SearchQuery<'a, Http> {
384381
show_ranking_score: None,
385382
matching_strategy: None,
386383
index_uid: None,
387-
#[cfg(feature = "experimental-vector-search")]
388384
hybrid: None,
389-
#[cfg(feature = "experimental-vector-search")]
390385
vector: None,
391386
}
392387
}
@@ -573,7 +568,6 @@ impl<'a, Http: HttpClient> SearchQuery<'a, Http> {
573568
}
574569
/// EXPERIMENTAL
575570
/// Defines whether to utilise previously defined embedders for semantic searching
576-
#[cfg(feature = "experimental-vector-search")]
577571
pub fn with_hybrid<'b>(
578572
&'b mut self,
579573
embedder: &'a str,
@@ -587,7 +581,6 @@ impl<'a, Http: HttpClient> SearchQuery<'a, Http> {
587581
}
588582
/// EXPERIMENTAL
589583
/// Defines what vectors an userprovided embedder has gotten for semantic searching
590-
#[cfg(feature = "experimental-vector-search")]
591584
pub fn with_vector<'b>(&'b mut self, vector: &'a [f32]) -> &'b mut SearchQuery<'a, Http> {
592585
self.vector = Some(vector);
593586
self
@@ -1240,7 +1233,6 @@ mod tests {
12401233
Ok(())
12411234
}
12421235

1243-
#[cfg(feature = "experimental-vector-search")]
12441236
#[meilisearch_test]
12451237
async fn test_hybrid(client: Client, index: Index) -> Result<(), Error> {
12461238
use crate::settings::{Embedder, UserProvidedEmbedderSettings};

src/settings.rs

+6-11
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ pub struct FacetingSettings {
3636
pub max_values_per_facet: usize,
3737
}
3838

39-
#[cfg(feature = "experimental-vector-search")]
39+
/// EXPERIMENTAL
40+
/// Allows configuring semantic seaarching
4041
#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq)]
4142
#[serde(rename_all = "camelCase", tag = "source")]
4243
pub enum Embedder {
@@ -50,7 +51,6 @@ pub enum Embedder {
5051
UserProvided(UserProvidedEmbedderSettings),
5152
}
5253

53-
#[cfg(feature = "experimental-vector-search")]
5454
#[derive(Serialize, Deserialize, Default, Debug, Clone, Eq, PartialEq)]
5555
#[serde(rename_all = "camelCase")]
5656
pub struct HuggingFaceEmbedderSettings {
@@ -69,7 +69,6 @@ pub struct HuggingFaceEmbedderSettings {
6969
pub document_template: Option<String>,
7070
}
7171

72-
#[cfg(feature = "experimental-vector-search")]
7372
#[derive(Serialize, Deserialize, Default, Debug, Clone, Eq, PartialEq)]
7473
#[serde(rename_all = "camelCase")]
7574
pub struct OpenapiEmbedderSettings {
@@ -93,7 +92,6 @@ pub struct OpenapiEmbedderSettings {
9392
pub document_template: Option<String>,
9493
}
9594

96-
#[cfg(feature = "experimental-vector-search")]
9795
#[derive(Serialize, Deserialize, Default, Debug, Clone, Eq, PartialEq, Copy)]
9896
pub struct UserProvidedEmbedderSettings {
9997
/// dimensions of your custom embedding
@@ -168,7 +166,6 @@ pub struct Settings {
168166
#[serde(skip_serializing_if = "Option::is_none")]
169167
pub proximity_precision: Option<String>,
170168
/// Settings how the embeddings for the experimental vector search feature are generated
171-
#[cfg(feature = "experimental-vector-search")]
172169
#[serde(skip_serializing_if = "Option::is_none")]
173170
pub embedders: Option<HashMap<String, Embedder>>,
174171
}
@@ -355,8 +352,9 @@ impl Settings {
355352
}
356353
}
357354

355+
/// EXPERIMENTAL
356+
/// Set the [embedders](https://www.meilisearch.com/docs/learn/experimental/vector_search) of the [Index].
358357
#[must_use]
359-
#[cfg(feature = "experimental-vector-search")]
360358
pub fn with_embedders<S>(self, embedders: HashMap<S, Embedder>) -> Settings
361359
where
362360
S: AsRef<str>,
@@ -840,6 +838,7 @@ impl<Http: HttpClient> Index<Http> {
840838
.await
841839
}
842840

841+
/// EXPERIMENTAL
843842
/// Get [embedders](https://www.meilisearch.com/docs/learn/experimental/vector_search) of the [Index].
844843
///
845844
/// ```
@@ -868,7 +867,6 @@ impl<Http: HttpClient> Index<Http> {
868867
/// # index.delete().await.unwrap().wait_for_completion(&client, None, None).await.unwrap();
869868
/// # });
870869
/// ```
871-
#[cfg(feature = "experimental-vector-search")]
872870
pub async fn get_embedders(&self) -> Result<HashMap<String, Embedder>, Error> {
873871
self.client
874872
.http_client
@@ -1940,6 +1938,7 @@ impl<Http: HttpClient> Index<Http> {
19401938
.await
19411939
}
19421940

1941+
/// EXPERIMENTAL
19431942
/// Reset [embedders](https://www.meilisearch.com/docs/learn/experimental/vector_search) of the [Index].
19441943
///
19451944
/// # Example
@@ -1959,7 +1958,6 @@ impl<Http: HttpClient> Index<Http> {
19591958
/// # index.delete().await.unwrap().wait_for_completion(&client, None, None).await.unwrap();
19601959
/// # });
19611960
/// ```
1962-
#[cfg(feature = "experimental-vector-search")]
19631961
pub async fn reset_embedders(&self) -> Result<TaskInfo, Error> {
19641962
self.client
19651963
.http_client
@@ -2008,7 +2006,6 @@ mod tests {
20082006
assert_eq!(faceting, res);
20092007
}
20102008

2011-
#[cfg(feature = "experimental-vector-search")]
20122009
#[meilisearch_test]
20132010
async fn test_get_embeddings(index: Index) {
20142011
let res = index.get_embedders().await.unwrap();
@@ -2042,7 +2039,6 @@ mod tests {
20422039
assert_eq!(faceting, res);
20432040
}
20442041

2045-
#[cfg(feature = "experimental-vector-search")]
20462042
#[meilisearch_test]
20472043
async fn test_reset_embedders(client: Client, index: Index) {
20482044
let features = crate::features::ExperimentalFeatures::new(&client)
@@ -2235,7 +2231,6 @@ mod tests {
22352231
assert_eq!(expected, res);
22362232
}
22372233

2238-
#[cfg(feature = "experimental-vector-search")]
22392234
#[meilisearch_test]
22402235
async fn test_set_embedding_settings(client: Client, index: Index) {
22412236
let features = crate::features::ExperimentalFeatures::new(&client)

0 commit comments

Comments
 (0)