mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
add the multi-search
This commit is contained in:
parent
11ce3b9636
commit
9473a2a6ca
5 changed files with 153 additions and 20 deletions
|
@ -190,7 +190,6 @@ impl<Method: AggregateMethod> Aggregate for DocumentsFetchAggregator<Method> {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// Get one document
|
||||
///
|
||||
/// Get one document from its primary key.
|
||||
|
@ -303,7 +302,6 @@ impl Aggregate for DocumentsDeletionAggregator {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// Delete a document
|
||||
///
|
||||
/// Delete a single document by id.
|
||||
|
@ -1197,13 +1195,16 @@ pub async fn delete_documents_by_filter(
|
|||
Ok(HttpResponse::Accepted().json(task))
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserr, IntoParams)]
|
||||
#[derive(Debug, Deserr, ToSchema)]
|
||||
#[deserr(error = DeserrJsonError, rename_all = camelCase, deny_unknown_fields)]
|
||||
pub struct DocumentEditionByFunction {
|
||||
/// A string containing a RHAI function.
|
||||
#[deserr(default, error = DeserrJsonError<InvalidDocumentFilter>)]
|
||||
pub filter: Option<Value>,
|
||||
/// A string containing a filter expression.
|
||||
#[deserr(default, error = DeserrJsonError<InvalidDocumentEditionContext>)]
|
||||
pub context: Option<Value>,
|
||||
/// An object with data Meilisearch should make available for the editing function.
|
||||
#[deserr(error = DeserrJsonError<InvalidDocumentEditionFunctionFilter>, missing_field_error = DeserrJsonError::missing_document_edition_function)]
|
||||
pub function: String,
|
||||
}
|
||||
|
@ -1246,8 +1247,8 @@ impl Aggregate for EditDocumentsByFunctionAggregator {
|
|||
security(("Bearer" = ["documents.*", "*"])),
|
||||
params(
|
||||
("indexUid", example = "movies", description = "Index Unique Identifier", nullable = false),
|
||||
DocumentEditionByFunction,
|
||||
),
|
||||
request_body = DocumentEditionByFunction,
|
||||
responses(
|
||||
(status = 202, description = "Task successfully enqueued", body = SummarizedTaskView, content_type = "application/json", example = json!(
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue