mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-17 18:26:26 +00:00
add documentation warnings
This commit is contained in:
@ -12,6 +12,12 @@ use crate::vector::settings::RemoveFragments;
|
|||||||
use crate::vector::EmbeddingConfig;
|
use crate::vector::EmbeddingConfig;
|
||||||
use crate::{CboRoaringBitmapCodec, DocumentId, UserError};
|
use crate::{CboRoaringBitmapCodec, DocumentId, UserError};
|
||||||
|
|
||||||
|
/// DB representation of an embedder configuration.
|
||||||
|
///
|
||||||
|
/// # Warning
|
||||||
|
///
|
||||||
|
/// This type is serialized in and deserialized from the DB, any modification should either go
|
||||||
|
/// through dumpless upgrade or be backward-compatible
|
||||||
#[derive(Debug, Deserialize, Serialize)]
|
#[derive(Debug, Deserialize, Serialize)]
|
||||||
pub struct IndexEmbeddingConfig {
|
pub struct IndexEmbeddingConfig {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
@ -24,6 +24,12 @@ pub enum SubEmbedder {
|
|||||||
Rest(rest::Embedder),
|
Rest(rest::Embedder),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Options of a subembedder, specific to each kind of embedder.
|
||||||
|
///
|
||||||
|
/// # Warning
|
||||||
|
///
|
||||||
|
/// This type is serialized in and deserialized from the DB, any modification should either go
|
||||||
|
/// through dumpless upgrade or be backward-compatible
|
||||||
#[derive(Debug, Clone, Hash, PartialEq, Eq, serde::Deserialize, serde::Serialize)]
|
#[derive(Debug, Clone, Hash, PartialEq, Eq, serde::Deserialize, serde::Serialize)]
|
||||||
pub enum SubEmbedderOptions {
|
pub enum SubEmbedderOptions {
|
||||||
HuggingFace(hf::EmbedderOptions),
|
HuggingFace(hf::EmbedderOptions),
|
||||||
@ -51,6 +57,12 @@ pub struct Embedder {
|
|||||||
pub(super) index: SubEmbedder,
|
pub(super) index: SubEmbedder,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Options of a composite embedder, specific to each kind of embedder.
|
||||||
|
///
|
||||||
|
/// # Warning
|
||||||
|
///
|
||||||
|
/// This type is serialized in and deserialized from the DB, any modification should either go
|
||||||
|
/// through dumpless upgrade or be backward-compatible
|
||||||
#[derive(Debug, Clone, Hash, PartialEq, Eq, serde::Deserialize, serde::Serialize)]
|
#[derive(Debug, Clone, Hash, PartialEq, Eq, serde::Deserialize, serde::Serialize)]
|
||||||
pub struct EmbedderOptions {
|
pub struct EmbedderOptions {
|
||||||
pub search: SubEmbedderOptions,
|
pub search: SubEmbedderOptions,
|
||||||
|
@ -30,6 +30,12 @@ enum WeightSource {
|
|||||||
Pytorch,
|
Pytorch,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Inert embedder options for a hf embedder.
|
||||||
|
///
|
||||||
|
/// # Warning
|
||||||
|
///
|
||||||
|
/// This type is serialized in and deserialized from the DB, any modification should either go
|
||||||
|
/// through dumpless upgrade or be backward-compatible
|
||||||
#[derive(Debug, Clone, Hash, PartialEq, Eq, serde::Deserialize, serde::Serialize)]
|
#[derive(Debug, Clone, Hash, PartialEq, Eq, serde::Deserialize, serde::Serialize)]
|
||||||
pub struct EmbedderOptions {
|
pub struct EmbedderOptions {
|
||||||
pub model: String,
|
pub model: String,
|
||||||
|
@ -7,6 +7,12 @@ pub struct Embedder {
|
|||||||
distribution: Option<DistributionShift>,
|
distribution: Option<DistributionShift>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Inert embedder options for a manual embedder.
|
||||||
|
///
|
||||||
|
/// # Warning
|
||||||
|
///
|
||||||
|
/// This type is serialized in and deserialized from the DB, any modification should either go
|
||||||
|
/// through dumpless upgrade or be backward-compatible
|
||||||
#[derive(Debug, Clone, Hash, PartialEq, Eq, serde::Deserialize, serde::Serialize)]
|
#[derive(Debug, Clone, Hash, PartialEq, Eq, serde::Deserialize, serde::Serialize)]
|
||||||
pub struct EmbedderOptions {
|
pub struct EmbedderOptions {
|
||||||
pub dimensions: usize,
|
pub dimensions: usize,
|
||||||
|
@ -35,6 +35,11 @@ pub enum Embedder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Configuration for an embedder.
|
/// Configuration for an embedder.
|
||||||
|
///
|
||||||
|
/// # Warning
|
||||||
|
///
|
||||||
|
/// This type is serialized in and deserialized from the DB, any modification should either go
|
||||||
|
/// through dumpless upgrade or be backward-compatible
|
||||||
#[derive(Debug, Clone, Default, serde::Deserialize, serde::Serialize)]
|
#[derive(Debug, Clone, Default, serde::Deserialize, serde::Serialize)]
|
||||||
pub struct EmbeddingConfig {
|
pub struct EmbeddingConfig {
|
||||||
/// Options of the embedder, specific to each kind of embedder
|
/// Options of the embedder, specific to each kind of embedder
|
||||||
@ -53,6 +58,11 @@ impl EmbeddingConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Options of an embedder, specific to each kind of embedder.
|
/// Options of an embedder, specific to each kind of embedder.
|
||||||
|
///
|
||||||
|
/// # Warning
|
||||||
|
///
|
||||||
|
/// This type is serialized in and deserialized from the DB, any modification should either go
|
||||||
|
/// through dumpless upgrade or be backward-compatible
|
||||||
#[derive(Debug, Clone, Hash, PartialEq, Eq, serde::Deserialize, serde::Serialize)]
|
#[derive(Debug, Clone, Hash, PartialEq, Eq, serde::Deserialize, serde::Serialize)]
|
||||||
pub enum EmbedderOptions {
|
pub enum EmbedderOptions {
|
||||||
HuggingFace(hf::EmbedderOptions),
|
HuggingFace(hf::EmbedderOptions),
|
||||||
|
@ -16,6 +16,12 @@ pub struct Embedder {
|
|||||||
rest_embedder: RestEmbedder,
|
rest_embedder: RestEmbedder,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Inert embedder options for an ollama embedder.
|
||||||
|
///
|
||||||
|
/// # Warning
|
||||||
|
///
|
||||||
|
/// This type is serialized in and deserialized from the DB, any modification should either go
|
||||||
|
/// through dumpless upgrade or be backward-compatible
|
||||||
#[derive(Debug, Clone, Hash, PartialEq, Eq, serde::Deserialize, serde::Serialize)]
|
#[derive(Debug, Clone, Hash, PartialEq, Eq, serde::Deserialize, serde::Serialize)]
|
||||||
pub struct EmbedderOptions {
|
pub struct EmbedderOptions {
|
||||||
pub embedding_model: String,
|
pub embedding_model: String,
|
||||||
|
@ -13,6 +13,12 @@ use crate::vector::error::{EmbedError, EmbedErrorKind, NewEmbedderError};
|
|||||||
use crate::vector::{Embedding, REQUEST_PARALLELISM};
|
use crate::vector::{Embedding, REQUEST_PARALLELISM};
|
||||||
use crate::ThreadPoolNoAbort;
|
use crate::ThreadPoolNoAbort;
|
||||||
|
|
||||||
|
/// Inert embedder options for an openai embedder.
|
||||||
|
///
|
||||||
|
/// # Warning
|
||||||
|
///
|
||||||
|
/// This type is serialized in and deserialized from the DB, any modification should either go
|
||||||
|
/// through dumpless upgrade or be backward-compatible
|
||||||
#[derive(Debug, Clone, Hash, PartialEq, Eq, serde::Deserialize, serde::Serialize)]
|
#[derive(Debug, Clone, Hash, PartialEq, Eq, serde::Deserialize, serde::Serialize)]
|
||||||
pub struct EmbedderOptions {
|
pub struct EmbedderOptions {
|
||||||
pub url: Option<String>,
|
pub url: Option<String>,
|
||||||
|
@ -133,6 +133,12 @@ impl RequestData {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Inert embedder options for a rest embedder.
|
||||||
|
///
|
||||||
|
/// # Warning
|
||||||
|
///
|
||||||
|
/// This type is serialized in and deserialized from the DB, any modification should either go
|
||||||
|
/// through dumpless upgrade or be backward-compatible
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)]
|
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)]
|
||||||
pub struct EmbedderOptions {
|
pub struct EmbedderOptions {
|
||||||
pub api_key: Option<String>,
|
pub api_key: Option<String>,
|
||||||
|
Reference in New Issue
Block a user