Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

support updating doc mapper through api #5253

Merged
merged 5 commits into from
Jul 26, 2024
Merged

Conversation

trinity-1686a
Copy link
Contributor

Description

allow updating the doc-mapper of an index
part of #5084

How was this PR tested?

updated tests, tested manually on a simple doc-mapper change (changing tokenizer)

@rdettai
Copy link
Contributor

rdettai commented Jul 26, 2024

The docs need to be updated:

  • ### Update an index
    ```
    PUT api/v1/indexes/<index id>
    ```
    Updates the configurations of an index. This endpoint follows PUT semantics, which means that all the fields of the current configuration are replaced by the values specified in this request or the associated defaults. In particular, if the field is optional (e.g. `retention_policy`), omitting it will delete the associated configuration. If the new configuration file contains updates that cannot be applied, the request fails, and none of the updates are applied. The API accepts JSON with `content-type: application/json` and YAML with `content-type: application/yaml`.
    - The retention policy update is automatically picked up by the janitor service on its next state refresh.
    - The search settings update is automatically picked up by searcher nodes when the next query is executed.
    - The indexing settings update is not automatically picked up by the indexer nodes, they need to be manually restarted.
    #### PUT payload
    | Variable | Type | Description | Default value |
    |---------------------|--------------------|-----------------------------------------------------------------------------------------------------------------------|---------------------------------------|
    | `version` | `String` | Config format version, use the same as your Quickwit version. | _required_ |
    | `index_id` | `String` | Index ID, must be the same index as in the request URI. | _required_ |
    | `index_uri` | `String` | Defines where the index files are stored. Cannot be updated. | `{current_index_uri}` |
    | `doc_mapping` | `DocMapping` | Doc mapping object as specified in the [index config docs](../configuration/index-config.md#doc-mapping). Cannot be updated. | _required_ |
    | `indexing_settings` | `IndexingSettings` | Indexing settings object as specified in the [index config docs](../configuration/index-config.md#indexing-settings). | |
    | `search_settings` | `SearchSettings` | Search settings object as specified in the [index config docs](../configuration/index-config.md#search-settings). | |
    | `retention` | `Retention` | Retention policy object as specified in the [index config docs](../configuration/index-config.md#retention-policy). | |
  • Configuration is generally set at index creation and cannot be modified, except for some specific attributes like the search settings and retention policy, which can be changed using the [update endpoint](../reference/rest-api.md) or the [CLI](../reference/cli.md).

@trinity-1686a trinity-1686a merged commit c642618 into main Jul 26, 2024
4 of 5 checks passed
@trinity-1686a trinity-1686a deleted the trinity/update-api branch July 26, 2024 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants