Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix delete task not respecting default fields #5690

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rdettai
Copy link
Collaborator

@rdettai rdettai commented Feb 20, 2025

Description

This seems to have been broken in #3148

According to the docs, delete tasks should support default fields

| `search_field` | `[String]` | Fields to search on. Comma-separated list, e.g. "field1,field2" | index_config.search_settings.default_search_fields |

How was this PR tested?

Unit tests.

@rdettai rdettai self-assigned this Feb 20, 2025
@@ -45,8 +45,9 @@ pub struct DeleteQueryRequest {
/// Query text. The query language is that of tantivy.
pub query: String,
// Fields to search on
#[serde(rename(deserialize = "search_field"))]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is necessary to be consistent with the docs and the search API

#[param(rename = "search_field")]
#[schema(rename = "search_field")]
#[serde(default)]
#[serde(rename = "search_field")]
#[serde(deserialize_with = "from_simple_list")]
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(serialize_with = "to_simple_list")]
pub search_fields: Option<Vec<String>>,

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants