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

v0.28: API endpoint verbs update #1732

Merged
merged 3 commits into from
Jun 30, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 36 additions & 36 deletions .code-samples.meilisearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ get_settings_1: |-
-X GET 'http://localhost:7700/indexes/movies/settings'
update_settings_1: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings' \
-X PATCH 'http://localhost:7700/indexes/movies/settings' \
-H 'Content-Type: application/json' \
--data-binary '{
"rankingRules": [
Expand Down Expand Up @@ -193,7 +193,7 @@ get_synonyms_1: |-
-X GET 'http://localhost:7700/indexes/movies/settings/synonyms'
update_synonyms_1: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings/synonyms' \
-X PUT 'http://localhost:7700/indexes/movies/settings/synonyms' \
-H 'Content-Type: application/json' \
--data-binary '{
"wolverine": [
Expand All @@ -214,7 +214,7 @@ get_stop_words_1: |-
-X GET 'http://localhost:7700/indexes/movies/settings/stop-words'
update_stop_words_1: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings/stop-words' \
-X PUT 'http://localhost:7700/indexes/movies/settings/stop-words' \
-H 'Content-Type: application/json' \
--data-binary '[
"the",
Expand All @@ -229,7 +229,7 @@ get_ranking_rules_1: |-
-X GET 'http://localhost:7700/indexes/movies/settings/ranking-rules'
update_ranking_rules_1: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings/ranking-rules' \
-X PUT 'http://localhost:7700/indexes/movies/settings/ranking-rules' \
-H 'Content-Type: application/json' \
--data-binary '[
"words",
Expand All @@ -249,7 +249,7 @@ get_distinct_attribute_1: |-
-X GET 'http://localhost:7700/indexes/shoes/settings/distinct-attribute'
update_distinct_attribute_1: |-
curl \
-X POST 'http://localhost:7700/indexes/shoes/settings/distinct-attribute' \
-X PUT 'http://localhost:7700/indexes/shoes/settings/distinct-attribute' \
-H 'Content-Type: application/json' \
--data-binary '"skuid"'
reset_distinct_attribute_1: |-
Expand All @@ -260,7 +260,7 @@ get_filterable_attributes_1: |-
-X GET 'http://localhost:7700/indexes/movies/settings/filterable-attributes'
update_filterable_attributes_1: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings/filterable-attributes' \
-X PUT 'http://localhost:7700/indexes/movies/settings/filterable-attributes' \
-H 'Content-Type: application/json' \
--data-binary '[
"genres",
Expand All @@ -274,7 +274,7 @@ get_searchable_attributes_1: |-
-X GET 'http://localhost:7700/indexes/movies/settings/searchable-attributes'
update_searchable_attributes_1: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings/searchable-attributes' \
-X PUT 'http://localhost:7700/indexes/movies/settings/searchable-attributes' \
-H 'Content-Type: application/json' \
--data-binary '[
"title",
Expand All @@ -289,7 +289,7 @@ get_displayed_attributes_1: |-
-X GET 'http://localhost:7700/indexes/movies/settings/displayed-attributes'
update_displayed_attributes_1: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings/displayed-attributes' \
-X PUT 'http://localhost:7700/indexes/movies/settings/displayed-attributes' \
-H 'Content-Type: application/json' \
--data-binary '[
"title",
Expand All @@ -314,12 +314,12 @@ get_version_1: |-
-X GET 'http://localhost:7700/version'
distinct_attribute_guide_1: |-
curl \
-X POST 'http://localhost:7700/indexes/jackets/settings' \
-X PUT 'http://localhost:7700/indexes/jackets/settings' \
-H 'Content-Type: application/json' \
--data-binary '{ "distinctAttribute": "product_id" }'
field_properties_guide_searchable_1: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings' \
-X PUT 'http://localhost:7700/indexes/movies/settings' \
-H 'Content-Type: application/json' \
--data-binary '{
"searchableAttributes": [
Expand All @@ -330,7 +330,7 @@ field_properties_guide_searchable_1: |-
}'
field_properties_guide_displayed_1: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings' \
-X PUT 'http://localhost:7700/indexes/movies/settings' \
-H 'Content-Type: application/json' \
--data-binary '{
"displayedAttributes": [
Expand Down Expand Up @@ -442,7 +442,7 @@ search_parameter_guide_matches_1: |-
}'
settings_guide_synonyms_1: |-
curl \
-X POST 'http://localhost:7700/indexes/tops/settings' \
-X PUT 'http://localhost:7700/indexes/tops/settings' \
-H 'Content-Type: application/json' \
--data-binary '{
"synonyms": {
Expand All @@ -452,7 +452,7 @@ settings_guide_synonyms_1: |-
}'
settings_guide_stop_words_1: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings' \
-X PUT 'http://localhost:7700/indexes/movies/settings' \
-H 'Content-Type: application/json' \
--data-binary '{
"stopWords": [
Expand All @@ -463,7 +463,7 @@ settings_guide_stop_words_1: |-
}'
settings_guide_ranking_rules_1: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings' \
-X PUT 'http://localhost:7700/indexes/movies/settings' \
-H 'Content-Type: application/json' \
--data-binary '{
"rankingRules": [
Expand All @@ -479,12 +479,12 @@ settings_guide_ranking_rules_1: |-
}'
settings_guide_distinct_1: |-
curl \
-X POST 'http://localhost:7700/indexes/jackets/settings' \
-X PUT 'http://localhost:7700/indexes/jackets/settings' \
-H 'Content-Type: application/json' \
--data-binary '{ "distinctAttribute": "product_id" }
settings_guide_searchable_1: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings' \
-X PUT 'http://localhost:7700/indexes/movies/settings' \
-H 'Content-Type: application/json' \
--data-binary '{
"searchableAttributes": [
Expand All @@ -495,7 +495,7 @@ settings_guide_searchable_1: |-
}'
settings_guide_displayed_1: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings' \
-X PUT 'http://localhost:7700/indexes/movies/settings' \
-H 'Content-Type: application/json' \
--data-binary '{
"displayedAttributes": [
Expand All @@ -507,7 +507,7 @@ settings_guide_displayed_1: |-
}'
settings_guide_sortable_1: |-
curl \
-X POST 'http://localhost:7700/indexes/books/settings' \
-X PUT 'http://localhost:7700/indexes/books/settings' \
-H 'Content-Type: application/json' \
--data-binary '{
"sortableAttributes": [
Expand Down Expand Up @@ -544,7 +544,7 @@ getting_started_add_meteorites: |-
--data-binary @meteorites.json
getting_started_update_ranking_rules: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings/ranking-rules' \
-X PUT 'http://localhost:7700/indexes/movies/settings/ranking-rules' \
-H 'Content-Type: application/json' \
--data-binary '[
"exactness",
Expand All @@ -558,7 +558,7 @@ getting_started_update_ranking_rules: |-
]'
getting_started_update_displayed_attributes: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings/displayed-attributes' \
-X PUT 'http://localhost:7700/indexes/movies/settings/displayed-attributes' \
-H 'Content-Type: application/json' \
--data-binary '[
"title",
Expand All @@ -567,17 +567,17 @@ getting_started_update_displayed_attributes: |-
]'
getting_started_update_searchable_attributes: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings/searchable-attributes' \
-X PUT 'http://localhost:7700/indexes/movies/settings/searchable-attributes' \
-H 'Content-Type: application/json' \
--data-binary '["title"]'
getting_started_update_stop_words: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings/stop-words' \
-X PUT 'http://localhost:7700/indexes/movies/settings/stop-words' \
-H 'Content-Type: application/json' \
--data-binary '["the"]'
getting_started_synonyms: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings/synonyms' \
-X PUT 'http://localhost:7700/indexes/movies/settings/synonyms' \
-H 'Content-Type: application/json' \
--data-binary '{
"winnie": ["piglet"],
Expand Down Expand Up @@ -608,7 +608,7 @@ getting_started_sorting: |-
}'
getting_started_configure_settings: |-
curl \
-X POST 'http://localhost:7700/indexes/meteorites/settings' \
-X PUT 'http://localhost:7700/indexes/meteorites/settings' \
-H 'Content-Type: application/json' \
--data-binary '{
"filterableAttributes": [
Expand All @@ -626,7 +626,7 @@ getting_started_communicating_with_a_protected_instance: |-
-H 'Authorization: Bearer API_KEY'
faceted_search_update_settings_1: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings' \
-X PUT 'http://localhost:7700/indexes/movies/settings' \
-H 'Content-Type: application/json' \
--data-binary '{
"filterableAttributes": [
Expand Down Expand Up @@ -686,15 +686,15 @@ authorization_header_1: |-
-H 'Authorization: Bearer MASTER_KEY'
sorting_guide_update_sortable_attributes_1: |-
curl \
-X POST 'http://localhost:7700/indexes/books/settings/sortable-attributes' \
-X PUT 'http://localhost:7700/indexes/books/settings/sortable-attributes' \
-H 'Content-Type: application/json' \
--data-binary '[
"author",
"price"
]'
sorting_guide_update_ranking_rules_1: |-
curl \
-X POST 'http://localhost:7700/indexes/books/settings/ranking-rules' \
-X PUT 'http://localhost:7700/indexes/books/settings/ranking-rules' \
-H 'Content-Type: application/json' \
--data-binary '[
"words",
Expand Down Expand Up @@ -725,7 +725,7 @@ get_sortable_attributes_1: |-
-X GET 'http://localhost:7700/indexes/books/settings/sortable-attributes'
update_sortable_attributes_1: |-
curl \
-X POST 'http://localhost:7700/indexes/books/settings/sortable-attributes' \
-X PUT 'http://localhost:7700/indexes/books/settings/sortable-attributes' \
-H 'Content-Type: application/json' \
--data-binary '[
"price",
Expand Down Expand Up @@ -759,7 +759,7 @@ geosearch_guide_filter_usage_2: |-
--data-binary '{ "filter": "_geoRadius(45.472735, 9.184019, 2000) AND type = pizza" }'
geosearch_guide_sort_settings_1: |-
curl \
-X POST 'http://localhost:7700/indexes/restaurants/settings/sortable-attributes' \
-X PUT 'http://localhost:7700/indexes/restaurants/settings/sortable-attributes' \
-H 'Content-type:application/json' \
--data-binary '["_geo"]'
geosearch_guide_sort_usage_1: |-
Expand Down Expand Up @@ -844,7 +844,7 @@ get_typo_tolerance_1: |-
-X GET 'http://localhost:7700/indexes/books/settings/typo-tolerance'
update_typo_tolerance_1: |-
curl \
-X POST 'http://localhost:7700/indexes/books/settings/typo-tolerance' \
-X PATCH 'http://localhost:7700/indexes/books/settings/typo-tolerance' \
-H 'Content-Type: application/json' \
--data-binary '{
"minWordSizeForTypos": {
Expand All @@ -858,17 +858,17 @@ reset_typo_tolerance_1: |-
-X DELETE 'http://localhost:7700/indexes/books/settings/typo-tolerance'
typo_tolerance_guide_1: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
-X PATCH 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
-H 'Content-Type: application/json' \
--data-binary '{ "enabled": false }'
typo_tolerance_guide_2: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
-X PATCH 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
-H 'Content-Type: application/json' \
--data-binary '{ "disableOnAttributes": ["title"] }'
typo_tolerance_guide_3: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
-X PATCH 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
-H 'Content-Type: application/json' \
--data-binary '{
"disableOnWords": [
Expand All @@ -877,7 +877,7 @@ typo_tolerance_guide_3: |-
}'
typo_tolerance_guide_4: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
-X PATCH 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
-H 'Content-Type: application/json' \
--data-binary '{
"minWordSizeForTypos": {
Expand All @@ -887,7 +887,7 @@ typo_tolerance_guide_4: |-
}'
settings_guide_typo_tolerance_1: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
-X PATCH 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
-H 'Content-Type: application/json' \
--data-binary '{
"minWordSizeForTypos": {
Expand Down Expand Up @@ -953,7 +953,7 @@ updating_guide_add_documents_old: |-
-H 'X-Meili-API-Key: API_KEY'
getting_started_typo_tolerance: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
-X PATCH 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
-H 'Content-Type: application/json' \
--data-binary '{
"minWordSizeForTypos": { "oneTypo": 4 }
Expand Down
2 changes: 1 addition & 1 deletion reference/api/displayed_attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ List the settings.

## Update displayed attributes

<RouteHighlighter method="POST" route="/indexes/{index_uid}/settings/displayed-attributes" />
<RouteHighlighter method="PUT" route="/indexes/{index_uid}/settings/displayed-attributes" />

Update the [displayed attributes](/learn/configuration/settings.md#displayed-attributes) of an index. The index [`uid`](/learn/core_concepts/indexes.md#index-uid) is required.

Expand Down
2 changes: 1 addition & 1 deletion reference/api/distinct_attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Get the [distinct attribute](/learn/configuration/settings.md#distinct-attribute

## Update distinct attribute

<RouteHighlighter method="POST" route="/indexes/{index_uid}/settings/distinct-attribute" />
<RouteHighlighter method="PUT" route="/indexes/{index_uid}/settings/distinct-attribute" />

Update the [distinct attribute](/learn/configuration/settings.md#distinct-attribute) field of an index. This will re-index all documents in the index. The index [`uid`](/learn/core_concepts/indexes.md#index-uid) is required.

Expand Down
2 changes: 1 addition & 1 deletion reference/api/filterable_attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ List the settings.

## Update filterable attributes

<RouteHighlighter method="POST" route="/indexes/{index_uid}/settings/filterable-attributes" />
<RouteHighlighter method="PUT" route="/indexes/{index_uid}/settings/filterable-attributes" />

Update an index's [filterable attributes list](/learn/advanced/filtering_and_faceted_search.md). This will re-index all documents in the index. The index [`uid`](/learn/core_concepts/indexes.md#index-uid) is required.

Expand Down
2 changes: 1 addition & 1 deletion reference/api/ranking_rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ List the settings.

## Update ranking rules

<RouteHighlighter method="POST" route="/indexes/{index_uid}/settings/ranking-rules" />
<RouteHighlighter method="PUT" route="/indexes/{index_uid}/settings/ranking-rules" />

Update the [ranking rules](/learn/core_concepts/relevancy.md#ranking-rules) of an index. The index [`uid`](/learn/core_concepts/indexes.md#index-uid) is required.

Expand Down
2 changes: 1 addition & 1 deletion reference/api/searchable_attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ List the settings.

## Update searchable attributes

<RouteHighlighter method="POST" route="/indexes/{index_uid}/settings/searchable-attributes" />
<RouteHighlighter method="PUT" route="/indexes/{index_uid}/settings/searchable-attributes" />

Update the [searchable attributes](/learn/configuration/displayed_searchable_attributes.md#searchable-fields) of an index. This will re-index all documents in the index. The index [`uid`](/learn/core_concepts/indexes.md#index-uid) is required.

Expand Down
2 changes: 1 addition & 1 deletion reference/api/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ List the settings.

## Update settings

<RouteHighlighter method="POST" route="/indexes/{index_uid}/settings" />
<RouteHighlighter method="PATCH" route="/indexes/{index_uid}/settings" />

Update the settings of an index. The index [`uid`](/learn/core_concepts/indexes.md#index-uid) is required.

Expand Down
2 changes: 1 addition & 1 deletion reference/api/sortable_attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ List the settings.

## Update sortable attributes

<RouteHighlighter method="POST" route="/indexes/{index_uid}/settings/sortable-attributes" />
<RouteHighlighter method="PUT" route="/indexes/{index_uid}/settings/sortable-attributes" />

Update an index's sortable attributes list. This will re-index all documents in the index. This will re-index all documents in the index. The index [`uid`](/learn/core_concepts/indexes.md#index-uid) is required.

Expand Down
2 changes: 1 addition & 1 deletion reference/api/stop_words.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Get the stop-words list of an index. The index [`uid`](/learn/core_concepts/inde

## Update stop-words

<RouteHighlighter method="POST" route="/indexes/{index_uid}/settings/stop-words" />
<RouteHighlighter method="PUT" route="/indexes/{index_uid}/settings/stop-words" />

Update the list of stop-words of an index. This will re-index all documents in the index. The index [`uid`](/learn/core_concepts/indexes.md#index-uid) is required.

Expand Down
2 changes: 1 addition & 1 deletion reference/api/synonyms.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Get the list of [synonyms](/learn/configuration/synonyms.md) of an index. The in

## Update synonyms

<RouteHighlighter method="POST" route="/indexes/{index_uid}/settings/synonyms"/>
<RouteHighlighter method="PUT" route="/indexes/{index_uid}/settings/synonyms"/>

Update the list of [synonyms](/learn/configuration/synonyms.md) of an index. Synonyms are [normalized](/learn/configuration/synonyms.md#normalization). The index [`uid`](/learn/core_concepts/indexes.md#index-uid) is required.

Expand Down
2 changes: 1 addition & 1 deletion reference/api/typo_tolerance.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ An array of attributes for which the typo tolerance feature is disabled.

## Update typo tolerance

<RouteHighlighter method="POST" route="/indexes/{index_uid}/settings/typo-tolerance"/>
<RouteHighlighter method="PATCH" route="/indexes/{index_uid}/settings/typo-tolerance"/>

Partially update the typo tolerance settings for an index. The index [`uid`](/learn/core_concepts/indexes.md#index-uid) is required.

Expand Down