diff --git a/meilisearch/index.py b/meilisearch/index.py index 0240f925..99601a14 100644 --- a/meilisearch/index.py +++ b/meilisearch/index.py @@ -71,7 +71,7 @@ def update(self, primary_key: str) -> Dict[str, Any]: An error containing details about why Meilisearch can't process your request. Meilisearch error codes are described here: https://docs.meilisearch.com/errors/#meilisearch-errors """ payload = {'primaryKey': primary_key} - return self.http.put(f'{self.config.paths.index}/{self.uid}', payload) + return self.http.patch(f'{self.config.paths.index}/{self.uid}', payload) def fetch_info(self) -> 'Index': """Fetch the info of the index. @@ -638,7 +638,7 @@ def update_settings(self, body: Dict[str, Any]) -> Dict[str, Any]: MeiliSearchApiError An error containing details about why Meilisearch can't process your request. Meilisearch error codes are described here: https://docs.meilisearch.com/errors/#meilisearch-errors """ - return self.http.post( + return self.http.patch( f'{self.config.paths.index}/{self.uid}/{self.config.paths.setting}', body ) @@ -701,7 +701,7 @@ def update_ranking_rules(self, body: List[str]) -> Dict[str, Any]: MeiliSearchApiError An error containing details about why Meilisearch can't process your request. Meilisearch error codes are described here: https://docs.meilisearch.com/errors/#meilisearch-errors """ - return self.http.post( + return self.http.put( self.__settings_url_for(self.config.paths.ranking_rules), body ) @@ -762,7 +762,7 @@ def update_distinct_attribute(self, body: Dict[str, Any]) -> Dict[str, Any]: MeiliSearchApiError An error containing details about why Meilisearch can't process your request. Meilisearch error codes are described here: https://docs.meilisearch.com/errors/#meilisearch-errors """ - return self.http.post( + return self.http.put( self.__settings_url_for(self.config.paths.distinct_attribute), body ) @@ -823,7 +823,7 @@ def update_searchable_attributes(self, body: List[str]) -> Dict[str, Any]: MeiliSearchApiError An error containing details about why Meilisearch can't process your request. Meilisearch error codes are described here: https://docs.meilisearch.com/errors/#meilisearch-errors """ - return self.http.post( + return self.http.put( self.__settings_url_for(self.config.paths.searchable_attributes), body ) @@ -884,7 +884,7 @@ def update_displayed_attributes(self, body: List[str]) -> Dict[str, Any]: MeiliSearchApiError An error containing details about why Meilisearch can't process your request. Meilisearch error codes are described here: https://docs.meilisearch.com/errors/#meilisearch-errors """ - return self.http.post( + return self.http.put( self.__settings_url_for(self.config.paths.displayed_attributes), body ) @@ -945,7 +945,7 @@ def update_stop_words(self, body: List[str]) -> Dict[str, Any]: MeiliSearchApiError An error containing details about why Meilisearch can't process your request. Meilisearch error codes are described here: https://docs.meilisearch.com/errors/#meilisearch-errors """ - return self.http.post( + return self.http.put( self.__settings_url_for(self.config.paths.stop_words), body ) @@ -1006,7 +1006,7 @@ def update_synonyms(self, body: Dict[str, List[str]]) -> Dict[str, Any]: MeiliSearchApiError An error containing details about why Meilisearch can't process your request. Meilisearch error codes are described here: https://docs.meilisearch.com/errors/#meilisearch-errors """ - return self.http.post( + return self.http.put( self.__settings_url_for(self.config.paths.synonyms), body ) @@ -1067,7 +1067,7 @@ def update_filterable_attributes(self, body: List[str]) -> Dict[str, Any]: MeiliSearchApiError An error containing details about why Meilisearch can't process your request. Meilisearch error codes are described here: https://docs.meilisearch.com/errors/#meilisearch-errors """ - return self.http.post( + return self.http.put( self.__settings_url_for(self.config.paths.filterable_attributes), body ) @@ -1129,7 +1129,7 @@ def update_sortable_attributes(self, body: List[str]) -> Dict[str, Any]: MeiliSearchApiError An error containing details about why Meilisearch can't process your request. Meilisearch error codes are described here: https://docs.meilisearch.com/errors/#meilisearch-errors """ - return self.http.post( + return self.http.put( self.__settings_url_for(self.config.paths.sortable_attributes), body ) @@ -1190,7 +1190,7 @@ def update_typo_tolerance(self, body: Dict[str, Any]) -> Dict[str, Any]: MeiliSearchApiError An error containing details about why Meilisearch can't process your request. Meilisearch error codes are described here: https://docs.meilisearch.com/errors/#meilisearch-errors """ - return self.http.post( + return self.http.patch( self.__settings_url_for(self.config.paths.typo_tolerance), body )