Skip to content

feat(api): indices as alias for indexes - #6747

Open
cemremengu wants to merge 2 commits into
quickwit-oss:mainfrom
cemremengu:index
Open

feat(api): indices as alias for indexes#6747
cemremengu wants to merge 2 commits into
quickwit-oss:mainfrom
cemremengu:index

Conversation

@cemremengu

Copy link
Copy Markdown

Resolves #3540

Description

Adds indices as an alias for indexes across all index management REST API routes, including index, split, source, and source-shard endpoints. indexes remains the canonical spelling in OpenAPI and documentation examples.

The alias uses a shared path-segment filter, avoiding duplicated handlers or business logic. A redirect was not used because these routes include methods such as POST, PUT, and DELETE with request bodies; redirect handling may not
reliably preserve the method and body across clients and would add an unnecessary round trip.

The REST API documentation was updated accordingly.

How was this PR tested?

  • Ran make fmt.
  • Ran cargo check -p quickwit-serve --tests.
  • Ran the focused index API test suite: 25 tests passed.
  • Ran the full quickwit-serve test suite: 165 tests passed.
  • Added tests covering both /indexes and /indices, including collection, individual index, split, and source routes.

@cemremengu
cemremengu requested a review from a team as a code owner August 29, 2026 10:21
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-29T10:24:31.071765Z 15f6378 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 15f6378d52

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

pub use self::split_resource::{ListSplitsQueryParams, ListSplitsResponse};

fn indexes_path_segment() -> impl Filter<Extract = (), Error = Rejection> + Clone {
warp::path("indexes").or(warp::path("indices")).unify()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve delete-task routes for an index named indices

When an existing index ID is literally indices—which is permitted by validate_identifier—GET or POST /api/v1/indices/delete-tasks no longer reaches the /{index_id}/delete-tasks handlers. This new prefix consumes indices as the collection alias: GET is interpreted as a metadata lookup for an index named delete-tasks, while POST is handled by the index-management recovery path; api_v1_routes mounts that recovered filter before delete_task_api_handlers. Route the generic delete-task endpoint before this alias or otherwise disambiguate this valid index ID.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@codex correct but this also seems to be true for "indexes" as well so its not a new issue ?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"indices" as alias for "indexes"

1 participant