From 0a5d317533adcf66cdeca22b0a44fe3aa4f7d122 Mon Sep 17 00:00:00 2001 From: gui machiavelli Date: Thu, 9 Oct 2025 16:37:30 +0200 Subject: [PATCH 01/45] initial tests --- assets/meilisearch.json | 1 + docs.json | 14 + learn/meilisearch.json | 1 + openapi.json | 14907 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 14923 insertions(+) create mode 100644 assets/meilisearch.json create mode 100644 learn/meilisearch.json create mode 100644 openapi.json diff --git a/assets/meilisearch.json b/assets/meilisearch.json new file mode 100644 index 000000000..778a31ae1 --- /dev/null +++ b/assets/meilisearch.json @@ -0,0 +1 @@ +{"openapi":"3.1.0","info":{"title":"meilisearch","description":"Meilisearch HTTP server","contact":{"name":"Quentin de Quelen","email":"quentin@dequelen.me"},"license":{"name":"MIT","identifier":"MIT"},"version":"1.22.1"},"servers":[{"url":"/","description":"Local server"}],"paths":{"/batches":{"get":{"tags":["Batches"],"summary":"Get batches","description":"List all batches, regardless of index. The batch objects are contained in the results array.\nBatches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first.\nBatch results are paginated and can be filtered with query parameters.","operationId":"get_batches","parameters":[{"name":"limit","in":"query","description":"Maximum number of results to return.","required":false,"schema":{"type":"integer","format":"u-int32","default":20,"minimum":0},"example":12},{"name":"from","in":"query","description":"Fetch the next set of results from the given uid.","required":false,"schema":{"type":"integer","format":"u-int32","minimum":0},"example":12421},{"name":"reverse","in":"query","description":"The order you want to retrieve the objects.","required":false,"schema":{"type":"boolean"},"example":true},{"name":"batchUids","in":"query","description":"Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character.","required":false,"schema":{"type":"integer","format":"u-int32","minimum":0},"example":12421},{"name":"uids","in":"query","description":"Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"canceledBy","in":"query","description":"Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[374,"*"]},{"name":"types","in":"query","description":"Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["documentAdditionOrUpdate","*"]},{"name":"statuses","in":"query","description":"Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Status"}},"example":["succeeded","failed","canceled","enqueued","processing","*"]},{"name":"indexUids","in":"query","description":"Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["movies","theater","*"]},{"name":"afterEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]}],"responses":{"200":{"description":"Return the batches","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllBatches"},"example":{"results":[{"uid":2,"details":{"stopWords":["of","the"]},"progress":null,"stats":{"totalNbTasks":1,"status":{"succeeded":1},"types":{"settingsUpdate":1},"indexUids":{"INDEX_NAME":1}},"duration":"PT0.110083S","startedAt":"2024-12-10T15:49:04.995321Z","finishedAt":"2024-12-10T15:49:05.105404Z"}],"total":3,"limit":1,"from":2,"next":1}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["tasks.get","tasks.*","*"]}]}},"/batches/{batchUid}":{"get":{"tags":["Batches"],"summary":"Get one batch","description":"Get a single batch.","operationId":"get_batch","parameters":[{"name":"batchUid","in":"path","description":"The unique batch id","required":true,"schema":{"type":"string"},"example":"8685"}],"responses":{"200":{"description":"Return the batch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchView"},"example":{"uid":1,"details":{"receivedDocuments":1,"indexedDocuments":1},"progress":null,"stats":{"totalNbTasks":1,"status":{"succeeded":1},"types":{"documentAdditionOrUpdate":1},"indexUids":{"INDEX_NAME":1}},"duration":"PT0.364788S","startedAt":"2024-12-10T15:48:49.672141Z","finishedAt":"2024-12-10T15:48:50.036929Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["tasks.get","tasks.*","*"]}]}},"/dumps":{"post":{"tags":["Dumps"],"summary":"Create a dump","description":"Triggers a dump creation process. Once the process is complete, a dump is created in the\n[dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory).\nIf the dump directory does not exist yet, it will be created.","operationId":"create_dump","responses":{"202":{"description":"Dump is being created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":0,"indexUid":null,"status":"enqueued","type":"DumpCreation","enqueuedAt":"2021-01-01T09:39:00.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["dumps.create","dumps.*","*"]}]}},"/experimental-features":{"get":{"tags":["Experimental features"],"summary":"Get all experimental features","description":"Get a list of all experimental features that can be activated via the /experimental-features route and whether or not they are currently activated.","operationId":"get_features","responses":{"200":{"description":"Experimental features are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeTogglableFeatures"},"example":{"metrics":true,"logsRoute":false,"editDocumentsByFunction":false,"containsFilter":false,"network":false,"getTaskDocumentsRoute":false,"compositeEmbedders":false,"chatCompletions":false,"multimodal":false,"vectorStoreSetting":false}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["experimental_features.get","experimental_features.*","*"]}]},"patch":{"tags":["Experimental features"],"summary":"Configure experimental features","description":"Activate or deactivate experimental features.","operationId":"patch_features","responses":{"200":{"description":"Experimental features are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeTogglableFeatures"},"example":{"metrics":true,"logsRoute":false,"editDocumentsByFunction":false,"containsFilter":false,"network":false,"getTaskDocumentsRoute":false,"compositeEmbedders":false,"chatCompletions":false,"multimodal":false,"vectorStoreSetting":false}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["experimental_features.update","experimental_features.*","*"]}]}},"/export":{"post":{"tags":["Export"],"operationId":"export","responses":{"202":{"description":"Export successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":1,"status":"enqueued","type":"export","enqueuedAt":"2021-08-11T09:25:53.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["export","*"]}]}},"/health":{"get":{"tags":["Health"],"summary":"Get Health","description":"The health check endpoint enables you to periodically test the health of your Meilisearch instance.","operationId":"get_health","responses":{"200":{"description":"Instance is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"},"example":{"status":"available"}}}}}}},"/indexes":{"get":{"tags":["Indexes"],"summary":"List indexes","description":"List all indexes.","operationId":"list_indexes","parameters":[{"name":"offset","in":"query","description":"The number of indexes to skip before starting to retrieve anything","required":false,"schema":{"type":"integer","minimum":0},"example":100},{"name":"limit","in":"query","description":"The number of indexes to retrieve","required":false,"schema":{"type":"integer","default":20,"minimum":0},"example":1}],"responses":{"200":{"description":"Indexes are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationView_IndexView"},"example":{"results":[{"uid":"movies","primaryKey":"movie_id","createdAt":"2019-11-20T09:40:33.711324Z","updatedAt":"2019-11-20T09:40:33.711324Z"}],"limit":1,"offset":0,"total":1}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["indexes.get","indexes.*","*"]}]},"post":{"tags":["Indexes"],"summary":"Create index","description":"Create an index.","operationId":"create_index","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexCreateRequest"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"indexCreation","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["indexes.create","indexes.*","*"]}]}},"/indexes/{indexUid}":{"get":{"tags":["Indexes"],"summary":"Get index","description":"Get information about an index.","operationId":"get_index","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"The index is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexView"},"example":{"uid":"movies","primaryKey":"movie_id","createdAt":"2019-11-20T09:40:33.711324Z","updatedAt":"2019-11-20T09:40:33.711324Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["indexes.get","indexes.*","*"]}]},"delete":{"tags":["Indexes"],"summary":"Delete index","description":"Delete an index.","operationId":"delete_index","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"202":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":0,"indexUid":"movies","status":"enqueued","type":"indexDeletion","enqueuedAt":"2021-01-01T09:39:00.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["indexes.delete","indexes.*","*"]}]},"patch":{"tags":["Indexes"],"summary":"Update index","description":"Update the `primaryKey` of an index.\nReturn an error if the index doesn't exists yet or if it contains documents.","operationId":"update_index","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIndexRequest"}}},"required":true},"responses":{"202":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":0,"indexUid":"movies","status":"enqueued","type":"indexUpdate","enqueuedAt":"2021-01-01T09:39:00.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["indexes.update","indexes.*","*"]}]}},"/indexes/{indexUid}/delete-batch":{"post":{"tags":["Documents"],"summary":"Delete documents by batch","description":"Delete a set of documents based on an array of document ids.","operationId":"delete_documents_batch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentAdditionOrUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.delete","documents.*","*"]}]}},"/indexes/{indexUid}/documents":{"get":{"tags":["Documents"],"summary":"Get documents","description":"Get documents by batches.","operationId":"get_documents","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"retrieveVectors","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"filter","in":"query","required":false,"schema":{"type":"string"},"example":"popularity > 1000"},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationView_Value"},"example":{"results":[{"id":25684,"title":"American Ninja 5","poster":"https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg","overview":"When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.","release_date":725846400},{"id":45881,"title":"The Bridge of San Luis Rey","poster":"https://image.tmdb.org/t/p/w500/4X7quIcdkc24Cveg5XdpfRqxtYA.jpg","overview":"The Bridge of San Luis Rey is American author Thornton Wilder's second novel, first published in 1927 to worldwide acclaim. It tells the story of several interrelated people who die in the collapse of an Inca rope-fiber suspension bridge in Peru, and the events that lead up to their being on the bridge.[ A friar who has witnessed the tragic accident then goes about inquiring into the lives of the victims, seeking some sort of cosmic answer to the question of why each had to die. The novel won the Pulitzer Prize in 1928.","release_date":1072915200}],"limit":20,"offset":0,"total":2}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["documents.get","documents.*","*"]}]},"put":{"tags":["Documents"],"summary":"Add or update documents","description":"Add a list of documents or update them if they already exist.\nIf you send an already existing document (same id) the old document will be only partially updated according to the fields of the new document. Thus, any fields not present in the new document are kept and remained unchanged.\nTo completely overwrite a document, see Add or replace documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document. `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved `_vectors` field in your documents.\n> It can accept an array of floats, multiple arrays of floats in an outer array or an object.\n> This object accepts keys corresponding to the different embedders defined your index settings.","operationId":"update_documents","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"primaryKey","in":"query","description":"The primary key of the documents. primaryKey is optional. If you want to set the primary key of your index through this route,\nit only has to be done the first time you add documents to the index. After which it will be ignored if given.","required":false,"schema":{"type":"string"},"example":"id"},{"name":"csvDelimiter","in":"query","description":"Customize the csv delimiter when importing CSV documents.","required":true,"schema":{"type":"string","default":","},"example":";"}],"requestBody":{"content":{"application/json":{"schema":{}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentAdditionOrUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.add","documents.*","*"]}]},"post":{"tags":["Documents"],"summary":"Add or replace documents","description":"Add a list of documents or replace them if they already exist.\n\nIf you send an already existing document (same id) the whole existing document will be overwritten by the new document. Fields previously in the document not present in the new document are removed.\n\nFor a partial update of the document see Add or update documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document. `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved `_vectors` field in your documents.\n> It can accept an array of floats, multiple arrays of floats in an outer array or an object.\n> This object accepts keys corresponding to the different embedders defined your index settings.","operationId":"replace_documents","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"primaryKey","in":"query","description":"The primary key of the documents. primaryKey is optional. If you want to set the primary key of your index through this route,\nit only has to be done the first time you add documents to the index. After which it will be ignored if given.","required":false,"schema":{"type":"string"},"example":"id"},{"name":"csvDelimiter","in":"query","description":"Customize the csv delimiter when importing CSV documents.","required":true,"schema":{"type":"string","default":","},"example":";"}],"requestBody":{"content":{"application/json":{"schema":{}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentAdditionOrUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.add","documents.*","*"]}]},"delete":{"tags":["Documents"],"summary":"Delete all documents","description":"Delete all documents in the specified index.","operationId":"clear_all_documents","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentDeletion","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.delete","documents.*","*"]}]}},"/indexes/{indexUid}/documents/delete":{"post":{"tags":["Documents"],"summary":"Delete documents by filter","description":"Delete a set of documents based on a filter.","operationId":"delete_documents_by_filter","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDeletionByFilter"}}},"required":true},"responses":{"202":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentDeletion","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.delete","documents.*","*"]}]}},"/indexes/{indexUid}/documents/edit":{"post":{"tags":["Documents"],"summary":"Edit documents by function.","description":"Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to edit one or more documents directly in Meilisearch.","operationId":"edit_documents_by_function","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentEditionByFunction"}}},"required":true},"responses":{"202":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentDeletion","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.*","*"]}]}},"/indexes/{indexUid}/documents/fetch":{"post":{"tags":["Documents"],"summary":"Get documents with POST","description":"Get a set of documents.","operationId":"documents_by_query_post","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowseQuery"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationView_Value"},"example":{"results":[{"title":"The Travels of Ibn Battuta","genres":["Travel","Adventure"],"language":"English","rating":4.5},{"title":"Pride and Prejudice","genres":["Classics","Fiction","Romance","Literature"],"language":"English","rating":4}],"offset":0,"limit":2,"total":5}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.delete","documents.*","*"]}]}},"/indexes/{indexUid}/documents/{documentId}":{"get":{"tags":["Documents"],"summary":"Get one document","description":"Get one document from its primary key.","operationId":"get_document","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"documentId","in":"path","description":"The document identifier","required":true,"schema":{"type":"string"},"example":"85087"},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"retrieveVectors","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"The document is returned","content":{"application/json":{"schema":{},"example":{"id":25684,"title":"American Ninja 5","poster":"https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg","overview":"When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.","release_date":725846400}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Document not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Document `a` not found.","code":"document_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#document_not_found"}}}}},"security":[{"Bearer":["documents.get","documents.*","*"]}]},"delete":{"tags":["Documents"],"summary":"Delete a document","description":"Delete a single document by id.","operationId":"delete_document","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"documentId","in":"path","description":"Document Identifier","required":true,"schema":{"type":"string"},"example":"853"}],"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentAdditionOrUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.delete","documents.*","*"]}]}},"/indexes/{indexUid}/facet-search":{"post":{"tags":["Facet Search"],"summary":"Perform a facet search","description":"Search for a facet value within a given facet.","operationId":"search","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacetSearchQuery"}}},"required":true},"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"},"example":{"hits":[{"id":2770,"title":"American Pie 2","poster":"https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg","overview":"The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…","release_date":997405200},{"id":190859,"title":"American Sniper","poster":"https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg","overview":"U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…","release_date":1418256000}],"offset":0,"limit":2,"estimatedTotalHits":976,"processingTimeMs":35,"query":"american "}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["search","*"]}]}},"/indexes/{indexUid}/search":{"get":{"tags":["Indexes","Search"],"summary":"Search an index with GET","description":"Search for documents matching a specific query in the given index.","operationId":"search_with_url_query","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"vector","in":"query","required":true,"schema":{"type":"array","items":{"type":"number","format":"float"}},"explode":false},{"name":"offset","in":"query","required":true,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"limit","in":"query","required":true,"schema":{"type":"integer","default":20,"minimum":0}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"hitsPerPage","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"attributesToRetrieve","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"retrieveVectors","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"attributesToCrop","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"cropLength","in":"query","required":true,"schema":{"type":"integer","default":10,"minimum":0}},{"name":"attributesToHighlight","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"filter","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"distinct","in":"query","required":false,"schema":{"type":"string"}},{"name":"showMatchesPosition","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"showRankingScore","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"showRankingScoreDetails","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"facets","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"highlightPreTag","in":"query","required":true,"schema":{"type":"string","default":""}},{"name":"highlightPostTag","in":"query","required":true,"schema":{"type":"string","default":""}},{"name":"cropMarker","in":"query","required":true,"schema":{"type":"string","default":"…"}},{"name":"matchingStrategy","in":"query","required":true,"schema":{"$ref":"#/components/schemas/MatchingStrategy"}},{"name":"attributesToSearchOn","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"hybridEmbedder","in":"query","required":false,"schema":{"type":"string"}},{"name":"hybridSemanticRatio","in":"query","required":true,"schema":{"type":"number","format":"float"}},{"name":"rankingScoreThreshold","in":"query","required":true,"schema":{"type":"number","format":"float"}},{"name":"locales","in":"query","required":true,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Locale"}},"explode":false}],"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"},"example":{"hits":[{"id":2770,"title":"American Pie 2","poster":"https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg","overview":"The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…","release_date":997405200},{"id":190859,"title":"American Sniper","poster":"https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg","overview":"U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…","release_date":1418256000}],"offset":0,"limit":2,"estimatedTotalHits":976,"processingTimeMs":35,"query":"american "}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["search","*"]}]},"post":{"tags":["Indexes","Search"],"summary":"Search with POST","description":"Search for documents matching a specific query in the given index.","operationId":"search_with_post","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchQuery"}}},"required":true},"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"},"example":{"hits":[{"id":2770,"title":"American Pie 2","poster":"https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg","overview":"The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…","release_date":997405200},{"id":190859,"title":"American Sniper","poster":"https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg","overview":"U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…","release_date":1418256000}],"offset":0,"limit":2,"estimatedTotalHits":976,"processingTimeMs":35,"query":"american "}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["search","*"]}]}},"/indexes/{indexUid}/settings":{"get":{"tags":["Settings"],"summary":"All settings","description":"This route allows you to retrieve, configure, or reset all of an index's settings at once.","operationId":"get_all","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"Settings are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings_Unchecked"},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset settings","description":"Reset all the settings of an index to their default value.","operationId":"delete_all","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update settings","description":"Update the settings of an index.\nPassing null to an index setting will reset it to its default value.\nUpdates in the settings route are partial. This means that any parameters not provided in the body will be left unchanged.\nIf the provided index does not exist, it will be created.","operationId":"update_all","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings_Unchecked"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/chat":{"get":{"tags":["Settings"],"summary":"Get chat","description":"Get an user defined chat","operationId":"getchat","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"chat is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSettings"},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset chat","description":"Reset an index's chat to its default value","operationId":"deletechat","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update chat","description":"Update an index's user defined chat","operationId":"patchchat","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/dictionary":{"get":{"tags":["Settings"],"summary":"Get dictionary","description":"Get an user defined dictionary","operationId":"getdictionary","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"dictionary is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update dictionary","description":"Update an index's user defined dictionary","operationId":"putdictionary","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset dictionary","description":"Reset an index's dictionary to its default value","operationId":"deletedictionary","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/displayed-attributes":{"get":{"tags":["Settings"],"summary":"Get displayedAttributes","description":"Get an user defined displayedAttributes","operationId":"getdisplayedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"displayedAttributes is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update displayedAttributes","description":"Update an index's user defined displayedAttributes","operationId":"putdisplayedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset displayedAttributes","description":"Reset an index's displayedAttributes to its default value","operationId":"deletedisplayedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/distinct-attribute":{"get":{"tags":["Settings"],"summary":"Get distinctAttribute","description":"Get an user defined distinctAttribute","operationId":"getdistinctAttribute","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"distinctAttribute is returned","content":{"application/json":{"schema":{"type":"string"},"example":""}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update distinctAttribute","description":"Update an index's user defined distinctAttribute","operationId":"putdistinctAttribute","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset distinctAttribute","description":"Reset an index's distinctAttribute to its default value","operationId":"deletedistinctAttribute","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/embedders":{"get":{"tags":["Settings"],"summary":"Get embedders","description":"Get an user defined embedders","operationId":"getembedders","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"embedders is returned","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/SettingEmbeddingSettings"},"propertyNames":{"type":"string"}},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset embedders","description":"Reset an index's embedders to its default value","operationId":"deleteembedders","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/SettingEmbeddingSettings"},"propertyNames":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update embedders","description":"Update an index's user defined embedders","operationId":"patchembedders","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/SettingEmbeddingSettings"},"propertyNames":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/facet-search":{"get":{"tags":["Settings"],"summary":"Get facetSearch","description":"Get an user defined facetSearch","operationId":"getfacetSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"facetSearch is returned","content":{"application/json":{"schema":{"type":"boolean"},"example":false}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update facetSearch","description":"Update an index's user defined facetSearch","operationId":"putfacetSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"boolean"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset facetSearch","description":"Reset an index's facetSearch to its default value","operationId":"deletefacetSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"boolean"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/faceting":{"get":{"tags":["Settings"],"summary":"Get faceting","description":"Get an user defined faceting","operationId":"getfaceting","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"faceting is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacetingSettings"},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset faceting","description":"Reset an index's faceting to its default value","operationId":"deletefaceting","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacetingSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update faceting","description":"Update an index's user defined faceting","operationId":"patchfaceting","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacetingSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/filterable-attributes":{"get":{"tags":["Settings"],"summary":"Get filterableAttributes","description":"Get an user defined filterableAttributes","operationId":"getfilterableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"filterableAttributes is returned","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FilterableAttributesRule"}},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update filterableAttributes","description":"Update an index's user defined filterableAttributes","operationId":"putfilterableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FilterableAttributesRule"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset filterableAttributes","description":"Reset an index's filterableAttributes to its default value","operationId":"deletefilterableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FilterableAttributesRule"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/localized-attributes":{"get":{"tags":["Settings"],"summary":"Get localizedAttributes","description":"Get an user defined localizedAttributes","operationId":"getlocalizedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"localizedAttributes is returned","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LocalizedAttributesRuleView"}},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update localizedAttributes","description":"Update an index's user defined localizedAttributes","operationId":"putlocalizedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LocalizedAttributesRuleView"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset localizedAttributes","description":"Reset an index's localizedAttributes to its default value","operationId":"deletelocalizedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LocalizedAttributesRuleView"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/non-separator-tokens":{"get":{"tags":["Settings"],"summary":"Get nonSeparatorTokens","description":"Get an user defined nonSeparatorTokens","operationId":"getnonSeparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"nonSeparatorTokens is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update nonSeparatorTokens","description":"Update an index's user defined nonSeparatorTokens","operationId":"putnonSeparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset nonSeparatorTokens","description":"Reset an index's nonSeparatorTokens to its default value","operationId":"deletenonSeparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/pagination":{"get":{"tags":["Settings"],"summary":"Get pagination","description":"Get an user defined pagination","operationId":"getpagination","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"pagination is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationSettings"},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset pagination","description":"Reset an index's pagination to its default value","operationId":"deletepagination","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update pagination","description":"Update an index's user defined pagination","operationId":"patchpagination","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/prefix-search":{"get":{"tags":["Settings"],"summary":"Get prefixSearch","description":"Get an user defined prefixSearch","operationId":"getprefixSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"prefixSearch is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrefixSearchSettings"},"example":"indexingTime"}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update prefixSearch","description":"Update an index's user defined prefixSearch","operationId":"putprefixSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrefixSearchSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset prefixSearch","description":"Reset an index's prefixSearch to its default value","operationId":"deleteprefixSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrefixSearchSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/proximity-precision":{"get":{"tags":["Settings"],"summary":"Get proximityPrecision","description":"Get an user defined proximityPrecision","operationId":"getproximityPrecision","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"proximityPrecision is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProximityPrecisionView"},"example":"byWord"}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update proximityPrecision","description":"Update an index's user defined proximityPrecision","operationId":"putproximityPrecision","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProximityPrecisionView"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset proximityPrecision","description":"Reset an index's proximityPrecision to its default value","operationId":"deleteproximityPrecision","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProximityPrecisionView"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/ranking-rules":{"get":{"tags":["Settings"],"summary":"Get rankingRules","description":"Get an user defined rankingRules","operationId":"getrankingRules","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"rankingRules is returned","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RankingRuleView"}},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update rankingRules","description":"Update an index's user defined rankingRules","operationId":"putrankingRules","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RankingRuleView"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset rankingRules","description":"Reset an index's rankingRules to its default value","operationId":"deleterankingRules","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RankingRuleView"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/search-cutoff-ms":{"get":{"tags":["Settings"],"summary":"Get searchCutoffMs","description":"Get an user defined searchCutoffMs","operationId":"getsearchCutoffMs","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"searchCutoffMs is returned","content":{"application/json":{"schema":{"type":"integer","format":"u-int64","minimum":0},"example":0}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update searchCutoffMs","description":"Update an index's user defined searchCutoffMs","operationId":"putsearchCutoffMs","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"integer","format":"u-int64","minimum":0}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset searchCutoffMs","description":"Reset an index's searchCutoffMs to its default value","operationId":"deletesearchCutoffMs","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"integer","format":"u-int64","minimum":0}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/searchable-attributes":{"get":{"tags":["Settings"],"summary":"Get searchableAttributes","description":"Get an user defined searchableAttributes","operationId":"getsearchableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"searchableAttributes is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update searchableAttributes","description":"Update an index's user defined searchableAttributes","operationId":"putsearchableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset searchableAttributes","description":"Reset an index's searchableAttributes to its default value","operationId":"deletesearchableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/separator-tokens":{"get":{"tags":["Settings"],"summary":"Get separatorTokens","description":"Get an user defined separatorTokens","operationId":"getseparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"separatorTokens is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update separatorTokens","description":"Update an index's user defined separatorTokens","operationId":"putseparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset separatorTokens","description":"Reset an index's separatorTokens to its default value","operationId":"deleteseparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/sortable-attributes":{"get":{"tags":["Settings"],"summary":"Get sortableAttributes","description":"Get an user defined sortableAttributes","operationId":"getsortableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"sortableAttributes is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update sortableAttributes","description":"Update an index's user defined sortableAttributes","operationId":"putsortableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset sortableAttributes","description":"Reset an index's sortableAttributes to its default value","operationId":"deletesortableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/stop-words":{"get":{"tags":["Settings"],"summary":"Get stopWords","description":"Get an user defined stopWords","operationId":"getstopWords","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"stopWords is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update stopWords","description":"Update an index's user defined stopWords","operationId":"putstopWords","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset stopWords","description":"Reset an index's stopWords to its default value","operationId":"deletestopWords","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/synonyms":{"get":{"tags":["Settings"],"summary":"Get synonyms","description":"Get an user defined synonyms","operationId":"getsynonyms","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"synonyms is returned","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"propertyNames":{"type":"string"}},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update synonyms","description":"Update an index's user defined synonyms","operationId":"putsynonyms","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"propertyNames":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset synonyms","description":"Reset an index's synonyms to its default value","operationId":"deletesynonyms","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"propertyNames":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/typo-tolerance":{"get":{"tags":["Settings"],"summary":"Get typoTolerance","description":"Get an user defined typoTolerance","operationId":"gettypoTolerance","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"typoTolerance is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypoSettings"},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset typoTolerance","description":"Reset an index's typoTolerance to its default value","operationId":"deletetypoTolerance","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypoSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update typoTolerance","description":"Update an index's user defined typoTolerance","operationId":"patchtypoTolerance","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypoSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/vector-store":{"get":{"tags":["Settings"],"summary":"Get vectorStore","description":"Get an user defined vectorStore","operationId":"getvectorStore","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"vectorStore is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreBackend"},"example":"stable"}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset vectorStore","description":"Reset an index's vectorStore to its default value","operationId":"deletevectorStore","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreBackend"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update vectorStore","description":"Update an index's user defined vectorStore","operationId":"patchvectorStore","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreBackend"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/similar":{"get":{"tags":["Similar documents"],"summary":"Get similar documents with GET","description":"Retrieve documents similar to a specific search result.","operationId":"similar_get","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"id","in":"query","required":true,"schema":{"type":"string"}},{"name":"offset","in":"query","required":true,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"limit","in":"query","required":true,"schema":{"type":"integer","default":20,"minimum":0}},{"name":"attributes_to_retrieve","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"retrieve_vectors","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"filter","in":"query","required":false,"schema":{"type":"string"}},{"name":"show_ranking_score","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"show_ranking_score_details","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"ranking_score_threshold","in":"query","required":false,"schema":{"type":"number","format":"float"}},{"name":"embedder","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimilarResult"},"example":{"hits":[{"id":2770,"title":"American Pie 2","poster":"https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg","overview":"The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…","release_date":997405200},{"id":190859,"title":"American Sniper","poster":"https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg","overview":"U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…","release_date":1418256000}],"offset":0,"limit":2,"estimatedTotalHits":976,"processingTimeMs":35,"query":"american "}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["search","*"]}]},"post":{"tags":["Similar documents"],"summary":"Get similar documents with POST","description":"Retrieve documents similar to a specific search result.","operationId":"similar_post","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimilarQuery"}}},"required":true},"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimilarResult"},"example":{"hits":[{"id":2770,"title":"American Pie 2","poster":"https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg","overview":"The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…","release_date":997405200},{"id":190859,"title":"American Sniper","poster":"https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg","overview":"U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…","release_date":1418256000}],"offset":0,"limit":2,"estimatedTotalHits":976,"processingTimeMs":35,"query":"american "}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["search","*"]}]}},"/indexes/{indexUid}/stats":{"get":{"tags":["Stats"],"summary":"Get stats of index","description":"Get the stats of an index.","operationId":"get_index_stats","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"The stats of the index","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexStats"},"example":{"numberOfDocuments":10,"rawDocumentDbSize":10,"avgDocumentSize":10,"numberOfEmbeddings":10,"numberOfEmbeddedDocuments":10,"isIndexing":true,"fieldDistribution":{"genre":10,"author":9}}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["stats.get","stats.*","*"]}]}},"/keys":{"get":{"tags":["Keys"],"summary":"Get API Keys","description":"List all API Keys","operationId":"list_api_keys","parameters":[{"name":"offset","in":"query","required":true,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"limit","in":"query","required":true,"schema":{"type":"integer","default":20,"minimum":0}}],"responses":{"202":{"description":"List of keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationView_KeyView"},"example":{"results":[{"uid":"01b4bc42-eb33-4041-b481-254d00cce834","key":"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4","name":"An API Key","description":null,"actions":["documents.add"],"indexes":["movies"],"expiresAt":"2022-11-12T10:00:00Z","createdAt":"2021-11-12T10:00:00Z","updatedAt":"2021-11-12T10:00:00Z"}],"limit":20,"offset":0,"total":1}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["keys.get","keys.*","*"]}]},"post":{"tags":["Keys"],"summary":"Create an API Key","description":"Create an API Key.","operationId":"create_api_key","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKey"}}},"required":true},"responses":{"202":{"description":"Key has been created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyView"},"example":{"uid":"01b4bc42-eb33-4041-b481-254d00cce834","key":"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4","name":"Indexing Products API key","description":null,"actions":["documents.add"],"indexes":["products"],"expiresAt":"2021-11-13T00:00:00Z","createdAt":"2021-11-12T10:00:00Z","updatedAt":"2021-11-12T10:00:00Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["keys.create","keys.*","*"]}]}},"/keys/{uidOrKey}":{"get":{"tags":["Keys"],"summary":"Get an API Key","description":"Get an API key from its `uid` or its `key` field.","operationId":"get_api_key","parameters":[{"name":"uidOrKey","in":"path","description":"The `uid` or `key` field of an existing API key","required":true,"schema":{"type":"string","format":"password"},"example":"7b198a7f-52a0-4188-8762-9ad93cd608b2"}],"responses":{"200":{"description":"The key is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyView"},"example":{"uid":"01b4bc42-eb33-4041-b481-254d00cce834","key":"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4","name":"An API Key","description":null,"actions":["documents.add"],"indexes":["movies"],"expiresAt":"2022-11-12T10:00:00Z","createdAt":"2021-11-12T10:00:00Z","updatedAt":"2021-11-12T10:00:00Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["keys.get","keys.*","*"]}]},"delete":{"tags":["Keys"],"summary":"Delete a key","description":"Delete the specified API key.","operationId":"delete_api_key","parameters":[{"name":"uidOrKey","in":"path","description":"The `uid` or `key` field of an existing API key","required":true,"schema":{"type":"string","format":"password"},"example":"7b198a7f-52a0-4188-8762-9ad93cd608b2"}],"responses":{"204":{"description":"The key have been removed"},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["keys.delete","keys.*","*"]}]},"patch":{"tags":["Keys"],"summary":"Update a Key","description":"Update the name and description of an API key.\nUpdates to keys are partial. This means you should provide only the fields you intend to update, as any fields not present in the payload will remain unchanged.","operationId":"patch_api_key","parameters":[{"name":"uidOrKey","in":"path","description":"The `uid` or `key` field of an existing API key","required":true,"schema":{"type":"string","format":"password"},"example":"7b198a7f-52a0-4188-8762-9ad93cd608b2"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchApiKey"}}},"required":true},"responses":{"200":{"description":"The key have been updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyView"},"example":{"uid":"01b4bc42-eb33-4041-b481-254d00cce834","key":"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4","name":"An API Key","description":null,"actions":["documents.add"],"indexes":["movies"],"expiresAt":"2022-11-12T10:00:00Z","createdAt":"2021-11-12T10:00:00Z","updatedAt":"2021-11-12T10:00:00Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["keys.update","keys.*","*"]}]}},"/logs/stderr":{"post":{"tags":["Logs"],"summary":"Update target of the console logs","description":"This route lets you specify at runtime the level of the console logs outputted on stderr.","operationId":"update_stderr_target","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStderrLogs"}}},"required":true},"responses":{"204":{"description":"The console logs have been updated"},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["metrics.get","metrics.*","*"]}]}},"/logs/stream":{"post":{"tags":["Logs"],"summary":"Retrieve logs","description":"Stream logs over HTTP. The format of the logs depends on the configuration specified in the payload.\nThe logs are sent as multi-part, and the stream never stops, so make sure your clients correctly handle that.\nTo make the server stop sending you logs, you can call the `DELETE /logs/stream` route.\n\nThere can only be one listener at a timeand an error will be returned if you call this route while it's being used by another client.","operationId":"get_logs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLogs"}}},"required":true},"responses":{"200":{"description":"Logs are being returned","content":{"application/json":{"schema":{"type":"string"},"example":"\n2024-10-08T13:35:02.643750Z WARN HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: tracing_actix_web::middleware: Error encountered while processing the incoming HTTP request: ResponseError { code: 400, message: \"Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625\", error_code: \"feature_not_enabled\", error_type: \"invalid_request\", error_link: \"https://docs.meilisearch.com/errors#feature_not_enabled\" }\n2024-10-08T13:35:02.644191Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: meilisearch: close time.busy=1.66ms time.idle=658µs\n2024-10-08T13:35:18.564152Z INFO HTTP request{method=PATCH host=\"localhost:7700\" route=/experimental-features query_parameters= user_agent=curl/8.6.0 status_code=200}: meilisearch: close time.busy=1.17ms time.idle=127µs\n2024-10-08T13:35:23.094987Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=200}: meilisearch: close time.busy=2.12ms time.idle=595µs\n"}}},"400":{"description":"The route is already being used","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The `/logs/stream` route is currently in use by someone else.","code":"bad_request","type":"invalid_request","link":"https://docs.meilisearch.com/errors#bad_request"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["metrics.get","metrics.*","*"]}]},"delete":{"tags":["Logs"],"summary":"Stop retrieving logs","description":"Call this route to make the engine stops sending logs through the `POST /logs/stream` route.","operationId":"cancel_logs","responses":{"204":{"description":"Logs are being returned"},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["metrics.get","metrics.*","*"]}]}},"/metrics":{"get":{"tags":["Stats"],"summary":"Get prometheus metrics","description":"Retrieve metrics on the engine. See https://www.meilisearch.com/docs/learn/experimental/metrics\nCurrently, [the feature is experimental](https://www.meilisearch.com/docs/learn/experimental/overview)\nwhich means it must be enabled.","operationId":"get_metrics","responses":{"200":{"description":"The metrics of the instance","content":{"text/plain":{"schema":{"type":"string"},"example":"\n# HELP meilisearch_db_size_bytes Meilisearch DB Size In Bytes\n# TYPE meilisearch_db_size_bytes gauge\nmeilisearch_db_size_bytes 1130496\n# HELP meilisearch_http_requests_total Meilisearch HTTP requests total\n# TYPE meilisearch_http_requests_total counter\nmeilisearch_http_requests_total{method=\"GET\",path=\"/metrics\",status=\"400\"} 1\nmeilisearch_http_requests_total{method=\"PATCH\",path=\"/experimental-features\",status=\"200\"} 1\n# HELP meilisearch_http_response_time_seconds Meilisearch HTTP response times\n# TYPE meilisearch_http_response_time_seconds histogram\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.005\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.01\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.025\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.05\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.075\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.25\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.75\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"2.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"7.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"10\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"+Inf\"} 0\nmeilisearch_http_response_time_seconds_sum{method=\"GET\",path=\"/metrics\"} 0\nmeilisearch_http_response_time_seconds_count{method=\"GET\",path=\"/metrics\"} 0\n# HELP meilisearch_index_count Meilisearch Index Count\n# TYPE meilisearch_index_count gauge\nmeilisearch_index_count 1\n# HELP meilisearch_index_docs_count Meilisearch Index Docs Count\n# TYPE meilisearch_index_docs_count gauge\nmeilisearch_index_docs_count{index=\"mieli\"} 2\n# HELP meilisearch_is_indexing Meilisearch Is Indexing\n# TYPE meilisearch_is_indexing gauge\nmeilisearch_is_indexing 0\n# HELP meilisearch_last_update Meilisearch Last Update\n# TYPE meilisearch_last_update gauge\nmeilisearch_last_update 1726675964\n# HELP meilisearch_nb_tasks Meilisearch Number of tasks\n# TYPE meilisearch_nb_tasks gauge\nmeilisearch_nb_tasks{kind=\"indexes\",value=\"mieli\"} 39\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"canceled\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"enqueued\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"failed\"} 4\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"processing\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"succeeded\"} 35\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentAdditionOrUpdate\"} 9\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentDeletion\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentEdition\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"dumpCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexDeletion\"} 8\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexSwap\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexUpdate\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"settingsUpdate\"} 22\nmeilisearch_nb_tasks{kind=\"types\",value=\"snapshotCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskCancelation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskDeletion\"} 0\n# HELP meilisearch_used_db_size_bytes Meilisearch Used DB Size In Bytes\n# TYPE meilisearch_used_db_size_bytes gauge\nmeilisearch_used_db_size_bytes 409600\n"}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["metrics.get","metrics.*","*"]}]}},"/multi-search":{"post":{"tags":["Multi-search"],"summary":"Perform a multi-search","description":"Bundle multiple search queries in a single API request. Use this endpoint to search through multiple indexes at once.","operationId":"multi_search_with_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FederatedSearch"}}},"required":true},"responses":{"200":{"description":"Federated multi-search","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FederatedSearchResult"},"example":{"hits":[{"id":42,"title":"Batman returns","overview":"The overview of batman returns","_federation":{"indexUid":"movies","queriesPosition":0}},{"comicsId":"batman-killing-joke","description":"This comic is really awesome","title":"Batman: the killing joke","_federation":{"indexUid":"comics","queriesPosition":1}}],"processingTimeMs":0,"limit":20,"offset":0,"estimatedTotalHits":2,"semanticHitCount":0}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["search","*"]}]}},"/network":{"get":{"tags":["Network"],"summary":"Get network topology","description":"Get a list of all Meilisearch instances currently known to this instance.","operationId":"get_network","responses":{"200":{"description":"Known nodes are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Network"},"example":{"self":"ms-0","remotes":{"ms-0":{"url":"http://localhost:7700","searchApiKey":null,"writeApiKey":null},"ms-1":{"url":"http://localhost:7701","searchApiKey":"foo","writeApiKey":"bar"},"ms-2":{"url":"http://localhost:7702","searchApiKey":"bar","writeApiKey":"foo"}}}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["network.get","*"]}]},"patch":{"tags":["Network"],"summary":"Configure Network","description":"Add or remove nodes from network.","operationId":"patch_network","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Network"}}},"required":true},"responses":{"200":{"description":"New network state is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Network"},"example":{"self":"ms-0","remotes":{"ms-0":{"url":"http://localhost:7700","searchApiKey":null,"writeApiKey":null},"ms-1":{"url":"http://localhost:7701","searchApiKey":"foo","writeApiKey":"bar"},"ms-2":{"url":"http://localhost:7702","searchApiKey":"bar","writeApiKey":"foo"}}}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["network.update","*"]}]}},"/snapshots":{"post":{"tags":["Snapshots"],"summary":"Create a snapshot","description":"Triggers a snapshot creation process. Once the process is complete, a snapshot is created in the snapshot directory. If the snapshot directory does not exist yet, it will be created.","operationId":"create_snapshot","responses":{"202":{"description":"Snapshot is being created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":0,"indexUid":null,"status":"enqueued","type":"snapshotCreation","enqueuedAt":"2021-01-01T09:39:00.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["snapshots.create","snapshots.*","*"]}]}},"/stats":{"get":{"tags":["Stats"],"summary":"Get stats of all indexes.","description":"Get stats of all indexes.","operationId":"get_stats","responses":{"200":{"description":"The stats of the instance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stats"},"example":{"databaseSize":567,"usedDatabaseSize":456,"lastUpdate":"2019-11-20T09:40:33.711324Z","indexes":{"movies":{"numberOfDocuments":10,"rawDocumentDbSize":100,"maxDocumentSize":16,"avgDocumentSize":10,"isIndexing":true,"fieldDistribution":{"genre":10,"author":9}}}}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["stats.get","stats.*","*"]}]}},"/swap-indexes":{"post":{"tags":["Indexes"],"summary":"Swap indexes","description":"Swap the documents, settings, and task history of two or more indexes. You can only swap indexes in pairs. However, a single request can swap as many index pairs as you wish.\nSwapping indexes is an atomic transaction: either all indexes are successfully swapped, or none are.\nSwapping indexA and indexB will also replace every mention of indexA by indexB and vice-versa in the task history. enqueued tasks are left unmodified.","operationId":"swap_indexes","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SwapIndexesPayload"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":3,"indexUid":null,"status":"enqueued","type":"indexSwap","enqueuedAt":"2021-08-12T10:00:00.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["search","*"]}]}},"/tasks":{"get":{"tags":["Tasks"],"summary":"Get all tasks","description":"Get all [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)","operationId":"get_tasks","parameters":[{"name":"limit","in":"query","description":"Maximum number of results to return.","required":false,"schema":{"type":"integer","format":"u-int32","default":20,"minimum":0},"example":12},{"name":"from","in":"query","description":"Fetch the next set of results from the given uid.","required":false,"schema":{"type":"integer","format":"u-int32","minimum":0},"example":12421},{"name":"reverse","in":"query","description":"The order you want to retrieve the objects.","required":false,"schema":{"type":"boolean"},"example":true},{"name":"batchUids","in":"query","description":"Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character.","required":false,"schema":{"type":"integer","format":"u-int32","minimum":0},"example":12421},{"name":"uids","in":"query","description":"Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"canceledBy","in":"query","description":"Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[374,"*"]},{"name":"types","in":"query","description":"Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["documentAdditionOrUpdate","*"]},{"name":"statuses","in":"query","description":"Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Status"}},"example":["succeeded","failed","canceled","enqueued","processing","*"]},{"name":"indexUids","in":"query","description":"Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["movies","theater","*"]},{"name":"afterEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]}],"responses":{"200":{"description":"Get all tasks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllTasks"},"example":{"results":[{"uid":144,"indexUid":"mieli","status":"succeeded","type":"settingsUpdate","canceledBy":null,"details":{"settings":{"filterableAttributes":["play_count"]}},"error":null,"duration":"PT0.009330S","enqueuedAt":"2024-08-08T09:01:13.348471Z","startedAt":"2024-08-08T09:01:13.349442Z","finishedAt":"2024-08-08T09:01:13.358772Z"}],"total":1,"limit":1,"from":144,"next":null}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["tasks.get","tasks.*","*"]}]},"delete":{"tags":["Tasks"],"summary":"Delete tasks","description":"Delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) on filter","operationId":"delete_tasks","parameters":[{"name":"uids","in":"query","description":"Permits to filter tasks by their uid. By default, when the `uids` query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"batchUids","in":"query","description":"Lets you filter tasks by their `batchUid`.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"canceledBy","in":"query","description":"Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[374,"*"]},{"name":"types","in":"query","description":"Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Kind"}},"example":["documentDeletion","*"]},{"name":"statuses","in":"query","description":"Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Status"}},"example":["succeeded","failed","canceled","*"]},{"name":"indexUids","in":"query","description":"Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["movies","theater","*"]},{"name":"afterEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]}],"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"taskDeletion","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"400":{"description":"A filter is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Query parameters to filter the tasks to delete are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.","code":"missing_task_filters","type":"invalid_request","link":"https://docs.meilisearch.com/errors#missing_task_filters"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"The task uid does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Task :taskUid not found.","code":"task_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors/#task_not_found"}}}}},"security":[{"Bearer":["tasks.delete","tasks.*","*"]}]}},"/tasks/cancel":{"post":{"tags":["Tasks"],"summary":"Cancel tasks","description":"Cancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)","operationId":"cancel_tasks","parameters":[{"name":"uids","in":"query","description":"Permits to filter tasks by their uid. By default, when the `uids` query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"batchUids","in":"query","description":"Lets you filter tasks by their `batchUid`.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"canceledBy","in":"query","description":"Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[374,"*"]},{"name":"types","in":"query","description":"Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Kind"}},"example":["documentDeletion","*"]},{"name":"statuses","in":"query","description":"Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Status"}},"example":["succeeded","failed","canceled","*"]},{"name":"indexUids","in":"query","description":"Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["movies","theater","*"]},{"name":"afterEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]}],"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"taskCancelation","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"400":{"description":"A filter is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Query parameters to filter the tasks to cancel are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.","code":"missing_task_filters","type":"invalid_request","link":"https://docs.meilisearch.com/errors#missing_task_filters"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"The task uid does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Task :taskUid not found.","code":"task_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors/#task_not_found"}}}}},"security":[{"Bearer":["tasks.cancel","tasks.*","*"]}]}},"/tasks/{taskUid}":{"get":{"tags":["Tasks"],"summary":"Get a task","description":"Get a [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)","operationId":"get_task","parameters":[{"name":"taskUid","in":"path","description":"The task identifier","required":true,"schema":{"type":"string","format":"u-int32"},"example":0}],"responses":{"200":{"description":"Task successfully retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskView"},"example":{"uid":1,"indexUid":"movies","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":79000,"indexedDocuments":79000},"error":null,"duration":"PT1S","enqueuedAt":"2021-01-01T09:39:00.000000Z","startedAt":"2021-01-01T09:39:01.000000Z","finishedAt":"2021-01-01T09:39:02.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"The task uid does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Task :taskUid not found.","code":"task_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors/#task_not_found"}}}}},"security":[{"Bearer":["tasks.get","tasks.*","*"]}]}},"/version":{"get":{"tags":["Version"],"summary":"Get version","description":"Current version of Meilisearch.","operationId":"get_version","responses":{"200":{"description":"Instance is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionResponse"},"example":{"commitSha":"b46889b5f0f2f8b91438a08a358ba8f05fc09fc1","commitDate":"2021-07-08","pkgVersion":"0.23.0"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["version","*"]}]}},"/webhooks":{"get":{"tags":["Webhooks"],"operationId":"get_webhooks","responses":{"200":{"description":"Webhooks are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResults"},"example":{"results":[{"uuid":"550e8400-e29b-41d4-a716-446655440000","url":"https://your.site/on-tasks-completed","headers":{"Authorization":"Bearer a-secret-token"},"isEditable":true},{"uuid":"550e8400-e29b-41d4-a716-446655440001","url":"https://another.site/on-tasks-completed","isEditable":true}]}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["webhooks.get","webhooks.*","*.get","*"]}]},"post":{"tags":["Webhooks"],"operationId":"post_webhook","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSettings"}}},"required":true},"responses":{"201":{"description":"Webhook created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithMetadata"},"example":{"uuid":"550e8400-e29b-41d4-a716-446655440000","url":"https://your.site/on-tasks-completed","headers":{"Authorization":"Bearer a-secret-token"},"isEditable":true}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}},"security":[{"Bearer":["webhooks.create","webhooks.*","*"]}]}},"/webhooks/{uuid}":{"get":{"tags":["Webhooks"],"operationId":"get_webhook","parameters":[{"name":"uuid","in":"path","description":"The universally unique identifier of the webhook","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Webhook found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithMetadata"},"example":{"uuid":"550e8400-e29b-41d4-a716-446655440000","url":"https://your.site/on-tasks-completed","headers":{"Authorization":"Bearer a-secret"},"isEditable":true}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}},"security":[{"Bearer":["webhooks.get","webhooks.*","*.get","*"]}]},"delete":{"tags":["Webhooks"],"operationId":"delete_webhook","parameters":[{"name":"uuid","in":"path","description":"The universally unique identifier of the webhook","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Webhook deleted successfully"},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}},"security":[{"Bearer":["webhooks.delete","webhooks.*","*"]}]},"patch":{"tags":["Webhooks"],"operationId":"patch_webhook","parameters":[{"name":"uuid","in":"path","description":"The universally unique identifier of the webhook","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSettings"}}},"required":true},"responses":{"200":{"description":"Webhook updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithMetadata"},"example":{"uuid":"550e8400-e29b-41d4-a716-446655440000","url":"https://your.site/on-tasks-completed","headers":{"Authorization":"Bearer a-secret-token"},"isEditable":true}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}},"security":[{"Bearer":["webhooks.update","webhooks.*","*"]}]}}},"components":{"schemas":{"Action":{"type":"string","enum":["*","search","documents.*","documents.add","documents.get","documents.delete","indexes.*","indexes.create","indexes.get","indexes.update","indexes.delete","indexes.swap","tasks.*","tasks.cancel","tasks.delete","tasks.get","settings.*","settings.get","settings.update","stats.*","stats.get","metrics.*","metrics.get","dumps.*","dumps.create","snapshots.*","snapshots.create","version","keys.create","keys.get","keys.update","keys.delete","experimental.get","experimental.update","export","network.get","network.update","chatCompletions","chats.*","chats.get","chats.delete","chatsSettings.*","chatsSettings.get","chatsSettings.update","*.get","webhooks.get","webhooks.update","webhooks.delete","webhooks.create","webhooks.*"]},"AllBatches":{"type":"object","required":["results","total","limit"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/BatchView"}},"total":{"type":"integer","format":"u-int64","minimum":0},"limit":{"type":"integer","format":"u-int32","minimum":0},"from":{"type":["integer","null"],"format":"u-int32","minimum":0},"next":{"type":["integer","null"],"format":"u-int32","minimum":0}}},"AllTasks":{"type":"object","required":["results","total","limit"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/TaskView"},"description":"The list of tasks that matched the filter."},"total":{"type":"integer","format":"u-int64","description":"Total number of browsable results using offset/limit parameters for the given resource.","minimum":0},"limit":{"type":"integer","format":"u-int32","description":"Limit given for the query. If limit is not provided as a query parameter, this parameter displays the default limit value.","minimum":0},"from":{"type":["integer","null"],"format":"u-int32","description":"The first task uid returned.","minimum":0},"next":{"type":["integer","null"],"format":"u-int32","description":"Represents the value to send in from to fetch the next slice of the results. The first item for the next slice starts at this exact number. When the returned value is null, it means that all the data have been browsed in the given order.","minimum":0}}},"AttributePatterns":{"type":"object","required":["patterns"],"properties":{"patterns":{"type":"array","items":{"type":"string"},"example":["title","overview_*","release_date"]}}},"BTreeMap":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","required":["start","length"],"properties":{"start":{"type":"integer","minimum":0},"length":{"type":"integer","minimum":0},"indices":{"type":["array","null"],"items":{"type":"integer","minimum":0}}}}},"propertyNames":{"type":"string"}},"BatchStats":{"type":"object","required":["totalNbTasks","status","types","indexUids"],"properties":{"totalNbTasks":{"$ref":"#/components/schemas/u32"},"status":{"type":"object","additionalProperties":{"type":"integer","format":"u-int32","minimum":0},"propertyNames":{"type":"string","description":"The status of a task.","enum":["enqueued","processing","succeeded","failed","canceled"],"example":"processing"}},"types":{"type":"object","additionalProperties":{"type":"integer","format":"u-int32","minimum":0},"propertyNames":{"type":"string","description":"The type of the task.","enum":["documentAdditionOrUpdate","documentEdition","documentDeletion","settingsUpdate","indexCreation","indexDeletion","indexUpdate","indexSwap","taskCancelation","taskDeletion","dumpCreation","snapshotCreation","export","upgradeDatabase"],"example":["documentAdditionOrUpdate","documentEdition","documentDeletion","settingsUpdate","indexCreation","indexDeletion","indexUpdate","indexSwap","taskCancelation","taskDeletion","dumpCreation","snapshotCreation","export","upgradeDatabase"]}},"indexUids":{"type":"object","additionalProperties":{"type":"integer","format":"u-int32","minimum":0},"propertyNames":{"type":"string"}},"progressTrace":{"type":"object","additionalProperties":{},"propertyNames":{"type":"string"}},"writeChannelCongestion":{"type":["object","null"],"additionalProperties":{},"propertyNames":{"type":"string"}},"internalDatabaseSizes":{"type":"object","additionalProperties":{},"propertyNames":{"type":"string"}}}},"BatchStatsView":{"allOf":[{"$ref":"#/components/schemas/BatchStats"},{"type":"object","properties":{"embedderRequests":{"$ref":"#/components/schemas/EmbedderStatsView"}}}]},"BatchView":{"type":"object","required":["uid","details","stats"],"properties":{"uid":{"$ref":"#/components/schemas/u32"},"progress":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProgressView"}]},"details":{"$ref":"#/components/schemas/DetailsView"},"stats":{"$ref":"#/components/schemas/BatchStatsView"},"duration":{"type":["string","null"]},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"type":["string","null"],"format":"date-time"},"batchStrategy":{"type":"string"}}},"BrowseQuery":{"type":"object","required":["offset","limit","retrieveVectors"],"properties":{"offset":{"type":"integer","example":150,"minimum":0},"limit":{"type":"integer","default":20,"example":1,"minimum":0},"fields":{"type":["array","null"],"items":{"type":"string"},"example":["title, description"]},"retrieveVectors":{"type":"boolean","example":true},"ids":{"type":["array","null"],"items":{"type":"string"},"example":["cody","finn","brandy","gambit"]},"filter":{},"sort":{"type":["array","null"],"items":{"type":"string"},"example":["title:asc","rating:desc"]}}},"ChatSearchParams":{"type":"object","properties":{"hybrid":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HybridQuery"}]},"limit":{"type":["integer","null"],"minimum":0},"sort":{"type":["array","null"],"items":{"type":"string"}},"distinct":{"type":["string","null"]},"matchingStrategy":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MatchingStrategy"}]},"attributesToSearchOn":{"type":["array","null"],"items":{"type":"string"}},"rankingScoreThreshold":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RankingScoreThreshold"}]}},"additionalProperties":false},"ChatSettings":{"type":"object","properties":{"description":{"type":["string","null"]},"documentTemplate":{"type":["string","null"],"description":"A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text."},"documentTemplateMaxBytes":{"type":["integer","null"],"description":"Rendered texts are truncated to this size. Defaults to 400.","minimum":0},"searchParameters":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ChatSearchParams","description":"The search parameters to use for the LLM."}]}},"additionalProperties":false},"Code":{"type":"string","enum":["api_key_already_exists","api_key_not_found","bad_parameter","bad_request","database_size_limit_reached","document_not_found","dump_already_processing","dump_not_found","dump_process_failed","duplicate_index_found","immutable_api_key_actions","immutable_api_key_created_at","immutable_api_key_expires_at","immutable_api_key_indexes","immutable_api_key_key","immutable_api_key_uid","immutable_api_key_updated_at","immutable_index_created_at","immutable_index_updated_at","index_already_exists","index_creation_failed","index_not_found","index_primary_key_already_exists","index_primary_key_multiple_candidates_found","index_primary_key_no_candidate_found","internal","invalid_api_key","invalid_api_key_actions","invalid_api_key_description","invalid_api_key_expires_at","invalid_api_key_indexes","invalid_api_key_limit","invalid_api_key_name","invalid_api_key_offset","invalid_api_key_uid","invalid_content_type","invalid_document_csv_delimiter","invalid_document_fields","invalid_document_retrieve_vectors","missing_document_filter","missing_document_edition_function","inconsistent_document_change_headers","invalid_document_filter","invalid_document_sort","invalid_document_geo_field","invalid_document_geojson_field","invalid_header_value","invalid_vector_dimensions","invalid_vectors_type","invalid_document_id","invalid_document_ids","invalid_document_limit","invalid_document_offset","invalid_search_embedder","invalid_similar_embedder","invalid_search_hybrid_query","invalid_index_limit","invalid_index_offset","invalid_index_primary_key","invalid_index_uid","invalid_multi_search_facets","invalid_multi_search_facets_by_index","invalid_multi_search_facet_order","invalid_multi_search_federated","invalid_multi_search_federation_options","invalid_multi_search_max_values_per_facet","invalid_multi_search_merge_facets","invalid_multi_search_query_facets","invalid_multi_search_query_pagination","invalid_multi_search_query_ranking_rules","invalid_multi_search_query_position","invalid_multi_search_remote","invalid_multi_search_weight","invalid_network_remotes","invalid_network_self","invalid_network_sharding","invalid_network_search_api_key","invalid_network_write_api_key","invalid_network_url","invalid_search_attributes_to_search_on","invalid_search_attributes_to_crop","invalid_search_attributes_to_highlight","invalid_similar_attributes_to_retrieve","invalid_similar_retrieve_vectors","invalid_search_attributes_to_retrieve","invalid_search_ranking_score_threshold","invalid_similar_ranking_score_threshold","invalid_search_retrieve_vectors","invalid_search_crop_length","invalid_search_crop_marker","invalid_search_facets","invalid_search_semantic_ratio","invalid_search_locales","invalid_facet_search_exhaustive_facet_count","invalid_facet_search_facet_name","invalid_similar_id","invalid_search_filter","invalid_similar_filter","invalid_search_highlight_post_tag","invalid_search_highlight_pre_tag","invalid_search_hits_per_page","invalid_similar_limit","invalid_search_limit","invalid_search_matching_strategy","invalid_similar_offset","invalid_search_offset","invalid_search_page","invalid_search_q","invalid_facet_search_query","invalid_facet_search_name","facet_search_disabled","invalid_search_vector","invalid_search_media","invalid_search_show_matches_position","invalid_search_show_ranking_score","invalid_similar_show_ranking_score","invalid_search_show_ranking_score_details","invalid_similar_show_ranking_score_details","invalid_search_sort","invalid_search_distinct","invalid_search_media_and_vector","invalid_settings_displayed_attributes","invalid_settings_distinct_attribute","invalid_settings_proximity_precision","invalid_settings_facet_search","invalid_settings_prefix_search","invalid_settings_faceting","invalid_settings_filterable_attributes","invalid_settings_pagination","invalid_settings_search_cutoff_ms","invalid_settings_embedders","invalid_settings_ranking_rules","invalid_settings_searchable_attributes","invalid_settings_sortable_attributes","invalid_settings_stop_words","invalid_settings_non_separator_tokens","invalid_settings_separator_tokens","invalid_settings_dictionary","invalid_settings_synonyms","invalid_settings_typo_tolerance","invalid_settings_localized_attributes","invalid_state","invalid_store_file","invalid_swap_duplicate_index_found","invalid_swap_indexes","invalid_swap_rename","invalid_task_after_enqueued_at","invalid_task_after_finished_at","invalid_task_after_started_at","invalid_task_before_enqueued_at","invalid_task_before_finished_at","invalid_task_before_started_at","invalid_task_canceled_by","invalid_task_from","invalid_task_limit","invalid_task_reverse","invalid_task_statuses","invalid_task_types","invalid_task_uids","invalid_batch_uids","io_error","feature_not_enabled","malformed_payload","max_fields_limit_exceeded","missing_api_key_actions","missing_api_key_expires_at","missing_api_key_indexes","missing_authorization_header","missing_content_type","missing_document_id","missing_facet_search_facet_name","missing_index_uid","missing_master_key","missing_network_url","missing_payload","missing_search_hybrid","missing_swap_indexes","missing_task_filters","no_space_left_on_device","payload_too_large","remote_bad_response","remote_bad_request","remote_could_not_send_request","remote_invalid_api_key","remote_remote_error","remote_timeout","too_many_search_requests","task_not_found","task_file_not_found","batch_not_found","too_many_open_files","too_many_vectors","unretrievable_document","unretrievable_error_code","unsupported_media_type","vector_embedding_error","not_found_similar_id","invalid_document_edition_context","invalid_document_edition_function_filter","edit_documents_by_function_error","invalid_settings_index_chat","invalid_settings_vector_store","invalid_export_url","invalid_export_api_key","invalid_export_payload_size","invalid_export_indexes_patterns","invalid_export_index_filter","invalid_export_index_override_settings","unimplemented_external_function_calling","unimplemented_non_streaming_chat_completions","unimplemented_multi_choice_chat_completions","chat_not_found","invalid_chat_setting_document_template","invalid_chat_completion_org_id","invalid_chat_completion_project_id","invalid_chat_completion_api_version","invalid_chat_completion_deployment_id","invalid_chat_completion_source","invalid_chat_completion_base_api","invalid_chat_completion_api_key","invalid_chat_completion_prompts","invalid_chat_completion_system_prompt","invalid_chat_completion_search_description_prompt","invalid_chat_completion_search_query_param_prompt","invalid_chat_completion_search_filter_param_prompt","invalid_chat_completion_search_index_uid_param_prompt","invalid_chat_completion_pre_query_prompt","invalid_webhooks","invalid_webhook_url","invalid_webhook_headers","immutable_webhook","invalid_webhook_uuid","webhook_not_found","immutable_webhook_uuid","immutable_webhook_is_editable"]},"ComputedFacets":{"type":"object","required":["distribution","stats"],"properties":{"distribution":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"integer","format":"u-int64","minimum":0},"propertyNames":{"type":"string"}},"propertyNames":{"type":"string"}},"stats":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FacetStats"},"propertyNames":{"type":"string"}}}},"CreateApiKey":{"type":"object","required":["uid","actions","indexes"],"properties":{"description":{"type":["string","null"],"description":"A description for the key. `null` if empty.","example":null},"name":{"type":["string","null"],"description":"A human-readable name for the key. `null` if empty.","example":"Indexing Products API key"},"uid":{"type":"string","format":"uuid","description":"A uuid v4 to identify the API Key. If not specified, it's generated by Meilisearch.","example":null},"actions":{"type":"array","items":{"$ref":"#/components/schemas/Action"},"description":"A list of actions permitted for the key. `[\"*\"]` for all actions. The `*` character can be used as a wildcard when located at the last position. e.g. `documents.*` to authorize access on all documents endpoints.","example":["documents.add"]},"indexes":{"type":"array","items":{"type":"string"},"description":"A list of accessible indexes permitted for the key. `[\"*\"]` for all indexes. The `*` character can be used as a wildcard when located at the last position. e.g. `products_*` to allow access to all indexes whose names start with `products_`.","example":["products"]},"expiresAt":{"type":["string","null"],"format":"date-time","description":"Represent the expiration date and time as RFC 3339 format. `null` equals to no expiration time."}}},"DetailsExportIndexSettings":{"allOf":[{"$ref":"#/components/schemas/ExportIndexSettings"},{"type":"object","properties":{"matchedDocuments":{"type":["integer","null"],"format":"u-int64","minimum":0}}}]},"DetailsView":{"allOf":[{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Settings_Unchecked","description":"[Learn more about the settings in this guide](https://www.meilisearch.com/docs/reference/api/settings)."}]},{"type":"object","properties":{"receivedDocuments":{"type":["integer","null"],"format":"u-int64","description":"Number of documents received for documentAdditionOrUpdate task.","minimum":0},"indexedDocuments":{"type":["integer","null"],"format":"u-int64","description":"Number of documents finally indexed for documentAdditionOrUpdate task or a documentAdditionOrUpdate batch of tasks.","minimum":0},"editedDocuments":{"type":["integer","null"],"format":"u-int64","description":"Number of documents edited for editDocumentByFunction task.","minimum":0},"primaryKey":{"type":["string","null"],"description":"Value for the primaryKey field encountered if any for indexCreation or indexUpdate task."},"providedIds":{"type":["integer","null"],"description":"Number of provided document ids for the documentDeletion task.","minimum":0},"deletedDocuments":{"type":["integer","null"],"format":"u-int64","description":"Number of documents finally deleted for documentDeletion and indexDeletion tasks.","minimum":0},"matchedTasks":{"type":["integer","null"],"format":"u-int64","description":"Number of tasks that match the request for taskCancelation or taskDeletion tasks.","minimum":0},"canceledTasks":{"type":["integer","null"],"format":"u-int64","description":"Number of tasks canceled for taskCancelation.","minimum":0},"deletedTasks":{"type":["integer","null"],"format":"u-int64","description":"Number of tasks deleted for taskDeletion.","minimum":0},"originalFilter":{"type":["string","null"],"description":"Original filter query for taskCancelation or taskDeletion tasks."},"dumpUid":{"type":["string","null"],"description":"Identifier generated for the dump for dumpCreation task."},"context":{"type":["object","null"]},"function":{"type":["string","null"]},"swaps":{"type":["array","null"],"items":{"$ref":"#/components/schemas/IndexSwap"}},"upgradeFrom":{"type":["string","null"]},"upgradeTo":{"type":["string","null"]},"url":{"type":["string","null"]},"apiKey":{"type":["string","null"]},"payloadSize":{"type":["string","null"]},"indexes":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/DetailsExportIndexSettings"},"propertyNames":{"type":"string"}},"oldIndexUid":{"type":["string","null"]},"newIndexUid":{"type":["string","null"]}}}]},"DistributionShift":{"type":"object","description":"Describes the mean and sigma of distribution of embedding similarity in the embedding space.\n\nThe intended use is to make the similarity score more comparable to the regular ranking score.\nThis allows to correct effects where results are too \"packed\" around a certain value.","required":["current_mean","current_sigma"],"properties":{"current_mean":{"type":"number","format":"float","description":"Value where the results are \"packed\".\n\nSimilarity scores are translated so that they are packed around 0.5 instead"},"current_sigma":{"type":"number","format":"float","description":"standard deviation of a similarity score.\n\nSet below 0.4 to make the results less packed around the mean, and above 0.4 to make them more packed."}}},"DocumentDeletionByFilter":{"type":"object","required":["filter"],"properties":{"filter":{}}},"DocumentEditionByFunction":{"type":"object","required":["function"],"properties":{"filter":{"description":"A string containing a RHAI function."},"context":{"description":"A string containing a filter expression."},"function":{"type":"string","description":"An object with data Meilisearch should make available for the editing function."}}},"EmbedderSource":{"type":"string","enum":["openAi","huggingFace","ollama","userProvided","rest","composite"]},"EmbedderStatsView":{"type":"object","required":["total","failed"],"properties":{"total":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"lastError":{"type":["string","null"]}}},"ErrorType":{"type":"string","enum":["internal","invalid_request","auth","system"]},"Export":{"type":"object","properties":{"url":{"type":["string","null"],"example":"https://ms-1234.heaven.meilisearch.com"},"apiKey":{"type":["string","null"],"example":"1234abcd"},"payloadSize":{"type":["string","null"],"example":"24MiB"},"indexes":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/ExportIndexSettings"},"propertyNames":{"type":"string"},"example":{"*":{"filter":null}}}}},"ExportIndexSettings":{"type":"object","properties":{"filter":{"type":["string","null"],"example":"genres = action"},"overrideSettings":{"type":["boolean","null"],"example":true}}},"FacetSearchQuery":{"type":"object","required":["facet_name","matching_strategy"],"properties":{"facet_query":{"type":["string","null"]},"facet_name":{"type":"string"},"q":{"type":["string","null"]},"vector":{"type":["array","null"],"items":{"type":"number","format":"float"}},"media":{},"hybrid":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HybridQuery"}]},"filter":{},"matching_strategy":{"$ref":"#/components/schemas/MatchingStrategy"},"attributes_to_search_on":{"type":["array","null"],"items":{"type":"string"}},"ranking_score_threshold":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RankingScoreThreshold"}]},"locales":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Locale"}},"exhaustive_facet_count":{"type":["boolean","null"]}}},"FacetStats":{"type":"object","required":["min","max"],"properties":{"min":{"type":"number","format":"double"},"max":{"type":"number","format":"double"}}},"FacetValuesSort":{"type":"string","enum":["alpha","count"]},"FacetingSettings":{"type":"object","properties":{"maxValuesPerFacet":{"type":["integer","null"],"example":10,"minimum":0},"sortFacetValuesBy":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/FacetValuesSort"},"propertyNames":{"type":"string"},"example":{"genre":"count"}}},"additionalProperties":false},"FederatedFacets":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ComputedFacets"},"propertyNames":{"type":"string"}},"FederatedSearch":{"type":"object","required":["queries"],"properties":{"queries":{"type":"array","items":{"$ref":"#/components/schemas/SearchQueryWithIndex"}},"federation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Federation"}]}}},"FederatedSearchResult":{"allOf":[{"$ref":"#/components/schemas/HitsInfo"},{"type":"object","required":["hits","processingTimeMs"],"properties":{"hits":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"}},"processingTimeMs":{"type":"integer","minimum":0},"queryVectors":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/Vec"},"propertyNames":{"type":"integer","minimum":0}},"semanticHitCount":{"type":["integer","null"],"format":"u-int32","minimum":0},"facetDistribution":{"type":["object","null"],"additionalProperties":{"type":"object","additionalProperties":{"type":"integer","format":"u-int64","minimum":0},"propertyNames":{"type":"string"}},"propertyNames":{"type":"string"}},"facetStats":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/FacetStats"},"propertyNames":{"type":"string"}},"facetsByIndex":{"$ref":"#/components/schemas/FederatedFacets"},"requestUid":{"type":["string","null"],"format":"uuid"},"remoteErrors":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/ResponseError"},"propertyNames":{"type":"string"}}}}]},"Federation":{"type":"object","required":["limit","offset","facetsByIndex"],"properties":{"limit":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0},"facetsByIndex":{"type":"object","additionalProperties":{"type":["array","null"],"items":{"type":"string"}},"propertyNames":{"type":"string","description":"An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long","example":"movies"}},"mergeFacets":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MergeFacets"}]}}},"FederationOptions":{"type":"object","required":["weight"],"properties":{"weight":{"type":"number","format":"double"},"remote":{"type":["string","null"]},"queryPosition":{"type":["integer","null"],"minimum":0}}},"FilterFeatures":{"type":"object","properties":{"equality":{"type":"boolean"},"comparison":{"type":"boolean"}},"additionalProperties":false},"FilterableAttributesFeatures":{"type":"object","properties":{"facetSearch":{"type":"boolean"},"filter":{"$ref":"#/components/schemas/FilterFeatures"}},"additionalProperties":false},"FilterableAttributesPatterns":{"type":"object","required":["attributePatterns"],"properties":{"attributePatterns":{"$ref":"#/components/schemas/AttributePatterns"},"features":{"$ref":"#/components/schemas/FilterableAttributesFeatures"}},"additionalProperties":false},"FilterableAttributesRule":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/FilterableAttributesPatterns"}]},"GetLogs":{"type":"object","required":["target","mode","profileMemory"],"properties":{"target":{"type":"string","description":"Lets you specify which parts of the code you want to inspect and is formatted like that: code_part=log_level,code_part=log_level\n- If the `code_part` is missing, then the `log_level` will be applied to everything.\n- If the `log_level` is missing, then the `code_part` will be selected in `info` log level.","default":"info","example":"milli=trace,index_scheduler,actix_web=off"},"mode":{"oneOf":[{"$ref":"#/components/schemas/LogMode","description":"Lets you customize the format of the logs."}],"default":"Human"},"profileMemory":{"type":"boolean","description":"A boolean to indicate if you want to profile the memory as well. This is only useful while using the `profile` mode.\nBe cautious, though; it slows down the engine a lot.","default":false}}},"HealthResponse":{"type":"object","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/HealthStatus","description":"The status of the instance."}}},"HealthStatus":{"type":"string","enum":["available"]},"HitsInfo":{"oneOf":[{"type":"object","required":["hitsPerPage","page","totalPages","totalHits"],"properties":{"hitsPerPage":{"type":"integer","minimum":0},"page":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"totalHits":{"type":"integer","minimum":0}}},{"type":"object","required":["limit","offset","estimatedTotalHits"],"properties":{"limit":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0},"estimatedTotalHits":{"type":"integer","minimum":0}}}]},"HybridQuery":{"type":"object","required":["embedder"],"properties":{"semanticRatio":{"type":"number","format":"float"},"embedder":{"type":"string"}}},"IndexCreateRequest":{"type":"object","required":["uid"],"properties":{"uid":{"$ref":"#/components/schemas/IndexUid","description":"The name of the index"},"primaryKey":{"type":["string","null"],"description":"The primary key of the index","example":"id"}}},"IndexStats":{"type":"object","description":"Stats of an `Index`, as known to the `stats` route.","required":["numberOfDocuments","rawDocumentDbSize","avgDocumentSize","isIndexing","fieldDistribution"],"properties":{"numberOfDocuments":{"type":"integer","format":"u-int64","description":"Number of documents in the index","minimum":0},"rawDocumentDbSize":{"type":"integer","format":"u-int64","description":"Size of the documents database, in bytes.","minimum":0},"avgDocumentSize":{"type":"integer","format":"u-int64","description":"Average size of a document in the documents database.","minimum":0},"isIndexing":{"type":"boolean","description":"Whether or not the index is currently ingesting document"},"numberOfEmbeddings":{"type":["integer","null"],"format":"u-int64","description":"Number of embeddings in the index","minimum":0},"numberOfEmbeddedDocuments":{"type":["integer","null"],"format":"u-int64","description":"Number of embedded documents in the index","minimum":0},"fieldDistribution":{"type":"object","description":"Association of every field name with the number of times it occurs in the documents.","additionalProperties":{"type":"integer","format":"u-int64","minimum":0},"propertyNames":{"type":"string"}}}},"IndexSwap":{"type":"object","required":["indexes"],"properties":{"indexes":{"type":"array","items":false,"prefixItems":[{"type":"string"},{"type":"string"}]},"rename":{"type":"boolean"}}},"IndexUid":{"type":"string","description":"An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long","example":"movies"},"IndexView":{"type":"object","required":["uid","createdAt","updatedAt"],"properties":{"uid":{"type":"string","description":"Unique identifier for the index"},"createdAt":{"type":"string","format":"date-time","description":"An `RFC 3339` format for date/time/duration."},"updatedAt":{"type":"string","format":"date-time","description":"An `RFC 3339` format for date/time/duration."},"primaryKey":{"type":["string","null"],"description":"Custom primaryKey for documents"}}},"KeyView":{"type":"object","required":["key","uid","actions","indexes","createdAt","updatedAt"],"properties":{"name":{"type":["string","null"],"description":"The name of the API Key if any"},"description":{"type":["string","null"],"description":"The description of the API Key if any"},"key":{"type":"string","description":"The actual API Key you can send to Meilisearch"},"uid":{"type":"string","format":"uuid","description":"The `Uuid` specified while creating the key or autogenerated by Meilisearch."},"actions":{"type":"array","items":{"$ref":"#/components/schemas/Action"},"description":"The actions accessible with this key."},"indexes":{"type":"array","items":{"type":"string"},"description":"The indexes accessible with this key."},"expiresAt":{"type":["string","null"],"format":"date-time","description":"The expiration date of the key. Once this timestamp is exceeded the key is not deleted but cannot be used anymore."},"createdAt":{"type":"string","format":"date-time","description":"The date of creation of this API Key.","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"The date of the last update made on this key.","readOnly":true}}},"Kind":{"type":"string","description":"The type of the task.","enum":["documentAdditionOrUpdate","documentEdition","documentDeletion","settingsUpdate","indexCreation","indexDeletion","indexUpdate","indexSwap","taskCancelation","taskDeletion","dumpCreation","snapshotCreation","export","upgradeDatabase"],"example":["documentAdditionOrUpdate","documentEdition","documentDeletion","settingsUpdate","indexCreation","indexDeletion","indexUpdate","indexSwap","taskCancelation","taskDeletion","dumpCreation","snapshotCreation","export","upgradeDatabase"]},"Locale":{"type":"string","enum":["af","ak","am","ar","az","be","bn","bg","ca","cs","da","de","el","en","eo","et","fi","fr","gu","he","hi","hr","hu","hy","id","it","jv","ja","kn","ka","km","ko","la","lv","lt","ml","mr","mk","my","ne","nl","nb","or","pa","fa","pl","pt","ro","ru","si","sk","sl","sn","es","sr","sv","ta","te","tl","th","tk","tr","uk","ur","uz","vi","yi","zh","zu","afr","aka","amh","ara","aze","bel","ben","bul","cat","ces","dan","deu","ell","eng","epo","est","fin","fra","guj","heb","hin","hrv","hun","hye","ind","ita","jav","jpn","kan","kat","khm","kor","lat","lav","lit","mal","mar","mkd","mya","nep","nld","nob","ori","pan","pes","pol","por","ron","rus","sin","slk","slv","sna","spa","srp","swe","tam","tel","tgl","tha","tuk","tur","ukr","urd","uzb","vie","yid","zho","zul","cmn"]},"LocalizedAttributesRuleView":{"type":"object","required":["attributePatterns","locales"],"properties":{"attributePatterns":{"$ref":"#/components/schemas/AttributePatterns"},"locales":{"type":"array","items":{"$ref":"#/components/schemas/Locale"}}}},"LogMode":{"type":"string","enum":["human","json","profile"]},"MatchingStrategy":{"type":"string","description":"This is unfortunately a duplication of the struct in .\nThe reason why it is duplicated is because milli cannot depend on meilisearch. It would be cyclic imports.","enum":["last","all","frequency"]},"MergeFacets":{"type":"object","properties":{"maxValuesPerFacet":{"type":["integer","null"],"minimum":0}}},"MinWordSizeTyposSetting":{"type":"object","properties":{"oneTypo":{"type":["integer","null"],"format":"u-int8","example":5,"minimum":0},"twoTypos":{"type":["integer","null"],"format":"u-int8","example":9,"minimum":0}},"additionalProperties":false},"Network":{"type":"object","properties":{"remotes":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/Remote"},"propertyNames":{"type":"string"},"example":"http://localhost:7700"},"self":{"type":["string","null"],"example":"ms-00"},"sharding":{"type":["boolean","null"],"example":true}}},"Origin":{"type":"object","required":["remoteName","taskUid"],"properties":{"remoteName":{"type":"string"},"taskUid":{"type":"integer","minimum":0}}},"OverridePooling":{"type":"string","enum":["useModel","forceCls","forceMean"]},"PaginationSettings":{"type":"object","properties":{"maxTotalHits":{"type":["integer","null"],"example":250,"minimum":0}},"additionalProperties":false},"PaginationView_IndexView":{"type":"object","required":["results","offset","limit","total"],"properties":{"results":{"type":"array","items":{"type":"object","required":["uid","createdAt","updatedAt"],"properties":{"uid":{"type":"string","description":"Unique identifier for the index"},"createdAt":{"type":"string","format":"date-time","description":"An `RFC 3339` format for date/time/duration."},"updatedAt":{"type":"string","format":"date-time","description":"An `RFC 3339` format for date/time/duration."},"primaryKey":{"type":["string","null"],"description":"Custom primaryKey for documents"}}}},"offset":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}}},"PaginationView_KeyView":{"type":"object","required":["results","offset","limit","total"],"properties":{"results":{"type":"array","items":{"type":"object","required":["key","uid","actions","indexes","createdAt","updatedAt"],"properties":{"name":{"type":["string","null"],"description":"The name of the API Key if any"},"description":{"type":["string","null"],"description":"The description of the API Key if any"},"key":{"type":"string","description":"The actual API Key you can send to Meilisearch"},"uid":{"type":"string","format":"uuid","description":"The `Uuid` specified while creating the key or autogenerated by Meilisearch."},"actions":{"type":"array","items":{"$ref":"#/components/schemas/Action"},"description":"The actions accessible with this key."},"indexes":{"type":"array","items":{"type":"string"},"description":"The indexes accessible with this key."},"expiresAt":{"type":["string","null"],"format":"date-time","description":"The expiration date of the key. Once this timestamp is exceeded the key is not deleted but cannot be used anymore."},"createdAt":{"type":"string","format":"date-time","description":"The date of creation of this API Key.","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"The date of the last update made on this key.","readOnly":true}}}},"offset":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}}},"PaginationView_Value":{"type":"object","required":["results","offset","limit","total"],"properties":{"results":{"type":"array","items":{}},"offset":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}}},"PatchApiKey":{"type":"object","properties":{"description":{"type":["string","null"],"example":"This key is used to update documents in the products index"},"name":{"type":["string","null"],"example":"Indexing Products API key"}}},"PrefixSearchSettings":{"type":"string","enum":["indexingTime","disabled"]},"ProgressStepView":{"type":"object","required":["currentStep","finished","total"],"properties":{"currentStep":{"type":"string"},"finished":{"type":"integer","format":"u-int32","minimum":0},"total":{"type":"integer","format":"u-int32","minimum":0}}},"ProgressView":{"type":"object","required":["steps","percentage"],"properties":{"steps":{"type":"array","items":{"$ref":"#/components/schemas/ProgressStepView"}},"percentage":{"type":"number","format":"float"}}},"ProximityPrecisionView":{"type":"string","enum":["byWord","byAttribute"]},"RankingRuleView":{"oneOf":[{"type":"string","description":"Sorted by decreasing number of matched query terms.\nQuery words at the front of an attribute is considered better than if it was at the back.","enum":["Words"]},{"type":"string","description":"Sorted by increasing number of typos.","enum":["Typo"]},{"type":"string","description":"Sorted by increasing distance between matched query terms.","enum":["Proximity"]},{"type":"string","description":"Documents with quey words contained in more important\nattributes are considered better.","enum":["Attribute"]},{"type":"string","description":"Dynamically sort at query time the documents. None, one or multiple Asc/Desc sortable\nattributes can be used in place of this criterion at query time.","enum":["Sort"]},{"type":"string","description":"Sorted by the similarity of the matched words with the query words.","enum":["Exactness"]},{"type":"object","description":"Sorted by the increasing value of the field specified.","required":["Asc"],"properties":{"Asc":{"type":"string","description":"Sorted by the increasing value of the field specified."}}},{"type":"object","description":"Sorted by the decreasing value of the field specified.","required":["Desc"],"properties":{"Desc":{"type":"string","description":"Sorted by the decreasing value of the field specified."}}}]},"RankingScoreThreshold":{"type":"number","format":"double"},"Remote":{"type":"object","properties":{"url":{"type":["string","null"],"example":{"ms-0":{"url":"http://localhost:7700","searchApiKey":null,"writeApiKey":null},"ms-1":{"url":"http://localhost:7701","searchApiKey":"foo","writeApiKey":"bar"},"ms-2":{"url":"http://localhost:7702","searchApiKey":"bar","writeApiKey":"foo"}}},"searchApiKey":{"type":["string","null"],"example":"XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU"},"writeApiKey":{"type":["string","null"],"example":"XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU"}}},"RemoteTask":{"type":"object","properties":{"taskUid":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/u32"}]},"error":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ResponseError"}]}}},"ResponseError":{"type":"object","required":["message","code","type","link"],"properties":{"message":{"type":"string","description":"The error message."},"code":{"$ref":"#/components/schemas/Code","description":"The error code."},"type":{"$ref":"#/components/schemas/ErrorType","description":"The error type."},"link":{"type":"string","description":"A link to the documentation about this specific error."}}},"RuntimeTogglableFeatures":{"type":"object","properties":{"metrics":{"type":["boolean","null"]},"logsRoute":{"type":["boolean","null"]},"editDocumentsByFunction":{"type":["boolean","null"]},"containsFilter":{"type":["boolean","null"]},"network":{"type":["boolean","null"]},"getTaskDocumentsRoute":{"type":["boolean","null"]},"compositeEmbedders":{"type":["boolean","null"]},"chatCompletions":{"type":["boolean","null"]},"multimodal":{"type":["boolean","null"]},"vectorStoreSetting":{"type":["boolean","null"]}}},"SearchHit":{"type":"object","properties":{"_formatted":{"type":"object","additionalProperties":true},"_matchesPosition":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BTreeMap"}]},"_rankingScore":{"type":["number","null"],"format":"double"},"_rankingScoreDetails":{"type":["object","null"],"additionalProperties":{},"propertyNames":{"type":"string"}}},"additionalProperties":{}},"SearchQuery":{"type":"object","required":["offset","limit","retrieve_vectors","crop_length","show_matches_position","show_ranking_score","show_ranking_score_details","highlight_pre_tag","highlight_post_tag","crop_marker","matching_strategy"],"properties":{"q":{"type":["string","null"]},"vector":{"type":["array","null"],"items":{"type":"number","format":"float"}},"media":{},"hybrid":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HybridQuery"}]},"offset":{"type":"integer","default":0,"minimum":0},"limit":{"type":"integer","default":20,"minimum":0},"page":{"type":["integer","null"],"minimum":0},"hits_per_page":{"type":["integer","null"],"minimum":0},"attributes_to_retrieve":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"retrieve_vectors":{"type":"boolean"},"attributes_to_crop":{"type":["array","null"],"items":{"type":"string"}},"crop_length":{"type":"integer","default":10,"minimum":0},"attributes_to_highlight":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"show_matches_position":{"type":"boolean"},"show_ranking_score":{"type":"boolean"},"show_ranking_score_details":{"type":"boolean"},"filter":{},"sort":{"type":["array","null"],"items":{"type":"string"}},"distinct":{"type":["string","null"]},"facets":{"type":["array","null"],"items":{"type":"string"}},"highlight_pre_tag":{"type":"string","default":""},"highlight_post_tag":{"type":"string","default":""},"crop_marker":{"type":"string","default":"…"},"matching_strategy":{"$ref":"#/components/schemas/MatchingStrategy"},"attributes_to_search_on":{"type":["array","null"],"items":{"type":"string"}},"ranking_score_threshold":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RankingScoreThreshold"}]},"locales":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Locale"}}}},"SearchQueryWithIndex":{"type":"object","description":"A `SearchQuery` + an index UID and optional FederationOptions.","required":["indexUid","retrieveVectors","cropLength","showRankingScore","showRankingScoreDetails","showMatchesPosition","highlightPreTag","highlightPostTag","cropMarker","matchingStrategy"],"properties":{"indexUid":{"$ref":"#/components/schemas/IndexUid"},"q":{"type":["string","null"]},"vector":{"type":["array","null"],"items":{"type":"number","format":"float"}},"media":{},"hybrid":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HybridQuery"}]},"offset":{"type":["integer","null"],"minimum":0},"limit":{"type":["integer","null"],"minimum":0},"page":{"type":["integer","null"],"minimum":0},"hitsPerPage":{"type":["integer","null"],"minimum":0},"attributesToRetrieve":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"retrieveVectors":{"type":"boolean"},"attributesToCrop":{"type":["array","null"],"items":{"type":"string"}},"cropLength":{"type":"integer","minimum":0},"attributesToHighlight":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"showRankingScore":{"type":"boolean"},"showRankingScoreDetails":{"type":"boolean"},"showMatchesPosition":{"type":"boolean"},"filter":{},"sort":{"type":["array","null"],"items":{"type":"string"}},"distinct":{"type":["string","null"]},"facets":{"type":["array","null"],"items":{"type":"string"}},"highlightPreTag":{"type":"string"},"highlightPostTag":{"type":"string"},"cropMarker":{"type":"string"},"matchingStrategy":{"$ref":"#/components/schemas/MatchingStrategy"},"attributesToSearchOn":{"type":["array","null"],"items":{"type":"string"}},"rankingScoreThreshold":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RankingScoreThreshold"}]},"locales":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Locale"}},"federationOptions":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FederationOptions"}]}}},"SearchResult":{"allOf":[{"$ref":"#/components/schemas/HitsInfo"},{"type":"object","required":["hits","query","processingTimeMs"],"properties":{"hits":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"}},"query":{"type":"string"},"queryVector":{"type":["array","null"],"items":{"type":"number","format":"float"}},"processingTimeMs":{"type":"integer","minimum":0},"facetDistribution":{"type":["object","null"],"additionalProperties":{},"propertyNames":{"type":"string"}},"facetStats":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/FacetStats"},"propertyNames":{"type":"string"}},"requestUid":{"type":["string","null"],"format":"uuid"},"semanticHitCount":{"type":["integer","null"],"format":"u-int32","minimum":0}}}]},"SearchResultWithIndex":{"allOf":[{"$ref":"#/components/schemas/SearchResult"},{"type":"object","required":["indexUid"],"properties":{"indexUid":{"type":"string"}}}]},"SearchResults":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/SearchResultWithIndex"}}}},"SettingEmbeddingSettings":{"type":"object","description":"\"Technical\" type that is required due to utoipa.\n\nWe did not find a way to implement [`utoipa::ToSchema`] for the [`Setting`] enum,\nbut most types can use the `value_type` macro parameter to workaround that issue.\n\nHowever that type is used in the settings route, including through the macro that auto-generate\nall the settings route, so we can't remap the `value_type`.","properties":{"inner":{"oneOf":[{"type":"null"},{"type":"object","properties":{"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EmbedderSource","description":"The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`"}]},"model":{"type":["string","null"],"description":"The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`"},"revision":{"type":["string","null"],"description":"The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`"},"pooling":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OverridePooling","description":"The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior."}]},"apiKey":{"type":["string","null"],"description":"The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings"},"dimensions":{"type":["string","null"],"description":"The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text."},"binaryQuantized":{"type":["boolean","null"],"description":"Whether to binary quantize the embeddings of this embedder.\n\nBinary quantized embeddings are smaller than regular embeddings, which improves\ndisk usage and retrieval speed, at the cost of relevancy.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🏗️ When set to `true`, embeddings are not regenerated, but they are binary quantized, which takes time.\n\n# Defaults\n\n- Defaults to `false`\n\n# Note\n\nAs binary quantization is a destructive operation, it is not possible to disable again this setting after\nfirst enabling it. If you are unsure of whether the performance-relevancy tradeoff is right for you,\nwe recommend to use this parameter on a test index first."},"documentTemplate":{"type":["boolean","null"],"description":"A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text."},"documentTemplateMaxBytes":{"type":["integer","null"],"description":"Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400","minimum":0},"url":{"type":["string","null"],"description":"URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated"},"indexingFragments":{"type":["object","null"],"description":"Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.","additionalProperties":{},"propertyNames":{"type":"string"}},"searchFragments":{"type":["object","null"],"description":"Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings","additionalProperties":{},"propertyNames":{"type":"string"}},"request":{"description":"Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings"},"response":{"description":"Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings"},"headers":{"type":["object","null"],"description":"Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"searchEmbedder":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SubEmbeddingSettings"}]},"indexingEmbedder":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SubEmbeddingSettings"}]},"distribution":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DistributionShift","description":"Affine transformation applied to the semantic score to make it more comparable to the ranking score.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings"}]}},"additionalProperties":false}]}}},"Settings_Checked":{"type":"object","description":"Holds all the settings for an index. `T` can either be `Checked` if they represents settings\nwhose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a\ncall to `check` will return a `Settings` from a `Settings`.","properties":{"displayedAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Fields displayed in the returned documents.","example":["id","title","description","url"]},"searchableAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Fields in which to search for matching query words sorted by order of importance.","example":["title","description"]},"filterableAttributes":{"type":["array","null"],"items":{"$ref":"#/components/schemas/FilterableAttributesRule"},"description":"Attributes to use for faceting and filtering. See [Filtering and Faceted Search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).","example":["release_date","genre"]},"sortableAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Attributes to use when sorting search results.","example":["release_date"]},"rankingRules":{"type":["array","null"],"items":{"type":"string"},"description":"List of ranking rules sorted by order of importance. The order is customizable.\n[A list of ordered built-in ranking rules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).","example":["words","typo","proximity","attribute","exactness"]},"stopWords":{"type":["array","null"],"items":{"type":"string"},"description":"List of words ignored when present in search queries.","example":["the","a","them","their"]},"nonSeparatorTokens":{"type":["array","null"],"items":{"type":"string"},"description":"List of characters not delimiting where one term begins and ends.","example":[" ","\n"]},"separatorTokens":{"type":["array","null"],"items":{"type":"string"},"description":"List of characters delimiting where one term begins and ends.","example":["S"]},"dictionary":{"type":["array","null"],"items":{"type":"string"},"description":"List of strings Meilisearch should parse as a single term.","example":["iPhone pro"]},"synonyms":{"type":["object","null"],"description":"List of associated words treated similarly. A word associated to an array of word as synonyms.","additionalProperties":{"type":"array","items":{"type":"string"}},"propertyNames":{"type":"string"},"example":{"he":["she","they","them"],"phone":["iPhone","android"]}},"distinctAttribute":{"type":["string","null"],"description":"Search returns documents with distinct (different) values of the given field.","example":"sku"},"proximityPrecision":{"type":["string","null"],"description":"Precision level when calculating the proximity ranking rule.","example":"byAttribute"},"typoTolerance":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TypoSettings","description":"Customize typo tolerance feature."}]},"faceting":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FacetingSettings","description":"Faceting settings."}]},"pagination":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PaginationSettings","description":"Pagination settings."}]},"embedders":{"type":["object","null"],"description":"Embedder required for performing semantic search queries.","additionalProperties":{"$ref":"#/components/schemas/SettingEmbeddingSettings"},"propertyNames":{"type":"string"}},"searchCutoffMs":{"type":["integer","null"],"format":"u-int64","description":"Maximum duration of a search query.","example":50,"minimum":0},"localizedAttributes":{"type":["array","null"],"items":{"$ref":"#/components/schemas/LocalizedAttributesRuleView"},"example":50},"facetSearch":{"type":["boolean","null"],"example":true},"prefixSearch":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrefixSearchSettings"}]},"chat":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ChatSettings","description":"Customize the chat prompting."}]},"vectorStore":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VectorStoreBackend"}]}},"additionalProperties":false},"Settings_Unchecked":{"type":"object","description":"Holds all the settings for an index. `T` can either be `Checked` if they represents settings\nwhose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a\ncall to `check` will return a `Settings` from a `Settings`.","properties":{"displayedAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Fields displayed in the returned documents.","example":["id","title","description","url"]},"searchableAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Fields in which to search for matching query words sorted by order of importance.","example":["title","description"]},"filterableAttributes":{"type":["array","null"],"items":{"$ref":"#/components/schemas/FilterableAttributesRule"},"description":"Attributes to use for faceting and filtering. See [Filtering and Faceted Search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).","example":["release_date","genre"]},"sortableAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Attributes to use when sorting search results.","example":["release_date"]},"rankingRules":{"type":["array","null"],"items":{"type":"string"},"description":"List of ranking rules sorted by order of importance. The order is customizable.\n[A list of ordered built-in ranking rules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).","example":["words","typo","proximity","attribute","exactness"]},"stopWords":{"type":["array","null"],"items":{"type":"string"},"description":"List of words ignored when present in search queries.","example":["the","a","them","their"]},"nonSeparatorTokens":{"type":["array","null"],"items":{"type":"string"},"description":"List of characters not delimiting where one term begins and ends.","example":[" ","\n"]},"separatorTokens":{"type":["array","null"],"items":{"type":"string"},"description":"List of characters delimiting where one term begins and ends.","example":["S"]},"dictionary":{"type":["array","null"],"items":{"type":"string"},"description":"List of strings Meilisearch should parse as a single term.","example":["iPhone pro"]},"synonyms":{"type":["object","null"],"description":"List of associated words treated similarly. A word associated to an array of word as synonyms.","additionalProperties":{"type":"array","items":{"type":"string"}},"propertyNames":{"type":"string"},"example":{"he":["she","they","them"],"phone":["iPhone","android"]}},"distinctAttribute":{"type":["string","null"],"description":"Search returns documents with distinct (different) values of the given field.","example":"sku"},"proximityPrecision":{"type":["string","null"],"description":"Precision level when calculating the proximity ranking rule.","example":"byAttribute"},"typoTolerance":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TypoSettings","description":"Customize typo tolerance feature."}]},"faceting":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FacetingSettings","description":"Faceting settings."}]},"pagination":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PaginationSettings","description":"Pagination settings."}]},"embedders":{"type":["object","null"],"description":"Embedder required for performing semantic search queries.","additionalProperties":{"$ref":"#/components/schemas/SettingEmbeddingSettings"},"propertyNames":{"type":"string"}},"searchCutoffMs":{"type":["integer","null"],"format":"u-int64","description":"Maximum duration of a search query.","example":50,"minimum":0},"localizedAttributes":{"type":["array","null"],"items":{"$ref":"#/components/schemas/LocalizedAttributesRuleView"},"example":50},"facetSearch":{"type":["boolean","null"],"example":true},"prefixSearch":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrefixSearchSettings"}]},"chat":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ChatSettings","description":"Customize the chat prompting."}]},"vectorStore":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VectorStoreBackend"}]}},"additionalProperties":false},"SimilarQuery":{"type":"object","required":["id","offset","limit","embedder","retrieve_vectors","show_ranking_score","show_ranking_score_details","ranking_score_threshold"],"properties":{"id":{"type":"string"},"offset":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"filter":{},"embedder":{"type":"string"},"attributes_to_retrieve":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"retrieve_vectors":{"type":"boolean"},"show_ranking_score":{"type":"boolean"},"show_ranking_score_details":{"type":"boolean"},"ranking_score_threshold":{"type":"number","format":"double"}}},"SimilarResult":{"allOf":[{"$ref":"#/components/schemas/HitsInfo"},{"type":"object","required":["hits","id","processingTimeMs"],"properties":{"hits":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"}},"id":{"type":"string"},"processingTimeMs":{"type":"integer","minimum":0}}}]},"Stats":{"type":"object","required":["databaseSize","usedDatabaseSize","indexes"],"properties":{"databaseSize":{"type":"integer","format":"u-int64","description":"The disk space used by the database, in bytes.","minimum":0},"usedDatabaseSize":{"type":"integer","format":"u-int64","description":"The size of the database, in bytes.","minimum":0},"lastUpdate":{"type":["string","null"],"format":"date-time","description":"The date of the last update in the RFC 3339 formats. Can be `null` if no update has ever been processed."},"indexes":{"type":"object","description":"The stats of every individual index your API key lets you access.","additionalProperties":{"$ref":"#/components/schemas/IndexStats"},"propertyNames":{"type":"string"}}}},"Status":{"type":"string","description":"The status of a task.","enum":["enqueued","processing","succeeded","failed","canceled"],"example":"processing"},"SubEmbeddingSettings":{"type":"object","properties":{"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EmbedderSource","description":"The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`"}]},"model":{"type":["string","null"],"description":"The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`"},"revision":{"type":["string","null"],"description":"The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`"},"pooling":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OverridePooling","description":"The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior."}]},"apiKey":{"type":["string","null"],"description":"The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings"},"dimensions":{"type":["string","null"],"description":"The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text."},"documentTemplate":{"type":["boolean","null"],"description":"A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text."},"documentTemplateMaxBytes":{"type":["integer","null"],"description":"Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400","minimum":0},"url":{"type":["string","null"],"description":"URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated"},"indexingFragments":{"type":["object","null"],"description":"Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.","additionalProperties":{},"propertyNames":{"type":"string"}},"searchFragments":{"type":["object","null"],"description":"Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings","additionalProperties":{},"propertyNames":{"type":"string"}},"request":{"description":"Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings"},"response":{"description":"Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings"},"headers":{"type":["object","null"],"description":"Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}}},"additionalProperties":false},"SummarizedTaskView":{"type":"object","required":["taskUid","status","type","enqueuedAt"],"properties":{"taskUid":{"type":"integer","format":"u-int32","description":"The task unique identifier.","minimum":0},"indexUid":{"type":["string","null"],"description":"The index affected by this task. May be `null` if the task is not linked to any index."},"status":{"$ref":"#/components/schemas/Status","description":"The status of the task."},"type":{"$ref":"#/components/schemas/Kind","description":"The type of the task."},"enqueuedAt":{"type":"string","format":"date-time","description":"The date on which the task was enqueued."}}},"SwapIndexesPayload":{"type":"object","required":["indexes","rename"],"properties":{"indexes":{"type":"array","items":{"$ref":"#/components/schemas/IndexUid"},"description":"Array of the two indexUids to be swapped"},"rename":{"type":"boolean","description":"If set to true, instead of swapping the left and right indexes it'll change the name of the first index to the second"}}},"TaskNetwork":{"oneOf":[{"type":"object","required":["origin"],"properties":{"origin":{"$ref":"#/components/schemas/Origin"}}},{"type":"object","required":["remote_tasks"],"properties":{"remote_tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/RemoteTask"},"propertyNames":{"type":"string"}}}}]},"TaskView":{"type":"object","required":["uid","status","type","enqueuedAt"],"properties":{"uid":{"type":"integer","format":"u-int32","description":"The unique sequential identifier of the task.","example":4312,"minimum":0},"batchUid":{"type":["integer","null"],"format":"u-int32","description":"The unique identifier of the index where this task is operated.","example":"movies","minimum":0},"indexUid":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/Status"},"type":{"$ref":"#/components/schemas/Kind","description":"The type of the task."},"canceledBy":{"type":["integer","null"],"format":"u-int32","description":"The uid of the task that performed the taskCancelation if the task has been canceled.","example":4326,"minimum":0},"details":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DetailsView"}]},"error":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ResponseError"}]},"duration":{"type":["string","null"],"description":"Total elasped time the engine was in processing state expressed as a `ISO-8601` duration format.","example":null},"enqueuedAt":{"type":"string","description":"An `RFC 3339` format for date/time/duration.","example":"2024-08-08_14:12:09.393Z"},"startedAt":{"type":"string","description":"An `RFC 3339` format for date/time/duration.","example":"2024-08-08_14:12:09.393Z"},"finishedAt":{"type":"string","description":"An `RFC 3339` format for date/time/duration.","example":"2024-08-08_14:12:09.393Z"},"network":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TaskNetwork"}]}}},"TypoSettings":{"type":"object","properties":{"enabled":{"type":["boolean","null"],"example":true},"minWordSizeForTypos":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MinWordSizeTyposSetting"}]},"disableOnWords":{"type":["array","null"],"items":{"type":"string"},"example":["iPhone","phone"],"uniqueItems":true},"disableOnAttributes":{"type":["array","null"],"items":{"type":"string"},"example":["uuid","url"],"uniqueItems":true},"disableOnNumbers":{"type":["boolean","null"],"example":true}},"additionalProperties":false},"Unchecked":{"default":null},"UpdateIndexRequest":{"type":"object","properties":{"primaryKey":{"type":["string","null"],"description":"The new primary key of the index"},"uid":{"type":["string","null"],"description":"The new uid of the index (for renaming)"}}},"UpdateStderrLogs":{"type":"object","required":["target"],"properties":{"target":{"type":"string","description":"Lets you specify which parts of the code you want to inspect and is formatted like that: code_part=log_level,code_part=log_level\n- If the `code_part` is missing, then the `log_level` will be applied to everything.\n- If the `log_level` is missing, then the `code_part` will be selected in `info` log level.","default":"info","example":"milli=trace,index_scheduler,actix_web=off"}}},"Vec":{"type":"array","items":{"type":"number","format":"float"}},"VectorStoreBackend":{"type":"string","enum":["stable","experimental"]},"VersionResponse":{"type":"object","required":["commitSha","commitDate","pkgVersion"],"properties":{"commitSha":{"type":"string","description":"The commit used to compile this build of Meilisearch."},"commitDate":{"type":"string","description":"The date of this build."},"pkgVersion":{"type":"string","description":"The version of Meilisearch."}}},"WebhookResults":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/WebhookWithMetadata"}}}},"WebhookSettings":{"type":"object","properties":{"url":{"type":["string","null"],"example":"https://your.site/on-tasks-completed"},"headers":{"type":["object","null"],"additionalProperties":{"type":"string"},"propertyNames":{"type":"string"},"example":{"Authorization":"Bearer a-secret-token"}}}},"WebhookWithMetadata":{"allOf":[{"$ref":"#/components/schemas/WebhookSettings"},{"type":"object","required":["uuid","isEditable"],"properties":{"uuid":{"type":"string","format":"uuid"},"isEditable":{"type":"boolean"}}}]},"u32":{"type":"integer","format":"u-int32","minimum":0}},"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"Uuidv4, string or JWT","description":"An API key is a token that you provide when making API calls. Include the token in a header parameter called `Authorization`.\nExample: `Authorization: Bearer 8fece4405662dd830e4cb265e7e047aab2e79672a760a12712d2a263c9003509`"}}},"tags":[{"name":"Stats","description":"Stats gives extended information and metrics about indexes and the Meilisearch database."},{"name":"Tasks","description":"The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html).","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/tasks","description":null}},{"name":"Batches","description":"The /batches route gives information about the progress of batches of asynchronous operations.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/batches","description":null}},{"name":"Indexes","description":"An index is an entity that gathers a set of [documents](https://www.meilisearch.com/docs/learn/getting_started/documents) with its own [settings](https://www.meilisearch.com/docs/reference/api/settings). Learn more about indexes.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/indexes","description":null}},{"name":"Documents","description":"Documents are objects composed of fields that can store any type of data. Each field contains an attribute and its associated value. Documents are stored inside [indexes](https://www.meilisearch.com/docs/learn/getting_started/indexes).","externalDocs":{"url":"https://www.meilisearch.com/docs/learn/getting_started/documents","description":null}},{"name":"Facet Search","description":"The `/facet-search` route allows you to search for facet values. Facet search supports prefix search and typo tolerance. The returned hits are sorted lexicographically in ascending order. You can configure how facets are sorted using the sortFacetValuesBy property of the faceting index settings.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/facet_search","description":null}},{"name":"Similar documents","description":"The /similar route uses AI-powered search to return a number of documents similar to a target document.\n\nMeilisearch exposes two routes for retrieving similar documents: POST and GET. In the majority of cases, POST will offer better performance and ease of use.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/similar","description":null}},{"name":"Settings","description":"Use the /settings route to customize search settings for a given index. You can either modify all index settings at once using the update settings endpoint, or use a child route to configure a single setting.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/settings","description":null}},{"name":"Search","description":"Meilisearch exposes two routes to perform searches:\n\n- A POST route: this is the preferred route when using API authentication, as it allows [preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) caching and better performance.\n- A GET route: the usage of this route is discouraged, unless you have good reason to do otherwise (specific caching abilities for example)","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/search","description":null}},{"name":"Snapshots","description":"The snapshots route allows the creation of database snapshots. Snapshots are .snapshot files that can be used to launch Meilisearch.\nCreating a snapshot is also referred to as exporting it, whereas launching Meilisearch with a snapshot is referred to as importing it.\nDuring a snapshot export, all indexes of the current instance are exported—together with their documents and settings—and saved as a single .snapshot file.\nDuring a snapshot import, all indexes contained in the indicated .snapshot file are imported along with their associated documents and settings.\nSnapshot imports are performed at launch using an option.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/snapshots","description":null}},{"name":"Dumps","description":"The `dumps` route allows the creation of database dumps.\nDumps are `.dump` files that can be used to launch Meilisearch. Dumps are compatible between Meilisearch versions.\nCreating a dump is also referred to as exporting it, whereas launching Meilisearch with a dump is referred to as importing it.\nDuring a [dump export](https://www.meilisearch.com/docs/reference/api/dump#create-a-dump), all indexes of the current instance are\nexported—together with their documents and settings—and saved as a single `.dump` file. During a dump import,\nall indexes contained in the indicated `.dump` file are imported along with their associated documents and settings.\nAny existing index with the same uid as an index in the dump file will be overwritten.\nDump imports are [performed at launch](https://www.meilisearch.com/docs/learn/advanced/dumps#importing-a-dump) using an option.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/dump","description":null}},{"name":"Keys","description":"Manage API `keys` for a Meilisearch instance. Each key has a given set of permissions.\nYou must have the master key or the default admin key to access the keys route. More information about the keys and their rights.\nAccessing any route under `/keys` without having set a master key will result in an error.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/keys","description":null}},{"name":"Logs","description":"Everything about retrieving or customizing logs.\nCurrently [experimental](https://www.meilisearch.com/docs/learn/experimental/overview).","externalDocs":{"url":"https://www.meilisearch.com/docs/learn/experimental/log_customization","description":null}},{"name":"Multi-search","description":"The `/multi-search` route allows you to perform multiple search queries on one or more indexes by bundling them into a single HTTP request. Multi-search is also known as federated search.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/multi_search","description":null}},{"name":"Experimental features","description":"The `/experimental-features` route allows you to activate or deactivate some of Meilisearch's experimental features.\n\nThis route is **synchronous**. This means that no task object will be returned, and any activated or deactivated features will be made available or unavailable immediately.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/experimental_features","description":null}},{"name":"Export","description":"The `/export` route allows you to trigger an export process to a remote Meilisearch instance.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/export","description":null}},{"name":"Network","description":"The `/network` route allows you to describe the topology of a network of Meilisearch instances.\n\nThis route is **synchronous**. This means that no task object will be returned, and any change to the network will be made available immediately.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/network","description":null}},{"name":"Webhooks","description":"The `/webhooks` route allows you to register endpoints to be called once tasks are processed.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/webhooks","description":null}}]} \ No newline at end of file diff --git a/docs.json b/docs.json index 1f588b4ad..e43e7549a 100644 --- a/docs.json +++ b/docs.json @@ -145,11 +145,25 @@ } ] }, + "api": { + "playground": { + "display": "simple" + }, + "examples": { + "languages": ["curl", "python", "javascript"], + "defaults": "required", + "prefill": true + } + }, "navigation": { "versions": [ { "version": "latest", "anchors": [ + { + "anchor": "Open API", + "openapi": "openapi.json" + }, { "anchor": "Learn", "icon": "book", diff --git a/learn/meilisearch.json b/learn/meilisearch.json new file mode 100644 index 000000000..778a31ae1 --- /dev/null +++ b/learn/meilisearch.json @@ -0,0 +1 @@ +{"openapi":"3.1.0","info":{"title":"meilisearch","description":"Meilisearch HTTP server","contact":{"name":"Quentin de Quelen","email":"quentin@dequelen.me"},"license":{"name":"MIT","identifier":"MIT"},"version":"1.22.1"},"servers":[{"url":"/","description":"Local server"}],"paths":{"/batches":{"get":{"tags":["Batches"],"summary":"Get batches","description":"List all batches, regardless of index. The batch objects are contained in the results array.\nBatches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first.\nBatch results are paginated and can be filtered with query parameters.","operationId":"get_batches","parameters":[{"name":"limit","in":"query","description":"Maximum number of results to return.","required":false,"schema":{"type":"integer","format":"u-int32","default":20,"minimum":0},"example":12},{"name":"from","in":"query","description":"Fetch the next set of results from the given uid.","required":false,"schema":{"type":"integer","format":"u-int32","minimum":0},"example":12421},{"name":"reverse","in":"query","description":"The order you want to retrieve the objects.","required":false,"schema":{"type":"boolean"},"example":true},{"name":"batchUids","in":"query","description":"Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character.","required":false,"schema":{"type":"integer","format":"u-int32","minimum":0},"example":12421},{"name":"uids","in":"query","description":"Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"canceledBy","in":"query","description":"Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[374,"*"]},{"name":"types","in":"query","description":"Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["documentAdditionOrUpdate","*"]},{"name":"statuses","in":"query","description":"Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Status"}},"example":["succeeded","failed","canceled","enqueued","processing","*"]},{"name":"indexUids","in":"query","description":"Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["movies","theater","*"]},{"name":"afterEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]}],"responses":{"200":{"description":"Return the batches","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllBatches"},"example":{"results":[{"uid":2,"details":{"stopWords":["of","the"]},"progress":null,"stats":{"totalNbTasks":1,"status":{"succeeded":1},"types":{"settingsUpdate":1},"indexUids":{"INDEX_NAME":1}},"duration":"PT0.110083S","startedAt":"2024-12-10T15:49:04.995321Z","finishedAt":"2024-12-10T15:49:05.105404Z"}],"total":3,"limit":1,"from":2,"next":1}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["tasks.get","tasks.*","*"]}]}},"/batches/{batchUid}":{"get":{"tags":["Batches"],"summary":"Get one batch","description":"Get a single batch.","operationId":"get_batch","parameters":[{"name":"batchUid","in":"path","description":"The unique batch id","required":true,"schema":{"type":"string"},"example":"8685"}],"responses":{"200":{"description":"Return the batch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchView"},"example":{"uid":1,"details":{"receivedDocuments":1,"indexedDocuments":1},"progress":null,"stats":{"totalNbTasks":1,"status":{"succeeded":1},"types":{"documentAdditionOrUpdate":1},"indexUids":{"INDEX_NAME":1}},"duration":"PT0.364788S","startedAt":"2024-12-10T15:48:49.672141Z","finishedAt":"2024-12-10T15:48:50.036929Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["tasks.get","tasks.*","*"]}]}},"/dumps":{"post":{"tags":["Dumps"],"summary":"Create a dump","description":"Triggers a dump creation process. Once the process is complete, a dump is created in the\n[dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory).\nIf the dump directory does not exist yet, it will be created.","operationId":"create_dump","responses":{"202":{"description":"Dump is being created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":0,"indexUid":null,"status":"enqueued","type":"DumpCreation","enqueuedAt":"2021-01-01T09:39:00.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["dumps.create","dumps.*","*"]}]}},"/experimental-features":{"get":{"tags":["Experimental features"],"summary":"Get all experimental features","description":"Get a list of all experimental features that can be activated via the /experimental-features route and whether or not they are currently activated.","operationId":"get_features","responses":{"200":{"description":"Experimental features are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeTogglableFeatures"},"example":{"metrics":true,"logsRoute":false,"editDocumentsByFunction":false,"containsFilter":false,"network":false,"getTaskDocumentsRoute":false,"compositeEmbedders":false,"chatCompletions":false,"multimodal":false,"vectorStoreSetting":false}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["experimental_features.get","experimental_features.*","*"]}]},"patch":{"tags":["Experimental features"],"summary":"Configure experimental features","description":"Activate or deactivate experimental features.","operationId":"patch_features","responses":{"200":{"description":"Experimental features are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeTogglableFeatures"},"example":{"metrics":true,"logsRoute":false,"editDocumentsByFunction":false,"containsFilter":false,"network":false,"getTaskDocumentsRoute":false,"compositeEmbedders":false,"chatCompletions":false,"multimodal":false,"vectorStoreSetting":false}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["experimental_features.update","experimental_features.*","*"]}]}},"/export":{"post":{"tags":["Export"],"operationId":"export","responses":{"202":{"description":"Export successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":1,"status":"enqueued","type":"export","enqueuedAt":"2021-08-11T09:25:53.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["export","*"]}]}},"/health":{"get":{"tags":["Health"],"summary":"Get Health","description":"The health check endpoint enables you to periodically test the health of your Meilisearch instance.","operationId":"get_health","responses":{"200":{"description":"Instance is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"},"example":{"status":"available"}}}}}}},"/indexes":{"get":{"tags":["Indexes"],"summary":"List indexes","description":"List all indexes.","operationId":"list_indexes","parameters":[{"name":"offset","in":"query","description":"The number of indexes to skip before starting to retrieve anything","required":false,"schema":{"type":"integer","minimum":0},"example":100},{"name":"limit","in":"query","description":"The number of indexes to retrieve","required":false,"schema":{"type":"integer","default":20,"minimum":0},"example":1}],"responses":{"200":{"description":"Indexes are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationView_IndexView"},"example":{"results":[{"uid":"movies","primaryKey":"movie_id","createdAt":"2019-11-20T09:40:33.711324Z","updatedAt":"2019-11-20T09:40:33.711324Z"}],"limit":1,"offset":0,"total":1}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["indexes.get","indexes.*","*"]}]},"post":{"tags":["Indexes"],"summary":"Create index","description":"Create an index.","operationId":"create_index","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexCreateRequest"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"indexCreation","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["indexes.create","indexes.*","*"]}]}},"/indexes/{indexUid}":{"get":{"tags":["Indexes"],"summary":"Get index","description":"Get information about an index.","operationId":"get_index","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"The index is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexView"},"example":{"uid":"movies","primaryKey":"movie_id","createdAt":"2019-11-20T09:40:33.711324Z","updatedAt":"2019-11-20T09:40:33.711324Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["indexes.get","indexes.*","*"]}]},"delete":{"tags":["Indexes"],"summary":"Delete index","description":"Delete an index.","operationId":"delete_index","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"202":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":0,"indexUid":"movies","status":"enqueued","type":"indexDeletion","enqueuedAt":"2021-01-01T09:39:00.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["indexes.delete","indexes.*","*"]}]},"patch":{"tags":["Indexes"],"summary":"Update index","description":"Update the `primaryKey` of an index.\nReturn an error if the index doesn't exists yet or if it contains documents.","operationId":"update_index","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIndexRequest"}}},"required":true},"responses":{"202":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":0,"indexUid":"movies","status":"enqueued","type":"indexUpdate","enqueuedAt":"2021-01-01T09:39:00.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["indexes.update","indexes.*","*"]}]}},"/indexes/{indexUid}/delete-batch":{"post":{"tags":["Documents"],"summary":"Delete documents by batch","description":"Delete a set of documents based on an array of document ids.","operationId":"delete_documents_batch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentAdditionOrUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.delete","documents.*","*"]}]}},"/indexes/{indexUid}/documents":{"get":{"tags":["Documents"],"summary":"Get documents","description":"Get documents by batches.","operationId":"get_documents","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"retrieveVectors","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"filter","in":"query","required":false,"schema":{"type":"string"},"example":"popularity > 1000"},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationView_Value"},"example":{"results":[{"id":25684,"title":"American Ninja 5","poster":"https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg","overview":"When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.","release_date":725846400},{"id":45881,"title":"The Bridge of San Luis Rey","poster":"https://image.tmdb.org/t/p/w500/4X7quIcdkc24Cveg5XdpfRqxtYA.jpg","overview":"The Bridge of San Luis Rey is American author Thornton Wilder's second novel, first published in 1927 to worldwide acclaim. It tells the story of several interrelated people who die in the collapse of an Inca rope-fiber suspension bridge in Peru, and the events that lead up to their being on the bridge.[ A friar who has witnessed the tragic accident then goes about inquiring into the lives of the victims, seeking some sort of cosmic answer to the question of why each had to die. The novel won the Pulitzer Prize in 1928.","release_date":1072915200}],"limit":20,"offset":0,"total":2}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["documents.get","documents.*","*"]}]},"put":{"tags":["Documents"],"summary":"Add or update documents","description":"Add a list of documents or update them if they already exist.\nIf you send an already existing document (same id) the old document will be only partially updated according to the fields of the new document. Thus, any fields not present in the new document are kept and remained unchanged.\nTo completely overwrite a document, see Add or replace documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document. `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved `_vectors` field in your documents.\n> It can accept an array of floats, multiple arrays of floats in an outer array or an object.\n> This object accepts keys corresponding to the different embedders defined your index settings.","operationId":"update_documents","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"primaryKey","in":"query","description":"The primary key of the documents. primaryKey is optional. If you want to set the primary key of your index through this route,\nit only has to be done the first time you add documents to the index. After which it will be ignored if given.","required":false,"schema":{"type":"string"},"example":"id"},{"name":"csvDelimiter","in":"query","description":"Customize the csv delimiter when importing CSV documents.","required":true,"schema":{"type":"string","default":","},"example":";"}],"requestBody":{"content":{"application/json":{"schema":{}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentAdditionOrUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.add","documents.*","*"]}]},"post":{"tags":["Documents"],"summary":"Add or replace documents","description":"Add a list of documents or replace them if they already exist.\n\nIf you send an already existing document (same id) the whole existing document will be overwritten by the new document. Fields previously in the document not present in the new document are removed.\n\nFor a partial update of the document see Add or update documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document. `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved `_vectors` field in your documents.\n> It can accept an array of floats, multiple arrays of floats in an outer array or an object.\n> This object accepts keys corresponding to the different embedders defined your index settings.","operationId":"replace_documents","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"primaryKey","in":"query","description":"The primary key of the documents. primaryKey is optional. If you want to set the primary key of your index through this route,\nit only has to be done the first time you add documents to the index. After which it will be ignored if given.","required":false,"schema":{"type":"string"},"example":"id"},{"name":"csvDelimiter","in":"query","description":"Customize the csv delimiter when importing CSV documents.","required":true,"schema":{"type":"string","default":","},"example":";"}],"requestBody":{"content":{"application/json":{"schema":{}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentAdditionOrUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.add","documents.*","*"]}]},"delete":{"tags":["Documents"],"summary":"Delete all documents","description":"Delete all documents in the specified index.","operationId":"clear_all_documents","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentDeletion","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.delete","documents.*","*"]}]}},"/indexes/{indexUid}/documents/delete":{"post":{"tags":["Documents"],"summary":"Delete documents by filter","description":"Delete a set of documents based on a filter.","operationId":"delete_documents_by_filter","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDeletionByFilter"}}},"required":true},"responses":{"202":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentDeletion","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.delete","documents.*","*"]}]}},"/indexes/{indexUid}/documents/edit":{"post":{"tags":["Documents"],"summary":"Edit documents by function.","description":"Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to edit one or more documents directly in Meilisearch.","operationId":"edit_documents_by_function","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentEditionByFunction"}}},"required":true},"responses":{"202":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentDeletion","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.*","*"]}]}},"/indexes/{indexUid}/documents/fetch":{"post":{"tags":["Documents"],"summary":"Get documents with POST","description":"Get a set of documents.","operationId":"documents_by_query_post","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowseQuery"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationView_Value"},"example":{"results":[{"title":"The Travels of Ibn Battuta","genres":["Travel","Adventure"],"language":"English","rating":4.5},{"title":"Pride and Prejudice","genres":["Classics","Fiction","Romance","Literature"],"language":"English","rating":4}],"offset":0,"limit":2,"total":5}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.delete","documents.*","*"]}]}},"/indexes/{indexUid}/documents/{documentId}":{"get":{"tags":["Documents"],"summary":"Get one document","description":"Get one document from its primary key.","operationId":"get_document","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"documentId","in":"path","description":"The document identifier","required":true,"schema":{"type":"string"},"example":"85087"},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"retrieveVectors","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"The document is returned","content":{"application/json":{"schema":{},"example":{"id":25684,"title":"American Ninja 5","poster":"https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg","overview":"When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.","release_date":725846400}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Document not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Document `a` not found.","code":"document_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#document_not_found"}}}}},"security":[{"Bearer":["documents.get","documents.*","*"]}]},"delete":{"tags":["Documents"],"summary":"Delete a document","description":"Delete a single document by id.","operationId":"delete_document","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"documentId","in":"path","description":"Document Identifier","required":true,"schema":{"type":"string"},"example":"853"}],"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentAdditionOrUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.delete","documents.*","*"]}]}},"/indexes/{indexUid}/facet-search":{"post":{"tags":["Facet Search"],"summary":"Perform a facet search","description":"Search for a facet value within a given facet.","operationId":"search","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacetSearchQuery"}}},"required":true},"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"},"example":{"hits":[{"id":2770,"title":"American Pie 2","poster":"https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg","overview":"The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…","release_date":997405200},{"id":190859,"title":"American Sniper","poster":"https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg","overview":"U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…","release_date":1418256000}],"offset":0,"limit":2,"estimatedTotalHits":976,"processingTimeMs":35,"query":"american "}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["search","*"]}]}},"/indexes/{indexUid}/search":{"get":{"tags":["Indexes","Search"],"summary":"Search an index with GET","description":"Search for documents matching a specific query in the given index.","operationId":"search_with_url_query","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"vector","in":"query","required":true,"schema":{"type":"array","items":{"type":"number","format":"float"}},"explode":false},{"name":"offset","in":"query","required":true,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"limit","in":"query","required":true,"schema":{"type":"integer","default":20,"minimum":0}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"hitsPerPage","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"attributesToRetrieve","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"retrieveVectors","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"attributesToCrop","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"cropLength","in":"query","required":true,"schema":{"type":"integer","default":10,"minimum":0}},{"name":"attributesToHighlight","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"filter","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"distinct","in":"query","required":false,"schema":{"type":"string"}},{"name":"showMatchesPosition","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"showRankingScore","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"showRankingScoreDetails","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"facets","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"highlightPreTag","in":"query","required":true,"schema":{"type":"string","default":""}},{"name":"highlightPostTag","in":"query","required":true,"schema":{"type":"string","default":""}},{"name":"cropMarker","in":"query","required":true,"schema":{"type":"string","default":"…"}},{"name":"matchingStrategy","in":"query","required":true,"schema":{"$ref":"#/components/schemas/MatchingStrategy"}},{"name":"attributesToSearchOn","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"hybridEmbedder","in":"query","required":false,"schema":{"type":"string"}},{"name":"hybridSemanticRatio","in":"query","required":true,"schema":{"type":"number","format":"float"}},{"name":"rankingScoreThreshold","in":"query","required":true,"schema":{"type":"number","format":"float"}},{"name":"locales","in":"query","required":true,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Locale"}},"explode":false}],"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"},"example":{"hits":[{"id":2770,"title":"American Pie 2","poster":"https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg","overview":"The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…","release_date":997405200},{"id":190859,"title":"American Sniper","poster":"https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg","overview":"U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…","release_date":1418256000}],"offset":0,"limit":2,"estimatedTotalHits":976,"processingTimeMs":35,"query":"american "}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["search","*"]}]},"post":{"tags":["Indexes","Search"],"summary":"Search with POST","description":"Search for documents matching a specific query in the given index.","operationId":"search_with_post","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchQuery"}}},"required":true},"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"},"example":{"hits":[{"id":2770,"title":"American Pie 2","poster":"https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg","overview":"The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…","release_date":997405200},{"id":190859,"title":"American Sniper","poster":"https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg","overview":"U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…","release_date":1418256000}],"offset":0,"limit":2,"estimatedTotalHits":976,"processingTimeMs":35,"query":"american "}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["search","*"]}]}},"/indexes/{indexUid}/settings":{"get":{"tags":["Settings"],"summary":"All settings","description":"This route allows you to retrieve, configure, or reset all of an index's settings at once.","operationId":"get_all","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"Settings are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings_Unchecked"},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset settings","description":"Reset all the settings of an index to their default value.","operationId":"delete_all","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update settings","description":"Update the settings of an index.\nPassing null to an index setting will reset it to its default value.\nUpdates in the settings route are partial. This means that any parameters not provided in the body will be left unchanged.\nIf the provided index does not exist, it will be created.","operationId":"update_all","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings_Unchecked"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/chat":{"get":{"tags":["Settings"],"summary":"Get chat","description":"Get an user defined chat","operationId":"getchat","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"chat is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSettings"},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset chat","description":"Reset an index's chat to its default value","operationId":"deletechat","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update chat","description":"Update an index's user defined chat","operationId":"patchchat","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/dictionary":{"get":{"tags":["Settings"],"summary":"Get dictionary","description":"Get an user defined dictionary","operationId":"getdictionary","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"dictionary is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update dictionary","description":"Update an index's user defined dictionary","operationId":"putdictionary","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset dictionary","description":"Reset an index's dictionary to its default value","operationId":"deletedictionary","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/displayed-attributes":{"get":{"tags":["Settings"],"summary":"Get displayedAttributes","description":"Get an user defined displayedAttributes","operationId":"getdisplayedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"displayedAttributes is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update displayedAttributes","description":"Update an index's user defined displayedAttributes","operationId":"putdisplayedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset displayedAttributes","description":"Reset an index's displayedAttributes to its default value","operationId":"deletedisplayedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/distinct-attribute":{"get":{"tags":["Settings"],"summary":"Get distinctAttribute","description":"Get an user defined distinctAttribute","operationId":"getdistinctAttribute","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"distinctAttribute is returned","content":{"application/json":{"schema":{"type":"string"},"example":""}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update distinctAttribute","description":"Update an index's user defined distinctAttribute","operationId":"putdistinctAttribute","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset distinctAttribute","description":"Reset an index's distinctAttribute to its default value","operationId":"deletedistinctAttribute","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/embedders":{"get":{"tags":["Settings"],"summary":"Get embedders","description":"Get an user defined embedders","operationId":"getembedders","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"embedders is returned","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/SettingEmbeddingSettings"},"propertyNames":{"type":"string"}},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset embedders","description":"Reset an index's embedders to its default value","operationId":"deleteembedders","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/SettingEmbeddingSettings"},"propertyNames":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update embedders","description":"Update an index's user defined embedders","operationId":"patchembedders","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/SettingEmbeddingSettings"},"propertyNames":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/facet-search":{"get":{"tags":["Settings"],"summary":"Get facetSearch","description":"Get an user defined facetSearch","operationId":"getfacetSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"facetSearch is returned","content":{"application/json":{"schema":{"type":"boolean"},"example":false}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update facetSearch","description":"Update an index's user defined facetSearch","operationId":"putfacetSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"boolean"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset facetSearch","description":"Reset an index's facetSearch to its default value","operationId":"deletefacetSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"boolean"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/faceting":{"get":{"tags":["Settings"],"summary":"Get faceting","description":"Get an user defined faceting","operationId":"getfaceting","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"faceting is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacetingSettings"},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset faceting","description":"Reset an index's faceting to its default value","operationId":"deletefaceting","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacetingSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update faceting","description":"Update an index's user defined faceting","operationId":"patchfaceting","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacetingSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/filterable-attributes":{"get":{"tags":["Settings"],"summary":"Get filterableAttributes","description":"Get an user defined filterableAttributes","operationId":"getfilterableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"filterableAttributes is returned","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FilterableAttributesRule"}},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update filterableAttributes","description":"Update an index's user defined filterableAttributes","operationId":"putfilterableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FilterableAttributesRule"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset filterableAttributes","description":"Reset an index's filterableAttributes to its default value","operationId":"deletefilterableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FilterableAttributesRule"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/localized-attributes":{"get":{"tags":["Settings"],"summary":"Get localizedAttributes","description":"Get an user defined localizedAttributes","operationId":"getlocalizedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"localizedAttributes is returned","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LocalizedAttributesRuleView"}},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update localizedAttributes","description":"Update an index's user defined localizedAttributes","operationId":"putlocalizedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LocalizedAttributesRuleView"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset localizedAttributes","description":"Reset an index's localizedAttributes to its default value","operationId":"deletelocalizedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LocalizedAttributesRuleView"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/non-separator-tokens":{"get":{"tags":["Settings"],"summary":"Get nonSeparatorTokens","description":"Get an user defined nonSeparatorTokens","operationId":"getnonSeparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"nonSeparatorTokens is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update nonSeparatorTokens","description":"Update an index's user defined nonSeparatorTokens","operationId":"putnonSeparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset nonSeparatorTokens","description":"Reset an index's nonSeparatorTokens to its default value","operationId":"deletenonSeparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/pagination":{"get":{"tags":["Settings"],"summary":"Get pagination","description":"Get an user defined pagination","operationId":"getpagination","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"pagination is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationSettings"},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset pagination","description":"Reset an index's pagination to its default value","operationId":"deletepagination","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update pagination","description":"Update an index's user defined pagination","operationId":"patchpagination","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/prefix-search":{"get":{"tags":["Settings"],"summary":"Get prefixSearch","description":"Get an user defined prefixSearch","operationId":"getprefixSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"prefixSearch is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrefixSearchSettings"},"example":"indexingTime"}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update prefixSearch","description":"Update an index's user defined prefixSearch","operationId":"putprefixSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrefixSearchSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset prefixSearch","description":"Reset an index's prefixSearch to its default value","operationId":"deleteprefixSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrefixSearchSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/proximity-precision":{"get":{"tags":["Settings"],"summary":"Get proximityPrecision","description":"Get an user defined proximityPrecision","operationId":"getproximityPrecision","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"proximityPrecision is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProximityPrecisionView"},"example":"byWord"}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update proximityPrecision","description":"Update an index's user defined proximityPrecision","operationId":"putproximityPrecision","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProximityPrecisionView"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset proximityPrecision","description":"Reset an index's proximityPrecision to its default value","operationId":"deleteproximityPrecision","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProximityPrecisionView"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/ranking-rules":{"get":{"tags":["Settings"],"summary":"Get rankingRules","description":"Get an user defined rankingRules","operationId":"getrankingRules","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"rankingRules is returned","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RankingRuleView"}},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update rankingRules","description":"Update an index's user defined rankingRules","operationId":"putrankingRules","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RankingRuleView"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset rankingRules","description":"Reset an index's rankingRules to its default value","operationId":"deleterankingRules","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RankingRuleView"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/search-cutoff-ms":{"get":{"tags":["Settings"],"summary":"Get searchCutoffMs","description":"Get an user defined searchCutoffMs","operationId":"getsearchCutoffMs","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"searchCutoffMs is returned","content":{"application/json":{"schema":{"type":"integer","format":"u-int64","minimum":0},"example":0}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update searchCutoffMs","description":"Update an index's user defined searchCutoffMs","operationId":"putsearchCutoffMs","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"integer","format":"u-int64","minimum":0}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset searchCutoffMs","description":"Reset an index's searchCutoffMs to its default value","operationId":"deletesearchCutoffMs","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"integer","format":"u-int64","minimum":0}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/searchable-attributes":{"get":{"tags":["Settings"],"summary":"Get searchableAttributes","description":"Get an user defined searchableAttributes","operationId":"getsearchableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"searchableAttributes is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update searchableAttributes","description":"Update an index's user defined searchableAttributes","operationId":"putsearchableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset searchableAttributes","description":"Reset an index's searchableAttributes to its default value","operationId":"deletesearchableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/separator-tokens":{"get":{"tags":["Settings"],"summary":"Get separatorTokens","description":"Get an user defined separatorTokens","operationId":"getseparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"separatorTokens is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update separatorTokens","description":"Update an index's user defined separatorTokens","operationId":"putseparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset separatorTokens","description":"Reset an index's separatorTokens to its default value","operationId":"deleteseparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/sortable-attributes":{"get":{"tags":["Settings"],"summary":"Get sortableAttributes","description":"Get an user defined sortableAttributes","operationId":"getsortableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"sortableAttributes is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update sortableAttributes","description":"Update an index's user defined sortableAttributes","operationId":"putsortableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset sortableAttributes","description":"Reset an index's sortableAttributes to its default value","operationId":"deletesortableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/stop-words":{"get":{"tags":["Settings"],"summary":"Get stopWords","description":"Get an user defined stopWords","operationId":"getstopWords","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"stopWords is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update stopWords","description":"Update an index's user defined stopWords","operationId":"putstopWords","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset stopWords","description":"Reset an index's stopWords to its default value","operationId":"deletestopWords","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/synonyms":{"get":{"tags":["Settings"],"summary":"Get synonyms","description":"Get an user defined synonyms","operationId":"getsynonyms","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"synonyms is returned","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"propertyNames":{"type":"string"}},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update synonyms","description":"Update an index's user defined synonyms","operationId":"putsynonyms","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"propertyNames":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset synonyms","description":"Reset an index's synonyms to its default value","operationId":"deletesynonyms","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"propertyNames":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/typo-tolerance":{"get":{"tags":["Settings"],"summary":"Get typoTolerance","description":"Get an user defined typoTolerance","operationId":"gettypoTolerance","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"typoTolerance is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypoSettings"},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset typoTolerance","description":"Reset an index's typoTolerance to its default value","operationId":"deletetypoTolerance","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypoSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update typoTolerance","description":"Update an index's user defined typoTolerance","operationId":"patchtypoTolerance","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypoSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/vector-store":{"get":{"tags":["Settings"],"summary":"Get vectorStore","description":"Get an user defined vectorStore","operationId":"getvectorStore","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"vectorStore is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreBackend"},"example":"stable"}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset vectorStore","description":"Reset an index's vectorStore to its default value","operationId":"deletevectorStore","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreBackend"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update vectorStore","description":"Update an index's user defined vectorStore","operationId":"patchvectorStore","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreBackend"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/similar":{"get":{"tags":["Similar documents"],"summary":"Get similar documents with GET","description":"Retrieve documents similar to a specific search result.","operationId":"similar_get","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"id","in":"query","required":true,"schema":{"type":"string"}},{"name":"offset","in":"query","required":true,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"limit","in":"query","required":true,"schema":{"type":"integer","default":20,"minimum":0}},{"name":"attributes_to_retrieve","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"retrieve_vectors","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"filter","in":"query","required":false,"schema":{"type":"string"}},{"name":"show_ranking_score","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"show_ranking_score_details","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"ranking_score_threshold","in":"query","required":false,"schema":{"type":"number","format":"float"}},{"name":"embedder","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimilarResult"},"example":{"hits":[{"id":2770,"title":"American Pie 2","poster":"https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg","overview":"The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…","release_date":997405200},{"id":190859,"title":"American Sniper","poster":"https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg","overview":"U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…","release_date":1418256000}],"offset":0,"limit":2,"estimatedTotalHits":976,"processingTimeMs":35,"query":"american "}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["search","*"]}]},"post":{"tags":["Similar documents"],"summary":"Get similar documents with POST","description":"Retrieve documents similar to a specific search result.","operationId":"similar_post","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimilarQuery"}}},"required":true},"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimilarResult"},"example":{"hits":[{"id":2770,"title":"American Pie 2","poster":"https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg","overview":"The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…","release_date":997405200},{"id":190859,"title":"American Sniper","poster":"https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg","overview":"U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…","release_date":1418256000}],"offset":0,"limit":2,"estimatedTotalHits":976,"processingTimeMs":35,"query":"american "}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["search","*"]}]}},"/indexes/{indexUid}/stats":{"get":{"tags":["Stats"],"summary":"Get stats of index","description":"Get the stats of an index.","operationId":"get_index_stats","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"The stats of the index","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexStats"},"example":{"numberOfDocuments":10,"rawDocumentDbSize":10,"avgDocumentSize":10,"numberOfEmbeddings":10,"numberOfEmbeddedDocuments":10,"isIndexing":true,"fieldDistribution":{"genre":10,"author":9}}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["stats.get","stats.*","*"]}]}},"/keys":{"get":{"tags":["Keys"],"summary":"Get API Keys","description":"List all API Keys","operationId":"list_api_keys","parameters":[{"name":"offset","in":"query","required":true,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"limit","in":"query","required":true,"schema":{"type":"integer","default":20,"minimum":0}}],"responses":{"202":{"description":"List of keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationView_KeyView"},"example":{"results":[{"uid":"01b4bc42-eb33-4041-b481-254d00cce834","key":"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4","name":"An API Key","description":null,"actions":["documents.add"],"indexes":["movies"],"expiresAt":"2022-11-12T10:00:00Z","createdAt":"2021-11-12T10:00:00Z","updatedAt":"2021-11-12T10:00:00Z"}],"limit":20,"offset":0,"total":1}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["keys.get","keys.*","*"]}]},"post":{"tags":["Keys"],"summary":"Create an API Key","description":"Create an API Key.","operationId":"create_api_key","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKey"}}},"required":true},"responses":{"202":{"description":"Key has been created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyView"},"example":{"uid":"01b4bc42-eb33-4041-b481-254d00cce834","key":"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4","name":"Indexing Products API key","description":null,"actions":["documents.add"],"indexes":["products"],"expiresAt":"2021-11-13T00:00:00Z","createdAt":"2021-11-12T10:00:00Z","updatedAt":"2021-11-12T10:00:00Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["keys.create","keys.*","*"]}]}},"/keys/{uidOrKey}":{"get":{"tags":["Keys"],"summary":"Get an API Key","description":"Get an API key from its `uid` or its `key` field.","operationId":"get_api_key","parameters":[{"name":"uidOrKey","in":"path","description":"The `uid` or `key` field of an existing API key","required":true,"schema":{"type":"string","format":"password"},"example":"7b198a7f-52a0-4188-8762-9ad93cd608b2"}],"responses":{"200":{"description":"The key is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyView"},"example":{"uid":"01b4bc42-eb33-4041-b481-254d00cce834","key":"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4","name":"An API Key","description":null,"actions":["documents.add"],"indexes":["movies"],"expiresAt":"2022-11-12T10:00:00Z","createdAt":"2021-11-12T10:00:00Z","updatedAt":"2021-11-12T10:00:00Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["keys.get","keys.*","*"]}]},"delete":{"tags":["Keys"],"summary":"Delete a key","description":"Delete the specified API key.","operationId":"delete_api_key","parameters":[{"name":"uidOrKey","in":"path","description":"The `uid` or `key` field of an existing API key","required":true,"schema":{"type":"string","format":"password"},"example":"7b198a7f-52a0-4188-8762-9ad93cd608b2"}],"responses":{"204":{"description":"The key have been removed"},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["keys.delete","keys.*","*"]}]},"patch":{"tags":["Keys"],"summary":"Update a Key","description":"Update the name and description of an API key.\nUpdates to keys are partial. This means you should provide only the fields you intend to update, as any fields not present in the payload will remain unchanged.","operationId":"patch_api_key","parameters":[{"name":"uidOrKey","in":"path","description":"The `uid` or `key` field of an existing API key","required":true,"schema":{"type":"string","format":"password"},"example":"7b198a7f-52a0-4188-8762-9ad93cd608b2"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchApiKey"}}},"required":true},"responses":{"200":{"description":"The key have been updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyView"},"example":{"uid":"01b4bc42-eb33-4041-b481-254d00cce834","key":"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4","name":"An API Key","description":null,"actions":["documents.add"],"indexes":["movies"],"expiresAt":"2022-11-12T10:00:00Z","createdAt":"2021-11-12T10:00:00Z","updatedAt":"2021-11-12T10:00:00Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["keys.update","keys.*","*"]}]}},"/logs/stderr":{"post":{"tags":["Logs"],"summary":"Update target of the console logs","description":"This route lets you specify at runtime the level of the console logs outputted on stderr.","operationId":"update_stderr_target","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStderrLogs"}}},"required":true},"responses":{"204":{"description":"The console logs have been updated"},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["metrics.get","metrics.*","*"]}]}},"/logs/stream":{"post":{"tags":["Logs"],"summary":"Retrieve logs","description":"Stream logs over HTTP. The format of the logs depends on the configuration specified in the payload.\nThe logs are sent as multi-part, and the stream never stops, so make sure your clients correctly handle that.\nTo make the server stop sending you logs, you can call the `DELETE /logs/stream` route.\n\nThere can only be one listener at a timeand an error will be returned if you call this route while it's being used by another client.","operationId":"get_logs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLogs"}}},"required":true},"responses":{"200":{"description":"Logs are being returned","content":{"application/json":{"schema":{"type":"string"},"example":"\n2024-10-08T13:35:02.643750Z WARN HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: tracing_actix_web::middleware: Error encountered while processing the incoming HTTP request: ResponseError { code: 400, message: \"Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625\", error_code: \"feature_not_enabled\", error_type: \"invalid_request\", error_link: \"https://docs.meilisearch.com/errors#feature_not_enabled\" }\n2024-10-08T13:35:02.644191Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: meilisearch: close time.busy=1.66ms time.idle=658µs\n2024-10-08T13:35:18.564152Z INFO HTTP request{method=PATCH host=\"localhost:7700\" route=/experimental-features query_parameters= user_agent=curl/8.6.0 status_code=200}: meilisearch: close time.busy=1.17ms time.idle=127µs\n2024-10-08T13:35:23.094987Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=200}: meilisearch: close time.busy=2.12ms time.idle=595µs\n"}}},"400":{"description":"The route is already being used","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The `/logs/stream` route is currently in use by someone else.","code":"bad_request","type":"invalid_request","link":"https://docs.meilisearch.com/errors#bad_request"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["metrics.get","metrics.*","*"]}]},"delete":{"tags":["Logs"],"summary":"Stop retrieving logs","description":"Call this route to make the engine stops sending logs through the `POST /logs/stream` route.","operationId":"cancel_logs","responses":{"204":{"description":"Logs are being returned"},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["metrics.get","metrics.*","*"]}]}},"/metrics":{"get":{"tags":["Stats"],"summary":"Get prometheus metrics","description":"Retrieve metrics on the engine. See https://www.meilisearch.com/docs/learn/experimental/metrics\nCurrently, [the feature is experimental](https://www.meilisearch.com/docs/learn/experimental/overview)\nwhich means it must be enabled.","operationId":"get_metrics","responses":{"200":{"description":"The metrics of the instance","content":{"text/plain":{"schema":{"type":"string"},"example":"\n# HELP meilisearch_db_size_bytes Meilisearch DB Size In Bytes\n# TYPE meilisearch_db_size_bytes gauge\nmeilisearch_db_size_bytes 1130496\n# HELP meilisearch_http_requests_total Meilisearch HTTP requests total\n# TYPE meilisearch_http_requests_total counter\nmeilisearch_http_requests_total{method=\"GET\",path=\"/metrics\",status=\"400\"} 1\nmeilisearch_http_requests_total{method=\"PATCH\",path=\"/experimental-features\",status=\"200\"} 1\n# HELP meilisearch_http_response_time_seconds Meilisearch HTTP response times\n# TYPE meilisearch_http_response_time_seconds histogram\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.005\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.01\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.025\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.05\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.075\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.25\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.75\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"2.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"7.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"10\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"+Inf\"} 0\nmeilisearch_http_response_time_seconds_sum{method=\"GET\",path=\"/metrics\"} 0\nmeilisearch_http_response_time_seconds_count{method=\"GET\",path=\"/metrics\"} 0\n# HELP meilisearch_index_count Meilisearch Index Count\n# TYPE meilisearch_index_count gauge\nmeilisearch_index_count 1\n# HELP meilisearch_index_docs_count Meilisearch Index Docs Count\n# TYPE meilisearch_index_docs_count gauge\nmeilisearch_index_docs_count{index=\"mieli\"} 2\n# HELP meilisearch_is_indexing Meilisearch Is Indexing\n# TYPE meilisearch_is_indexing gauge\nmeilisearch_is_indexing 0\n# HELP meilisearch_last_update Meilisearch Last Update\n# TYPE meilisearch_last_update gauge\nmeilisearch_last_update 1726675964\n# HELP meilisearch_nb_tasks Meilisearch Number of tasks\n# TYPE meilisearch_nb_tasks gauge\nmeilisearch_nb_tasks{kind=\"indexes\",value=\"mieli\"} 39\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"canceled\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"enqueued\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"failed\"} 4\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"processing\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"succeeded\"} 35\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentAdditionOrUpdate\"} 9\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentDeletion\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentEdition\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"dumpCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexDeletion\"} 8\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexSwap\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexUpdate\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"settingsUpdate\"} 22\nmeilisearch_nb_tasks{kind=\"types\",value=\"snapshotCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskCancelation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskDeletion\"} 0\n# HELP meilisearch_used_db_size_bytes Meilisearch Used DB Size In Bytes\n# TYPE meilisearch_used_db_size_bytes gauge\nmeilisearch_used_db_size_bytes 409600\n"}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["metrics.get","metrics.*","*"]}]}},"/multi-search":{"post":{"tags":["Multi-search"],"summary":"Perform a multi-search","description":"Bundle multiple search queries in a single API request. Use this endpoint to search through multiple indexes at once.","operationId":"multi_search_with_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FederatedSearch"}}},"required":true},"responses":{"200":{"description":"Federated multi-search","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FederatedSearchResult"},"example":{"hits":[{"id":42,"title":"Batman returns","overview":"The overview of batman returns","_federation":{"indexUid":"movies","queriesPosition":0}},{"comicsId":"batman-killing-joke","description":"This comic is really awesome","title":"Batman: the killing joke","_federation":{"indexUid":"comics","queriesPosition":1}}],"processingTimeMs":0,"limit":20,"offset":0,"estimatedTotalHits":2,"semanticHitCount":0}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["search","*"]}]}},"/network":{"get":{"tags":["Network"],"summary":"Get network topology","description":"Get a list of all Meilisearch instances currently known to this instance.","operationId":"get_network","responses":{"200":{"description":"Known nodes are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Network"},"example":{"self":"ms-0","remotes":{"ms-0":{"url":"http://localhost:7700","searchApiKey":null,"writeApiKey":null},"ms-1":{"url":"http://localhost:7701","searchApiKey":"foo","writeApiKey":"bar"},"ms-2":{"url":"http://localhost:7702","searchApiKey":"bar","writeApiKey":"foo"}}}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["network.get","*"]}]},"patch":{"tags":["Network"],"summary":"Configure Network","description":"Add or remove nodes from network.","operationId":"patch_network","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Network"}}},"required":true},"responses":{"200":{"description":"New network state is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Network"},"example":{"self":"ms-0","remotes":{"ms-0":{"url":"http://localhost:7700","searchApiKey":null,"writeApiKey":null},"ms-1":{"url":"http://localhost:7701","searchApiKey":"foo","writeApiKey":"bar"},"ms-2":{"url":"http://localhost:7702","searchApiKey":"bar","writeApiKey":"foo"}}}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["network.update","*"]}]}},"/snapshots":{"post":{"tags":["Snapshots"],"summary":"Create a snapshot","description":"Triggers a snapshot creation process. Once the process is complete, a snapshot is created in the snapshot directory. If the snapshot directory does not exist yet, it will be created.","operationId":"create_snapshot","responses":{"202":{"description":"Snapshot is being created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":0,"indexUid":null,"status":"enqueued","type":"snapshotCreation","enqueuedAt":"2021-01-01T09:39:00.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["snapshots.create","snapshots.*","*"]}]}},"/stats":{"get":{"tags":["Stats"],"summary":"Get stats of all indexes.","description":"Get stats of all indexes.","operationId":"get_stats","responses":{"200":{"description":"The stats of the instance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stats"},"example":{"databaseSize":567,"usedDatabaseSize":456,"lastUpdate":"2019-11-20T09:40:33.711324Z","indexes":{"movies":{"numberOfDocuments":10,"rawDocumentDbSize":100,"maxDocumentSize":16,"avgDocumentSize":10,"isIndexing":true,"fieldDistribution":{"genre":10,"author":9}}}}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["stats.get","stats.*","*"]}]}},"/swap-indexes":{"post":{"tags":["Indexes"],"summary":"Swap indexes","description":"Swap the documents, settings, and task history of two or more indexes. You can only swap indexes in pairs. However, a single request can swap as many index pairs as you wish.\nSwapping indexes is an atomic transaction: either all indexes are successfully swapped, or none are.\nSwapping indexA and indexB will also replace every mention of indexA by indexB and vice-versa in the task history. enqueued tasks are left unmodified.","operationId":"swap_indexes","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SwapIndexesPayload"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":3,"indexUid":null,"status":"enqueued","type":"indexSwap","enqueuedAt":"2021-08-12T10:00:00.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["search","*"]}]}},"/tasks":{"get":{"tags":["Tasks"],"summary":"Get all tasks","description":"Get all [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)","operationId":"get_tasks","parameters":[{"name":"limit","in":"query","description":"Maximum number of results to return.","required":false,"schema":{"type":"integer","format":"u-int32","default":20,"minimum":0},"example":12},{"name":"from","in":"query","description":"Fetch the next set of results from the given uid.","required":false,"schema":{"type":"integer","format":"u-int32","minimum":0},"example":12421},{"name":"reverse","in":"query","description":"The order you want to retrieve the objects.","required":false,"schema":{"type":"boolean"},"example":true},{"name":"batchUids","in":"query","description":"Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character.","required":false,"schema":{"type":"integer","format":"u-int32","minimum":0},"example":12421},{"name":"uids","in":"query","description":"Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"canceledBy","in":"query","description":"Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[374,"*"]},{"name":"types","in":"query","description":"Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["documentAdditionOrUpdate","*"]},{"name":"statuses","in":"query","description":"Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Status"}},"example":["succeeded","failed","canceled","enqueued","processing","*"]},{"name":"indexUids","in":"query","description":"Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["movies","theater","*"]},{"name":"afterEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]}],"responses":{"200":{"description":"Get all tasks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllTasks"},"example":{"results":[{"uid":144,"indexUid":"mieli","status":"succeeded","type":"settingsUpdate","canceledBy":null,"details":{"settings":{"filterableAttributes":["play_count"]}},"error":null,"duration":"PT0.009330S","enqueuedAt":"2024-08-08T09:01:13.348471Z","startedAt":"2024-08-08T09:01:13.349442Z","finishedAt":"2024-08-08T09:01:13.358772Z"}],"total":1,"limit":1,"from":144,"next":null}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["tasks.get","tasks.*","*"]}]},"delete":{"tags":["Tasks"],"summary":"Delete tasks","description":"Delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) on filter","operationId":"delete_tasks","parameters":[{"name":"uids","in":"query","description":"Permits to filter tasks by their uid. By default, when the `uids` query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"batchUids","in":"query","description":"Lets you filter tasks by their `batchUid`.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"canceledBy","in":"query","description":"Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[374,"*"]},{"name":"types","in":"query","description":"Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Kind"}},"example":["documentDeletion","*"]},{"name":"statuses","in":"query","description":"Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Status"}},"example":["succeeded","failed","canceled","*"]},{"name":"indexUids","in":"query","description":"Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["movies","theater","*"]},{"name":"afterEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]}],"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"taskDeletion","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"400":{"description":"A filter is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Query parameters to filter the tasks to delete are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.","code":"missing_task_filters","type":"invalid_request","link":"https://docs.meilisearch.com/errors#missing_task_filters"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"The task uid does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Task :taskUid not found.","code":"task_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors/#task_not_found"}}}}},"security":[{"Bearer":["tasks.delete","tasks.*","*"]}]}},"/tasks/cancel":{"post":{"tags":["Tasks"],"summary":"Cancel tasks","description":"Cancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)","operationId":"cancel_tasks","parameters":[{"name":"uids","in":"query","description":"Permits to filter tasks by their uid. By default, when the `uids` query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"batchUids","in":"query","description":"Lets you filter tasks by their `batchUid`.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"canceledBy","in":"query","description":"Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[374,"*"]},{"name":"types","in":"query","description":"Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Kind"}},"example":["documentDeletion","*"]},{"name":"statuses","in":"query","description":"Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Status"}},"example":["succeeded","failed","canceled","*"]},{"name":"indexUids","in":"query","description":"Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["movies","theater","*"]},{"name":"afterEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]}],"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"taskCancelation","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"400":{"description":"A filter is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Query parameters to filter the tasks to cancel are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.","code":"missing_task_filters","type":"invalid_request","link":"https://docs.meilisearch.com/errors#missing_task_filters"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"The task uid does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Task :taskUid not found.","code":"task_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors/#task_not_found"}}}}},"security":[{"Bearer":["tasks.cancel","tasks.*","*"]}]}},"/tasks/{taskUid}":{"get":{"tags":["Tasks"],"summary":"Get a task","description":"Get a [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)","operationId":"get_task","parameters":[{"name":"taskUid","in":"path","description":"The task identifier","required":true,"schema":{"type":"string","format":"u-int32"},"example":0}],"responses":{"200":{"description":"Task successfully retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskView"},"example":{"uid":1,"indexUid":"movies","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":79000,"indexedDocuments":79000},"error":null,"duration":"PT1S","enqueuedAt":"2021-01-01T09:39:00.000000Z","startedAt":"2021-01-01T09:39:01.000000Z","finishedAt":"2021-01-01T09:39:02.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"The task uid does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Task :taskUid not found.","code":"task_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors/#task_not_found"}}}}},"security":[{"Bearer":["tasks.get","tasks.*","*"]}]}},"/version":{"get":{"tags":["Version"],"summary":"Get version","description":"Current version of Meilisearch.","operationId":"get_version","responses":{"200":{"description":"Instance is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionResponse"},"example":{"commitSha":"b46889b5f0f2f8b91438a08a358ba8f05fc09fc1","commitDate":"2021-07-08","pkgVersion":"0.23.0"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["version","*"]}]}},"/webhooks":{"get":{"tags":["Webhooks"],"operationId":"get_webhooks","responses":{"200":{"description":"Webhooks are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResults"},"example":{"results":[{"uuid":"550e8400-e29b-41d4-a716-446655440000","url":"https://your.site/on-tasks-completed","headers":{"Authorization":"Bearer a-secret-token"},"isEditable":true},{"uuid":"550e8400-e29b-41d4-a716-446655440001","url":"https://another.site/on-tasks-completed","isEditable":true}]}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["webhooks.get","webhooks.*","*.get","*"]}]},"post":{"tags":["Webhooks"],"operationId":"post_webhook","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSettings"}}},"required":true},"responses":{"201":{"description":"Webhook created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithMetadata"},"example":{"uuid":"550e8400-e29b-41d4-a716-446655440000","url":"https://your.site/on-tasks-completed","headers":{"Authorization":"Bearer a-secret-token"},"isEditable":true}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}},"security":[{"Bearer":["webhooks.create","webhooks.*","*"]}]}},"/webhooks/{uuid}":{"get":{"tags":["Webhooks"],"operationId":"get_webhook","parameters":[{"name":"uuid","in":"path","description":"The universally unique identifier of the webhook","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Webhook found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithMetadata"},"example":{"uuid":"550e8400-e29b-41d4-a716-446655440000","url":"https://your.site/on-tasks-completed","headers":{"Authorization":"Bearer a-secret"},"isEditable":true}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}},"security":[{"Bearer":["webhooks.get","webhooks.*","*.get","*"]}]},"delete":{"tags":["Webhooks"],"operationId":"delete_webhook","parameters":[{"name":"uuid","in":"path","description":"The universally unique identifier of the webhook","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Webhook deleted successfully"},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}},"security":[{"Bearer":["webhooks.delete","webhooks.*","*"]}]},"patch":{"tags":["Webhooks"],"operationId":"patch_webhook","parameters":[{"name":"uuid","in":"path","description":"The universally unique identifier of the webhook","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSettings"}}},"required":true},"responses":{"200":{"description":"Webhook updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithMetadata"},"example":{"uuid":"550e8400-e29b-41d4-a716-446655440000","url":"https://your.site/on-tasks-completed","headers":{"Authorization":"Bearer a-secret-token"},"isEditable":true}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}},"security":[{"Bearer":["webhooks.update","webhooks.*","*"]}]}}},"components":{"schemas":{"Action":{"type":"string","enum":["*","search","documents.*","documents.add","documents.get","documents.delete","indexes.*","indexes.create","indexes.get","indexes.update","indexes.delete","indexes.swap","tasks.*","tasks.cancel","tasks.delete","tasks.get","settings.*","settings.get","settings.update","stats.*","stats.get","metrics.*","metrics.get","dumps.*","dumps.create","snapshots.*","snapshots.create","version","keys.create","keys.get","keys.update","keys.delete","experimental.get","experimental.update","export","network.get","network.update","chatCompletions","chats.*","chats.get","chats.delete","chatsSettings.*","chatsSettings.get","chatsSettings.update","*.get","webhooks.get","webhooks.update","webhooks.delete","webhooks.create","webhooks.*"]},"AllBatches":{"type":"object","required":["results","total","limit"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/BatchView"}},"total":{"type":"integer","format":"u-int64","minimum":0},"limit":{"type":"integer","format":"u-int32","minimum":0},"from":{"type":["integer","null"],"format":"u-int32","minimum":0},"next":{"type":["integer","null"],"format":"u-int32","minimum":0}}},"AllTasks":{"type":"object","required":["results","total","limit"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/TaskView"},"description":"The list of tasks that matched the filter."},"total":{"type":"integer","format":"u-int64","description":"Total number of browsable results using offset/limit parameters for the given resource.","minimum":0},"limit":{"type":"integer","format":"u-int32","description":"Limit given for the query. If limit is not provided as a query parameter, this parameter displays the default limit value.","minimum":0},"from":{"type":["integer","null"],"format":"u-int32","description":"The first task uid returned.","minimum":0},"next":{"type":["integer","null"],"format":"u-int32","description":"Represents the value to send in from to fetch the next slice of the results. The first item for the next slice starts at this exact number. When the returned value is null, it means that all the data have been browsed in the given order.","minimum":0}}},"AttributePatterns":{"type":"object","required":["patterns"],"properties":{"patterns":{"type":"array","items":{"type":"string"},"example":["title","overview_*","release_date"]}}},"BTreeMap":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","required":["start","length"],"properties":{"start":{"type":"integer","minimum":0},"length":{"type":"integer","minimum":0},"indices":{"type":["array","null"],"items":{"type":"integer","minimum":0}}}}},"propertyNames":{"type":"string"}},"BatchStats":{"type":"object","required":["totalNbTasks","status","types","indexUids"],"properties":{"totalNbTasks":{"$ref":"#/components/schemas/u32"},"status":{"type":"object","additionalProperties":{"type":"integer","format":"u-int32","minimum":0},"propertyNames":{"type":"string","description":"The status of a task.","enum":["enqueued","processing","succeeded","failed","canceled"],"example":"processing"}},"types":{"type":"object","additionalProperties":{"type":"integer","format":"u-int32","minimum":0},"propertyNames":{"type":"string","description":"The type of the task.","enum":["documentAdditionOrUpdate","documentEdition","documentDeletion","settingsUpdate","indexCreation","indexDeletion","indexUpdate","indexSwap","taskCancelation","taskDeletion","dumpCreation","snapshotCreation","export","upgradeDatabase"],"example":["documentAdditionOrUpdate","documentEdition","documentDeletion","settingsUpdate","indexCreation","indexDeletion","indexUpdate","indexSwap","taskCancelation","taskDeletion","dumpCreation","snapshotCreation","export","upgradeDatabase"]}},"indexUids":{"type":"object","additionalProperties":{"type":"integer","format":"u-int32","minimum":0},"propertyNames":{"type":"string"}},"progressTrace":{"type":"object","additionalProperties":{},"propertyNames":{"type":"string"}},"writeChannelCongestion":{"type":["object","null"],"additionalProperties":{},"propertyNames":{"type":"string"}},"internalDatabaseSizes":{"type":"object","additionalProperties":{},"propertyNames":{"type":"string"}}}},"BatchStatsView":{"allOf":[{"$ref":"#/components/schemas/BatchStats"},{"type":"object","properties":{"embedderRequests":{"$ref":"#/components/schemas/EmbedderStatsView"}}}]},"BatchView":{"type":"object","required":["uid","details","stats"],"properties":{"uid":{"$ref":"#/components/schemas/u32"},"progress":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProgressView"}]},"details":{"$ref":"#/components/schemas/DetailsView"},"stats":{"$ref":"#/components/schemas/BatchStatsView"},"duration":{"type":["string","null"]},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"type":["string","null"],"format":"date-time"},"batchStrategy":{"type":"string"}}},"BrowseQuery":{"type":"object","required":["offset","limit","retrieveVectors"],"properties":{"offset":{"type":"integer","example":150,"minimum":0},"limit":{"type":"integer","default":20,"example":1,"minimum":0},"fields":{"type":["array","null"],"items":{"type":"string"},"example":["title, description"]},"retrieveVectors":{"type":"boolean","example":true},"ids":{"type":["array","null"],"items":{"type":"string"},"example":["cody","finn","brandy","gambit"]},"filter":{},"sort":{"type":["array","null"],"items":{"type":"string"},"example":["title:asc","rating:desc"]}}},"ChatSearchParams":{"type":"object","properties":{"hybrid":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HybridQuery"}]},"limit":{"type":["integer","null"],"minimum":0},"sort":{"type":["array","null"],"items":{"type":"string"}},"distinct":{"type":["string","null"]},"matchingStrategy":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MatchingStrategy"}]},"attributesToSearchOn":{"type":["array","null"],"items":{"type":"string"}},"rankingScoreThreshold":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RankingScoreThreshold"}]}},"additionalProperties":false},"ChatSettings":{"type":"object","properties":{"description":{"type":["string","null"]},"documentTemplate":{"type":["string","null"],"description":"A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text."},"documentTemplateMaxBytes":{"type":["integer","null"],"description":"Rendered texts are truncated to this size. Defaults to 400.","minimum":0},"searchParameters":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ChatSearchParams","description":"The search parameters to use for the LLM."}]}},"additionalProperties":false},"Code":{"type":"string","enum":["api_key_already_exists","api_key_not_found","bad_parameter","bad_request","database_size_limit_reached","document_not_found","dump_already_processing","dump_not_found","dump_process_failed","duplicate_index_found","immutable_api_key_actions","immutable_api_key_created_at","immutable_api_key_expires_at","immutable_api_key_indexes","immutable_api_key_key","immutable_api_key_uid","immutable_api_key_updated_at","immutable_index_created_at","immutable_index_updated_at","index_already_exists","index_creation_failed","index_not_found","index_primary_key_already_exists","index_primary_key_multiple_candidates_found","index_primary_key_no_candidate_found","internal","invalid_api_key","invalid_api_key_actions","invalid_api_key_description","invalid_api_key_expires_at","invalid_api_key_indexes","invalid_api_key_limit","invalid_api_key_name","invalid_api_key_offset","invalid_api_key_uid","invalid_content_type","invalid_document_csv_delimiter","invalid_document_fields","invalid_document_retrieve_vectors","missing_document_filter","missing_document_edition_function","inconsistent_document_change_headers","invalid_document_filter","invalid_document_sort","invalid_document_geo_field","invalid_document_geojson_field","invalid_header_value","invalid_vector_dimensions","invalid_vectors_type","invalid_document_id","invalid_document_ids","invalid_document_limit","invalid_document_offset","invalid_search_embedder","invalid_similar_embedder","invalid_search_hybrid_query","invalid_index_limit","invalid_index_offset","invalid_index_primary_key","invalid_index_uid","invalid_multi_search_facets","invalid_multi_search_facets_by_index","invalid_multi_search_facet_order","invalid_multi_search_federated","invalid_multi_search_federation_options","invalid_multi_search_max_values_per_facet","invalid_multi_search_merge_facets","invalid_multi_search_query_facets","invalid_multi_search_query_pagination","invalid_multi_search_query_ranking_rules","invalid_multi_search_query_position","invalid_multi_search_remote","invalid_multi_search_weight","invalid_network_remotes","invalid_network_self","invalid_network_sharding","invalid_network_search_api_key","invalid_network_write_api_key","invalid_network_url","invalid_search_attributes_to_search_on","invalid_search_attributes_to_crop","invalid_search_attributes_to_highlight","invalid_similar_attributes_to_retrieve","invalid_similar_retrieve_vectors","invalid_search_attributes_to_retrieve","invalid_search_ranking_score_threshold","invalid_similar_ranking_score_threshold","invalid_search_retrieve_vectors","invalid_search_crop_length","invalid_search_crop_marker","invalid_search_facets","invalid_search_semantic_ratio","invalid_search_locales","invalid_facet_search_exhaustive_facet_count","invalid_facet_search_facet_name","invalid_similar_id","invalid_search_filter","invalid_similar_filter","invalid_search_highlight_post_tag","invalid_search_highlight_pre_tag","invalid_search_hits_per_page","invalid_similar_limit","invalid_search_limit","invalid_search_matching_strategy","invalid_similar_offset","invalid_search_offset","invalid_search_page","invalid_search_q","invalid_facet_search_query","invalid_facet_search_name","facet_search_disabled","invalid_search_vector","invalid_search_media","invalid_search_show_matches_position","invalid_search_show_ranking_score","invalid_similar_show_ranking_score","invalid_search_show_ranking_score_details","invalid_similar_show_ranking_score_details","invalid_search_sort","invalid_search_distinct","invalid_search_media_and_vector","invalid_settings_displayed_attributes","invalid_settings_distinct_attribute","invalid_settings_proximity_precision","invalid_settings_facet_search","invalid_settings_prefix_search","invalid_settings_faceting","invalid_settings_filterable_attributes","invalid_settings_pagination","invalid_settings_search_cutoff_ms","invalid_settings_embedders","invalid_settings_ranking_rules","invalid_settings_searchable_attributes","invalid_settings_sortable_attributes","invalid_settings_stop_words","invalid_settings_non_separator_tokens","invalid_settings_separator_tokens","invalid_settings_dictionary","invalid_settings_synonyms","invalid_settings_typo_tolerance","invalid_settings_localized_attributes","invalid_state","invalid_store_file","invalid_swap_duplicate_index_found","invalid_swap_indexes","invalid_swap_rename","invalid_task_after_enqueued_at","invalid_task_after_finished_at","invalid_task_after_started_at","invalid_task_before_enqueued_at","invalid_task_before_finished_at","invalid_task_before_started_at","invalid_task_canceled_by","invalid_task_from","invalid_task_limit","invalid_task_reverse","invalid_task_statuses","invalid_task_types","invalid_task_uids","invalid_batch_uids","io_error","feature_not_enabled","malformed_payload","max_fields_limit_exceeded","missing_api_key_actions","missing_api_key_expires_at","missing_api_key_indexes","missing_authorization_header","missing_content_type","missing_document_id","missing_facet_search_facet_name","missing_index_uid","missing_master_key","missing_network_url","missing_payload","missing_search_hybrid","missing_swap_indexes","missing_task_filters","no_space_left_on_device","payload_too_large","remote_bad_response","remote_bad_request","remote_could_not_send_request","remote_invalid_api_key","remote_remote_error","remote_timeout","too_many_search_requests","task_not_found","task_file_not_found","batch_not_found","too_many_open_files","too_many_vectors","unretrievable_document","unretrievable_error_code","unsupported_media_type","vector_embedding_error","not_found_similar_id","invalid_document_edition_context","invalid_document_edition_function_filter","edit_documents_by_function_error","invalid_settings_index_chat","invalid_settings_vector_store","invalid_export_url","invalid_export_api_key","invalid_export_payload_size","invalid_export_indexes_patterns","invalid_export_index_filter","invalid_export_index_override_settings","unimplemented_external_function_calling","unimplemented_non_streaming_chat_completions","unimplemented_multi_choice_chat_completions","chat_not_found","invalid_chat_setting_document_template","invalid_chat_completion_org_id","invalid_chat_completion_project_id","invalid_chat_completion_api_version","invalid_chat_completion_deployment_id","invalid_chat_completion_source","invalid_chat_completion_base_api","invalid_chat_completion_api_key","invalid_chat_completion_prompts","invalid_chat_completion_system_prompt","invalid_chat_completion_search_description_prompt","invalid_chat_completion_search_query_param_prompt","invalid_chat_completion_search_filter_param_prompt","invalid_chat_completion_search_index_uid_param_prompt","invalid_chat_completion_pre_query_prompt","invalid_webhooks","invalid_webhook_url","invalid_webhook_headers","immutable_webhook","invalid_webhook_uuid","webhook_not_found","immutable_webhook_uuid","immutable_webhook_is_editable"]},"ComputedFacets":{"type":"object","required":["distribution","stats"],"properties":{"distribution":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"integer","format":"u-int64","minimum":0},"propertyNames":{"type":"string"}},"propertyNames":{"type":"string"}},"stats":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FacetStats"},"propertyNames":{"type":"string"}}}},"CreateApiKey":{"type":"object","required":["uid","actions","indexes"],"properties":{"description":{"type":["string","null"],"description":"A description for the key. `null` if empty.","example":null},"name":{"type":["string","null"],"description":"A human-readable name for the key. `null` if empty.","example":"Indexing Products API key"},"uid":{"type":"string","format":"uuid","description":"A uuid v4 to identify the API Key. If not specified, it's generated by Meilisearch.","example":null},"actions":{"type":"array","items":{"$ref":"#/components/schemas/Action"},"description":"A list of actions permitted for the key. `[\"*\"]` for all actions. The `*` character can be used as a wildcard when located at the last position. e.g. `documents.*` to authorize access on all documents endpoints.","example":["documents.add"]},"indexes":{"type":"array","items":{"type":"string"},"description":"A list of accessible indexes permitted for the key. `[\"*\"]` for all indexes. The `*` character can be used as a wildcard when located at the last position. e.g. `products_*` to allow access to all indexes whose names start with `products_`.","example":["products"]},"expiresAt":{"type":["string","null"],"format":"date-time","description":"Represent the expiration date and time as RFC 3339 format. `null` equals to no expiration time."}}},"DetailsExportIndexSettings":{"allOf":[{"$ref":"#/components/schemas/ExportIndexSettings"},{"type":"object","properties":{"matchedDocuments":{"type":["integer","null"],"format":"u-int64","minimum":0}}}]},"DetailsView":{"allOf":[{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Settings_Unchecked","description":"[Learn more about the settings in this guide](https://www.meilisearch.com/docs/reference/api/settings)."}]},{"type":"object","properties":{"receivedDocuments":{"type":["integer","null"],"format":"u-int64","description":"Number of documents received for documentAdditionOrUpdate task.","minimum":0},"indexedDocuments":{"type":["integer","null"],"format":"u-int64","description":"Number of documents finally indexed for documentAdditionOrUpdate task or a documentAdditionOrUpdate batch of tasks.","minimum":0},"editedDocuments":{"type":["integer","null"],"format":"u-int64","description":"Number of documents edited for editDocumentByFunction task.","minimum":0},"primaryKey":{"type":["string","null"],"description":"Value for the primaryKey field encountered if any for indexCreation or indexUpdate task."},"providedIds":{"type":["integer","null"],"description":"Number of provided document ids for the documentDeletion task.","minimum":0},"deletedDocuments":{"type":["integer","null"],"format":"u-int64","description":"Number of documents finally deleted for documentDeletion and indexDeletion tasks.","minimum":0},"matchedTasks":{"type":["integer","null"],"format":"u-int64","description":"Number of tasks that match the request for taskCancelation or taskDeletion tasks.","minimum":0},"canceledTasks":{"type":["integer","null"],"format":"u-int64","description":"Number of tasks canceled for taskCancelation.","minimum":0},"deletedTasks":{"type":["integer","null"],"format":"u-int64","description":"Number of tasks deleted for taskDeletion.","minimum":0},"originalFilter":{"type":["string","null"],"description":"Original filter query for taskCancelation or taskDeletion tasks."},"dumpUid":{"type":["string","null"],"description":"Identifier generated for the dump for dumpCreation task."},"context":{"type":["object","null"]},"function":{"type":["string","null"]},"swaps":{"type":["array","null"],"items":{"$ref":"#/components/schemas/IndexSwap"}},"upgradeFrom":{"type":["string","null"]},"upgradeTo":{"type":["string","null"]},"url":{"type":["string","null"]},"apiKey":{"type":["string","null"]},"payloadSize":{"type":["string","null"]},"indexes":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/DetailsExportIndexSettings"},"propertyNames":{"type":"string"}},"oldIndexUid":{"type":["string","null"]},"newIndexUid":{"type":["string","null"]}}}]},"DistributionShift":{"type":"object","description":"Describes the mean and sigma of distribution of embedding similarity in the embedding space.\n\nThe intended use is to make the similarity score more comparable to the regular ranking score.\nThis allows to correct effects where results are too \"packed\" around a certain value.","required":["current_mean","current_sigma"],"properties":{"current_mean":{"type":"number","format":"float","description":"Value where the results are \"packed\".\n\nSimilarity scores are translated so that they are packed around 0.5 instead"},"current_sigma":{"type":"number","format":"float","description":"standard deviation of a similarity score.\n\nSet below 0.4 to make the results less packed around the mean, and above 0.4 to make them more packed."}}},"DocumentDeletionByFilter":{"type":"object","required":["filter"],"properties":{"filter":{}}},"DocumentEditionByFunction":{"type":"object","required":["function"],"properties":{"filter":{"description":"A string containing a RHAI function."},"context":{"description":"A string containing a filter expression."},"function":{"type":"string","description":"An object with data Meilisearch should make available for the editing function."}}},"EmbedderSource":{"type":"string","enum":["openAi","huggingFace","ollama","userProvided","rest","composite"]},"EmbedderStatsView":{"type":"object","required":["total","failed"],"properties":{"total":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"lastError":{"type":["string","null"]}}},"ErrorType":{"type":"string","enum":["internal","invalid_request","auth","system"]},"Export":{"type":"object","properties":{"url":{"type":["string","null"],"example":"https://ms-1234.heaven.meilisearch.com"},"apiKey":{"type":["string","null"],"example":"1234abcd"},"payloadSize":{"type":["string","null"],"example":"24MiB"},"indexes":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/ExportIndexSettings"},"propertyNames":{"type":"string"},"example":{"*":{"filter":null}}}}},"ExportIndexSettings":{"type":"object","properties":{"filter":{"type":["string","null"],"example":"genres = action"},"overrideSettings":{"type":["boolean","null"],"example":true}}},"FacetSearchQuery":{"type":"object","required":["facet_name","matching_strategy"],"properties":{"facet_query":{"type":["string","null"]},"facet_name":{"type":"string"},"q":{"type":["string","null"]},"vector":{"type":["array","null"],"items":{"type":"number","format":"float"}},"media":{},"hybrid":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HybridQuery"}]},"filter":{},"matching_strategy":{"$ref":"#/components/schemas/MatchingStrategy"},"attributes_to_search_on":{"type":["array","null"],"items":{"type":"string"}},"ranking_score_threshold":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RankingScoreThreshold"}]},"locales":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Locale"}},"exhaustive_facet_count":{"type":["boolean","null"]}}},"FacetStats":{"type":"object","required":["min","max"],"properties":{"min":{"type":"number","format":"double"},"max":{"type":"number","format":"double"}}},"FacetValuesSort":{"type":"string","enum":["alpha","count"]},"FacetingSettings":{"type":"object","properties":{"maxValuesPerFacet":{"type":["integer","null"],"example":10,"minimum":0},"sortFacetValuesBy":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/FacetValuesSort"},"propertyNames":{"type":"string"},"example":{"genre":"count"}}},"additionalProperties":false},"FederatedFacets":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ComputedFacets"},"propertyNames":{"type":"string"}},"FederatedSearch":{"type":"object","required":["queries"],"properties":{"queries":{"type":"array","items":{"$ref":"#/components/schemas/SearchQueryWithIndex"}},"federation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Federation"}]}}},"FederatedSearchResult":{"allOf":[{"$ref":"#/components/schemas/HitsInfo"},{"type":"object","required":["hits","processingTimeMs"],"properties":{"hits":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"}},"processingTimeMs":{"type":"integer","minimum":0},"queryVectors":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/Vec"},"propertyNames":{"type":"integer","minimum":0}},"semanticHitCount":{"type":["integer","null"],"format":"u-int32","minimum":0},"facetDistribution":{"type":["object","null"],"additionalProperties":{"type":"object","additionalProperties":{"type":"integer","format":"u-int64","minimum":0},"propertyNames":{"type":"string"}},"propertyNames":{"type":"string"}},"facetStats":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/FacetStats"},"propertyNames":{"type":"string"}},"facetsByIndex":{"$ref":"#/components/schemas/FederatedFacets"},"requestUid":{"type":["string","null"],"format":"uuid"},"remoteErrors":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/ResponseError"},"propertyNames":{"type":"string"}}}}]},"Federation":{"type":"object","required":["limit","offset","facetsByIndex"],"properties":{"limit":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0},"facetsByIndex":{"type":"object","additionalProperties":{"type":["array","null"],"items":{"type":"string"}},"propertyNames":{"type":"string","description":"An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long","example":"movies"}},"mergeFacets":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MergeFacets"}]}}},"FederationOptions":{"type":"object","required":["weight"],"properties":{"weight":{"type":"number","format":"double"},"remote":{"type":["string","null"]},"queryPosition":{"type":["integer","null"],"minimum":0}}},"FilterFeatures":{"type":"object","properties":{"equality":{"type":"boolean"},"comparison":{"type":"boolean"}},"additionalProperties":false},"FilterableAttributesFeatures":{"type":"object","properties":{"facetSearch":{"type":"boolean"},"filter":{"$ref":"#/components/schemas/FilterFeatures"}},"additionalProperties":false},"FilterableAttributesPatterns":{"type":"object","required":["attributePatterns"],"properties":{"attributePatterns":{"$ref":"#/components/schemas/AttributePatterns"},"features":{"$ref":"#/components/schemas/FilterableAttributesFeatures"}},"additionalProperties":false},"FilterableAttributesRule":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/FilterableAttributesPatterns"}]},"GetLogs":{"type":"object","required":["target","mode","profileMemory"],"properties":{"target":{"type":"string","description":"Lets you specify which parts of the code you want to inspect and is formatted like that: code_part=log_level,code_part=log_level\n- If the `code_part` is missing, then the `log_level` will be applied to everything.\n- If the `log_level` is missing, then the `code_part` will be selected in `info` log level.","default":"info","example":"milli=trace,index_scheduler,actix_web=off"},"mode":{"oneOf":[{"$ref":"#/components/schemas/LogMode","description":"Lets you customize the format of the logs."}],"default":"Human"},"profileMemory":{"type":"boolean","description":"A boolean to indicate if you want to profile the memory as well. This is only useful while using the `profile` mode.\nBe cautious, though; it slows down the engine a lot.","default":false}}},"HealthResponse":{"type":"object","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/HealthStatus","description":"The status of the instance."}}},"HealthStatus":{"type":"string","enum":["available"]},"HitsInfo":{"oneOf":[{"type":"object","required":["hitsPerPage","page","totalPages","totalHits"],"properties":{"hitsPerPage":{"type":"integer","minimum":0},"page":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"totalHits":{"type":"integer","minimum":0}}},{"type":"object","required":["limit","offset","estimatedTotalHits"],"properties":{"limit":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0},"estimatedTotalHits":{"type":"integer","minimum":0}}}]},"HybridQuery":{"type":"object","required":["embedder"],"properties":{"semanticRatio":{"type":"number","format":"float"},"embedder":{"type":"string"}}},"IndexCreateRequest":{"type":"object","required":["uid"],"properties":{"uid":{"$ref":"#/components/schemas/IndexUid","description":"The name of the index"},"primaryKey":{"type":["string","null"],"description":"The primary key of the index","example":"id"}}},"IndexStats":{"type":"object","description":"Stats of an `Index`, as known to the `stats` route.","required":["numberOfDocuments","rawDocumentDbSize","avgDocumentSize","isIndexing","fieldDistribution"],"properties":{"numberOfDocuments":{"type":"integer","format":"u-int64","description":"Number of documents in the index","minimum":0},"rawDocumentDbSize":{"type":"integer","format":"u-int64","description":"Size of the documents database, in bytes.","minimum":0},"avgDocumentSize":{"type":"integer","format":"u-int64","description":"Average size of a document in the documents database.","minimum":0},"isIndexing":{"type":"boolean","description":"Whether or not the index is currently ingesting document"},"numberOfEmbeddings":{"type":["integer","null"],"format":"u-int64","description":"Number of embeddings in the index","minimum":0},"numberOfEmbeddedDocuments":{"type":["integer","null"],"format":"u-int64","description":"Number of embedded documents in the index","minimum":0},"fieldDistribution":{"type":"object","description":"Association of every field name with the number of times it occurs in the documents.","additionalProperties":{"type":"integer","format":"u-int64","minimum":0},"propertyNames":{"type":"string"}}}},"IndexSwap":{"type":"object","required":["indexes"],"properties":{"indexes":{"type":"array","items":false,"prefixItems":[{"type":"string"},{"type":"string"}]},"rename":{"type":"boolean"}}},"IndexUid":{"type":"string","description":"An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long","example":"movies"},"IndexView":{"type":"object","required":["uid","createdAt","updatedAt"],"properties":{"uid":{"type":"string","description":"Unique identifier for the index"},"createdAt":{"type":"string","format":"date-time","description":"An `RFC 3339` format for date/time/duration."},"updatedAt":{"type":"string","format":"date-time","description":"An `RFC 3339` format for date/time/duration."},"primaryKey":{"type":["string","null"],"description":"Custom primaryKey for documents"}}},"KeyView":{"type":"object","required":["key","uid","actions","indexes","createdAt","updatedAt"],"properties":{"name":{"type":["string","null"],"description":"The name of the API Key if any"},"description":{"type":["string","null"],"description":"The description of the API Key if any"},"key":{"type":"string","description":"The actual API Key you can send to Meilisearch"},"uid":{"type":"string","format":"uuid","description":"The `Uuid` specified while creating the key or autogenerated by Meilisearch."},"actions":{"type":"array","items":{"$ref":"#/components/schemas/Action"},"description":"The actions accessible with this key."},"indexes":{"type":"array","items":{"type":"string"},"description":"The indexes accessible with this key."},"expiresAt":{"type":["string","null"],"format":"date-time","description":"The expiration date of the key. Once this timestamp is exceeded the key is not deleted but cannot be used anymore."},"createdAt":{"type":"string","format":"date-time","description":"The date of creation of this API Key.","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"The date of the last update made on this key.","readOnly":true}}},"Kind":{"type":"string","description":"The type of the task.","enum":["documentAdditionOrUpdate","documentEdition","documentDeletion","settingsUpdate","indexCreation","indexDeletion","indexUpdate","indexSwap","taskCancelation","taskDeletion","dumpCreation","snapshotCreation","export","upgradeDatabase"],"example":["documentAdditionOrUpdate","documentEdition","documentDeletion","settingsUpdate","indexCreation","indexDeletion","indexUpdate","indexSwap","taskCancelation","taskDeletion","dumpCreation","snapshotCreation","export","upgradeDatabase"]},"Locale":{"type":"string","enum":["af","ak","am","ar","az","be","bn","bg","ca","cs","da","de","el","en","eo","et","fi","fr","gu","he","hi","hr","hu","hy","id","it","jv","ja","kn","ka","km","ko","la","lv","lt","ml","mr","mk","my","ne","nl","nb","or","pa","fa","pl","pt","ro","ru","si","sk","sl","sn","es","sr","sv","ta","te","tl","th","tk","tr","uk","ur","uz","vi","yi","zh","zu","afr","aka","amh","ara","aze","bel","ben","bul","cat","ces","dan","deu","ell","eng","epo","est","fin","fra","guj","heb","hin","hrv","hun","hye","ind","ita","jav","jpn","kan","kat","khm","kor","lat","lav","lit","mal","mar","mkd","mya","nep","nld","nob","ori","pan","pes","pol","por","ron","rus","sin","slk","slv","sna","spa","srp","swe","tam","tel","tgl","tha","tuk","tur","ukr","urd","uzb","vie","yid","zho","zul","cmn"]},"LocalizedAttributesRuleView":{"type":"object","required":["attributePatterns","locales"],"properties":{"attributePatterns":{"$ref":"#/components/schemas/AttributePatterns"},"locales":{"type":"array","items":{"$ref":"#/components/schemas/Locale"}}}},"LogMode":{"type":"string","enum":["human","json","profile"]},"MatchingStrategy":{"type":"string","description":"This is unfortunately a duplication of the struct in .\nThe reason why it is duplicated is because milli cannot depend on meilisearch. It would be cyclic imports.","enum":["last","all","frequency"]},"MergeFacets":{"type":"object","properties":{"maxValuesPerFacet":{"type":["integer","null"],"minimum":0}}},"MinWordSizeTyposSetting":{"type":"object","properties":{"oneTypo":{"type":["integer","null"],"format":"u-int8","example":5,"minimum":0},"twoTypos":{"type":["integer","null"],"format":"u-int8","example":9,"minimum":0}},"additionalProperties":false},"Network":{"type":"object","properties":{"remotes":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/Remote"},"propertyNames":{"type":"string"},"example":"http://localhost:7700"},"self":{"type":["string","null"],"example":"ms-00"},"sharding":{"type":["boolean","null"],"example":true}}},"Origin":{"type":"object","required":["remoteName","taskUid"],"properties":{"remoteName":{"type":"string"},"taskUid":{"type":"integer","minimum":0}}},"OverridePooling":{"type":"string","enum":["useModel","forceCls","forceMean"]},"PaginationSettings":{"type":"object","properties":{"maxTotalHits":{"type":["integer","null"],"example":250,"minimum":0}},"additionalProperties":false},"PaginationView_IndexView":{"type":"object","required":["results","offset","limit","total"],"properties":{"results":{"type":"array","items":{"type":"object","required":["uid","createdAt","updatedAt"],"properties":{"uid":{"type":"string","description":"Unique identifier for the index"},"createdAt":{"type":"string","format":"date-time","description":"An `RFC 3339` format for date/time/duration."},"updatedAt":{"type":"string","format":"date-time","description":"An `RFC 3339` format for date/time/duration."},"primaryKey":{"type":["string","null"],"description":"Custom primaryKey for documents"}}}},"offset":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}}},"PaginationView_KeyView":{"type":"object","required":["results","offset","limit","total"],"properties":{"results":{"type":"array","items":{"type":"object","required":["key","uid","actions","indexes","createdAt","updatedAt"],"properties":{"name":{"type":["string","null"],"description":"The name of the API Key if any"},"description":{"type":["string","null"],"description":"The description of the API Key if any"},"key":{"type":"string","description":"The actual API Key you can send to Meilisearch"},"uid":{"type":"string","format":"uuid","description":"The `Uuid` specified while creating the key or autogenerated by Meilisearch."},"actions":{"type":"array","items":{"$ref":"#/components/schemas/Action"},"description":"The actions accessible with this key."},"indexes":{"type":"array","items":{"type":"string"},"description":"The indexes accessible with this key."},"expiresAt":{"type":["string","null"],"format":"date-time","description":"The expiration date of the key. Once this timestamp is exceeded the key is not deleted but cannot be used anymore."},"createdAt":{"type":"string","format":"date-time","description":"The date of creation of this API Key.","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"The date of the last update made on this key.","readOnly":true}}}},"offset":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}}},"PaginationView_Value":{"type":"object","required":["results","offset","limit","total"],"properties":{"results":{"type":"array","items":{}},"offset":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}}},"PatchApiKey":{"type":"object","properties":{"description":{"type":["string","null"],"example":"This key is used to update documents in the products index"},"name":{"type":["string","null"],"example":"Indexing Products API key"}}},"PrefixSearchSettings":{"type":"string","enum":["indexingTime","disabled"]},"ProgressStepView":{"type":"object","required":["currentStep","finished","total"],"properties":{"currentStep":{"type":"string"},"finished":{"type":"integer","format":"u-int32","minimum":0},"total":{"type":"integer","format":"u-int32","minimum":0}}},"ProgressView":{"type":"object","required":["steps","percentage"],"properties":{"steps":{"type":"array","items":{"$ref":"#/components/schemas/ProgressStepView"}},"percentage":{"type":"number","format":"float"}}},"ProximityPrecisionView":{"type":"string","enum":["byWord","byAttribute"]},"RankingRuleView":{"oneOf":[{"type":"string","description":"Sorted by decreasing number of matched query terms.\nQuery words at the front of an attribute is considered better than if it was at the back.","enum":["Words"]},{"type":"string","description":"Sorted by increasing number of typos.","enum":["Typo"]},{"type":"string","description":"Sorted by increasing distance between matched query terms.","enum":["Proximity"]},{"type":"string","description":"Documents with quey words contained in more important\nattributes are considered better.","enum":["Attribute"]},{"type":"string","description":"Dynamically sort at query time the documents. None, one or multiple Asc/Desc sortable\nattributes can be used in place of this criterion at query time.","enum":["Sort"]},{"type":"string","description":"Sorted by the similarity of the matched words with the query words.","enum":["Exactness"]},{"type":"object","description":"Sorted by the increasing value of the field specified.","required":["Asc"],"properties":{"Asc":{"type":"string","description":"Sorted by the increasing value of the field specified."}}},{"type":"object","description":"Sorted by the decreasing value of the field specified.","required":["Desc"],"properties":{"Desc":{"type":"string","description":"Sorted by the decreasing value of the field specified."}}}]},"RankingScoreThreshold":{"type":"number","format":"double"},"Remote":{"type":"object","properties":{"url":{"type":["string","null"],"example":{"ms-0":{"url":"http://localhost:7700","searchApiKey":null,"writeApiKey":null},"ms-1":{"url":"http://localhost:7701","searchApiKey":"foo","writeApiKey":"bar"},"ms-2":{"url":"http://localhost:7702","searchApiKey":"bar","writeApiKey":"foo"}}},"searchApiKey":{"type":["string","null"],"example":"XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU"},"writeApiKey":{"type":["string","null"],"example":"XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU"}}},"RemoteTask":{"type":"object","properties":{"taskUid":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/u32"}]},"error":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ResponseError"}]}}},"ResponseError":{"type":"object","required":["message","code","type","link"],"properties":{"message":{"type":"string","description":"The error message."},"code":{"$ref":"#/components/schemas/Code","description":"The error code."},"type":{"$ref":"#/components/schemas/ErrorType","description":"The error type."},"link":{"type":"string","description":"A link to the documentation about this specific error."}}},"RuntimeTogglableFeatures":{"type":"object","properties":{"metrics":{"type":["boolean","null"]},"logsRoute":{"type":["boolean","null"]},"editDocumentsByFunction":{"type":["boolean","null"]},"containsFilter":{"type":["boolean","null"]},"network":{"type":["boolean","null"]},"getTaskDocumentsRoute":{"type":["boolean","null"]},"compositeEmbedders":{"type":["boolean","null"]},"chatCompletions":{"type":["boolean","null"]},"multimodal":{"type":["boolean","null"]},"vectorStoreSetting":{"type":["boolean","null"]}}},"SearchHit":{"type":"object","properties":{"_formatted":{"type":"object","additionalProperties":true},"_matchesPosition":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BTreeMap"}]},"_rankingScore":{"type":["number","null"],"format":"double"},"_rankingScoreDetails":{"type":["object","null"],"additionalProperties":{},"propertyNames":{"type":"string"}}},"additionalProperties":{}},"SearchQuery":{"type":"object","required":["offset","limit","retrieve_vectors","crop_length","show_matches_position","show_ranking_score","show_ranking_score_details","highlight_pre_tag","highlight_post_tag","crop_marker","matching_strategy"],"properties":{"q":{"type":["string","null"]},"vector":{"type":["array","null"],"items":{"type":"number","format":"float"}},"media":{},"hybrid":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HybridQuery"}]},"offset":{"type":"integer","default":0,"minimum":0},"limit":{"type":"integer","default":20,"minimum":0},"page":{"type":["integer","null"],"minimum":0},"hits_per_page":{"type":["integer","null"],"minimum":0},"attributes_to_retrieve":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"retrieve_vectors":{"type":"boolean"},"attributes_to_crop":{"type":["array","null"],"items":{"type":"string"}},"crop_length":{"type":"integer","default":10,"minimum":0},"attributes_to_highlight":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"show_matches_position":{"type":"boolean"},"show_ranking_score":{"type":"boolean"},"show_ranking_score_details":{"type":"boolean"},"filter":{},"sort":{"type":["array","null"],"items":{"type":"string"}},"distinct":{"type":["string","null"]},"facets":{"type":["array","null"],"items":{"type":"string"}},"highlight_pre_tag":{"type":"string","default":""},"highlight_post_tag":{"type":"string","default":""},"crop_marker":{"type":"string","default":"…"},"matching_strategy":{"$ref":"#/components/schemas/MatchingStrategy"},"attributes_to_search_on":{"type":["array","null"],"items":{"type":"string"}},"ranking_score_threshold":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RankingScoreThreshold"}]},"locales":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Locale"}}}},"SearchQueryWithIndex":{"type":"object","description":"A `SearchQuery` + an index UID and optional FederationOptions.","required":["indexUid","retrieveVectors","cropLength","showRankingScore","showRankingScoreDetails","showMatchesPosition","highlightPreTag","highlightPostTag","cropMarker","matchingStrategy"],"properties":{"indexUid":{"$ref":"#/components/schemas/IndexUid"},"q":{"type":["string","null"]},"vector":{"type":["array","null"],"items":{"type":"number","format":"float"}},"media":{},"hybrid":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HybridQuery"}]},"offset":{"type":["integer","null"],"minimum":0},"limit":{"type":["integer","null"],"minimum":0},"page":{"type":["integer","null"],"minimum":0},"hitsPerPage":{"type":["integer","null"],"minimum":0},"attributesToRetrieve":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"retrieveVectors":{"type":"boolean"},"attributesToCrop":{"type":["array","null"],"items":{"type":"string"}},"cropLength":{"type":"integer","minimum":0},"attributesToHighlight":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"showRankingScore":{"type":"boolean"},"showRankingScoreDetails":{"type":"boolean"},"showMatchesPosition":{"type":"boolean"},"filter":{},"sort":{"type":["array","null"],"items":{"type":"string"}},"distinct":{"type":["string","null"]},"facets":{"type":["array","null"],"items":{"type":"string"}},"highlightPreTag":{"type":"string"},"highlightPostTag":{"type":"string"},"cropMarker":{"type":"string"},"matchingStrategy":{"$ref":"#/components/schemas/MatchingStrategy"},"attributesToSearchOn":{"type":["array","null"],"items":{"type":"string"}},"rankingScoreThreshold":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RankingScoreThreshold"}]},"locales":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Locale"}},"federationOptions":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FederationOptions"}]}}},"SearchResult":{"allOf":[{"$ref":"#/components/schemas/HitsInfo"},{"type":"object","required":["hits","query","processingTimeMs"],"properties":{"hits":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"}},"query":{"type":"string"},"queryVector":{"type":["array","null"],"items":{"type":"number","format":"float"}},"processingTimeMs":{"type":"integer","minimum":0},"facetDistribution":{"type":["object","null"],"additionalProperties":{},"propertyNames":{"type":"string"}},"facetStats":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/FacetStats"},"propertyNames":{"type":"string"}},"requestUid":{"type":["string","null"],"format":"uuid"},"semanticHitCount":{"type":["integer","null"],"format":"u-int32","minimum":0}}}]},"SearchResultWithIndex":{"allOf":[{"$ref":"#/components/schemas/SearchResult"},{"type":"object","required":["indexUid"],"properties":{"indexUid":{"type":"string"}}}]},"SearchResults":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/SearchResultWithIndex"}}}},"SettingEmbeddingSettings":{"type":"object","description":"\"Technical\" type that is required due to utoipa.\n\nWe did not find a way to implement [`utoipa::ToSchema`] for the [`Setting`] enum,\nbut most types can use the `value_type` macro parameter to workaround that issue.\n\nHowever that type is used in the settings route, including through the macro that auto-generate\nall the settings route, so we can't remap the `value_type`.","properties":{"inner":{"oneOf":[{"type":"null"},{"type":"object","properties":{"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EmbedderSource","description":"The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`"}]},"model":{"type":["string","null"],"description":"The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`"},"revision":{"type":["string","null"],"description":"The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`"},"pooling":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OverridePooling","description":"The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior."}]},"apiKey":{"type":["string","null"],"description":"The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings"},"dimensions":{"type":["string","null"],"description":"The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text."},"binaryQuantized":{"type":["boolean","null"],"description":"Whether to binary quantize the embeddings of this embedder.\n\nBinary quantized embeddings are smaller than regular embeddings, which improves\ndisk usage and retrieval speed, at the cost of relevancy.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🏗️ When set to `true`, embeddings are not regenerated, but they are binary quantized, which takes time.\n\n# Defaults\n\n- Defaults to `false`\n\n# Note\n\nAs binary quantization is a destructive operation, it is not possible to disable again this setting after\nfirst enabling it. If you are unsure of whether the performance-relevancy tradeoff is right for you,\nwe recommend to use this parameter on a test index first."},"documentTemplate":{"type":["boolean","null"],"description":"A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text."},"documentTemplateMaxBytes":{"type":["integer","null"],"description":"Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400","minimum":0},"url":{"type":["string","null"],"description":"URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated"},"indexingFragments":{"type":["object","null"],"description":"Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.","additionalProperties":{},"propertyNames":{"type":"string"}},"searchFragments":{"type":["object","null"],"description":"Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings","additionalProperties":{},"propertyNames":{"type":"string"}},"request":{"description":"Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings"},"response":{"description":"Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings"},"headers":{"type":["object","null"],"description":"Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"searchEmbedder":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SubEmbeddingSettings"}]},"indexingEmbedder":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SubEmbeddingSettings"}]},"distribution":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DistributionShift","description":"Affine transformation applied to the semantic score to make it more comparable to the ranking score.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings"}]}},"additionalProperties":false}]}}},"Settings_Checked":{"type":"object","description":"Holds all the settings for an index. `T` can either be `Checked` if they represents settings\nwhose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a\ncall to `check` will return a `Settings` from a `Settings`.","properties":{"displayedAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Fields displayed in the returned documents.","example":["id","title","description","url"]},"searchableAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Fields in which to search for matching query words sorted by order of importance.","example":["title","description"]},"filterableAttributes":{"type":["array","null"],"items":{"$ref":"#/components/schemas/FilterableAttributesRule"},"description":"Attributes to use for faceting and filtering. See [Filtering and Faceted Search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).","example":["release_date","genre"]},"sortableAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Attributes to use when sorting search results.","example":["release_date"]},"rankingRules":{"type":["array","null"],"items":{"type":"string"},"description":"List of ranking rules sorted by order of importance. The order is customizable.\n[A list of ordered built-in ranking rules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).","example":["words","typo","proximity","attribute","exactness"]},"stopWords":{"type":["array","null"],"items":{"type":"string"},"description":"List of words ignored when present in search queries.","example":["the","a","them","their"]},"nonSeparatorTokens":{"type":["array","null"],"items":{"type":"string"},"description":"List of characters not delimiting where one term begins and ends.","example":[" ","\n"]},"separatorTokens":{"type":["array","null"],"items":{"type":"string"},"description":"List of characters delimiting where one term begins and ends.","example":["S"]},"dictionary":{"type":["array","null"],"items":{"type":"string"},"description":"List of strings Meilisearch should parse as a single term.","example":["iPhone pro"]},"synonyms":{"type":["object","null"],"description":"List of associated words treated similarly. A word associated to an array of word as synonyms.","additionalProperties":{"type":"array","items":{"type":"string"}},"propertyNames":{"type":"string"},"example":{"he":["she","they","them"],"phone":["iPhone","android"]}},"distinctAttribute":{"type":["string","null"],"description":"Search returns documents with distinct (different) values of the given field.","example":"sku"},"proximityPrecision":{"type":["string","null"],"description":"Precision level when calculating the proximity ranking rule.","example":"byAttribute"},"typoTolerance":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TypoSettings","description":"Customize typo tolerance feature."}]},"faceting":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FacetingSettings","description":"Faceting settings."}]},"pagination":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PaginationSettings","description":"Pagination settings."}]},"embedders":{"type":["object","null"],"description":"Embedder required for performing semantic search queries.","additionalProperties":{"$ref":"#/components/schemas/SettingEmbeddingSettings"},"propertyNames":{"type":"string"}},"searchCutoffMs":{"type":["integer","null"],"format":"u-int64","description":"Maximum duration of a search query.","example":50,"minimum":0},"localizedAttributes":{"type":["array","null"],"items":{"$ref":"#/components/schemas/LocalizedAttributesRuleView"},"example":50},"facetSearch":{"type":["boolean","null"],"example":true},"prefixSearch":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrefixSearchSettings"}]},"chat":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ChatSettings","description":"Customize the chat prompting."}]},"vectorStore":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VectorStoreBackend"}]}},"additionalProperties":false},"Settings_Unchecked":{"type":"object","description":"Holds all the settings for an index. `T` can either be `Checked` if they represents settings\nwhose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a\ncall to `check` will return a `Settings` from a `Settings`.","properties":{"displayedAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Fields displayed in the returned documents.","example":["id","title","description","url"]},"searchableAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Fields in which to search for matching query words sorted by order of importance.","example":["title","description"]},"filterableAttributes":{"type":["array","null"],"items":{"$ref":"#/components/schemas/FilterableAttributesRule"},"description":"Attributes to use for faceting and filtering. See [Filtering and Faceted Search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).","example":["release_date","genre"]},"sortableAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Attributes to use when sorting search results.","example":["release_date"]},"rankingRules":{"type":["array","null"],"items":{"type":"string"},"description":"List of ranking rules sorted by order of importance. The order is customizable.\n[A list of ordered built-in ranking rules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).","example":["words","typo","proximity","attribute","exactness"]},"stopWords":{"type":["array","null"],"items":{"type":"string"},"description":"List of words ignored when present in search queries.","example":["the","a","them","their"]},"nonSeparatorTokens":{"type":["array","null"],"items":{"type":"string"},"description":"List of characters not delimiting where one term begins and ends.","example":[" ","\n"]},"separatorTokens":{"type":["array","null"],"items":{"type":"string"},"description":"List of characters delimiting where one term begins and ends.","example":["S"]},"dictionary":{"type":["array","null"],"items":{"type":"string"},"description":"List of strings Meilisearch should parse as a single term.","example":["iPhone pro"]},"synonyms":{"type":["object","null"],"description":"List of associated words treated similarly. A word associated to an array of word as synonyms.","additionalProperties":{"type":"array","items":{"type":"string"}},"propertyNames":{"type":"string"},"example":{"he":["she","they","them"],"phone":["iPhone","android"]}},"distinctAttribute":{"type":["string","null"],"description":"Search returns documents with distinct (different) values of the given field.","example":"sku"},"proximityPrecision":{"type":["string","null"],"description":"Precision level when calculating the proximity ranking rule.","example":"byAttribute"},"typoTolerance":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TypoSettings","description":"Customize typo tolerance feature."}]},"faceting":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FacetingSettings","description":"Faceting settings."}]},"pagination":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PaginationSettings","description":"Pagination settings."}]},"embedders":{"type":["object","null"],"description":"Embedder required for performing semantic search queries.","additionalProperties":{"$ref":"#/components/schemas/SettingEmbeddingSettings"},"propertyNames":{"type":"string"}},"searchCutoffMs":{"type":["integer","null"],"format":"u-int64","description":"Maximum duration of a search query.","example":50,"minimum":0},"localizedAttributes":{"type":["array","null"],"items":{"$ref":"#/components/schemas/LocalizedAttributesRuleView"},"example":50},"facetSearch":{"type":["boolean","null"],"example":true},"prefixSearch":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrefixSearchSettings"}]},"chat":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ChatSettings","description":"Customize the chat prompting."}]},"vectorStore":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VectorStoreBackend"}]}},"additionalProperties":false},"SimilarQuery":{"type":"object","required":["id","offset","limit","embedder","retrieve_vectors","show_ranking_score","show_ranking_score_details","ranking_score_threshold"],"properties":{"id":{"type":"string"},"offset":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"filter":{},"embedder":{"type":"string"},"attributes_to_retrieve":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"retrieve_vectors":{"type":"boolean"},"show_ranking_score":{"type":"boolean"},"show_ranking_score_details":{"type":"boolean"},"ranking_score_threshold":{"type":"number","format":"double"}}},"SimilarResult":{"allOf":[{"$ref":"#/components/schemas/HitsInfo"},{"type":"object","required":["hits","id","processingTimeMs"],"properties":{"hits":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"}},"id":{"type":"string"},"processingTimeMs":{"type":"integer","minimum":0}}}]},"Stats":{"type":"object","required":["databaseSize","usedDatabaseSize","indexes"],"properties":{"databaseSize":{"type":"integer","format":"u-int64","description":"The disk space used by the database, in bytes.","minimum":0},"usedDatabaseSize":{"type":"integer","format":"u-int64","description":"The size of the database, in bytes.","minimum":0},"lastUpdate":{"type":["string","null"],"format":"date-time","description":"The date of the last update in the RFC 3339 formats. Can be `null` if no update has ever been processed."},"indexes":{"type":"object","description":"The stats of every individual index your API key lets you access.","additionalProperties":{"$ref":"#/components/schemas/IndexStats"},"propertyNames":{"type":"string"}}}},"Status":{"type":"string","description":"The status of a task.","enum":["enqueued","processing","succeeded","failed","canceled"],"example":"processing"},"SubEmbeddingSettings":{"type":"object","properties":{"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EmbedderSource","description":"The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`"}]},"model":{"type":["string","null"],"description":"The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`"},"revision":{"type":["string","null"],"description":"The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`"},"pooling":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OverridePooling","description":"The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior."}]},"apiKey":{"type":["string","null"],"description":"The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings"},"dimensions":{"type":["string","null"],"description":"The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text."},"documentTemplate":{"type":["boolean","null"],"description":"A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text."},"documentTemplateMaxBytes":{"type":["integer","null"],"description":"Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400","minimum":0},"url":{"type":["string","null"],"description":"URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated"},"indexingFragments":{"type":["object","null"],"description":"Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.","additionalProperties":{},"propertyNames":{"type":"string"}},"searchFragments":{"type":["object","null"],"description":"Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings","additionalProperties":{},"propertyNames":{"type":"string"}},"request":{"description":"Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings"},"response":{"description":"Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings"},"headers":{"type":["object","null"],"description":"Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}}},"additionalProperties":false},"SummarizedTaskView":{"type":"object","required":["taskUid","status","type","enqueuedAt"],"properties":{"taskUid":{"type":"integer","format":"u-int32","description":"The task unique identifier.","minimum":0},"indexUid":{"type":["string","null"],"description":"The index affected by this task. May be `null` if the task is not linked to any index."},"status":{"$ref":"#/components/schemas/Status","description":"The status of the task."},"type":{"$ref":"#/components/schemas/Kind","description":"The type of the task."},"enqueuedAt":{"type":"string","format":"date-time","description":"The date on which the task was enqueued."}}},"SwapIndexesPayload":{"type":"object","required":["indexes","rename"],"properties":{"indexes":{"type":"array","items":{"$ref":"#/components/schemas/IndexUid"},"description":"Array of the two indexUids to be swapped"},"rename":{"type":"boolean","description":"If set to true, instead of swapping the left and right indexes it'll change the name of the first index to the second"}}},"TaskNetwork":{"oneOf":[{"type":"object","required":["origin"],"properties":{"origin":{"$ref":"#/components/schemas/Origin"}}},{"type":"object","required":["remote_tasks"],"properties":{"remote_tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/RemoteTask"},"propertyNames":{"type":"string"}}}}]},"TaskView":{"type":"object","required":["uid","status","type","enqueuedAt"],"properties":{"uid":{"type":"integer","format":"u-int32","description":"The unique sequential identifier of the task.","example":4312,"minimum":0},"batchUid":{"type":["integer","null"],"format":"u-int32","description":"The unique identifier of the index where this task is operated.","example":"movies","minimum":0},"indexUid":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/Status"},"type":{"$ref":"#/components/schemas/Kind","description":"The type of the task."},"canceledBy":{"type":["integer","null"],"format":"u-int32","description":"The uid of the task that performed the taskCancelation if the task has been canceled.","example":4326,"minimum":0},"details":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DetailsView"}]},"error":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ResponseError"}]},"duration":{"type":["string","null"],"description":"Total elasped time the engine was in processing state expressed as a `ISO-8601` duration format.","example":null},"enqueuedAt":{"type":"string","description":"An `RFC 3339` format for date/time/duration.","example":"2024-08-08_14:12:09.393Z"},"startedAt":{"type":"string","description":"An `RFC 3339` format for date/time/duration.","example":"2024-08-08_14:12:09.393Z"},"finishedAt":{"type":"string","description":"An `RFC 3339` format for date/time/duration.","example":"2024-08-08_14:12:09.393Z"},"network":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TaskNetwork"}]}}},"TypoSettings":{"type":"object","properties":{"enabled":{"type":["boolean","null"],"example":true},"minWordSizeForTypos":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MinWordSizeTyposSetting"}]},"disableOnWords":{"type":["array","null"],"items":{"type":"string"},"example":["iPhone","phone"],"uniqueItems":true},"disableOnAttributes":{"type":["array","null"],"items":{"type":"string"},"example":["uuid","url"],"uniqueItems":true},"disableOnNumbers":{"type":["boolean","null"],"example":true}},"additionalProperties":false},"Unchecked":{"default":null},"UpdateIndexRequest":{"type":"object","properties":{"primaryKey":{"type":["string","null"],"description":"The new primary key of the index"},"uid":{"type":["string","null"],"description":"The new uid of the index (for renaming)"}}},"UpdateStderrLogs":{"type":"object","required":["target"],"properties":{"target":{"type":"string","description":"Lets you specify which parts of the code you want to inspect and is formatted like that: code_part=log_level,code_part=log_level\n- If the `code_part` is missing, then the `log_level` will be applied to everything.\n- If the `log_level` is missing, then the `code_part` will be selected in `info` log level.","default":"info","example":"milli=trace,index_scheduler,actix_web=off"}}},"Vec":{"type":"array","items":{"type":"number","format":"float"}},"VectorStoreBackend":{"type":"string","enum":["stable","experimental"]},"VersionResponse":{"type":"object","required":["commitSha","commitDate","pkgVersion"],"properties":{"commitSha":{"type":"string","description":"The commit used to compile this build of Meilisearch."},"commitDate":{"type":"string","description":"The date of this build."},"pkgVersion":{"type":"string","description":"The version of Meilisearch."}}},"WebhookResults":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/WebhookWithMetadata"}}}},"WebhookSettings":{"type":"object","properties":{"url":{"type":["string","null"],"example":"https://your.site/on-tasks-completed"},"headers":{"type":["object","null"],"additionalProperties":{"type":"string"},"propertyNames":{"type":"string"},"example":{"Authorization":"Bearer a-secret-token"}}}},"WebhookWithMetadata":{"allOf":[{"$ref":"#/components/schemas/WebhookSettings"},{"type":"object","required":["uuid","isEditable"],"properties":{"uuid":{"type":"string","format":"uuid"},"isEditable":{"type":"boolean"}}}]},"u32":{"type":"integer","format":"u-int32","minimum":0}},"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"Uuidv4, string or JWT","description":"An API key is a token that you provide when making API calls. Include the token in a header parameter called `Authorization`.\nExample: `Authorization: Bearer 8fece4405662dd830e4cb265e7e047aab2e79672a760a12712d2a263c9003509`"}}},"tags":[{"name":"Stats","description":"Stats gives extended information and metrics about indexes and the Meilisearch database."},{"name":"Tasks","description":"The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html).","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/tasks","description":null}},{"name":"Batches","description":"The /batches route gives information about the progress of batches of asynchronous operations.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/batches","description":null}},{"name":"Indexes","description":"An index is an entity that gathers a set of [documents](https://www.meilisearch.com/docs/learn/getting_started/documents) with its own [settings](https://www.meilisearch.com/docs/reference/api/settings). Learn more about indexes.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/indexes","description":null}},{"name":"Documents","description":"Documents are objects composed of fields that can store any type of data. Each field contains an attribute and its associated value. Documents are stored inside [indexes](https://www.meilisearch.com/docs/learn/getting_started/indexes).","externalDocs":{"url":"https://www.meilisearch.com/docs/learn/getting_started/documents","description":null}},{"name":"Facet Search","description":"The `/facet-search` route allows you to search for facet values. Facet search supports prefix search and typo tolerance. The returned hits are sorted lexicographically in ascending order. You can configure how facets are sorted using the sortFacetValuesBy property of the faceting index settings.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/facet_search","description":null}},{"name":"Similar documents","description":"The /similar route uses AI-powered search to return a number of documents similar to a target document.\n\nMeilisearch exposes two routes for retrieving similar documents: POST and GET. In the majority of cases, POST will offer better performance and ease of use.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/similar","description":null}},{"name":"Settings","description":"Use the /settings route to customize search settings for a given index. You can either modify all index settings at once using the update settings endpoint, or use a child route to configure a single setting.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/settings","description":null}},{"name":"Search","description":"Meilisearch exposes two routes to perform searches:\n\n- A POST route: this is the preferred route when using API authentication, as it allows [preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) caching and better performance.\n- A GET route: the usage of this route is discouraged, unless you have good reason to do otherwise (specific caching abilities for example)","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/search","description":null}},{"name":"Snapshots","description":"The snapshots route allows the creation of database snapshots. Snapshots are .snapshot files that can be used to launch Meilisearch.\nCreating a snapshot is also referred to as exporting it, whereas launching Meilisearch with a snapshot is referred to as importing it.\nDuring a snapshot export, all indexes of the current instance are exported—together with their documents and settings—and saved as a single .snapshot file.\nDuring a snapshot import, all indexes contained in the indicated .snapshot file are imported along with their associated documents and settings.\nSnapshot imports are performed at launch using an option.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/snapshots","description":null}},{"name":"Dumps","description":"The `dumps` route allows the creation of database dumps.\nDumps are `.dump` files that can be used to launch Meilisearch. Dumps are compatible between Meilisearch versions.\nCreating a dump is also referred to as exporting it, whereas launching Meilisearch with a dump is referred to as importing it.\nDuring a [dump export](https://www.meilisearch.com/docs/reference/api/dump#create-a-dump), all indexes of the current instance are\nexported—together with their documents and settings—and saved as a single `.dump` file. During a dump import,\nall indexes contained in the indicated `.dump` file are imported along with their associated documents and settings.\nAny existing index with the same uid as an index in the dump file will be overwritten.\nDump imports are [performed at launch](https://www.meilisearch.com/docs/learn/advanced/dumps#importing-a-dump) using an option.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/dump","description":null}},{"name":"Keys","description":"Manage API `keys` for a Meilisearch instance. Each key has a given set of permissions.\nYou must have the master key or the default admin key to access the keys route. More information about the keys and their rights.\nAccessing any route under `/keys` without having set a master key will result in an error.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/keys","description":null}},{"name":"Logs","description":"Everything about retrieving or customizing logs.\nCurrently [experimental](https://www.meilisearch.com/docs/learn/experimental/overview).","externalDocs":{"url":"https://www.meilisearch.com/docs/learn/experimental/log_customization","description":null}},{"name":"Multi-search","description":"The `/multi-search` route allows you to perform multiple search queries on one or more indexes by bundling them into a single HTTP request. Multi-search is also known as federated search.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/multi_search","description":null}},{"name":"Experimental features","description":"The `/experimental-features` route allows you to activate or deactivate some of Meilisearch's experimental features.\n\nThis route is **synchronous**. This means that no task object will be returned, and any activated or deactivated features will be made available or unavailable immediately.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/experimental_features","description":null}},{"name":"Export","description":"The `/export` route allows you to trigger an export process to a remote Meilisearch instance.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/export","description":null}},{"name":"Network","description":"The `/network` route allows you to describe the topology of a network of Meilisearch instances.\n\nThis route is **synchronous**. This means that no task object will be returned, and any change to the network will be made available immediately.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/network","description":null}},{"name":"Webhooks","description":"The `/webhooks` route allows you to register endpoints to be called once tasks are processed.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/webhooks","description":null}}]} \ No newline at end of file diff --git a/openapi.json b/openapi.json new file mode 100644 index 000000000..5264b794a --- /dev/null +++ b/openapi.json @@ -0,0 +1,14907 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "meilisearch", + "description": "Meilisearch HTTP server", + "contact": { + "name": "Quentin de Quelen", + "email": "quentin@dequelen.me" + }, + "license": { + "name": "MIT", + "identifier": "MIT" + }, + "version": "1.22.2" + }, + "servers": [ + { + "url": "/", + "description": "Local server" + } + ], + "paths": { + "/dumps": { + "post": { + "tags": [ + "Dumps" + ], + "summary": "Create a dump", + "description": "Triggers a dump creation process. Once the process is complete, a dump is created in the\n[dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory).\nIf the dump directory does not exist yet, it will be created.", + "operationId": "create_dump", + "responses": { + "202": { + "description": "Dump is being created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 0, + "indexUid": null, + "status": "enqueued", + "type": "DumpCreation", + "enqueuedAt": "2021-01-01T09:39:00.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "dumps.create", + "dumps.*", + "*" + ] + } + ] + } + }, + "/batches": { + "get": { + "tags": [ + "Batches" + ], + "summary": "Get batches", + "description": "List all batches, regardless of index. The batch objects are contained in the results array.\nBatches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first.\nBatch results are paginated and can be filtered with query parameters.", + "operationId": "get_batches", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "Maximum number of results to return.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "default": 20, + "minimum": 0 + }, + "example": 12 + }, + { + "name": "from", + "in": "query", + "description": "Fetch the next set of results from the given uid.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "example": 12421 + }, + { + "name": "reverse", + "in": "query", + "description": "The order you want to retrieve the objects.", + "required": false, + "schema": { + "type": "boolean" + }, + "example": true + }, + { + "name": "batchUids", + "in": "query", + "description": "Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "example": 12421 + }, + { + "name": "uids", + "in": "query", + "description": "Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598, + "*" + ] + }, + { + "name": "canceledBy", + "in": "query", + "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 374, + "*" + ] + }, + { + "name": "types", + "in": "query", + "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "documentAdditionOrUpdate", + "*" + ] + }, + { + "name": "statuses", + "in": "query", + "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Status" + } + }, + "example": [ + "succeeded", + "failed", + "canceled", + "enqueued", + "processing", + "*" + ] + }, + { + "name": "indexUids", + "in": "query", + "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "movies", + "theater", + "*" + ] + }, + { + "name": "afterEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + } + ], + "responses": { + "200": { + "description": "Return the batches", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AllBatches" + }, + "example": { + "results": [ + { + "uid": 2, + "details": { + "stopWords": [ + "of", + "the" + ] + }, + "progress": null, + "stats": { + "totalNbTasks": 1, + "status": { + "succeeded": 1 + }, + "types": { + "settingsUpdate": 1 + }, + "indexUids": { + "INDEX_NAME": 1 + } + }, + "duration": "PT0.110083S", + "startedAt": "2024-12-10T15:49:04.995321Z", + "finishedAt": "2024-12-10T15:49:05.105404Z" + } + ], + "total": 3, + "limit": 1, + "from": 2, + "next": 1 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.get", + "tasks.*", + "*" + ] + } + ] + } + }, + "/batches/{batchUid}": { + "get": { + "tags": [ + "Batches" + ], + "summary": "Get one batch", + "description": "Get a single batch.", + "operationId": "get_batch", + "parameters": [ + { + "name": "batchUid", + "in": "path", + "description": "The unique batch id", + "required": true, + "schema": { + "type": "string" + }, + "example": "8685" + } + ], + "responses": { + "200": { + "description": "Return the batch", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchView" + }, + "example": { + "uid": 1, + "details": { + "receivedDocuments": 1, + "indexedDocuments": 1 + }, + "progress": null, + "stats": { + "totalNbTasks": 1, + "status": { + "succeeded": 1 + }, + "types": { + "documentAdditionOrUpdate": 1 + }, + "indexUids": { + "INDEX_NAME": 1 + } + }, + "duration": "PT0.364788S", + "startedAt": "2024-12-10T15:48:49.672141Z", + "finishedAt": "2024-12-10T15:48:50.036929Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.get", + "tasks.*", + "*" + ] + } + ] + } + }, + + "/experimental-features": { + "get": { + "tags": [ + "Experimental features" + ], + "summary": "Get all experimental features", + "description": "Get a list of all experimental features that can be activated via the /experimental-features route and whether or not they are currently activated.", + "operationId": "get_features", + "responses": { + "200": { + "description": "Experimental features are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuntimeTogglableFeatures" + }, + "example": { + "metrics": true, + "logsRoute": false, + "editDocumentsByFunction": false, + "containsFilter": false, + "network": false, + "getTaskDocumentsRoute": false, + "compositeEmbedders": false, + "chatCompletions": false, + "multimodal": false, + "vectorStoreSetting": false + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "experimental_features.get", + "experimental_features.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Experimental features" + ], + "summary": "Configure experimental features", + "description": "Activate or deactivate experimental features.", + "operationId": "patch_features", + "responses": { + "200": { + "description": "Experimental features are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuntimeTogglableFeatures" + }, + "example": { + "metrics": true, + "logsRoute": false, + "editDocumentsByFunction": false, + "containsFilter": false, + "network": false, + "getTaskDocumentsRoute": false, + "compositeEmbedders": false, + "chatCompletions": false, + "multimodal": false, + "vectorStoreSetting": false + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "experimental_features.update", + "experimental_features.*", + "*" + ] + } + ] + } + }, + "/export": { + "post": { + "tags": [ + "Export" + ], + "operationId": "export", + "responses": { + "202": { + "description": "Export successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 1, + "status": "enqueued", + "type": "export", + "enqueuedAt": "2021-08-11T09:25:53.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "export", + "*" + ] + } + ] + } + }, + "/health": { + "get": { + "tags": [ + "Health" + ], + "summary": "Get Health", + "description": "The health check endpoint enables you to periodically test the health of your Meilisearch instance.", + "operationId": "get_health", + "responses": { + "200": { + "description": "Instance is healthy", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HealthResponse" + }, + "example": { + "status": "available" + } + } + } + } + } + } + }, + "/indexes": { + "get": { + "tags": [ + "Indexes" + ], + "summary": "List indexes", + "description": "List all indexes.", + "operationId": "list_indexes", + "parameters": [ + { + "name": "offset", + "in": "query", + "description": "The number of indexes to skip before starting to retrieve anything", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "example": 100 + }, + { + "name": "limit", + "in": "query", + "description": "The number of indexes to retrieve", + "required": false, + "schema": { + "type": "integer", + "default": 20, + "minimum": 0 + }, + "example": 1 + } + ], + "responses": { + "200": { + "description": "Indexes are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationView_IndexView" + }, + "example": { + "results": [ + { + "uid": "movies", + "primaryKey": "movie_id", + "createdAt": "2019-11-20T09:40:33.711324Z", + "updatedAt": "2019-11-20T09:40:33.711324Z" + } + ], + "limit": 1, + "offset": 0, + "total": 1 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "indexes.get", + "indexes.*", + "*" + ] + } + ] + }, + "post": { + "tags": [ + "Indexes" + ], + "summary": "Create index", + "description": "Create an index.", + "operationId": "create_index", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IndexCreateRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "indexCreation", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "indexes.create", + "indexes.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}": { + "get": { + "tags": [ + "Indexes" + ], + "summary": "Get index", + "description": "Get information about an index.", + "operationId": "get_index", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "The index is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IndexView" + }, + "example": { + "uid": "movies", + "primaryKey": "movie_id", + "createdAt": "2019-11-20T09:40:33.711324Z", + "updatedAt": "2019-11-20T09:40:33.711324Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "indexes.get", + "indexes.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Indexes" + ], + "summary": "Delete index", + "description": "Delete an index.", + "operationId": "delete_index", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "202": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 0, + "indexUid": "movies", + "status": "enqueued", + "type": "indexDeletion", + "enqueuedAt": "2021-01-01T09:39:00.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "indexes.delete", + "indexes.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Indexes" + ], + "summary": "Update index", + "description": "Update the `primaryKey` of an index.\nReturn an error if the index doesn't exists yet or if it contains documents.", + "operationId": "update_index", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateIndexRequest" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 0, + "indexUid": "movies", + "status": "enqueued", + "type": "indexUpdate", + "enqueuedAt": "2021-01-01T09:39:00.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "indexes.update", + "indexes.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/delete-batch": { + "post": { + "tags": [ + "Documents" + ], + "summary": "Delete documents by batch", + "description": "Delete a set of documents based on an array of document ids.", + "operationId": "delete_documents_batch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": {} + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentAdditionOrUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.delete", + "documents.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/documents": { + "get": { + "tags": [ + "Documents" + ], + "summary": "Get documents", + "description": "Get documents by batches.", + "operationId": "get_documents", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "fields", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "retrieveVectors", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ids", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "example": "popularity > 1000" + }, + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationView_Value" + }, + "example": { + "results": [ + { + "id": 25684, + "title": "American Ninja 5", + "poster": "https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg", + "overview": "When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.", + "release_date": 725846400 + }, + { + "id": 45881, + "title": "The Bridge of San Luis Rey", + "poster": "https://image.tmdb.org/t/p/w500/4X7quIcdkc24Cveg5XdpfRqxtYA.jpg", + "overview": "The Bridge of San Luis Rey is American author Thornton Wilder's second novel, first published in 1927 to worldwide acclaim. It tells the story of several interrelated people who die in the collapse of an Inca rope-fiber suspension bridge in Peru, and the events that lead up to their being on the bridge.[ A friar who has witnessed the tragic accident then goes about inquiring into the lives of the victims, seeking some sort of cosmic answer to the question of why each had to die. The novel won the Pulitzer Prize in 1928.", + "release_date": 1072915200 + } + ], + "limit": 20, + "offset": 0, + "total": 2 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.get", + "documents.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Documents" + ], + "summary": "Add or update documents", + "description": "Add a list of documents or update them if they already exist.\nIf you send an already existing document (same id) the old document will be only partially updated according to the fields of the new document. Thus, any fields not present in the new document are kept and remained unchanged.\nTo completely overwrite a document, see Add or replace documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document. `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved `_vectors` field in your documents.\n> It can accept an array of floats, multiple arrays of floats in an outer array or an object.\n> This object accepts keys corresponding to the different embedders defined your index settings.", + "operationId": "update_documents", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "primaryKey", + "in": "query", + "description": "The primary key of the documents. primaryKey is optional. If you want to set the primary key of your index through this route,\nit only has to be done the first time you add documents to the index. After which it will be ignored if given.", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "csvDelimiter", + "in": "query", + "description": "Customize the csv delimiter when importing CSV documents.", + "required": true, + "schema": { + "type": "string", + "default": "," + }, + "example": ";" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentAdditionOrUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.add", + "documents.*", + "*" + ] + } + ] + }, + "post": { + "tags": [ + "Documents" + ], + "summary": "Add or replace documents", + "description": "Add a list of documents or replace them if they already exist.\n\nIf you send an already existing document (same id) the whole existing document will be overwritten by the new document. Fields previously in the document not present in the new document are removed.\n\nFor a partial update of the document see Add or update documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document. `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved `_vectors` field in your documents.\n> It can accept an array of floats, multiple arrays of floats in an outer array or an object.\n> This object accepts keys corresponding to the different embedders defined your index settings.", + "operationId": "replace_documents", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "primaryKey", + "in": "query", + "description": "The primary key of the documents. primaryKey is optional. If you want to set the primary key of your index through this route,\nit only has to be done the first time you add documents to the index. After which it will be ignored if given.", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "csvDelimiter", + "in": "query", + "description": "Customize the csv delimiter when importing CSV documents.", + "required": true, + "schema": { + "type": "string", + "default": "," + }, + "example": ";" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentAdditionOrUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.add", + "documents.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Documents" + ], + "summary": "Delete all documents", + "description": "Delete all documents in the specified index.", + "operationId": "clear_all_documents", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentDeletion", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.delete", + "documents.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/documents/delete": { + "post": { + "tags": [ + "Documents" + ], + "summary": "Delete documents by filter", + "description": "Delete a set of documents based on a filter.", + "operationId": "delete_documents_by_filter", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentDeletionByFilter" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentDeletion", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.delete", + "documents.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/documents/edit": { + "post": { + "tags": [ + "Documents" + ], + "summary": "Edit documents by function.", + "description": "Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to edit one or more documents directly in Meilisearch.", + "operationId": "edit_documents_by_function", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentEditionByFunction" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentDeletion", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/documents/fetch": { + "post": { + "tags": [ + "Documents" + ], + "summary": "Get documents with POST", + "description": "Get a set of documents.", + "operationId": "documents_by_query_post", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BrowseQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationView_Value" + }, + "example": { + "results": [ + { + "title": "The Travels of Ibn Battuta", + "genres": [ + "Travel", + "Adventure" + ], + "language": "English", + "rating": 4.5 + }, + { + "title": "Pride and Prejudice", + "genres": [ + "Classics", + "Fiction", + "Romance", + "Literature" + ], + "language": "English", + "rating": 4 + } + ], + "offset": 0, + "limit": 2, + "total": 5 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.delete", + "documents.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/documents/{documentId}": { + "get": { + "tags": [ + "Documents" + ], + "summary": "Get one document", + "description": "Get one document from its primary key.", + "operationId": "get_document", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "documentId", + "in": "path", + "description": "The document identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "85087" + }, + { + "name": "fields", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "retrieveVectors", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "The document is returned", + "content": { + "application/json": { + "schema": {}, + "example": { + "id": 25684, + "title": "American Ninja 5", + "poster": "https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg", + "overview": "When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.", + "release_date": 725846400 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Document not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Document `a` not found.", + "code": "document_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#document_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.get", + "documents.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Documents" + ], + "summary": "Delete a document", + "description": "Delete a single document by id.", + "operationId": "delete_document", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "documentId", + "in": "path", + "description": "Document Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "853" + } + ], + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentAdditionOrUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.delete", + "documents.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/facet-search": { + "post": { + "tags": [ + "Facet Search" + ], + "summary": "Perform a facet search", + "description": "Search for a facet value within a given facet.", + "operationId": "search", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacetSearchQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchResult" + }, + "example": { + "hits": [ + { + "id": 2770, + "title": "American Pie 2", + "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", + "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", + "release_date": 997405200 + }, + { + "id": 190859, + "title": "American Sniper", + "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", + "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", + "release_date": 1418256000 + } + ], + "offset": 0, + "limit": 2, + "estimatedTotalHits": 976, + "processingTimeMs": 35, + "query": "american " + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/search": { + "get": { + "tags": [ + "Indexes", + "Search" + ], + "summary": "Search an index with GET", + "description": "Search for documents matching a specific query in the given index.", + "operationId": "search_with_url_query", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "q", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "vector", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "explode": false + }, + { + "name": "offset", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "default": 20, + "minimum": 0 + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "hitsPerPage", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "attributesToRetrieve", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false + }, + { + "name": "retrieveVectors", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "attributesToCrop", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false + }, + { + "name": "cropLength", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "default": 10, + "minimum": 0 + } + }, + { + "name": "attributesToHighlight", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "distinct", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "showMatchesPosition", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "showRankingScore", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "showRankingScoreDetails", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "facets", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false + }, + { + "name": "highlightPreTag", + "in": "query", + "required": true, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "highlightPostTag", + "in": "query", + "required": true, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "cropMarker", + "in": "query", + "required": true, + "schema": { + "type": "string", + "default": "…" + } + }, + { + "name": "matchingStrategy", + "in": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/MatchingStrategy" + } + }, + { + "name": "attributesToSearchOn", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false + }, + { + "name": "hybridEmbedder", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "hybridSemanticRatio", + "in": "query", + "required": true, + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "rankingScoreThreshold", + "in": "query", + "required": true, + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "locales", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Locale" + } + }, + "explode": false + } + ], + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchResult" + }, + "example": { + "hits": [ + { + "id": 2770, + "title": "American Pie 2", + "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", + "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", + "release_date": 997405200 + }, + { + "id": 190859, + "title": "American Sniper", + "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", + "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", + "release_date": 1418256000 + } + ], + "offset": 0, + "limit": 2, + "estimatedTotalHits": 976, + "processingTimeMs": 35, + "query": "american " + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ] + }, + "post": { + "tags": [ + "Indexes", + "Search" + ], + "summary": "Search with POST", + "description": "Search for documents matching a specific query in the given index.", + "operationId": "search_with_post", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchResult" + }, + "example": { + "hits": [ + { + "id": 2770, + "title": "American Pie 2", + "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", + "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", + "release_date": 997405200 + }, + { + "id": 190859, + "title": "American Sniper", + "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", + "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", + "release_date": 1418256000 + } + ], + "offset": 0, + "limit": 2, + "estimatedTotalHits": 976, + "processingTimeMs": 35, + "query": "american " + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings": { + "get": { + "tags": [ + "Settings" + ], + "summary": "All settings", + "description": "This route allows you to retrieve, configure, or reset all of an index's settings at once.", + "operationId": "get_all", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "Settings are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Settings_Unchecked" + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset settings", + "description": "Reset all the settings of an index to their default value.", + "operationId": "delete_all", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update settings", + "description": "Update the settings of an index.\nPassing null to an index setting will reset it to its default value.\nUpdates in the settings route are partial. This means that any parameters not provided in the body will be left unchanged.\nIf the provided index does not exist, it will be created.", + "operationId": "update_all", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Settings_Unchecked" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/chat": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get chat", + "description": "Get an user defined chat", + "operationId": "getchat", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "chat is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChatSettings" + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset chat", + "description": "Reset an index's chat to its default value", + "operationId": "deletechat", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChatSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update chat", + "description": "Update an index's user defined chat", + "operationId": "patchchat", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChatSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/dictionary": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get dictionary", + "description": "Get an user defined dictionary", + "operationId": "getdictionary", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "dictionary is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update dictionary", + "description": "Update an index's user defined dictionary", + "operationId": "putdictionary", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset dictionary", + "description": "Reset an index's dictionary to its default value", + "operationId": "deletedictionary", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/displayed-attributes": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get displayedAttributes", + "description": "Get an user defined displayedAttributes", + "operationId": "getdisplayedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "displayedAttributes is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update displayedAttributes", + "description": "Update an index's user defined displayedAttributes", + "operationId": "putdisplayedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset displayedAttributes", + "description": "Reset an index's displayedAttributes to its default value", + "operationId": "deletedisplayedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/distinct-attribute": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get distinctAttribute", + "description": "Get an user defined distinctAttribute", + "operationId": "getdistinctAttribute", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "distinctAttribute is returned", + "content": { + "application/json": { + "schema": { + "type": "string" + }, + "example": "" + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update distinctAttribute", + "description": "Update an index's user defined distinctAttribute", + "operationId": "putdistinctAttribute", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset distinctAttribute", + "description": "Reset an index's distinctAttribute to its default value", + "operationId": "deletedistinctAttribute", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/embedders": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get embedders", + "description": "Get an user defined embedders", + "operationId": "getembedders", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "embedders is returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SettingEmbeddingSettings" + }, + "propertyNames": { + "type": "string" + } + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset embedders", + "description": "Reset an index's embedders to its default value", + "operationId": "deleteembedders", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SettingEmbeddingSettings" + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update embedders", + "description": "Update an index's user defined embedders", + "operationId": "patchembedders", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SettingEmbeddingSettings" + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/facet-search": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get facetSearch", + "description": "Get an user defined facetSearch", + "operationId": "getfacetSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "facetSearch is returned", + "content": { + "application/json": { + "schema": { + "type": "boolean" + }, + "example": false + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update facetSearch", + "description": "Update an index's user defined facetSearch", + "operationId": "putfacetSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "boolean" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset facetSearch", + "description": "Reset an index's facetSearch to its default value", + "operationId": "deletefacetSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "boolean" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/faceting": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get faceting", + "description": "Get an user defined faceting", + "operationId": "getfaceting", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "faceting is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacetingSettings" + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset faceting", + "description": "Reset an index's faceting to its default value", + "operationId": "deletefaceting", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacetingSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update faceting", + "description": "Update an index's user defined faceting", + "operationId": "patchfaceting", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacetingSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/filterable-attributes": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get filterableAttributes", + "description": "Get an user defined filterableAttributes", + "operationId": "getfilterableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "filterableAttributes is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FilterableAttributesRule" + } + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update filterableAttributes", + "description": "Update an index's user defined filterableAttributes", + "operationId": "putfilterableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FilterableAttributesRule" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset filterableAttributes", + "description": "Reset an index's filterableAttributes to its default value", + "operationId": "deletefilterableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FilterableAttributesRule" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/localized-attributes": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get localizedAttributes", + "description": "Get an user defined localizedAttributes", + "operationId": "getlocalizedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "localizedAttributes is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalizedAttributesRuleView" + } + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update localizedAttributes", + "description": "Update an index's user defined localizedAttributes", + "operationId": "putlocalizedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalizedAttributesRuleView" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset localizedAttributes", + "description": "Reset an index's localizedAttributes to its default value", + "operationId": "deletelocalizedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalizedAttributesRuleView" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/non-separator-tokens": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get nonSeparatorTokens", + "description": "Get an user defined nonSeparatorTokens", + "operationId": "getnonSeparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "nonSeparatorTokens is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update nonSeparatorTokens", + "description": "Update an index's user defined nonSeparatorTokens", + "operationId": "putnonSeparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset nonSeparatorTokens", + "description": "Reset an index's nonSeparatorTokens to its default value", + "operationId": "deletenonSeparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/pagination": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get pagination", + "description": "Get an user defined pagination", + "operationId": "getpagination", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "pagination is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationSettings" + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset pagination", + "description": "Reset an index's pagination to its default value", + "operationId": "deletepagination", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update pagination", + "description": "Update an index's user defined pagination", + "operationId": "patchpagination", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/prefix-search": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get prefixSearch", + "description": "Get an user defined prefixSearch", + "operationId": "getprefixSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "prefixSearch is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrefixSearchSettings" + }, + "example": "indexingTime" + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update prefixSearch", + "description": "Update an index's user defined prefixSearch", + "operationId": "putprefixSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrefixSearchSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset prefixSearch", + "description": "Reset an index's prefixSearch to its default value", + "operationId": "deleteprefixSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrefixSearchSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/proximity-precision": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get proximityPrecision", + "description": "Get an user defined proximityPrecision", + "operationId": "getproximityPrecision", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "proximityPrecision is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProximityPrecisionView" + }, + "example": "byWord" + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update proximityPrecision", + "description": "Update an index's user defined proximityPrecision", + "operationId": "putproximityPrecision", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProximityPrecisionView" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset proximityPrecision", + "description": "Reset an index's proximityPrecision to its default value", + "operationId": "deleteproximityPrecision", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProximityPrecisionView" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/ranking-rules": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get rankingRules", + "description": "Get an user defined rankingRules", + "operationId": "getrankingRules", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "rankingRules is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RankingRuleView" + } + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update rankingRules", + "description": "Update an index's user defined rankingRules", + "operationId": "putrankingRules", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RankingRuleView" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset rankingRules", + "description": "Reset an index's rankingRules to its default value", + "operationId": "deleterankingRules", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RankingRuleView" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/search-cutoff-ms": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get searchCutoffMs", + "description": "Get an user defined searchCutoffMs", + "operationId": "getsearchCutoffMs", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "searchCutoffMs is returned", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + }, + "example": 0 + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update searchCutoffMs", + "description": "Update an index's user defined searchCutoffMs", + "operationId": "putsearchCutoffMs", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset searchCutoffMs", + "description": "Reset an index's searchCutoffMs to its default value", + "operationId": "deletesearchCutoffMs", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/searchable-attributes": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get searchableAttributes", + "description": "Get an user defined searchableAttributes", + "operationId": "getsearchableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "searchableAttributes is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update searchableAttributes", + "description": "Update an index's user defined searchableAttributes", + "operationId": "putsearchableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset searchableAttributes", + "description": "Reset an index's searchableAttributes to its default value", + "operationId": "deletesearchableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/separator-tokens": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get separatorTokens", + "description": "Get an user defined separatorTokens", + "operationId": "getseparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "separatorTokens is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update separatorTokens", + "description": "Update an index's user defined separatorTokens", + "operationId": "putseparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset separatorTokens", + "description": "Reset an index's separatorTokens to its default value", + "operationId": "deleteseparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/sortable-attributes": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get sortableAttributes", + "description": "Get an user defined sortableAttributes", + "operationId": "getsortableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "sortableAttributes is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update sortableAttributes", + "description": "Update an index's user defined sortableAttributes", + "operationId": "putsortableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset sortableAttributes", + "description": "Reset an index's sortableAttributes to its default value", + "operationId": "deletesortableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/stop-words": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get stopWords", + "description": "Get an user defined stopWords", + "operationId": "getstopWords", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "stopWords is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update stopWords", + "description": "Update an index's user defined stopWords", + "operationId": "putstopWords", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset stopWords", + "description": "Reset an index's stopWords to its default value", + "operationId": "deletestopWords", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/synonyms": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get synonyms", + "description": "Get an user defined synonyms", + "operationId": "getsynonyms", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "synonyms is returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + } + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update synonyms", + "description": "Update an index's user defined synonyms", + "operationId": "putsynonyms", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset synonyms", + "description": "Reset an index's synonyms to its default value", + "operationId": "deletesynonyms", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/typo-tolerance": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get typoTolerance", + "description": "Get an user defined typoTolerance", + "operationId": "gettypoTolerance", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "typoTolerance is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TypoSettings" + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset typoTolerance", + "description": "Reset an index's typoTolerance to its default value", + "operationId": "deletetypoTolerance", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TypoSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update typoTolerance", + "description": "Update an index's user defined typoTolerance", + "operationId": "patchtypoTolerance", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TypoSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/vector-store": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get vectorStore", + "description": "Get an user defined vectorStore", + "operationId": "getvectorStore", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "vectorStore is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VectorStoreBackend" + }, + "example": "stable" + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset vectorStore", + "description": "Reset an index's vectorStore to its default value", + "operationId": "deletevectorStore", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VectorStoreBackend" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update vectorStore", + "description": "Update an index's user defined vectorStore", + "operationId": "patchvectorStore", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VectorStoreBackend" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/similar": { + "get": { + "tags": [ + "Similar documents" + ], + "summary": "Get similar documents with GET", + "description": "Retrieve documents similar to a specific search result.", + "operationId": "similar_get", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "id", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "offset", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "default": 20, + "minimum": 0 + } + }, + { + "name": "attributes_to_retrieve", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "retrieve_vectors", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "show_ranking_score", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "show_ranking_score_details", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "ranking_score_threshold", + "in": "query", + "required": false, + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "embedder", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimilarResult" + }, + "example": { + "hits": [ + { + "id": 2770, + "title": "American Pie 2", + "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", + "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", + "release_date": 997405200 + }, + { + "id": 190859, + "title": "American Sniper", + "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", + "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", + "release_date": 1418256000 + } + ], + "offset": 0, + "limit": 2, + "estimatedTotalHits": 976, + "processingTimeMs": 35, + "query": "american " + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ] + }, + "post": { + "tags": [ + "Similar documents" + ], + "summary": "Get similar documents with POST", + "description": "Retrieve documents similar to a specific search result.", + "operationId": "similar_post", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimilarQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimilarResult" + }, + "example": { + "hits": [ + { + "id": 2770, + "title": "American Pie 2", + "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", + "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", + "release_date": 997405200 + }, + { + "id": 190859, + "title": "American Sniper", + "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", + "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", + "release_date": 1418256000 + } + ], + "offset": 0, + "limit": 2, + "estimatedTotalHits": 976, + "processingTimeMs": 35, + "query": "american " + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/stats": { + "get": { + "tags": [ + "Stats" + ], + "summary": "Get stats of index", + "description": "Get the stats of an index.", + "operationId": "get_index_stats", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "The stats of the index", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IndexStats" + }, + "example": { + "numberOfDocuments": 10, + "rawDocumentDbSize": 10, + "avgDocumentSize": 10, + "numberOfEmbeddings": 10, + "numberOfEmbeddedDocuments": 10, + "isIndexing": true, + "fieldDistribution": { + "genre": 10, + "author": 9 + } + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "stats.get", + "stats.*", + "*" + ] + } + ] + } + }, + "/keys": { + "get": { + "tags": [ + "Keys" + ], + "summary": "Get API Keys", + "description": "List all API Keys", + "operationId": "list_api_keys", + "parameters": [ + { + "name": "offset", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "default": 20, + "minimum": 0 + } + } + ], + "responses": { + "202": { + "description": "List of keys", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationView_KeyView" + }, + "example": { + "results": [ + { + "uid": "01b4bc42-eb33-4041-b481-254d00cce834", + "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", + "name": "An API Key", + "actions": [ + "documents.add" + ], + "indexes": [ + "movies" + ], + "expiresAt": "2022-11-12T10:00:00Z", + "createdAt": "2021-11-12T10:00:00Z", + "updatedAt": "2021-11-12T10:00:00Z" + } + ], + "limit": 20, + "offset": 0, + "total": 1 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "keys.get", + "keys.*", + "*" + ] + } + ] + }, + "post": { + "tags": [ + "Keys" + ], + "summary": "Create an API Key", + "description": "Create an API Key.", + "operationId": "create_api_key", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateApiKey" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Key has been created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeyView" + }, + "example": { + "uid": "01b4bc42-eb33-4041-b481-254d00cce834", + "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", + "name": "Indexing Products API key", + "actions": [ + "documents.add" + ], + "indexes": [ + "products" + ], + "expiresAt": "2021-11-13T00:00:00Z", + "createdAt": "2021-11-12T10:00:00Z", + "updatedAt": "2021-11-12T10:00:00Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "keys.create", + "keys.*", + "*" + ] + } + ] + } + }, + "/keys/{uidOrKey}": { + "get": { + "tags": [ + "Keys" + ], + "summary": "Get an API Key", + "description": "Get an API key from its `uid` or its `key` field.", + "operationId": "get_api_key", + "parameters": [ + { + "name": "uidOrKey", + "in": "path", + "description": "The `uid` or `key` field of an existing API key", + "required": true, + "schema": { + "type": "string", + "format": "password" + }, + "example": "7b198a7f-52a0-4188-8762-9ad93cd608b2" + } + ], + "responses": { + "200": { + "description": "The key is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeyView" + }, + "example": { + "uid": "01b4bc42-eb33-4041-b481-254d00cce834", + "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", + "name": "An API Key", + "actions": [ + "documents.add" + ], + "indexes": [ + "movies" + ], + "expiresAt": "2022-11-12T10:00:00Z", + "createdAt": "2021-11-12T10:00:00Z", + "updatedAt": "2021-11-12T10:00:00Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "keys.get", + "keys.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Keys" + ], + "summary": "Delete a key", + "description": "Delete the specified API key.", + "operationId": "delete_api_key", + "parameters": [ + { + "name": "uidOrKey", + "in": "path", + "description": "The `uid` or `key` field of an existing API key", + "required": true, + "schema": { + "type": "string", + "format": "password" + }, + "example": "7b198a7f-52a0-4188-8762-9ad93cd608b2" + } + ], + "responses": { + "204": { + "description": "The key have been removed" + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "keys.delete", + "keys.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Keys" + ], + "summary": "Update a Key", + "description": "Update the name and description of an API key.\nUpdates to keys are partial. This means you should provide only the fields you intend to update, as any fields not present in the payload will remain unchanged.", + "operationId": "patch_api_key", + "parameters": [ + { + "name": "uidOrKey", + "in": "path", + "description": "The `uid` or `key` field of an existing API key", + "required": true, + "schema": { + "type": "string", + "format": "password" + }, + "example": "7b198a7f-52a0-4188-8762-9ad93cd608b2" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchApiKey" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "The key have been updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeyView" + }, + "example": { + "uid": "01b4bc42-eb33-4041-b481-254d00cce834", + "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", + "name": "An API Key", + "actions": [ + "documents.add" + ], + "indexes": [ + "movies" + ], + "expiresAt": "2022-11-12T10:00:00Z", + "createdAt": "2021-11-12T10:00:00Z", + "updatedAt": "2021-11-12T10:00:00Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "keys.update", + "keys.*", + "*" + ] + } + ] + } + }, + "/logs/stderr": { + "post": { + "tags": [ + "Logs" + ], + "summary": "Update target of the console logs", + "description": "This route lets you specify at runtime the level of the console logs outputted on stderr.", + "operationId": "update_stderr_target", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateStderrLogs" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "The console logs have been updated" + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "metrics.get", + "metrics.*", + "*" + ] + } + ] + } + }, + "/logs/stream": { + "post": { + "tags": [ + "Logs" + ], + "summary": "Retrieve logs", + "description": "Stream logs over HTTP. The format of the logs depends on the configuration specified in the payload.\nThe logs are sent as multi-part, and the stream never stops, so make sure your clients correctly handle that.\nTo make the server stop sending you logs, you can call the `DELETE /logs/stream` route.\n\nThere can only be one listener at a timeand an error will be returned if you call this route while it's being used by another client.", + "operationId": "get_logs", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetLogs" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Logs are being returned", + "content": { + "application/json": { + "schema": { + "type": "string" + }, + "example": "\n2024-10-08T13:35:02.643750Z WARN HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: tracing_actix_web::middleware: Error encountered while processing the incoming HTTP request: ResponseError { code: 400, message: \"Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625\", error_code: \"feature_not_enabled\", error_type: \"invalid_request\", error_link: \"https://docs.meilisearch.com/errors#feature_not_enabled\" }\n2024-10-08T13:35:02.644191Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: meilisearch: close time.busy=1.66ms time.idle=658µs\n2024-10-08T13:35:18.564152Z INFO HTTP request{method=PATCH host=\"localhost:7700\" route=/experimental-features query_parameters= user_agent=curl/8.6.0 status_code=200}: meilisearch: close time.busy=1.17ms time.idle=127µs\n2024-10-08T13:35:23.094987Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=200}: meilisearch: close time.busy=2.12ms time.idle=595µs\n" + } + } + }, + "400": { + "description": "The route is already being used", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The `/logs/stream` route is currently in use by someone else.", + "code": "bad_request", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#bad_request" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "metrics.get", + "metrics.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Logs" + ], + "summary": "Stop retrieving logs", + "description": "Call this route to make the engine stops sending logs through the `POST /logs/stream` route.", + "operationId": "cancel_logs", + "responses": { + "204": { + "description": "Logs are being returned" + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "metrics.get", + "metrics.*", + "*" + ] + } + ] + } + }, + "/metrics": { + "get": { + "tags": [ + "Stats" + ], + "summary": "Get prometheus metrics", + "description": "Retrieve metrics on the engine. See https://www.meilisearch.com/docs/learn/experimental/metrics\nCurrently, [the feature is experimental](https://www.meilisearch.com/docs/learn/experimental/overview)\nwhich means it must be enabled.", + "operationId": "get_metrics", + "responses": { + "200": { + "description": "The metrics of the instance", + "content": { + "text/plain": { + "schema": { + "type": "string" + }, + "example": "\n# HELP meilisearch_db_size_bytes Meilisearch DB Size In Bytes\n# TYPE meilisearch_db_size_bytes gauge\nmeilisearch_db_size_bytes 1130496\n# HELP meilisearch_http_requests_total Meilisearch HTTP requests total\n# TYPE meilisearch_http_requests_total counter\nmeilisearch_http_requests_total{method=\"GET\",path=\"/metrics\",status=\"400\"} 1\nmeilisearch_http_requests_total{method=\"PATCH\",path=\"/experimental-features\",status=\"200\"} 1\n# HELP meilisearch_http_response_time_seconds Meilisearch HTTP response times\n# TYPE meilisearch_http_response_time_seconds histogram\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.005\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.01\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.025\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.05\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.075\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.25\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.75\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"2.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"7.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"10\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"+Inf\"} 0\nmeilisearch_http_response_time_seconds_sum{method=\"GET\",path=\"/metrics\"} 0\nmeilisearch_http_response_time_seconds_count{method=\"GET\",path=\"/metrics\"} 0\n# HELP meilisearch_index_count Meilisearch Index Count\n# TYPE meilisearch_index_count gauge\nmeilisearch_index_count 1\n# HELP meilisearch_index_docs_count Meilisearch Index Docs Count\n# TYPE meilisearch_index_docs_count gauge\nmeilisearch_index_docs_count{index=\"mieli\"} 2\n# HELP meilisearch_is_indexing Meilisearch Is Indexing\n# TYPE meilisearch_is_indexing gauge\nmeilisearch_is_indexing 0\n# HELP meilisearch_last_update Meilisearch Last Update\n# TYPE meilisearch_last_update gauge\nmeilisearch_last_update 1726675964\n# HELP meilisearch_nb_tasks Meilisearch Number of tasks\n# TYPE meilisearch_nb_tasks gauge\nmeilisearch_nb_tasks{kind=\"indexes\",value=\"mieli\"} 39\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"canceled\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"enqueued\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"failed\"} 4\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"processing\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"succeeded\"} 35\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentAdditionOrUpdate\"} 9\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentDeletion\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentEdition\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"dumpCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexDeletion\"} 8\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexSwap\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexUpdate\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"settingsUpdate\"} 22\nmeilisearch_nb_tasks{kind=\"types\",value=\"snapshotCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskCancelation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskDeletion\"} 0\n# HELP meilisearch_used_db_size_bytes Meilisearch Used DB Size In Bytes\n# TYPE meilisearch_used_db_size_bytes gauge\nmeilisearch_used_db_size_bytes 409600\n" + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "metrics.get", + "metrics.*", + "*" + ] + } + ] + } + }, + "/multi-search": { + "post": { + "tags": [ + "Multi-search" + ], + "summary": "Perform a multi-search", + "description": "Bundle multiple search queries in a single API request. Use this endpoint to search through multiple indexes at once.", + "operationId": "multi_search_with_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FederatedSearch" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Federated multi-search", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FederatedSearchResult" + }, + "example": { + "hits": [ + { + "id": 42, + "title": "Batman returns", + "overview": "The overview of batman returns", + "_federation": { + "indexUid": "movies", + "queriesPosition": 0 + } + }, + { + "comicsId": "batman-killing-joke", + "description": "This comic is really awesome", + "title": "Batman: the killing joke", + "_federation": { + "indexUid": "comics", + "queriesPosition": 1 + } + } + ], + "processingTimeMs": 0, + "limit": 20, + "offset": 0, + "estimatedTotalHits": 2, + "semanticHitCount": 0 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ] + } + }, + "/network": { + "get": { + "tags": [ + "Network" + ], + "summary": "Get network topology", + "description": "Get a list of all Meilisearch instances currently known to this instance.", + "operationId": "get_network", + "responses": { + "200": { + "description": "Known nodes are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Network" + }, + "example": { + "self": "ms-0", + "remotes": { + "ms-0": { + "url": "http://localhost:7700", + "searchApiKey": null, + "writeApiKey": null + }, + "ms-1": { + "url": "http://localhost:7701", + "searchApiKey": "foo", + "writeApiKey": "bar" + }, + "ms-2": { + "url": "http://localhost:7702", + "searchApiKey": "bar", + "writeApiKey": "foo" + } + } + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "network.get", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Network" + ], + "summary": "Configure Network", + "description": "Add or remove nodes from network.", + "operationId": "patch_network", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Network" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "New network state is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Network" + }, + "example": { + "self": "ms-0", + "remotes": { + "ms-0": { + "url": "http://localhost:7700", + "searchApiKey": null, + "writeApiKey": null + }, + "ms-1": { + "url": "http://localhost:7701", + "searchApiKey": "foo", + "writeApiKey": "bar" + }, + "ms-2": { + "url": "http://localhost:7702", + "searchApiKey": "bar", + "writeApiKey": "foo" + } + } + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "network.update", + "*" + ] + } + ] + } + }, + "/snapshots": { + "post": { + "tags": [ + "Snapshots" + ], + "summary": "Create a snapshot", + "description": "Triggers a snapshot creation process. Once the process is complete, a snapshot is created in the snapshot directory. If the snapshot directory does not exist yet, it will be created.", + "operationId": "create_snapshot", + "responses": { + "202": { + "description": "Snapshot is being created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 0, + "indexUid": null, + "status": "enqueued", + "type": "snapshotCreation", + "enqueuedAt": "2021-01-01T09:39:00.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "snapshots.create", + "snapshots.*", + "*" + ] + } + ] + } + }, + "/stats": { + "get": { + "tags": [ + "Stats" + ], + "summary": "Get stats of all indexes.", + "description": "Get stats of all indexes.", + "operationId": "get_stats", + "responses": { + "200": { + "description": "The stats of the instance", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Stats" + }, + "example": { + "databaseSize": 567, + "usedDatabaseSize": 456, + "lastUpdate": "2019-11-20T09:40:33.711324Z", + "indexes": { + "movies": { + "numberOfDocuments": 10, + "rawDocumentDbSize": 100, + "maxDocumentSize": 16, + "avgDocumentSize": 10, + "isIndexing": true, + "fieldDistribution": { + "genre": 10, + "author": 9 + } + } + } + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "stats.get", + "stats.*", + "*" + ] + } + ] + } + }, + "/swap-indexes": { + "post": { + "tags": [ + "Indexes" + ], + "summary": "Swap indexes", + "description": "Swap the documents, settings, and task history of two or more indexes. You can only swap indexes in pairs. However, a single request can swap as many index pairs as you wish.\nSwapping indexes is an atomic transaction: either all indexes are successfully swapped, or none are.\nSwapping indexA and indexB will also replace every mention of indexA by indexB and vice-versa in the task history. enqueued tasks are left unmodified.", + "operationId": "swap_indexes", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SwapIndexesPayload" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 3, + "indexUid": null, + "status": "enqueued", + "type": "indexSwap", + "enqueuedAt": "2021-08-12T10:00:00.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ] + } + }, + "/tasks": { + "get": { + "tags": [ + "Tasks" + ], + "summary": "Get all tasks", + "description": "Get all [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)", + "operationId": "get_tasks", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "Maximum number of results to return.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "default": 20, + "minimum": 0 + }, + "example": 12 + }, + { + "name": "from", + "in": "query", + "description": "Fetch the next set of results from the given uid.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "example": 12421 + }, + { + "name": "reverse", + "in": "query", + "description": "The order you want to retrieve the objects.", + "required": false, + "schema": { + "type": "boolean" + }, + "example": true + }, + { + "name": "batchUids", + "in": "query", + "description": "Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "example": 12421 + }, + { + "name": "uids", + "in": "query", + "description": "Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598, + "*" + ] + }, + { + "name": "canceledBy", + "in": "query", + "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 374, + "*" + ] + }, + { + "name": "types", + "in": "query", + "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "documentAdditionOrUpdate", + "*" + ] + }, + { + "name": "statuses", + "in": "query", + "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Status" + } + }, + "example": [ + "succeeded", + "failed", + "canceled", + "enqueued", + "processing", + "*" + ] + }, + { + "name": "indexUids", + "in": "query", + "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "movies", + "theater", + "*" + ] + }, + { + "name": "afterEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + } + ], + "responses": { + "200": { + "description": "Get all tasks", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AllTasks" + }, + "example": { + "results": [ + { + "uid": 144, + "indexUid": "mieli", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "settings": { + "filterableAttributes": [ + "play_count" + ] + } + }, + "error": null, + "duration": "PT0.009330S", + "enqueuedAt": "2024-08-08T09:01:13.348471Z", + "startedAt": "2024-08-08T09:01:13.349442Z", + "finishedAt": "2024-08-08T09:01:13.358772Z" + } + ], + "total": 1, + "limit": 1, + "from": 144, + "next": null + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.get", + "tasks.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Tasks" + ], + "summary": "Delete tasks", + "description": "Delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) on filter", + "operationId": "delete_tasks", + "parameters": [ + { + "name": "uids", + "in": "query", + "description": "Permits to filter tasks by their uid. By default, when the `uids` query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598, + "*" + ] + }, + { + "name": "batchUids", + "in": "query", + "description": "Lets you filter tasks by their `batchUid`.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598, + "*" + ] + }, + { + "name": "canceledBy", + "in": "query", + "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 374, + "*" + ] + }, + { + "name": "types", + "in": "query", + "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Kind" + } + }, + "example": [ + "documentDeletion", + "*" + ] + }, + { + "name": "statuses", + "in": "query", + "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Status" + } + }, + "example": [ + "succeeded", + "failed", + "canceled", + "*" + ] + }, + { + "name": "indexUids", + "in": "query", + "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "movies", + "theater", + "*" + ] + }, + { + "name": "afterEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + } + ], + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "taskDeletion", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "400": { + "description": "A filter is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Query parameters to filter the tasks to delete are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.", + "code": "missing_task_filters", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#missing_task_filters" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "The task uid does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Task :taskUid not found.", + "code": "task_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors/#task_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.delete", + "tasks.*", + "*" + ] + } + ] + } + }, + "/tasks/cancel": { + "post": { + "tags": [ + "Tasks" + ], + "summary": "Cancel tasks", + "description": "Cancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", + "operationId": "cancel_tasks", + "parameters": [ + { + "name": "uids", + "in": "query", + "description": "Permits to filter tasks by their uid. By default, when the `uids` query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598, + "*" + ] + }, + { + "name": "batchUids", + "in": "query", + "description": "Lets you filter tasks by their `batchUid`.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598, + "*" + ] + }, + { + "name": "canceledBy", + "in": "query", + "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 374, + "*" + ] + }, + { + "name": "types", + "in": "query", + "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Kind" + } + }, + "example": [ + "documentDeletion", + "*" + ] + }, + { + "name": "statuses", + "in": "query", + "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Status" + } + }, + "example": [ + "succeeded", + "failed", + "canceled", + "*" + ] + }, + { + "name": "indexUids", + "in": "query", + "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "movies", + "theater", + "*" + ] + }, + { + "name": "afterEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + } + ], + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "taskCancelation", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "400": { + "description": "A filter is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Query parameters to filter the tasks to cancel are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.", + "code": "missing_task_filters", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#missing_task_filters" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "The task uid does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Task :taskUid not found.", + "code": "task_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors/#task_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.cancel", + "tasks.*", + "*" + ] + } + ] + } + }, + "/tasks/{taskUid}": { + "get": { + "tags": [ + "Tasks" + ], + "summary": "Get a task", + "description": "Get a [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", + "operationId": "get_task", + "parameters": [ + { + "name": "taskUid", + "in": "path", + "description": "The task identifier", + "required": true, + "schema": { + "type": "string", + "format": "u-int32" + }, + "example": 0 + } + ], + "responses": { + "200": { + "description": "Task successfully retrieved", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskView" + }, + "example": { + "uid": 1, + "indexUid": "movies", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 79000, + "indexedDocuments": 79000 + }, + "error": null, + "duration": "PT1S", + "enqueuedAt": "2021-01-01T09:39:00.000000Z", + "startedAt": "2021-01-01T09:39:01.000000Z", + "finishedAt": "2021-01-01T09:39:02.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "The task uid does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Task :taskUid not found.", + "code": "task_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors/#task_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.get", + "tasks.*", + "*" + ] + } + ] + } + }, + "/version": { + "get": { + "tags": [ + "Version" + ], + "summary": "Get version", + "description": "Current version of Meilisearch.", + "operationId": "get_version", + "responses": { + "200": { + "description": "Instance is healthy", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionResponse" + }, + "example": { + "commitSha": "b46889b5f0f2f8b91438a08a358ba8f05fc09fc1", + "commitDate": "2021-07-08", + "pkgVersion": "0.23.0" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "version", + "*" + ] + } + ] + } + }, + "/webhooks": { + "get": { + "tags": [ + "Webhooks" + ], + "operationId": "get_webhooks", + "responses": { + "200": { + "description": "Webhooks are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookResults" + }, + "example": { + "results": [ + { + "uuid": "550e8400-e29b-41d4-a716-446655440000", + "url": "https://your.site/on-tasks-completed", + "headers": { + "Authorization": "Bearer a-secret-token" + }, + "isEditable": true + }, + { + "uuid": "550e8400-e29b-41d4-a716-446655440001", + "url": "https://another.site/on-tasks-completed", + "isEditable": true + } + ] + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "webhooks.get", + "webhooks.*", + "*.get", + "*" + ] + } + ] + }, + "post": { + "tags": [ + "Webhooks" + ], + "operationId": "post_webhook", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookSettings" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Webhook created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookWithMetadata" + }, + "example": { + "uuid": "550e8400-e29b-41d4-a716-446655440000", + "url": "https://your.site/on-tasks-completed", + "headers": { + "Authorization": "Bearer a-secret-token" + }, + "isEditable": true + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "webhooks.create", + "webhooks.*", + "*" + ] + } + ] + } + }, + "/webhooks/{uuid}": { + "get": { + "tags": [ + "Webhooks" + ], + "operationId": "get_webhook", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "The universally unique identifier of the webhook", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Webhook found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookWithMetadata" + }, + "example": { + "uuid": "550e8400-e29b-41d4-a716-446655440000", + "url": "https://your.site/on-tasks-completed", + "headers": { + "Authorization": "Bearer a-secret" + }, + "isEditable": true + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + }, + "404": { + "description": "Webhook not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "webhooks.get", + "webhooks.*", + "*.get", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Webhooks" + ], + "operationId": "delete_webhook", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "The universally unique identifier of the webhook", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "Webhook deleted successfully" + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + }, + "404": { + "description": "Webhook not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "webhooks.delete", + "webhooks.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Webhooks" + ], + "operationId": "patch_webhook", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "The universally unique identifier of the webhook", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Webhook updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookWithMetadata" + }, + "example": { + "uuid": "550e8400-e29b-41d4-a716-446655440000", + "url": "https://your.site/on-tasks-completed", + "headers": { + "Authorization": "Bearer a-secret-token" + }, + "isEditable": true + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "webhooks.update", + "webhooks.*", + "*" + ] + } + ] + } + } + }, + "components": { + "schemas": { + "Action": { + "type": "string", + "enum": [ + "*", + "search", + "documents.*", + "documents.add", + "documents.get", + "documents.delete", + "indexes.*", + "indexes.create", + "indexes.get", + "indexes.update", + "indexes.delete", + "indexes.swap", + "tasks.*", + "tasks.cancel", + "tasks.delete", + "tasks.get", + "settings.*", + "settings.get", + "settings.update", + "stats.*", + "stats.get", + "metrics.*", + "metrics.get", + "dumps.*", + "dumps.create", + "snapshots.*", + "snapshots.create", + "version", + "keys.create", + "keys.get", + "keys.update", + "keys.delete", + "experimental.get", + "experimental.update", + "export", + "network.get", + "network.update", + "chatCompletions", + "chats.*", + "chats.get", + "chats.delete", + "chatsSettings.*", + "chatsSettings.get", + "chatsSettings.update", + "*.get", + "webhooks.get", + "webhooks.update", + "webhooks.delete", + "webhooks.create", + "webhooks.*" + ] + }, + "AllBatches": { + "type": "object", + "required": [ + "results", + "total", + "limit" + ], + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BatchView" + } + }, + "total": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + }, + "limit": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "from": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "minimum": 0 + }, + "next": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "minimum": 0 + } + } + }, + "AllTasks": { + "type": "object", + "required": [ + "results", + "total", + "limit" + ], + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskView" + }, + "description": "The list of tasks that matched the filter." + }, + "total": { + "type": "integer", + "format": "u-int64", + "description": "Total number of browsable results using offset/limit parameters for the given resource.", + "minimum": 0 + }, + "limit": { + "type": "integer", + "format": "u-int32", + "description": "Limit given for the query. If limit is not provided as a query parameter, this parameter displays the default limit value.", + "minimum": 0 + }, + "from": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "description": "The first task uid returned.", + "minimum": 0 + }, + "next": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "description": "Represents the value to send in from to fetch the next slice of the results. The first item for the next slice starts at this exact number. When the returned value is null, it means that all the data have been browsed in the given order.", + "minimum": 0 + } + } + }, + "AttributePatterns": { + "type": "object", + "required": [ + "patterns" + ], + "properties": { + "patterns": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "title", + "overview_*", + "release_date" + ] + } + } + }, + "BTreeMap": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "object", + "required": [ + "start", + "length" + ], + "properties": { + "start": { + "type": "integer", + "minimum": 0 + }, + "length": { + "type": "integer", + "minimum": 0 + }, + "indices": { + "type": [ + "array", + "null" + ], + "items": { + "type": "integer", + "minimum": 0 + } + } + } + } + }, + "propertyNames": { + "type": "string" + } + }, + "BatchStats": { + "type": "object", + "required": [ + "totalNbTasks", + "status", + "types", + "indexUids" + ], + "properties": { + "totalNbTasks": { + "$ref": "#/components/schemas/u32" + }, + "status": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "propertyNames": { + "type": "string", + "description": "The status of a task.", + "enum": [ + "enqueued", + "processing", + "succeeded", + "failed", + "canceled" + ], + "example": "processing" + } + }, + "types": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "propertyNames": { + "type": "string", + "description": "The type of the task.", + "enum": [ + "documentAdditionOrUpdate", + "documentEdition", + "documentDeletion", + "settingsUpdate", + "indexCreation", + "indexDeletion", + "indexUpdate", + "indexSwap", + "taskCancelation", + "taskDeletion", + "dumpCreation", + "snapshotCreation", + "export", + "upgradeDatabase" + ], + "example": [ + "documentAdditionOrUpdate", + "documentEdition", + "documentDeletion", + "settingsUpdate", + "indexCreation", + "indexDeletion", + "indexUpdate", + "indexSwap", + "taskCancelation", + "taskDeletion", + "dumpCreation", + "snapshotCreation", + "export", + "upgradeDatabase" + ] + } + }, + "indexUids": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "propertyNames": { + "type": "string" + } + }, + "progressTrace": { + "type": "object", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "writeChannelCongestion": { + "type": [ + "object", + "null" + ], + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "internalDatabaseSizes": { + "type": "object", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + } + } + }, + "BatchStatsView": { + "allOf": [ + { + "$ref": "#/components/schemas/BatchStats" + }, + { + "type": "object", + "properties": { + "embedderRequests": { + "$ref": "#/components/schemas/EmbedderStatsView" + } + } + } + ] + }, + "BatchView": { + "type": "object", + "required": [ + "uid", + "details", + "stats" + ], + "properties": { + "uid": { + "$ref": "#/components/schemas/u32" + }, + "progress": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ProgressView" + } + ] + }, + "details": { + "$ref": "#/components/schemas/DetailsView" + }, + "stats": { + "$ref": "#/components/schemas/BatchStatsView" + }, + "duration": { + "type": [ + "string", + "null" + ] + }, + "startedAt": { + "type": "string", + "format": "date-time" + }, + "finishedAt": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "batchStrategy": { + "type": "string" + } + } + }, + "BrowseQuery": { + "type": "object", + "required": [ + "offset", + "limit", + "retrieveVectors" + ], + "properties": { + "offset": { + "type": "integer", + "example": 150, + "minimum": 0 + }, + "limit": { + "type": "integer", + "default": 20, + "example": 1, + "minimum": 0 + }, + "fields": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "example": [ + "title, description" + ] + }, + "retrieveVectors": { + "type": "boolean", + "example": true + }, + "ids": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "example": [ + "cody", + "finn", + "brandy", + "gambit" + ] + }, + "filter": {}, + "sort": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "example": [ + "title:asc", + "rating:desc" + ] + } + } + }, + "ChatSearchParams": { + "type": "object", + "properties": { + "hybrid": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/HybridQuery" + } + ] + }, + "limit": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "sort": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "distinct": { + "type": [ + "string", + "null" + ] + }, + "matchingStrategy": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/MatchingStrategy" + } + ] + }, + "attributesToSearchOn": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "rankingScoreThreshold": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/RankingScoreThreshold" + } + ] + } + }, + "additionalProperties": false + }, + "ChatSettings": { + "type": "object", + "properties": { + "description": { + "type": [ + "string", + "null" + ] + }, + "documentTemplate": { + "type": [ + "string", + "null" + ], + "description": "A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text." + }, + "documentTemplateMaxBytes": { + "type": [ + "integer", + "null" + ], + "description": "Rendered texts are truncated to this size. Defaults to 400.", + "minimum": 0 + }, + "searchParameters": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ChatSearchParams", + "description": "The search parameters to use for the LLM." + } + ] + } + }, + "additionalProperties": false + }, + "Code": { + "type": "string", + "enum": [ + "api_key_already_exists", + "api_key_not_found", + "bad_parameter", + "bad_request", + "database_size_limit_reached", + "document_not_found", + "dump_already_processing", + "dump_not_found", + "dump_process_failed", + "duplicate_index_found", + "immutable_api_key_actions", + "immutable_api_key_created_at", + "immutable_api_key_expires_at", + "immutable_api_key_indexes", + "immutable_api_key_key", + "immutable_api_key_uid", + "immutable_api_key_updated_at", + "immutable_index_created_at", + "immutable_index_updated_at", + "index_already_exists", + "index_creation_failed", + "index_not_found", + "index_primary_key_already_exists", + "index_primary_key_multiple_candidates_found", + "index_primary_key_no_candidate_found", + "internal", + "invalid_api_key", + "invalid_api_key_actions", + "invalid_api_key_description", + "invalid_api_key_expires_at", + "invalid_api_key_indexes", + "invalid_api_key_limit", + "invalid_api_key_name", + "invalid_api_key_offset", + "invalid_api_key_uid", + "invalid_content_type", + "invalid_document_csv_delimiter", + "invalid_document_fields", + "invalid_document_retrieve_vectors", + "missing_document_filter", + "missing_document_edition_function", + "inconsistent_document_change_headers", + "invalid_document_filter", + "invalid_document_sort", + "invalid_document_geo_field", + "invalid_document_geojson_field", + "invalid_header_value", + "invalid_vector_dimensions", + "invalid_vectors_type", + "invalid_document_id", + "invalid_document_ids", + "invalid_document_limit", + "invalid_document_offset", + "invalid_search_embedder", + "invalid_similar_embedder", + "invalid_search_hybrid_query", + "invalid_index_limit", + "invalid_index_offset", + "invalid_index_primary_key", + "invalid_index_uid", + "invalid_multi_search_facets", + "invalid_multi_search_facets_by_index", + "invalid_multi_search_facet_order", + "invalid_multi_search_federated", + "invalid_multi_search_federation_options", + "invalid_multi_search_max_values_per_facet", + "invalid_multi_search_merge_facets", + "invalid_multi_search_query_facets", + "invalid_multi_search_query_pagination", + "invalid_multi_search_query_ranking_rules", + "invalid_multi_search_query_position", + "invalid_multi_search_remote", + "invalid_multi_search_weight", + "invalid_network_remotes", + "invalid_network_self", + "invalid_network_sharding", + "invalid_network_search_api_key", + "invalid_network_write_api_key", + "invalid_network_url", + "invalid_search_attributes_to_search_on", + "invalid_search_attributes_to_crop", + "invalid_search_attributes_to_highlight", + "invalid_similar_attributes_to_retrieve", + "invalid_similar_retrieve_vectors", + "invalid_search_attributes_to_retrieve", + "invalid_search_ranking_score_threshold", + "invalid_similar_ranking_score_threshold", + "invalid_search_retrieve_vectors", + "invalid_search_crop_length", + "invalid_search_crop_marker", + "invalid_search_facets", + "invalid_search_semantic_ratio", + "invalid_search_locales", + "invalid_facet_search_exhaustive_facet_count", + "invalid_facet_search_facet_name", + "invalid_similar_id", + "invalid_search_filter", + "invalid_similar_filter", + "invalid_search_highlight_post_tag", + "invalid_search_highlight_pre_tag", + "invalid_search_hits_per_page", + "invalid_similar_limit", + "invalid_search_limit", + "invalid_search_matching_strategy", + "invalid_similar_offset", + "invalid_search_offset", + "invalid_search_page", + "invalid_search_q", + "invalid_facet_search_query", + "invalid_facet_search_name", + "facet_search_disabled", + "invalid_search_vector", + "invalid_search_media", + "invalid_search_show_matches_position", + "invalid_search_show_ranking_score", + "invalid_similar_show_ranking_score", + "invalid_search_show_ranking_score_details", + "invalid_similar_show_ranking_score_details", + "invalid_search_sort", + "invalid_search_distinct", + "invalid_search_media_and_vector", + "invalid_settings_displayed_attributes", + "invalid_settings_distinct_attribute", + "invalid_settings_proximity_precision", + "invalid_settings_facet_search", + "invalid_settings_prefix_search", + "invalid_settings_faceting", + "invalid_settings_filterable_attributes", + "invalid_settings_pagination", + "invalid_settings_search_cutoff_ms", + "invalid_settings_embedders", + "invalid_settings_ranking_rules", + "invalid_settings_searchable_attributes", + "invalid_settings_sortable_attributes", + "invalid_settings_stop_words", + "invalid_settings_non_separator_tokens", + "invalid_settings_separator_tokens", + "invalid_settings_dictionary", + "invalid_settings_synonyms", + "invalid_settings_typo_tolerance", + "invalid_settings_localized_attributes", + "invalid_state", + "invalid_store_file", + "invalid_swap_duplicate_index_found", + "invalid_swap_indexes", + "invalid_swap_rename", + "invalid_task_after_enqueued_at", + "invalid_task_after_finished_at", + "invalid_task_after_started_at", + "invalid_task_before_enqueued_at", + "invalid_task_before_finished_at", + "invalid_task_before_started_at", + "invalid_task_canceled_by", + "invalid_task_from", + "invalid_task_limit", + "invalid_task_reverse", + "invalid_task_statuses", + "invalid_task_types", + "invalid_task_uids", + "invalid_batch_uids", + "io_error", + "feature_not_enabled", + "malformed_payload", + "max_fields_limit_exceeded", + "missing_api_key_actions", + "missing_api_key_expires_at", + "missing_api_key_indexes", + "missing_authorization_header", + "missing_content_type", + "missing_document_id", + "missing_facet_search_facet_name", + "missing_index_uid", + "missing_master_key", + "missing_network_url", + "missing_payload", + "missing_search_hybrid", + "missing_swap_indexes", + "missing_task_filters", + "no_space_left_on_device", + "payload_too_large", + "remote_bad_response", + "remote_bad_request", + "remote_could_not_send_request", + "remote_invalid_api_key", + "remote_remote_error", + "remote_timeout", + "too_many_search_requests", + "task_not_found", + "task_file_not_found", + "batch_not_found", + "too_many_open_files", + "too_many_vectors", + "unretrievable_document", + "unretrievable_error_code", + "unsupported_media_type", + "vector_embedding_error", + "not_found_similar_id", + "invalid_document_edition_context", + "invalid_document_edition_function_filter", + "edit_documents_by_function_error", + "invalid_settings_index_chat", + "invalid_settings_vector_store", + "invalid_export_url", + "invalid_export_api_key", + "invalid_export_payload_size", + "invalid_export_indexes_patterns", + "invalid_export_index_filter", + "invalid_export_index_override_settings", + "unimplemented_external_function_calling", + "unimplemented_non_streaming_chat_completions", + "unimplemented_multi_choice_chat_completions", + "chat_not_found", + "invalid_chat_setting_document_template", + "invalid_chat_completion_org_id", + "invalid_chat_completion_project_id", + "invalid_chat_completion_api_version", + "invalid_chat_completion_deployment_id", + "invalid_chat_completion_source", + "invalid_chat_completion_base_api", + "invalid_chat_completion_api_key", + "invalid_chat_completion_prompts", + "invalid_chat_completion_system_prompt", + "invalid_chat_completion_search_description_prompt", + "invalid_chat_completion_search_query_param_prompt", + "invalid_chat_completion_search_filter_param_prompt", + "invalid_chat_completion_search_index_uid_param_prompt", + "invalid_chat_completion_pre_query_prompt", + "invalid_webhooks", + "invalid_webhook_url", + "invalid_webhook_headers", + "immutable_webhook", + "invalid_webhook_uuid", + "webhook_not_found", + "immutable_webhook_uuid", + "immutable_webhook_is_editable" + ] + }, + "ComputedFacets": { + "type": "object", + "required": [ + "distribution", + "stats" + ], + "properties": { + "distribution": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + }, + "propertyNames": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + } + }, + "stats": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FacetStats" + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "CreateApiKey": { + "type": "object", + "required": [ + "uid", + "actions", + "indexes" + ], + "properties": { + "description": { + "type": [ + "string", + "null" + ], + "description": "A description for the key. `null` if empty.", + "example": null + }, + "name": { + "type": [ + "string", + "null" + ], + "description": "A human-readable name for the key. `null` if empty.", + "example": "Indexing Products API key" + }, + "uid": { + "type": "string", + "format": "uuid", + "description": "A uuid v4 to identify the API Key. If not specified, it's generated by Meilisearch.", + "example": null + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Action" + }, + "description": "A list of actions permitted for the key. `[\"*\"]` for all actions. The `*` character can be used as a wildcard when located at the last position. e.g. `documents.*` to authorize access on all documents endpoints.", + "example": [ + "documents.add" + ] + }, + "indexes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of accessible indexes permitted for the key. `[\"*\"]` for all indexes. The `*` character can be used as a wildcard when located at the last position. e.g. `products_*` to allow access to all indexes whose names start with `products_`.", + "example": [ + "products" + ] + }, + "expiresAt": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "Represent the expiration date and time as RFC 3339 format. `null` equals to no expiration time." + } + } + }, + "DetailsExportIndexSettings": { + "allOf": [ + { + "$ref": "#/components/schemas/ExportIndexSettings" + }, + { + "type": "object", + "properties": { + "matchedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "minimum": 0 + } + } + } + ] + }, + "DetailsView": { + "allOf": [ + { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/Settings_Unchecked", + "description": "[Learn more about the settings in this guide](https://www.meilisearch.com/docs/reference/api/settings)." + } + ] + }, + { + "type": "object", + "properties": { + "receivedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of documents received for documentAdditionOrUpdate task.", + "minimum": 0 + }, + "indexedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of documents finally indexed for documentAdditionOrUpdate task or a documentAdditionOrUpdate batch of tasks.", + "minimum": 0 + }, + "editedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of documents edited for editDocumentByFunction task.", + "minimum": 0 + }, + "primaryKey": { + "type": [ + "string", + "null" + ], + "description": "Value for the primaryKey field encountered if any for indexCreation or indexUpdate task." + }, + "providedIds": { + "type": [ + "integer", + "null" + ], + "description": "Number of provided document ids for the documentDeletion task.", + "minimum": 0 + }, + "deletedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of documents finally deleted for documentDeletion and indexDeletion tasks.", + "minimum": 0 + }, + "matchedTasks": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of tasks that match the request for taskCancelation or taskDeletion tasks.", + "minimum": 0 + }, + "canceledTasks": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of tasks canceled for taskCancelation.", + "minimum": 0 + }, + "deletedTasks": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of tasks deleted for taskDeletion.", + "minimum": 0 + }, + "originalFilter": { + "type": [ + "string", + "null" + ], + "description": "Original filter query for taskCancelation or taskDeletion tasks." + }, + "dumpUid": { + "type": [ + "string", + "null" + ], + "description": "Identifier generated for the dump for dumpCreation task." + }, + "context": { + "type": [ + "object", + "null" + ] + }, + "function": { + "type": [ + "string", + "null" + ] + }, + "swaps": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/IndexSwap" + } + }, + "upgradeFrom": { + "type": [ + "string", + "null" + ] + }, + "upgradeTo": { + "type": [ + "string", + "null" + ] + }, + "url": { + "type": [ + "string", + "null" + ] + }, + "apiKey": { + "type": [ + "string", + "null" + ] + }, + "payloadSize": { + "type": [ + "string", + "null" + ] + }, + "indexes": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/DetailsExportIndexSettings" + }, + "propertyNames": { + "type": "string" + } + }, + "oldIndexUid": { + "type": [ + "string", + "null" + ] + }, + "newIndexUid": { + "type": [ + "string", + "null" + ] + } + } + } + ] + }, + "DistributionShift": { + "type": "object", + "description": "Describes the mean and sigma of distribution of embedding similarity in the embedding space.\n\nThe intended use is to make the similarity score more comparable to the regular ranking score.\nThis allows to correct effects where results are too \"packed\" around a certain value.", + "required": [ + "current_mean", + "current_sigma" + ], + "properties": { + "current_mean": { + "type": "number", + "format": "float", + "description": "Value where the results are \"packed\".\n\nSimilarity scores are translated so that they are packed around 0.5 instead" + }, + "current_sigma": { + "type": "number", + "format": "float", + "description": "standard deviation of a similarity score.\n\nSet below 0.4 to make the results less packed around the mean, and above 0.4 to make them more packed." + } + } + }, + "DocumentDeletionByFilter": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": {} + } + }, + "DocumentEditionByFunction": { + "type": "object", + "required": [ + "function" + ], + "properties": { + "filter": { + "description": "A string containing a RHAI function." + }, + "context": { + "description": "A string containing a filter expression." + }, + "function": { + "type": "string", + "description": "An object with data Meilisearch should make available for the editing function." + } + } + }, + "EmbedderSource": { + "type": "string", + "enum": [ + "openAi", + "huggingFace", + "ollama", + "userProvided", + "rest", + "composite" + ] + }, + "EmbedderStatsView": { + "type": "object", + "required": [ + "total", + "failed" + ], + "properties": { + "total": { + "type": "integer", + "minimum": 0 + }, + "failed": { + "type": "integer", + "minimum": 0 + }, + "lastError": { + "type": [ + "string", + "null" + ] + } + } + }, + "ErrorType": { + "type": "string", + "enum": [ + "internal", + "invalid_request", + "auth", + "system" + ] + }, + "Export": { + "type": "object", + "properties": { + "url": { + "type": [ + "string", + "null" + ], + "example": "https://ms-1234.heaven.meilisearch.com" + }, + "apiKey": { + "type": [ + "string", + "null" + ], + "example": "1234abcd" + }, + "payloadSize": { + "type": [ + "string", + "null" + ], + "example": "24MiB" + }, + "indexes": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/ExportIndexSettings" + }, + "propertyNames": { + "type": "string" + }, + "example": { + "*": { + "filter": null + } + } + } + } + }, + "ExportIndexSettings": { + "type": "object", + "properties": { + "filter": { + "type": [ + "string", + "null" + ], + "example": "genres = action" + }, + "overrideSettings": { + "type": [ + "boolean", + "null" + ], + "example": true + } + } + }, + "FacetSearchQuery": { + "type": "object", + "required": [ + "facet_name", + "matching_strategy" + ], + "properties": { + "facet_query": { + "type": [ + "string", + "null" + ] + }, + "facet_name": { + "type": "string" + }, + "q": { + "type": [ + "string", + "null" + ] + }, + "vector": { + "type": [ + "array", + "null" + ], + "items": { + "type": "number", + "format": "float" + } + }, + "media": {}, + "hybrid": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/HybridQuery" + } + ] + }, + "filter": {}, + "matching_strategy": { + "$ref": "#/components/schemas/MatchingStrategy" + }, + "attributes_to_search_on": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "ranking_score_threshold": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/RankingScoreThreshold" + } + ] + }, + "locales": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/Locale" + } + }, + "exhaustive_facet_count": { + "type": [ + "boolean", + "null" + ] + } + } + }, + "FacetStats": { + "type": "object", + "required": [ + "min", + "max" + ], + "properties": { + "min": { + "type": "number", + "format": "double" + }, + "max": { + "type": "number", + "format": "double" + } + } + }, + "FacetValuesSort": { + "type": "string", + "enum": [ + "alpha", + "count" + ] + }, + "FacetingSettings": { + "type": "object", + "properties": { + "maxValuesPerFacet": { + "type": [ + "integer", + "null" + ], + "example": 10, + "minimum": 0 + }, + "sortFacetValuesBy": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/FacetValuesSort" + }, + "propertyNames": { + "type": "string" + }, + "example": { + "genre": "count" + } + } + }, + "additionalProperties": false + }, + "FederatedFacets": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ComputedFacets" + }, + "propertyNames": { + "type": "string" + } + }, + "FederatedSearch": { + "type": "object", + "required": [ + "queries" + ], + "properties": { + "queries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchQueryWithIndex" + } + }, + "federation": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/Federation" + } + ] + } + } + }, + "FederatedSearchResult": { + "allOf": [ + { + "$ref": "#/components/schemas/HitsInfo" + }, + { + "type": "object", + "required": [ + "hits", + "processingTimeMs" + ], + "properties": { + "hits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchHit" + } + }, + "processingTimeMs": { + "type": "integer", + "minimum": 0 + }, + "queryVectors": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/Vec" + }, + "propertyNames": { + "type": "integer", + "minimum": 0 + } + }, + "semanticHitCount": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "minimum": 0 + }, + "facetDistribution": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + }, + "propertyNames": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + } + }, + "facetStats": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/FacetStats" + }, + "propertyNames": { + "type": "string" + } + }, + "facetsByIndex": { + "$ref": "#/components/schemas/FederatedFacets" + }, + "remoteErrors": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/ResponseError" + }, + "propertyNames": { + "type": "string" + } + } + } + } + ] + }, + "Federation": { + "type": "object", + "required": [ + "limit", + "offset", + "facetsByIndex" + ], + "properties": { + "limit": { + "type": "integer", + "minimum": 0 + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "facetsByIndex": { + "type": "object", + "additionalProperties": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string", + "description": "An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long", + "example": "movies" + } + }, + "mergeFacets": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/MergeFacets" + } + ] + } + } + }, + "FederationOptions": { + "type": "object", + "required": [ + "weight" + ], + "properties": { + "weight": { + "type": "number", + "format": "double" + }, + "remote": { + "type": [ + "string", + "null" + ] + }, + "queryPosition": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + } + } + }, + "FilterFeatures": { + "type": "object", + "properties": { + "equality": { + "type": "boolean" + }, + "comparison": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "FilterableAttributesFeatures": { + "type": "object", + "properties": { + "facetSearch": { + "type": "boolean" + }, + "filter": { + "$ref": "#/components/schemas/FilterFeatures" + } + }, + "additionalProperties": false + }, + "FilterableAttributesPatterns": { + "type": "object", + "required": [ + "attributePatterns" + ], + "properties": { + "attributePatterns": { + "$ref": "#/components/schemas/AttributePatterns" + }, + "features": { + "$ref": "#/components/schemas/FilterableAttributesFeatures" + } + }, + "additionalProperties": false + }, + "FilterableAttributesRule": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/FilterableAttributesPatterns" + } + ] + }, + "GetLogs": { + "type": "object", + "required": [ + "target", + "mode", + "profileMemory" + ], + "properties": { + "target": { + "type": "string", + "description": "Lets you specify which parts of the code you want to inspect and is formatted like that: code_part=log_level,code_part=log_level\n- If the `code_part` is missing, then the `log_level` will be applied to everything.\n- If the `log_level` is missing, then the `code_part` will be selected in `info` log level.", + "default": "info", + "example": "milli=trace,index_scheduler,actix_web=off" + }, + "mode": { + "oneOf": [ + { + "$ref": "#/components/schemas/LogMode", + "description": "Lets you customize the format of the logs." + } + ], + "default": "Human" + }, + "profileMemory": { + "type": "boolean", + "description": "A boolean to indicate if you want to profile the memory as well. This is only useful while using the `profile` mode.\nBe cautious, though; it slows down the engine a lot.", + "default": false + } + } + }, + "HealthResponse": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/HealthStatus", + "description": "The status of the instance." + } + } + }, + "HealthStatus": { + "type": "string", + "enum": [ + "available" + ] + }, + "HitsInfo": { + "oneOf": [ + { + "type": "object", + "required": [ + "hitsPerPage", + "page", + "totalPages", + "totalHits" + ], + "properties": { + "hitsPerPage": { + "type": "integer", + "minimum": 0 + }, + "page": { + "type": "integer", + "minimum": 0 + }, + "totalPages": { + "type": "integer", + "minimum": 0 + }, + "totalHits": { + "type": "integer", + "minimum": 0 + } + } + }, + { + "type": "object", + "required": [ + "limit", + "offset", + "estimatedTotalHits" + ], + "properties": { + "limit": { + "type": "integer", + "minimum": 0 + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "estimatedTotalHits": { + "type": "integer", + "minimum": 0 + } + } + } + ] + }, + "HybridQuery": { + "type": "object", + "required": [ + "embedder" + ], + "properties": { + "semanticRatio": { + "type": "number", + "format": "float" + }, + "embedder": { + "type": "string" + } + } + }, + "IndexCreateRequest": { + "type": "object", + "required": [ + "uid" + ], + "properties": { + "uid": { + "$ref": "#/components/schemas/IndexUid", + "description": "The name of the index" + }, + "primaryKey": { + "type": [ + "string", + "null" + ], + "description": "The primary key of the index", + "example": "id" + } + } + }, + "IndexStats": { + "type": "object", + "description": "Stats of an `Index`, as known to the `stats` route.", + "required": [ + "numberOfDocuments", + "rawDocumentDbSize", + "avgDocumentSize", + "isIndexing", + "fieldDistribution" + ], + "properties": { + "numberOfDocuments": { + "type": "integer", + "format": "u-int64", + "description": "Number of documents in the index", + "minimum": 0 + }, + "rawDocumentDbSize": { + "type": "integer", + "format": "u-int64", + "description": "Size of the documents database, in bytes.", + "minimum": 0 + }, + "avgDocumentSize": { + "type": "integer", + "format": "u-int64", + "description": "Average size of a document in the documents database.", + "minimum": 0 + }, + "isIndexing": { + "type": "boolean", + "description": "Whether or not the index is currently ingesting document" + }, + "numberOfEmbeddings": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of embeddings in the index", + "minimum": 0 + }, + "numberOfEmbeddedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of embedded documents in the index", + "minimum": 0 + }, + "fieldDistribution": { + "type": "object", + "description": "Association of every field name with the number of times it occurs in the documents.", + "additionalProperties": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "IndexSwap": { + "type": "object", + "required": [ + "indexes" + ], + "properties": { + "indexes": { + "type": "array", + "items": false, + "prefixItems": [ + { + "type": "string" + }, + { + "type": "string" + } + ] + }, + "rename": { + "type": "boolean" + } + } + }, + "IndexUid": { + "type": "string", + "description": "An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long", + "example": "movies" + }, + "IndexView": { + "type": "object", + "required": [ + "uid", + "createdAt", + "updatedAt" + ], + "properties": { + "uid": { + "type": "string", + "description": "Unique identifier for the index" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "An `RFC 3339` format for date/time/duration." + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "An `RFC 3339` format for date/time/duration." + }, + "primaryKey": { + "type": [ + "string", + "null" + ], + "description": "Custom primaryKey for documents" + } + } + }, + "KeyView": { + "type": "object", + "required": [ + "key", + "uid", + "actions", + "indexes", + "createdAt", + "updatedAt" + ], + "properties": { + "name": { + "type": [ + "string", + "null" + ], + "description": "The name of the API Key if any" + }, + "description": { + "type": [ + "string", + "null" + ], + "description": "The description of the API Key if any" + }, + "key": { + "type": "string", + "description": "The actual API Key you can send to Meilisearch" + }, + "uid": { + "type": "string", + "format": "uuid", + "description": "The `Uuid` specified while creating the key or autogenerated by Meilisearch." + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Action" + }, + "description": "The actions accessible with this key." + }, + "indexes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The indexes accessible with this key." + }, + "expiresAt": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "The expiration date of the key. Once this timestamp is exceeded the key is not deleted but cannot be used anymore." + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The date of creation of this API Key.", + "readOnly": true + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "The date of the last update made on this key.", + "readOnly": true + } + } + }, + "Kind": { + "type": "string", + "description": "The type of the task.", + "enum": [ + "documentAdditionOrUpdate", + "documentEdition", + "documentDeletion", + "settingsUpdate", + "indexCreation", + "indexDeletion", + "indexUpdate", + "indexSwap", + "taskCancelation", + "taskDeletion", + "dumpCreation", + "snapshotCreation", + "export", + "upgradeDatabase" + ], + "example": [ + "documentAdditionOrUpdate", + "documentEdition", + "documentDeletion", + "settingsUpdate", + "indexCreation", + "indexDeletion", + "indexUpdate", + "indexSwap", + "taskCancelation", + "taskDeletion", + "dumpCreation", + "snapshotCreation", + "export", + "upgradeDatabase" + ] + }, + "Locale": { + "type": "string", + "enum": [ + "af", + "ak", + "am", + "ar", + "az", + "be", + "bn", + "bg", + "ca", + "cs", + "da", + "de", + "el", + "en", + "eo", + "et", + "fi", + "fr", + "gu", + "he", + "hi", + "hr", + "hu", + "hy", + "id", + "it", + "jv", + "ja", + "kn", + "ka", + "km", + "ko", + "la", + "lv", + "lt", + "ml", + "mr", + "mk", + "my", + "ne", + "nl", + "nb", + "or", + "pa", + "fa", + "pl", + "pt", + "ro", + "ru", + "si", + "sk", + "sl", + "sn", + "es", + "sr", + "sv", + "ta", + "te", + "tl", + "th", + "tk", + "tr", + "uk", + "ur", + "uz", + "vi", + "yi", + "zh", + "zu", + "afr", + "aka", + "amh", + "ara", + "aze", + "bel", + "ben", + "bul", + "cat", + "ces", + "dan", + "deu", + "ell", + "eng", + "epo", + "est", + "fin", + "fra", + "guj", + "heb", + "hin", + "hrv", + "hun", + "hye", + "ind", + "ita", + "jav", + "jpn", + "kan", + "kat", + "khm", + "kor", + "lat", + "lav", + "lit", + "mal", + "mar", + "mkd", + "mya", + "nep", + "nld", + "nob", + "ori", + "pan", + "pes", + "pol", + "por", + "ron", + "rus", + "sin", + "slk", + "slv", + "sna", + "spa", + "srp", + "swe", + "tam", + "tel", + "tgl", + "tha", + "tuk", + "tur", + "ukr", + "urd", + "uzb", + "vie", + "yid", + "zho", + "zul", + "cmn" + ] + }, + "LocalizedAttributesRuleView": { + "type": "object", + "required": [ + "attributePatterns", + "locales" + ], + "properties": { + "attributePatterns": { + "$ref": "#/components/schemas/AttributePatterns" + }, + "locales": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Locale" + } + } + } + }, + "LogMode": { + "type": "string", + "enum": [ + "human", + "json", + "profile" + ] + }, + "MatchingStrategy": { + "type": "string", + "description": "This is unfortunately a duplication of the struct in .\nThe reason why it is duplicated is because milli cannot depend on meilisearch. It would be cyclic imports.", + "enum": [ + "last", + "all", + "frequency" + ] + }, + "MergeFacets": { + "type": "object", + "properties": { + "maxValuesPerFacet": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + } + } + }, + "MinWordSizeTyposSetting": { + "type": "object", + "properties": { + "oneTypo": { + "type": [ + "integer", + "null" + ], + "format": "u-int8", + "example": 5, + "minimum": 0 + }, + "twoTypos": { + "type": [ + "integer", + "null" + ], + "format": "u-int8", + "example": 9, + "minimum": 0 + } + }, + "additionalProperties": false + }, + "Network": { + "type": "object", + "properties": { + "remotes": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/Remote" + }, + "propertyNames": { + "type": "string" + }, + "example": "http://localhost:7700" + }, + "self": { + "type": [ + "string", + "null" + ], + "example": "ms-00" + }, + "sharding": { + "type": [ + "boolean", + "null" + ], + "example": true + } + } + }, + "Origin": { + "type": "object", + "required": [ + "remoteName", + "taskUid" + ], + "properties": { + "remoteName": { + "type": "string" + }, + "taskUid": { + "type": "integer", + "minimum": 0 + } + } + }, + "OverridePooling": { + "type": "string", + "enum": [ + "useModel", + "forceCls", + "forceMean" + ] + }, + "PaginationSettings": { + "type": "object", + "properties": { + "maxTotalHits": { + "type": [ + "integer", + "null" + ], + "example": 250, + "minimum": 0 + } + }, + "additionalProperties": false + }, + "PaginationView_IndexView": { + "type": "object", + "required": [ + "results", + "offset", + "limit", + "total" + ], + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "createdAt", + "updatedAt" + ], + "properties": { + "uid": { + "type": "string", + "description": "Unique identifier for the index" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "An `RFC 3339` format for date/time/duration." + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "An `RFC 3339` format for date/time/duration." + }, + "primaryKey": { + "type": [ + "string", + "null" + ], + "description": "Custom primaryKey for documents" + } + } + } + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 0 + }, + "total": { + "type": "integer", + "minimum": 0 + } + } + }, + "PaginationView_KeyView": { + "type": "object", + "required": [ + "results", + "offset", + "limit", + "total" + ], + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "uid", + "actions", + "indexes", + "createdAt", + "updatedAt" + ], + "properties": { + "name": { + "type": [ + "string", + "null" + ], + "description": "The name of the API Key if any" + }, + "description": { + "type": [ + "string", + "null" + ], + "description": "The description of the API Key if any" + }, + "key": { + "type": "string", + "description": "The actual API Key you can send to Meilisearch" + }, + "uid": { + "type": "string", + "format": "uuid", + "description": "The `Uuid` specified while creating the key or autogenerated by Meilisearch." + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Action" + }, + "description": "The actions accessible with this key." + }, + "indexes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The indexes accessible with this key." + }, + "expiresAt": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "The expiration date of the key. Once this timestamp is exceeded the key is not deleted but cannot be used anymore." + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The date of creation of this API Key.", + "readOnly": true + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "The date of the last update made on this key.", + "readOnly": true + } + } + } + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 0 + }, + "total": { + "type": "integer", + "minimum": 0 + } + } + }, + "PaginationView_Value": { + "type": "object", + "required": [ + "results", + "offset", + "limit", + "total" + ], + "properties": { + "results": { + "type": "array", + "items": {} + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 0 + }, + "total": { + "type": "integer", + "minimum": 0 + } + } + }, + "PatchApiKey": { + "type": "object", + "properties": { + "description": { + "type": [ + "string", + "null" + ], + "example": "This key is used to update documents in the products index" + }, + "name": { + "type": [ + "string", + "null" + ], + "example": "Indexing Products API key" + } + } + }, + "PrefixSearchSettings": { + "type": "string", + "enum": [ + "indexingTime", + "disabled" + ] + }, + "ProgressStepView": { + "type": "object", + "required": [ + "currentStep", + "finished", + "total" + ], + "properties": { + "currentStep": { + "type": "string" + }, + "finished": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "total": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + } + }, + "ProgressView": { + "type": "object", + "required": [ + "steps", + "percentage" + ], + "properties": { + "steps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProgressStepView" + } + }, + "percentage": { + "type": "number", + "format": "float" + } + } + }, + "ProximityPrecisionView": { + "type": "string", + "enum": [ + "byWord", + "byAttribute" + ] + }, + "RankingRuleView": { + "oneOf": [ + { + "type": "string", + "description": "Sorted by decreasing number of matched query terms.\nQuery words at the front of an attribute is considered better than if it was at the back.", + "enum": [ + "Words" + ] + }, + { + "type": "string", + "description": "Sorted by increasing number of typos.", + "enum": [ + "Typo" + ] + }, + { + "type": "string", + "description": "Sorted by increasing distance between matched query terms.", + "enum": [ + "Proximity" + ] + }, + { + "type": "string", + "description": "Documents with quey words contained in more important\nattributes are considered better.", + "enum": [ + "Attribute" + ] + }, + { + "type": "string", + "description": "Dynamically sort at query time the documents. None, one or multiple Asc/Desc sortable\nattributes can be used in place of this criterion at query time.", + "enum": [ + "Sort" + ] + }, + { + "type": "string", + "description": "Sorted by the similarity of the matched words with the query words.", + "enum": [ + "Exactness" + ] + }, + { + "type": "object", + "description": "Sorted by the increasing value of the field specified.", + "required": [ + "Asc" + ], + "properties": { + "Asc": { + "type": "string", + "description": "Sorted by the increasing value of the field specified." + } + } + }, + { + "type": "object", + "description": "Sorted by the decreasing value of the field specified.", + "required": [ + "Desc" + ], + "properties": { + "Desc": { + "type": "string", + "description": "Sorted by the decreasing value of the field specified." + } + } + } + ] + }, + "RankingScoreThreshold": { + "type": "number", + "format": "double" + }, + "Remote": { + "type": "object", + "properties": { + "url": { + "type": [ + "string", + "null" + ], + "example": { + "ms-0": { + "url": "http://localhost:7700", + "searchApiKey": null, + "writeApiKey": null + }, + "ms-1": { + "url": "http://localhost:7701", + "searchApiKey": "foo", + "writeApiKey": "bar" + }, + "ms-2": { + "url": "http://localhost:7702", + "searchApiKey": "bar", + "writeApiKey": "foo" + } + } + }, + "searchApiKey": { + "type": [ + "string", + "null" + ], + "example": "XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU" + }, + "writeApiKey": { + "type": [ + "string", + "null" + ], + "example": "XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU" + } + } + }, + "RemoteTask": { + "type": "object", + "properties": { + "taskUid": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/u32" + } + ] + }, + "error": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ResponseError" + } + ] + } + } + }, + "ResponseError": { + "type": "object", + "required": [ + "message", + "code", + "type", + "link" + ], + "properties": { + "message": { + "type": "string", + "description": "The error message." + }, + "code": { + "$ref": "#/components/schemas/Code", + "description": "The error code." + }, + "type": { + "$ref": "#/components/schemas/ErrorType", + "description": "The error type." + }, + "link": { + "type": "string", + "description": "A link to the documentation about this specific error." + } + } + }, + "RuntimeTogglableFeatures": { + "type": "object", + "properties": { + "metrics": { + "type": [ + "boolean", + "null" + ] + }, + "logsRoute": { + "type": [ + "boolean", + "null" + ] + }, + "editDocumentsByFunction": { + "type": [ + "boolean", + "null" + ] + }, + "containsFilter": { + "type": [ + "boolean", + "null" + ] + }, + "network": { + "type": [ + "boolean", + "null" + ] + }, + "getTaskDocumentsRoute": { + "type": [ + "boolean", + "null" + ] + }, + "compositeEmbedders": { + "type": [ + "boolean", + "null" + ] + }, + "chatCompletions": { + "type": [ + "boolean", + "null" + ] + }, + "multimodal": { + "type": [ + "boolean", + "null" + ] + }, + "vectorStoreSetting": { + "type": [ + "boolean", + "null" + ] + } + } + }, + "SearchHit": { + "type": "object", + "properties": { + "_formatted": { + "type": "object", + "additionalProperties": true + }, + "_matchesPosition": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/BTreeMap" + } + ] + }, + "_rankingScore": { + "type": [ + "number", + "null" + ], + "format": "double" + }, + "_rankingScoreDetails": { + "type": [ + "object", + "null" + ], + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + } + }, + "additionalProperties": {} + }, + "SearchQuery": { + "type": "object", + "required": [ + "offset", + "limit", + "retrieve_vectors", + "crop_length", + "show_matches_position", + "show_ranking_score", + "show_ranking_score_details", + "highlight_pre_tag", + "highlight_post_tag", + "crop_marker", + "matching_strategy" + ], + "properties": { + "q": { + "type": [ + "string", + "null" + ] + }, + "vector": { + "type": [ + "array", + "null" + ], + "items": { + "type": "number", + "format": "float" + } + }, + "media": {}, + "hybrid": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/HybridQuery" + } + ] + }, + "offset": { + "type": "integer", + "default": 0, + "minimum": 0 + }, + "limit": { + "type": "integer", + "default": 20, + "minimum": 0 + }, + "page": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "hits_per_page": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "attributes_to_retrieve": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "retrieve_vectors": { + "type": "boolean" + }, + "attributes_to_crop": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "crop_length": { + "type": "integer", + "default": 10, + "minimum": 0 + }, + "attributes_to_highlight": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "show_matches_position": { + "type": "boolean" + }, + "show_ranking_score": { + "type": "boolean" + }, + "show_ranking_score_details": { + "type": "boolean" + }, + "filter": {}, + "sort": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "distinct": { + "type": [ + "string", + "null" + ] + }, + "facets": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "highlight_pre_tag": { + "type": "string", + "default": "" + }, + "highlight_post_tag": { + "type": "string", + "default": "" + }, + "crop_marker": { + "type": "string", + "default": "…" + }, + "matching_strategy": { + "$ref": "#/components/schemas/MatchingStrategy" + }, + "attributes_to_search_on": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "ranking_score_threshold": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/RankingScoreThreshold" + } + ] + }, + "locales": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/Locale" + } + } + } + }, + "SearchQueryWithIndex": { + "type": "object", + "description": "A `SearchQuery` + an index UID and optional FederationOptions.", + "required": [ + "indexUid", + "retrieveVectors", + "cropLength", + "showRankingScore", + "showRankingScoreDetails", + "showMatchesPosition", + "highlightPreTag", + "highlightPostTag", + "cropMarker", + "matchingStrategy" + ], + "properties": { + "indexUid": { + "$ref": "#/components/schemas/IndexUid" + }, + "q": { + "type": [ + "string", + "null" + ] + }, + "vector": { + "type": [ + "array", + "null" + ], + "items": { + "type": "number", + "format": "float" + } + }, + "media": {}, + "hybrid": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/HybridQuery" + } + ] + }, + "offset": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "limit": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "page": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "hitsPerPage": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "attributesToRetrieve": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "retrieveVectors": { + "type": "boolean" + }, + "attributesToCrop": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "cropLength": { + "type": "integer", + "minimum": 0 + }, + "attributesToHighlight": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "showRankingScore": { + "type": "boolean" + }, + "showRankingScoreDetails": { + "type": "boolean" + }, + "showMatchesPosition": { + "type": "boolean" + }, + "filter": {}, + "sort": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "distinct": { + "type": [ + "string", + "null" + ] + }, + "facets": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "highlightPreTag": { + "type": "string" + }, + "highlightPostTag": { + "type": "string" + }, + "cropMarker": { + "type": "string" + }, + "matchingStrategy": { + "$ref": "#/components/schemas/MatchingStrategy" + }, + "attributesToSearchOn": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "rankingScoreThreshold": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/RankingScoreThreshold" + } + ] + }, + "locales": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/Locale" + } + }, + "federationOptions": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/FederationOptions" + } + ] + } + } + }, + "SearchResult": { + "allOf": [ + { + "$ref": "#/components/schemas/HitsInfo" + }, + { + "type": "object", + "required": [ + "hits", + "query", + "processingTimeMs" + ], + "properties": { + "hits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchHit" + } + }, + "query": { + "type": "string" + }, + "queryVector": { + "type": [ + "array", + "null" + ], + "items": { + "type": "number", + "format": "float" + } + }, + "processingTimeMs": { + "type": "integer", + "minimum": 0 + }, + "facetDistribution": { + "type": [ + "object", + "null" + ], + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "facetStats": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/FacetStats" + }, + "propertyNames": { + "type": "string" + } + }, + "semanticHitCount": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "minimum": 0 + } + } + } + ] + }, + "SearchResultWithIndex": { + "allOf": [ + { + "$ref": "#/components/schemas/SearchResult" + }, + { + "type": "object", + "required": [ + "indexUid" + ], + "properties": { + "indexUid": { + "type": "string" + } + } + } + ] + }, + "SearchResults": { + "type": "object", + "required": [ + "results" + ], + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchResultWithIndex" + } + } + } + }, + "SettingEmbeddingSettings": { + "type": "object", + "description": "\"Technical\" type that is required due to utoipa.\n\nWe did not find a way to implement [`utoipa::ToSchema`] for the [`Setting`] enum,\nbut most types can use the `value_type` macro parameter to workaround that issue.\n\nHowever that type is used in the settings route, including through the macro that auto-generate\nall the settings route, so we can't remap the `value_type`.", + "properties": { + "inner": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "source": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/EmbedderSource", + "description": "The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`" + } + ] + }, + "model": { + "type": [ + "string", + "null" + ], + "description": "The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`" + }, + "revision": { + "type": [ + "string", + "null" + ], + "description": "The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`" + }, + "pooling": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/OverridePooling", + "description": "The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior." + } + ] + }, + "apiKey": { + "type": [ + "string", + "null" + ], + "description": "The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings" + }, + "dimensions": { + "type": [ + "string", + "null" + ], + "description": "The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text." + }, + "binaryQuantized": { + "type": [ + "boolean", + "null" + ], + "description": "Whether to binary quantize the embeddings of this embedder.\n\nBinary quantized embeddings are smaller than regular embeddings, which improves\ndisk usage and retrieval speed, at the cost of relevancy.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🏗️ When set to `true`, embeddings are not regenerated, but they are binary quantized, which takes time.\n\n# Defaults\n\n- Defaults to `false`\n\n# Note\n\nAs binary quantization is a destructive operation, it is not possible to disable again this setting after\nfirst enabling it. If you are unsure of whether the performance-relevancy tradeoff is right for you,\nwe recommend to use this parameter on a test index first." + }, + "documentTemplate": { + "type": [ + "boolean", + "null" + ], + "description": "A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text." + }, + "documentTemplateMaxBytes": { + "type": [ + "integer", + "null" + ], + "description": "Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400", + "minimum": 0 + }, + "url": { + "type": [ + "string", + "null" + ], + "description": "URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated" + }, + "indexingFragments": { + "type": [ + "object", + "null" + ], + "description": "Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "searchFragments": { + "type": [ + "object", + "null" + ], + "description": "Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "request": { + "description": "Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" + }, + "response": { + "description": "Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" + }, + "headers": { + "type": [ + "object", + "null" + ], + "description": "Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "additionalProperties": { + "type": "string" + }, + "propertyNames": { + "type": "string" + } + }, + "searchEmbedder": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SubEmbeddingSettings" + } + ] + }, + "indexingEmbedder": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SubEmbeddingSettings" + } + ] + }, + "distribution": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/DistributionShift", + "description": "Affine transformation applied to the semantic score to make it more comparable to the ranking score.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings" + } + ] + } + }, + "additionalProperties": false + } + ] + } + } + }, + "Settings_Checked": { + "type": "object", + "description": "Holds all the settings for an index. `T` can either be `Checked` if they represents settings\nwhose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a\ncall to `check` will return a `Settings` from a `Settings`.", + "properties": { + "displayedAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Fields displayed in the returned documents.", + "example": [ + "id", + "title", + "description", + "url" + ] + }, + "searchableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Fields in which to search for matching query words sorted by order of importance.", + "example": [ + "title", + "description" + ] + }, + "filterableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/FilterableAttributesRule" + }, + "description": "Attributes to use for faceting and filtering. See [Filtering and Faceted Search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).", + "example": [ + "release_date", + "genre" + ] + }, + "sortableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Attributes to use when sorting search results.", + "example": [ + "release_date" + ] + }, + "rankingRules": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of ranking rules sorted by order of importance. The order is customizable.\n[A list of ordered built-in ranking rules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).", + "example": [ + "words", + "typo", + "proximity", + "attribute", + "exactness" + ] + }, + "stopWords": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of words ignored when present in search queries.", + "example": [ + "the", + "a", + "them", + "their" + ] + }, + "nonSeparatorTokens": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of characters not delimiting where one term begins and ends.", + "example": [ + " ", + "\n" + ] + }, + "separatorTokens": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of characters delimiting where one term begins and ends.", + "example": [ + "S" + ] + }, + "dictionary": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of strings Meilisearch should parse as a single term.", + "example": [ + "iPhone pro" + ] + }, + "synonyms": { + "type": [ + "object", + "null" + ], + "description": "List of associated words treated similarly. A word associated to an array of word as synonyms.", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + }, + "example": { + "he": [ + "she", + "they", + "them" + ], + "phone": [ + "iPhone", + "android" + ] + } + }, + "distinctAttribute": { + "type": [ + "string", + "null" + ], + "description": "Search returns documents with distinct (different) values of the given field.", + "example": "sku" + }, + "proximityPrecision": { + "type": [ + "string", + "null" + ], + "description": "Precision level when calculating the proximity ranking rule.", + "example": "byAttribute" + }, + "typoTolerance": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/TypoSettings", + "description": "Customize typo tolerance feature." + } + ] + }, + "faceting": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/FacetingSettings", + "description": "Faceting settings." + } + ] + }, + "pagination": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/PaginationSettings", + "description": "Pagination settings." + } + ] + }, + "embedders": { + "type": [ + "object", + "null" + ], + "description": "Embedder required for performing semantic search queries.", + "additionalProperties": { + "$ref": "#/components/schemas/SettingEmbeddingSettings" + }, + "propertyNames": { + "type": "string" + } + }, + "searchCutoffMs": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Maximum duration of a search query.", + "example": 50, + "minimum": 0 + }, + "localizedAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/LocalizedAttributesRuleView" + }, + "example": 50 + }, + "facetSearch": { + "type": [ + "boolean", + "null" + ], + "example": true + }, + "prefixSearch": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/PrefixSearchSettings" + } + ] + }, + "chat": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ChatSettings", + "description": "Customize the chat prompting." + } + ] + }, + "vectorStore": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/VectorStoreBackend" + } + ] + } + }, + "additionalProperties": false + }, + "Settings_Unchecked": { + "type": "object", + "description": "Holds all the settings for an index. `T` can either be `Checked` if they represents settings\nwhose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a\ncall to `check` will return a `Settings` from a `Settings`.", + "properties": { + "displayedAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Fields displayed in the returned documents.", + "example": [ + "id", + "title", + "description", + "url" + ] + }, + "searchableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Fields in which to search for matching query words sorted by order of importance.", + "example": [ + "title", + "description" + ] + }, + "filterableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/FilterableAttributesRule" + }, + "description": "Attributes to use for faceting and filtering. See [Filtering and Faceted Search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).", + "example": [ + "release_date", + "genre" + ] + }, + "sortableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Attributes to use when sorting search results.", + "example": [ + "release_date" + ] + }, + "rankingRules": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of ranking rules sorted by order of importance. The order is customizable.\n[A list of ordered built-in ranking rules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).", + "example": [ + "words", + "typo", + "proximity", + "attribute", + "exactness" + ] + }, + "stopWords": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of words ignored when present in search queries.", + "example": [ + "the", + "a", + "them", + "their" + ] + }, + "nonSeparatorTokens": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of characters not delimiting where one term begins and ends.", + "example": [ + " ", + "\n" + ] + }, + "separatorTokens": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of characters delimiting where one term begins and ends.", + "example": [ + "S" + ] + }, + "dictionary": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of strings Meilisearch should parse as a single term.", + "example": [ + "iPhone pro" + ] + }, + "synonyms": { + "type": [ + "object", + "null" + ], + "description": "List of associated words treated similarly. A word associated to an array of word as synonyms.", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + }, + "example": { + "he": [ + "she", + "they", + "them" + ], + "phone": [ + "iPhone", + "android" + ] + } + }, + "distinctAttribute": { + "type": [ + "string", + "null" + ], + "description": "Search returns documents with distinct (different) values of the given field.", + "example": "sku" + }, + "proximityPrecision": { + "type": [ + "string", + "null" + ], + "description": "Precision level when calculating the proximity ranking rule.", + "example": "byAttribute" + }, + "typoTolerance": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/TypoSettings", + "description": "Customize typo tolerance feature." + } + ] + }, + "faceting": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/FacetingSettings", + "description": "Faceting settings." + } + ] + }, + "pagination": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/PaginationSettings", + "description": "Pagination settings." + } + ] + }, + "embedders": { + "type": [ + "object", + "null" + ], + "description": "Embedder required for performing semantic search queries.", + "additionalProperties": { + "$ref": "#/components/schemas/SettingEmbeddingSettings" + }, + "propertyNames": { + "type": "string" + } + }, + "searchCutoffMs": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Maximum duration of a search query.", + "example": 50, + "minimum": 0 + }, + "localizedAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/LocalizedAttributesRuleView" + }, + "example": 50 + }, + "facetSearch": { + "type": [ + "boolean", + "null" + ], + "example": true + }, + "prefixSearch": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/PrefixSearchSettings" + } + ] + }, + "chat": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ChatSettings", + "description": "Customize the chat prompting." + } + ] + }, + "vectorStore": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/VectorStoreBackend" + } + ] + } + }, + "additionalProperties": false + }, + "SimilarQuery": { + "type": "object", + "required": [ + "id", + "offset", + "limit", + "embedder", + "retrieve_vectors", + "show_ranking_score", + "show_ranking_score_details", + "ranking_score_threshold" + ], + "properties": { + "id": { + "type": "string" + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 0 + }, + "filter": {}, + "embedder": { + "type": "string" + }, + "attributes_to_retrieve": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "retrieve_vectors": { + "type": "boolean" + }, + "show_ranking_score": { + "type": "boolean" + }, + "show_ranking_score_details": { + "type": "boolean" + }, + "ranking_score_threshold": { + "type": "number", + "format": "double" + } + } + }, + "SimilarResult": { + "allOf": [ + { + "$ref": "#/components/schemas/HitsInfo" + }, + { + "type": "object", + "required": [ + "hits", + "id", + "processingTimeMs" + ], + "properties": { + "hits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchHit" + } + }, + "id": { + "type": "string" + }, + "processingTimeMs": { + "type": "integer", + "minimum": 0 + } + } + } + ] + }, + "Stats": { + "type": "object", + "required": [ + "databaseSize", + "usedDatabaseSize", + "indexes" + ], + "properties": { + "databaseSize": { + "type": "integer", + "format": "u-int64", + "description": "The disk space used by the database, in bytes.", + "minimum": 0 + }, + "usedDatabaseSize": { + "type": "integer", + "format": "u-int64", + "description": "The size of the database, in bytes.", + "minimum": 0 + }, + "lastUpdate": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "The date of the last update in the RFC 3339 formats. Can be `null` if no update has ever been processed." + }, + "indexes": { + "type": "object", + "description": "The stats of every individual index your API key lets you access.", + "additionalProperties": { + "$ref": "#/components/schemas/IndexStats" + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "Status": { + "type": "string", + "description": "The status of a task.", + "enum": [ + "enqueued", + "processing", + "succeeded", + "failed", + "canceled" + ], + "example": "processing" + }, + "SubEmbeddingSettings": { + "type": "object", + "properties": { + "source": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/EmbedderSource", + "description": "The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`" + } + ] + }, + "model": { + "type": [ + "string", + "null" + ], + "description": "The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`" + }, + "revision": { + "type": [ + "string", + "null" + ], + "description": "The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`" + }, + "pooling": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/OverridePooling", + "description": "The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior." + } + ] + }, + "apiKey": { + "type": [ + "string", + "null" + ], + "description": "The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings" + }, + "dimensions": { + "type": [ + "string", + "null" + ], + "description": "The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text." + }, + "documentTemplate": { + "type": [ + "boolean", + "null" + ], + "description": "A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text." + }, + "documentTemplateMaxBytes": { + "type": [ + "integer", + "null" + ], + "description": "Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400", + "minimum": 0 + }, + "url": { + "type": [ + "string", + "null" + ], + "description": "URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated" + }, + "indexingFragments": { + "type": [ + "object", + "null" + ], + "description": "Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "searchFragments": { + "type": [ + "object", + "null" + ], + "description": "Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "request": { + "description": "Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" + }, + "response": { + "description": "Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" + }, + "headers": { + "type": [ + "object", + "null" + ], + "description": "Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "additionalProperties": { + "type": "string" + }, + "propertyNames": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "SummarizedTaskView": { + "type": "object", + "required": [ + "taskUid", + "status", + "type", + "enqueuedAt" + ], + "properties": { + "taskUid": { + "type": "integer", + "format": "u-int32", + "description": "The task unique identifier.", + "minimum": 0 + }, + "indexUid": { + "type": [ + "string", + "null" + ], + "description": "The index affected by this task. May be `null` if the task is not linked to any index." + }, + "status": { + "$ref": "#/components/schemas/Status", + "description": "The status of the task." + }, + "type": { + "$ref": "#/components/schemas/Kind", + "description": "The type of the task." + }, + "enqueuedAt": { + "type": "string", + "format": "date-time", + "description": "The date on which the task was enqueued." + } + } + }, + "SwapIndexesPayload": { + "type": "object", + "required": [ + "indexes", + "rename" + ], + "properties": { + "indexes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IndexUid" + }, + "description": "Array of the two indexUids to be swapped" + }, + "rename": { + "type": "boolean", + "description": "If set to true, instead of swapping the left and right indexes it'll change the name of the first index to the second" + } + } + }, + "TaskNetwork": { + "oneOf": [ + { + "type": "object", + "required": [ + "origin" + ], + "properties": { + "origin": { + "$ref": "#/components/schemas/Origin" + } + } + }, + { + "type": "object", + "required": [ + "remote_tasks" + ], + "properties": { + "remote_tasks": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/RemoteTask" + }, + "propertyNames": { + "type": "string" + } + } + } + } + ] + }, + "TaskView": { + "type": "object", + "required": [ + "uid", + "status", + "type", + "enqueuedAt" + ], + "properties": { + "uid": { + "type": "integer", + "format": "u-int32", + "description": "The unique sequential identifier of the task.", + "example": 4312, + "minimum": 0 + }, + "batchUid": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "description": "The unique identifier of the index where this task is operated.", + "example": "movies", + "minimum": 0 + }, + "indexUid": { + "type": [ + "string", + "null" + ] + }, + "status": { + "$ref": "#/components/schemas/Status" + }, + "type": { + "$ref": "#/components/schemas/Kind", + "description": "The type of the task." + }, + "canceledBy": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "description": "The uid of the task that performed the taskCancelation if the task has been canceled.", + "example": 4326, + "minimum": 0 + }, + "details": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/DetailsView" + } + ] + }, + "error": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ResponseError" + } + ] + }, + "duration": { + "type": [ + "string", + "null" + ], + "description": "Total elasped time the engine was in processing state expressed as a `ISO-8601` duration format.", + "example": null + }, + "enqueuedAt": { + "type": "string", + "description": "An `RFC 3339` format for date/time/duration.", + "example": "2024-08-08_14:12:09.393Z" + }, + "startedAt": { + "type": "string", + "description": "An `RFC 3339` format for date/time/duration.", + "example": "2024-08-08_14:12:09.393Z" + }, + "finishedAt": { + "type": "string", + "description": "An `RFC 3339` format for date/time/duration.", + "example": "2024-08-08_14:12:09.393Z" + }, + "network": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/TaskNetwork" + } + ] + } + } + }, + "TypoSettings": { + "type": "object", + "properties": { + "enabled": { + "type": [ + "boolean", + "null" + ], + "example": true + }, + "minWordSizeForTypos": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/MinWordSizeTyposSetting" + } + ] + }, + "disableOnWords": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "example": [ + "iPhone", + "phone" + ], + "uniqueItems": true + }, + "disableOnAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "example": [ + "uuid", + "url" + ], + "uniqueItems": true + }, + "disableOnNumbers": { + "type": [ + "boolean", + "null" + ], + "example": true + } + }, + "additionalProperties": false + }, + "Unchecked": { + "default": null + }, + "UpdateIndexRequest": { + "type": "object", + "properties": { + "primaryKey": { + "type": [ + "string", + "null" + ], + "description": "The new primary key of the index" + }, + "uid": { + "type": [ + "string", + "null" + ], + "description": "The new uid of the index (for renaming)" + } + } + }, + "UpdateStderrLogs": { + "type": "object", + "required": [ + "target" + ], + "properties": { + "target": { + "type": "string", + "description": "Lets you specify which parts of the code you want to inspect and is formatted like that: code_part=log_level,code_part=log_level\n- If the `code_part` is missing, then the `log_level` will be applied to everything.\n- If the `log_level` is missing, then the `code_part` will be selected in `info` log level.", + "default": "info", + "example": "milli=trace,index_scheduler,actix_web=off" + } + } + }, + "Vec": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "VectorStoreBackend": { + "type": "string", + "enum": [ + "stable", + "experimental" + ] + }, + "VersionResponse": { + "type": "object", + "required": [ + "commitSha", + "commitDate", + "pkgVersion" + ], + "properties": { + "commitSha": { + "type": "string", + "description": "The commit used to compile this build of Meilisearch." + }, + "commitDate": { + "type": "string", + "description": "The date of this build." + }, + "pkgVersion": { + "type": "string", + "description": "The version of Meilisearch." + } + } + }, + "WebhookResults": { + "type": "object", + "required": [ + "results" + ], + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookWithMetadata" + } + } + } + }, + "WebhookSettings": { + "type": "object", + "properties": { + "url": { + "type": [ + "string", + "null" + ], + "example": "https://your.site/on-tasks-completed" + }, + "headers": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "type": "string" + }, + "propertyNames": { + "type": "string" + }, + "example": { + "Authorization": "Bearer a-secret-token" + } + } + } + }, + "WebhookWithMetadata": { + "allOf": [ + { + "$ref": "#/components/schemas/WebhookSettings" + }, + { + "type": "object", + "required": [ + "uuid", + "isEditable" + ], + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "isEditable": { + "type": "boolean" + } + } + } + ] + }, + "u32": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "securitySchemes": { + "Bearer": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "Uuidv4, string or JWT", + "description": "An API key is a token that you provide when making API calls. Include the token in a header parameter called `Authorization`.\nExample: `Authorization: Bearer 8fece4405662dd830e4cb265e7e047aab2e79672a760a12712d2a263c9003509`" + } + } + }, + "tags": [ + { + "name": "Stats", + "description": "Stats gives extended information and metrics about indexes and the Meilisearch database." + }, + { + "name": "Tasks", + "description": "The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html).", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/tasks" + } + }, + { + "name": "Batches", + "description": "The /batches route gives information about the progress of batches of asynchronous operations.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/batches", + } + }, + { + "name": "Indexes", + "description": "An index is an entity that gathers a set of [documents](https://www.meilisearch.com/docs/learn/getting_started/documents) with its own [settings](https://www.meilisearch.com/docs/reference/api/settings). Learn more about indexes.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/indexes", + } + }, + { + "name": "Documents", + "description": "Documents are objects composed of fields that can store any type of data. Each field contains an attribute and its associated value. Documents are stored inside [indexes](https://www.meilisearch.com/docs/learn/getting_started/indexes).", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/learn/getting_started/documents" + } + }, + { + "name": "Facet Search", + "description": "The `/facet-search` route allows you to search for facet values. Facet search supports prefix search and typo tolerance. The returned hits are sorted lexicographically in ascending order. You can configure how facets are sorted using the sortFacetValuesBy property of the faceting index settings.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/facet_search" + } + }, + { + "name": "Similar documents", + "description": "The /similar route uses AI-powered search to return a number of documents similar to a target document.\n\nMeilisearch exposes two routes for retrieving similar documents: POST and GET. In the majority of cases, POST will offer better performance and ease of use.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/similar" + } + }, + { + "name": "Settings", + "description": "Use the /settings route to customize search settings for a given index. You can either modify all index settings at once using the update settings endpoint, or use a child route to configure a single setting.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/settings" + } + }, + { + "name": "Search", + "description": "Meilisearch exposes two routes to perform searches:\n\n- A POST route: this is the preferred route when using API authentication, as it allows [preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) caching and better performance.\n- A GET route: the usage of this route is discouraged, unless you have good reason to do otherwise (specific caching abilities for example)", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/search" + } + }, + { + "name": "Snapshots", + "description": "The snapshots route allows the creation of database snapshots. Snapshots are .snapshot files that can be used to launch Meilisearch.\nCreating a snapshot is also referred to as exporting it, whereas launching Meilisearch with a snapshot is referred to as importing it.\nDuring a snapshot export, all indexes of the current instance are exported—together with their documents and settings—and saved as a single .snapshot file.\nDuring a snapshot import, all indexes contained in the indicated .snapshot file are imported along with their associated documents and settings.\nSnapshot imports are performed at launch using an option.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/snapshots" + } + }, + { + "name": "Dumps", + "description": "The `dumps` route allows the creation of database dumps.\nDumps are `.dump` files that can be used to launch Meilisearch. Dumps are compatible between Meilisearch versions.\nCreating a dump is also referred to as exporting it, whereas launching Meilisearch with a dump is referred to as importing it.\nDuring a [dump export](https://www.meilisearch.com/docs/reference/api/dump#create-a-dump), all indexes of the current instance are\nexported—together with their documents and settings—and saved as a single `.dump` file. During a dump import,\nall indexes contained in the indicated `.dump` file are imported along with their associated documents and settings.\nAny existing index with the same uid as an index in the dump file will be overwritten.\nDump imports are [performed at launch](https://www.meilisearch.com/docs/learn/advanced/dumps#importing-a-dump) using an option.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/dump" + } + }, + { + "name": "Keys", + "description": "Manage API `keys` for a Meilisearch instance. Each key has a given set of permissions.\nYou must have the master key or the default admin key to access the keys route. More information about the keys and their rights.\nAccessing any route under `/keys` without having set a master key will result in an error.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/keys" + } + }, + { + "name": "Logs", + "description": "Everything about retrieving or customizing logs.\nCurrently [experimental](https://www.meilisearch.com/docs/learn/experimental/overview).", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/learn/experimental/log_customization" + } + }, + { + "name": "Multi-search", + "description": "The `/multi-search` route allows you to perform multiple search queries on one or more indexes by bundling them into a single HTTP request. Multi-search is also known as federated search.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/multi_search" + } + }, + { + "name": "Experimental features", + "description": "The `/experimental-features` route allows you to activate or deactivate some of Meilisearch's experimental features.\n\nThis route is **synchronous**. This means that no task object will be returned, and any activated or deactivated features will be made available or unavailable immediately.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/experimental_features" + } + }, + { + "name": "Export", + "description": "The `/export` route allows you to trigger an export process to a remote Meilisearch instance.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/export" + } + }, + { + "name": "Network", + "description": "The `/network` route allows you to describe the topology of a network of Meilisearch instances.\n\nThis route is **synchronous**. This means that no task object will be returned, and any change to the network will be made available immediately.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/network" + } + }, + { + "name": "Webhooks", + "description": "The `/webhooks` route allows you to register endpoints to be called once tasks are processed.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/webhooks" + } + } + ] +} \ No newline at end of file From 597d73be0a5d8a8faed3807060da8b8848d2e00d Mon Sep 17 00:00:00 2001 From: gui machiavelli Date: Thu, 23 Oct 2025 18:56:04 +0200 Subject: [PATCH 02/45] add overview --- docs.json | 16 ++++++- openapi.json | 115 ++++++++++++++++++++++++++------------------------- 2 files changed, 73 insertions(+), 58 deletions(-) diff --git a/docs.json b/docs.json index e43e7549a..9fffac2c4 100644 --- a/docs.json +++ b/docs.json @@ -162,7 +162,21 @@ "anchors": [ { "anchor": "Open API", - "openapi": "openapi.json" + "groups": [ + { + "group": "test", + "pages": [ + "learn/getting_started/cloud_quick_start" + ] + }, + { + "group": "Endpoints", + "openapi": { + "source": "openapi.json", + "directory": "endpoints" + } + } + ] }, { "anchor": "Learn", diff --git a/openapi.json b/openapi.json index 5264b794a..e1fe2b8b4 100644 --- a/openapi.json +++ b/openapi.json @@ -20,60 +20,6 @@ } ], "paths": { - "/dumps": { - "post": { - "tags": [ - "Dumps" - ], - "summary": "Create a dump", - "description": "Triggers a dump creation process. Once the process is complete, a dump is created in the\n[dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory).\nIf the dump directory does not exist yet, it will be created.", - "operationId": "create_dump", - "responses": { - "202": { - "description": "Dump is being created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 0, - "indexUid": null, - "status": "enqueued", - "type": "DumpCreation", - "enqueuedAt": "2021-01-01T09:39:00.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "dumps.create", - "dumps.*", - "*" - ] - } - ] - } - }, "/batches": { "get": { "tags": [ @@ -375,7 +321,7 @@ "/batches/{batchUid}": { "get": { "tags": [ - "Batches" + "Batch number 2" ], "summary": "Get one batch", "description": "Get a single batch.", @@ -454,6 +400,60 @@ ] } }, + "/dumps": { + "post": { + "tags": [ + "Dumps1" + ], + "summary": "Create a dumppty", + "description": "Triggers a dump creation process. Once the process is complete, a dump is created in the\n[dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory).\nIf the dump directory does not exist yet, it will be created.", + "operationId": "create_dump", + "responses": { + "202": { + "description": "Dump is being created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 0, + "indexUid": null, + "status": "enqueued", + "type": "DumpCreation", + "enqueuedAt": "2021-01-01T09:39:00.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "dumps.create", + "dumps.*", + "*" + ] + } + ] + } + }, "/experimental-features": { "get": { @@ -14848,10 +14848,11 @@ } }, { - "name": "Dumps", + "name": "Dumps2", "description": "The `dumps` route allows the creation of database dumps.\nDumps are `.dump` files that can be used to launch Meilisearch. Dumps are compatible between Meilisearch versions.\nCreating a dump is also referred to as exporting it, whereas launching Meilisearch with a dump is referred to as importing it.\nDuring a [dump export](https://www.meilisearch.com/docs/reference/api/dump#create-a-dump), all indexes of the current instance are\nexported—together with their documents and settings—and saved as a single `.dump` file. During a dump import,\nall indexes contained in the indicated `.dump` file are imported along with their associated documents and settings.\nAny existing index with the same uid as an index in the dump file will be overwritten.\nDump imports are [performed at launch](https://www.meilisearch.com/docs/learn/advanced/dumps#importing-a-dump) using an option.", "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/dump" + "url": "https://www.meilisearch.com/docs/reference/api/dump", + "description": "lorem ipsum" } }, { From 1db66d00f55565e1a66d4bbf4f6e85e41c878e88 Mon Sep 17 00:00:00 2001 From: gui machiavelli Date: Thu, 13 Nov 2025 15:31:35 +0100 Subject: [PATCH 03/45] set references to top level for easier debugging --- docs.json | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/docs.json b/docs.json index 9fffac2c4..75f67e90f 100644 --- a/docs.json +++ b/docs.json @@ -162,21 +162,7 @@ "anchors": [ { "anchor": "Open API", - "groups": [ - { - "group": "test", - "pages": [ - "learn/getting_started/cloud_quick_start" - ] - }, - { - "group": "Endpoints", - "openapi": { - "source": "openapi.json", - "directory": "endpoints" - } - } - ] + "openapi": "openapi.json" }, { "anchor": "Learn", From e46d73f15eba55353f1f4cba5df3e6c77a8cb2a9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 13 Nov 2025 14:32:38 +0000 Subject: [PATCH 04/45] Update code samples [skip ci] --- .../generated-code-samples/code_samples_compact_index_1.mdx | 2 +- .../code_samples_getting_started_add_documents.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/snippets/generated-code-samples/code_samples_compact_index_1.mdx b/snippets/generated-code-samples/code_samples_compact_index_1.mdx index 29a9dd481..a3c0bbed9 100644 --- a/snippets/generated-code-samples/code_samples_compact_index_1.mdx +++ b/snippets/generated-code-samples/code_samples_compact_index_1.mdx @@ -32,4 +32,4 @@ let task: TaskInfo = client .await .unwrap(); ``` - \ No newline at end of file + diff --git a/snippets/generated-code-samples/code_samples_getting_started_add_documents.mdx b/snippets/generated-code-samples/code_samples_getting_started_add_documents.mdx index f77bbe050..fbd773200 100644 --- a/snippets/generated-code-samples/code_samples_getting_started_add_documents.mdx +++ b/snippets/generated-code-samples/code_samples_getting_started_add_documents.mdx @@ -288,4 +288,4 @@ var client = MeiliSearchClient('http://localhost:7700', 'aSampleMasterKey'); final json = await File('movies.json').readAsString(); await client.index('movies').addDocumentsJson(json); ``` - \ No newline at end of file + From fb65cd9f66e8711adcd27f0004eb8f20c76b88bc Mon Sep 17 00:00:00 2001 From: gui machiavelli Date: Tue, 9 Dec 2025 16:55:38 +0100 Subject: [PATCH 05/45] add openapi file with code samples --- docs.json | 2 +- openapi-curqui.json | 23302 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 23303 insertions(+), 1 deletion(-) create mode 100644 openapi-curqui.json diff --git a/docs.json b/docs.json index 75f67e90f..530175e2d 100644 --- a/docs.json +++ b/docs.json @@ -162,7 +162,7 @@ "anchors": [ { "anchor": "Open API", - "openapi": "openapi.json" + "openapi": "openapi-curqui.json" }, { "anchor": "Learn", diff --git a/openapi-curqui.json b/openapi-curqui.json new file mode 100644 index 000000000..e60b3ed86 --- /dev/null +++ b/openapi-curqui.json @@ -0,0 +1,23302 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "meilisearch", + "description": "Meilisearch HTTP server", + "contact": { + "name": "Quentin de Quelen", + "email": "quentin@dequelen.me" + }, + "license": { + "name": "MIT", + "identifier": "MIT" + }, + "version": "1.28.2" + }, + "servers": [ + { + "url": "/", + "description": "Local server" + } + ], + "paths": { + "/batches": { + "get": { + "tags": [ + "Batches" + ], + "summary": "Get batches", + "description": "List all batches, regardless of index. The batch objects are contained in the results array.\nBatches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first.\nBatch results are paginated and can be filtered with query parameters.", + "operationId": "get_batches", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "Maximum number of results to return.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "default": 20, + "minimum": 0 + }, + "example": 12 + }, + { + "name": "from", + "in": "query", + "description": "Fetch the next set of results from the given uid.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "example": 12421 + }, + { + "name": "reverse", + "in": "query", + "description": "The order you want to retrieve the objects.", + "required": false, + "schema": { + "type": "boolean" + }, + "example": true + }, + { + "name": "batchUids", + "in": "query", + "description": "Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "example": 12421 + }, + { + "name": "uids", + "in": "query", + "description": "Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598, + "*" + ] + }, + { + "name": "canceledBy", + "in": "query", + "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 374, + "*" + ] + }, + { + "name": "types", + "in": "query", + "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "documentAdditionOrUpdate", + "*" + ] + }, + { + "name": "statuses", + "in": "query", + "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Status" + } + }, + "example": [ + "succeeded", + "failed", + "canceled", + "enqueued", + "processing", + "*" + ] + }, + { + "name": "indexUids", + "in": "query", + "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "movies", + "theater", + "*" + ] + }, + { + "name": "afterEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + } + ], + "responses": { + "200": { + "description": "Return the batches", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AllBatches" + }, + "example": { + "results": [ + { + "uid": 2, + "details": { + "stopWords": [ + "of", + "the" + ] + }, + "progress": null, + "stats": { + "totalNbTasks": 1, + "status": { + "succeeded": 1 + }, + "types": { + "settingsUpdate": 1 + }, + "indexUids": { + "INDEX_NAME": 1 + } + }, + "duration": "PT0.110083S", + "startedAt": "2024-12-10T15:49:04.995321Z", + "finishedAt": "2024-12-10T15:49:05.105404Z" + } + ], + "total": 3, + "limit": 1, + "from": 2, + "next": 1 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.get", + "tasks.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.GetBatches();" + }, + { + "lang": "JS", + "source": "client.batches.getBatches();" + }, + { + "lang": "PHP", + "source": "$client->getBatches();" + }, + { + "lang": "Python", + "source": "client.get_batches()" + }, + { + "lang": "Ruby", + "source": "client.batches" + }, + { + "lang": "Rust", + "source": "let mut query = meilisearch_sdk::batches::BatchesQuery::new(&client);\nquery.with_limit(20);\nlet batches: meilisearch_sdk::batches::BatchesResults =\n client.get_batches_with(&query).await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches'" + } + ] + } + }, + "/batches/{batchUid}": { + "get": { + "tags": [ + "Batches" + ], + "summary": "Get one batch", + "description": "Get a single batch.", + "operationId": "get_batch", + "parameters": [ + { + "name": "batchUid", + "in": "path", + "description": "The unique batch id", + "required": true, + "schema": { + "type": "string" + }, + "example": "8685" + } + ], + "responses": { + "200": { + "description": "Return the batch", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchView" + }, + "example": { + "uid": 1, + "details": { + "receivedDocuments": 1, + "indexedDocuments": 1 + }, + "progress": null, + "stats": { + "totalNbTasks": 1, + "status": { + "succeeded": 1 + }, + "types": { + "documentAdditionOrUpdate": 1 + }, + "indexUids": { + "INDEX_NAME": 1 + } + }, + "duration": "PT0.364788S", + "startedAt": "2024-12-10T15:48:49.672141Z", + "finishedAt": "2024-12-10T15:48:50.036929Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.get", + "tasks.*", + "*" + ] + } + ] + } + }, + "/dumps": { + "post": { + "tags": [ + "Dumps" + ], + "summary": "Create a dump", + "description": "Triggers a dump creation process. Once the process is complete, a dump is created in the\n[dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory).\nIf the dump directory does not exist yet, it will be created.", + "operationId": "create_dump", + "responses": { + "202": { + "description": "Dump is being created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 0, + "indexUid": null, + "status": "enqueued", + "type": "DumpCreation", + "enqueuedAt": "2021-01-01T09:39:00.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "dumps.create", + "dumps.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.CreateDumpAsync();" + }, + { + "lang": "Dart", + "source": "await client.createDump();" + }, + { + "lang": "Go", + "source": "resp, err := client.CreateDump()" + }, + { + "lang": "JS", + "source": "client.createDump()" + }, + { + "lang": "Java", + "source": "client.createDump();" + }, + { + "lang": "PHP", + "source": "$client->createDump();" + }, + { + "lang": "Python", + "source": "client.create_dump()" + }, + { + "lang": "Ruby", + "source": "client.create_dump" + }, + { + "lang": "Rust", + "source": "client\n .create_dump()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.createDump { result in\n switch result {\n case .success(let dumpStatus):\n print(dumpStatus)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/dumps'" + } + ] + } + }, + "/experimental-features": { + "get": { + "tags": [ + "Experimental features" + ], + "summary": "Get all experimental features", + "description": "Get a list of all experimental features that can be activated via the /experimental-features route and whether or not they are currently activated.", + "operationId": "get_features", + "responses": { + "200": { + "description": "Experimental features are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuntimeTogglableFeatures" + }, + "example": { + "metrics": true, + "logsRoute": false, + "editDocumentsByFunction": false, + "containsFilter": false, + "network": false, + "getTaskDocumentsRoute": false, + "compositeEmbedders": false, + "chatCompletions": false, + "multimodal": false, + "vectorStoreSetting": false + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "experimental_features.get", + "experimental_features.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.ExperimentalFeatures().Get()" + }, + { + "lang": "Ruby", + "source": "client.experimental_features" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nlet res = features\n .get()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/experimental-features/'" + } + ] + }, + "patch": { + "tags": [ + "Experimental features" + ], + "summary": "Configure experimental features", + "description": "Activate or deactivate experimental features.", + "operationId": "patch_features", + "responses": { + "200": { + "description": "Experimental features are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuntimeTogglableFeatures" + }, + "example": { + "metrics": true, + "logsRoute": false, + "editDocumentsByFunction": false, + "containsFilter": false, + "network": false, + "getTaskDocumentsRoute": false, + "compositeEmbedders": false, + "chatCompletions": false, + "multimodal": false, + "vectorStoreSetting": false + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "experimental_features.update", + "experimental_features.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.ExperimentalFeatures().SetMetrics(true).Update()" + }, + { + "lang": "Ruby", + "source": "client.update_experimental_features(metrics: true)" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nfeatures.set_metrics(true)\nlet res = features\n .update()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/experimental-features/' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"metrics\": true\n }'" + } + ] + } + }, + "/export": { + "post": { + "tags": [ + "Export" + ], + "operationId": "export", + "responses": { + "202": { + "description": "Export successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 1, + "status": "enqueued", + "type": "export", + "enqueuedAt": "2021-08-11T09:25:53.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "export", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Java", + "source": "Map indexes = new HashMap<>();\nindexes.put(\"*\", ExportIndexFilter.builder().overrideSettings(true).build());\nExportRequest request = ExportRequest.builder().url(\"TARGET_INSTANCE_URL\").indexes(indexes).build();\nclient.export(request);" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/export' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"TARGET_INSTANCE_URL\",\n \"indexes\": {\n \"*\": {\n \"overrideSettings\": true\n }\n }\n }'" + } + ] + } + }, + "/health": { + "get": { + "tags": [ + "Health" + ], + "summary": "Get Health", + "description": "The health check endpoint enables you to periodically test the health of your Meilisearch instance.", + "operationId": "get_health", + "responses": { + "200": { + "description": "Instance is healthy", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HealthResponse" + }, + "example": { + "status": "available" + } + } + } + } + }, + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.HealthAsync();" + }, + { + "lang": "Dart", + "source": "await client.health();" + }, + { + "lang": "Go", + "source": "client.Health()" + }, + { + "lang": "JS", + "source": "client.health()" + }, + { + "lang": "Java", + "source": "client.health();" + }, + { + "lang": "PHP", + "source": "$client->health();" + }, + { + "lang": "Python", + "source": "client.health()" + }, + { + "lang": "Ruby", + "source": "client.health" + }, + { + "lang": "Rust", + "source": "// health() return an Err() if the server is not healthy, so this example would panic due to the unwrap\nclient\n .health()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.health { (result) in\n switch result {\n case .success:\n print(\"Healthy!\")\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/health'" + } + ] + } + }, + "/indexes": { + "get": { + "tags": [ + "Indexes" + ], + "summary": "List indexes", + "description": "List all indexes.", + "operationId": "list_indexes", + "parameters": [ + { + "name": "offset", + "in": "query", + "description": "The number of indexes to skip before starting to retrieve anything", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "example": 100 + }, + { + "name": "limit", + "in": "query", + "description": "The number of indexes to retrieve", + "required": false, + "schema": { + "type": "integer", + "default": 20, + "minimum": 0 + }, + "example": 1 + } + ], + "responses": { + "200": { + "description": "Indexes are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationView_IndexView" + }, + "example": { + "results": [ + { + "uid": "movies", + "primaryKey": "movie_id", + "createdAt": "2019-11-20T09:40:33.711324Z", + "updatedAt": "2019-11-20T09:40:33.711324Z" + } + ], + "limit": 1, + "offset": 0, + "total": 1 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "indexes.get", + "indexes.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.GetAllIndexesAsync(new IndexesQuery { Limit = 3 });" + }, + { + "lang": "Dart", + "source": "await client.getIndexes(params: IndexesQuery(limit: 3));" + }, + { + "lang": "Go", + "source": "client.GetIndexes(&meilisearch.IndexesQuery{\n Limit: 3,\n})" + }, + { + "lang": "JS", + "source": "client.getIndexes({ limit: 3 })" + }, + { + "lang": "Java", + "source": "IndexesQuery query = new IndexesQuery().setLimit(3);\nclient.getIndexes(query);" + }, + { + "lang": "PHP", + "source": "$client->getIndexes((new IndexesQuery())->setLimit(3));" + }, + { + "lang": "Python", + "source": "client.get_indexes({'limit': 3})" + }, + { + "lang": "Ruby", + "source": "client.indexes(limit: 3)" + }, + { + "lang": "Rust", + "source": "let mut indexes = IndexesQuery::new(&client)\n .with_limit(3)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.getIndexes { (result) in\n switch result {\n case .success(let indexes):\n print(indexes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes?limit=3'" + } + ] + }, + "post": { + "tags": [ + "Indexes" + ], + "summary": "Create index", + "description": "Create an index.", + "operationId": "create_index", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IndexCreateRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "indexCreation", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "indexes.create", + "indexes.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "TaskInfo task = await client.CreateIndexAsync(\"movies\", \"id\");" + }, + { + "lang": "Dart", + "source": "await client.createIndex('movies', primaryKey: 'id');" + }, + { + "lang": "Go", + "source": "client.CreateIndex(&meilisearch.IndexConfig{\n Uid: \"movies\",\n PrimaryKey: \"id\",\n})" + }, + { + "lang": "JS", + "source": "client.createIndex('movies', { primaryKey: 'id' })" + }, + { + "lang": "Java", + "source": "client.createIndex(\"movies\", \"id\");" + }, + { + "lang": "PHP", + "source": "$client->createIndex('movies', ['primaryKey' => 'id']);" + }, + { + "lang": "Python", + "source": "client.create_index('movies', {'primaryKey': 'id'})" + }, + { + "lang": "Ruby", + "source": "client.create_index('movies', primary_key: 'id')" + }, + { + "lang": "Rust", + "source": "client.create_index(\"movies\", Some(\"id\"))\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.createIndex(uid: \"movies\", primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"uid\": \"movies\",\n \"primaryKey\": \"id\"\n }'" + } + ] + } + }, + "/indexes/{indexUid}": { + "get": { + "tags": [ + "Indexes" + ], + "summary": "Get index", + "description": "Get information about an index.", + "operationId": "get_index", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "The index is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IndexView" + }, + "example": { + "uid": "movies", + "primaryKey": "movie_id", + "createdAt": "2019-11-20T09:40:33.711324Z", + "updatedAt": "2019-11-20T09:40:33.711324Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "indexes.get", + "indexes.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.GetIndexAsync(\"movies\");" + }, + { + "lang": "Dart", + "source": "await client.getIndex('movies');" + }, + { + "lang": "Go", + "source": "client.GetIndex(\"movies\")" + }, + { + "lang": "JS", + "source": "client.index('movies').getRawInfo()" + }, + { + "lang": "Java", + "source": "client.getIndex(\"movies\");" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->fetchRawInfo();" + }, + { + "lang": "Python", + "source": "client.get_index('movies')" + }, + { + "lang": "Ruby", + "source": "client.fetch_index('movies')" + }, + { + "lang": "Rust", + "source": "let movies: Index = client\n .get_index(\"movies\")\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.getIndex(\"movies\") { (result) in\n switch result {\n case .success(let index):\n print(index)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies'" + } + ] + }, + "delete": { + "tags": [ + "Indexes" + ], + "summary": "Delete index", + "description": "Delete an index.", + "operationId": "delete_index", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "202": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 0, + "indexUid": "movies", + "status": "enqueued", + "type": "indexDeletion", + "enqueuedAt": "2021-01-01T09:39:00.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "indexes.delete", + "indexes.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.DeleteIndexAsync(\"movies\");" + }, + { + "lang": "Dart", + "source": "await client.index('movies').delete();" + }, + { + "lang": "Go", + "source": "client.DeleteIndex(\"movies\")\n// OR\nclient.Index(\"movies\").Delete()" + }, + { + "lang": "JS", + "source": "client.deleteIndex('movies')" + }, + { + "lang": "Java", + "source": "client.deleteIndex(\"movies\");" + }, + { + "lang": "PHP", + "source": "$client->deleteIndex('movies');" + }, + { + "lang": "Python", + "source": "client.delete_index('movies')\n// OR\nclient.index('movies').delete()" + }, + { + "lang": "Ruby", + "source": "client.delete_index('movies')" + }, + { + "lang": "Rust", + "source": "client.index(\"movies\")\n .delete()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").delete { (result) in\n switch result {\n case .success:\n print(\"Index deleted\")\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies'" + } + ] + }, + "patch": { + "tags": [ + "Indexes" + ], + "summary": "Update index", + "description": "Update the `primaryKey` of an index.\nReturn an error if the index doesn't exists yet or if it contains documents.", + "operationId": "update_index", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateIndexRequest" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 0, + "indexUid": "movies", + "status": "enqueued", + "type": "indexUpdate", + "enqueuedAt": "2021-01-01T09:39:00.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "indexes.update", + "indexes.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "TaskInfo task = await client.UpdateIndexAsync(\"movies\", \"id\");" + }, + { + "lang": "Dart", + "source": "await client.index('movies').update(primaryKey: 'id');" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateIndex(&meilisearch.UpdateIndexRequestParams{\n PrimaryKey: \"id\",\n})" + }, + { + "lang": "JS", + "source": "client.updateIndex('movies', { primaryKey: 'id' })" + }, + { + "lang": "Java", + "source": "client.updateIndex(\"movies\", \"id\");" + }, + { + "lang": "PHP", + "source": "$client->updateIndex('movies', ['primaryKey' => 'id']);" + }, + { + "lang": "Python", + "source": "client.index('movies').update(primary_key='id')" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update(primary_key: 'movie_id')" + }, + { + "lang": "Rust", + "source": "let task = IndexUpdater::new(\"movies\", &client)\n .with_primary_key(\"movie_review_id\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").update(primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"primaryKey\": \"id\" }'" + } + ] + } + }, + "/indexes/{indexUid}/compact": { + "post": { + "tags": [ + "Compact an index" + ], + "summary": "Compact an index", + "operationId": "compact", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "202": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentDeletion", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Java", + "source": "client.index(\"INDEX_NAME\").compact();" + }, + { + "lang": "Python", + "source": "client.index('movies').compact()" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"INDEX_UID\")\n .compact()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_UID/compact'" + } + ] + } + }, + "/indexes/{indexUid}/documents": { + "get": { + "tags": [ + "Documents" + ], + "summary": "Get documents", + "description": "Get documents by batches.", + "operationId": "get_documents", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "fields", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "retrieveVectors", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ids", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "example": "popularity > 1000" + }, + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationView_Value" + }, + "example": { + "results": [ + { + "id": 25684, + "title": "American Ninja 5", + "poster": "https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg", + "overview": "When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.", + "release_date": 725846400 + }, + { + "id": 45881, + "title": "The Bridge of San Luis Rey", + "poster": "https://image.tmdb.org/t/p/w500/4X7quIcdkc24Cveg5XdpfRqxtYA.jpg", + "overview": "The Bridge of San Luis Rey is American author Thornton Wilder's second novel, first published in 1927 to worldwide acclaim. It tells the story of several interrelated people who die in the collapse of an Inca rope-fiber suspension bridge in Peru, and the events that lead up to their being on the bridge.[ A friar who has witnessed the tragic accident then goes about inquiring into the lives of the victims, seeking some sort of cosmic answer to the question of why each had to die. The novel won the Pulitzer Prize in 1928.", + "release_date": 1072915200 + } + ], + "limit": 20, + "offset": 0, + "total": 2 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.get", + "documents.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() { Limit = 2, Filter = \"genres = action\" });" + }, + { + "lang": "Go", + "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"movies\").GetDocuments(&meilisearch.DocumentsQuery{\n Limit: 2,\n Filter: \"genres = action\",\n}, &result)" + }, + { + "lang": "JS", + "source": "client.index('movies').getDocuments({\n limit: 2,\n filter: 'genres = action'\n})" + }, + { + "lang": "Java", + "source": "DocumentsQuery query = new DocumentsQuery().setLimit(2).setFilter(new String[] {\"genres = action\"});\nclient.index(\"movies\").getDocuments(query, TargetClassName.class);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getDocuments((new DocumentsQuery())->setFilter('genres = action')->setLimit(2));" + }, + { + "lang": "Python", + "source": "client.index('movies').get_documents({\n 'limit':2, 'filter': 'genres=action',\n 'sort': ['rating:desc', 'release_date:asc'] # list format\n})" + }, + { + "lang": "ruby", + "source": "client.index('movies').get_documents(limit: 2, filter: 'genres = action')" + }, + { + "lang": "Rust", + "source": "let index = client.index(\"movies\");\nlet documents: DocumentsResults = DocumentsQuery::new(&index)\n .with_filter(\"genres = action\")\n .with_limit(2)\n .execute::()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getDocuments(params: DocumentsQuery(limit: 2)) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let movies):\n print(movies)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents?limit=2&filter=genres=action'" + } + ] + }, + "put": { + "tags": [ + "Documents" + ], + "summary": "Add or update documents", + "description": "Add a list of documents or update them if they already exist.\nIf you send an already existing document (same id) the old document will be only partially updated according to the fields of the new document. Thus, any fields not present in the new document are kept and remained unchanged.\nTo completely overwrite a document, see Add or replace documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document. `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved `_vectors` field in your documents.\n> It can accept an array of floats, multiple arrays of floats in an outer array or an object.\n> This object accepts keys corresponding to the different embedders defined your index settings.", + "operationId": "update_documents", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "primaryKey", + "in": "query", + "description": "The primary key of the documents. primaryKey is optional. If you want to set the primary key of your index through this route,\nit only has to be done the first time you add documents to the index. After which it will be ignored if given.", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "csvDelimiter", + "in": "query", + "description": "Customize the csv delimiter when importing CSV documents.", + "required": true, + "schema": { + "type": "string", + "default": "," + }, + "example": ";" + }, + { + "name": "customMetadata", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "example": "custom" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentAdditionOrUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.add", + "documents.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var movie = new[]\n{\n new Movie { Id = \"287947\", Title = \"Shazam ⚡️\", Genres = \"comedy\" }\n};\nawait index.UpdateDocumentsAsync(movie);" + }, + { + "lang": "Go", + "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\",\n },\n}\nclient.Index(\"movies\").UpdateDocuments(documents, nil)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateDocuments([{\n id: 287947,\n title: 'Shazam ⚡️',\n genres: 'comedy'\n}])" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateDocuments(\"[{\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam ⚡️\\\",\"\n + \"\\\"genres\\\": \\\"comedy\\\"\"\n + \"}]\"\n);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateDocuments([\n [\n 'id' => 287947,\n 'title' => 'Shazam ⚡️',\n 'genres' => 'comedy'\n ]\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_documents([{\n 'id': 287947,\n 'title': 'Shazam ⚡️',\n 'genres': 'comedy'\n}])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_documents([\n {\n id: 287947,\n title: 'Shazam ⚡️',\n genres: 'comedy'\n }\n])" + }, + { + "lang": "Rust", + "source": "// Define the type of our documents\n#[derive(Serialize, Deserialize)]\nstruct IncompleteMovie {\n id: usize,\n title: String,\n genres: String\n}\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .add_or_update(&[\n IncompleteMovie {\n id: 287947,\n title: \"Shazam ⚡️\".to_string(),\n genres: \"comedy\".to_string()\n }\n ], None)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let documentJsonString = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\"\n }\n]\n\"\"\"\nlet documents: Data = documentJsonString.data(using: .utf8)!\n\nclient.index(\"movies\").updateDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\"\n }\n ]'" + } + ] + }, + "post": { + "tags": [ + "Documents" + ], + "summary": "Add or replace documents", + "description": "Add a list of documents or replace them if they already exist.\n\nIf you send an already existing document (same id) the whole existing document will be overwritten by the new document. Fields previously in the document not present in the new document are removed.\n\nFor a partial update of the document see Add or update documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document. `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved `_vectors` field in your documents.\n> It can accept an array of floats, multiple arrays of floats in an outer array or an object.\n> This object accepts keys corresponding to the different embedders defined your index settings.", + "operationId": "replace_documents", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "primaryKey", + "in": "query", + "description": "The primary key of the documents. primaryKey is optional. If you want to set the primary key of your index through this route,\nit only has to be done the first time you add documents to the index. After which it will be ignored if given.", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "csvDelimiter", + "in": "query", + "description": "Customize the csv delimiter when importing CSV documents.", + "required": true, + "schema": { + "type": "string", + "default": "," + }, + "example": ";" + }, + { + "name": "customMetadata", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "example": "custom" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentAdditionOrUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.add", + "documents.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var movie = new[]\n{\n new Movie\n {\n Id = \"287947\",\n Title = \"Shazam\",\n Poster = \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n Overview = \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n ReleaseDate = \"2019-03-23\"\n }\n};\nawait index.AddDocumentsAsync(movie);" + }, + { + "lang": "Dart", + "source": "await client.index('movies').addDocuments([\n {\n 'id': 287947,\n 'title': 'Shazam',\n 'poster':\n 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview':\n 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n }\n]);" + }, + { + "lang": "Go", + "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\",\n },\n}\nclient.Index(\"movies\").AddDocuments(documents, nil)" + }, + { + "lang": "JS", + "source": "client.index('movies').addDocuments([{\n id: 287947,\n title: 'Shazam',\n poster: 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n overview: 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n release_date: '2019-03-23'\n}])" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").addDocuments(\"[{\"\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam\\\",\"\n + \"\\\"poster\\\": \\\"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\\\",\"\n + \"\\\"overview\\\": \\\"A boy is given the ability to become an adult superhero in times of need with a single magic word.\\\",\"\n + \"\\\"release_date\\\": \\\"2019-03-23\\\"\"\n + \"}]\"\n);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->addDocuments([\n [\n 'id' => 287947,\n 'title' => 'Shazam',\n 'poster' => 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview' => 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date' => '2019-03-23'\n ]\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').add_documents([{\n 'id': 287947,\n 'title': 'Shazam',\n 'poster': 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview': 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n}])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').add_documents([\n {\n id: 287947,\n title: 'Shazam',\n poster: 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n overview: 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n release_date: '2019-03-23'\n }\n])" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .add_or_replace(&[\n Movie {\n id: 287947,\n title: \"Shazam\".to_string(),\n poster: \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\".to_string(),\n overview: \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\".to_string(),\n release_date: \"2019-03-23\".to_string(),\n }\n ], None)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let documentJsonString = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n]\n\"\"\"\nlet documents: Data = documentJsonString.data(using: .utf8)!\n\nclient.index(\"movies\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n ]'" + } + ] + }, + "delete": { + "tags": [ + "Documents" + ], + "summary": "Delete all documents", + "description": "Delete all documents in the specified index.", + "operationId": "clear_all_documents", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentDeletion", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.delete", + "documents.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteAllDocumentsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').deleteAllDocuments();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").DeleteAllDocuments()" + }, + { + "lang": "JS", + "source": "client.index('movies').deleteAllDocuments()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").deleteAllDocuments();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->deleteAllDocuments();" + }, + { + "lang": "Python", + "source": "client.index('movies').delete_all_documents()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').delete_all_documents" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_all_documents()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").deleteAllDocuments() { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/documents'" + } + ] + } + }, + "/indexes/{indexUid}/documents/delete": { + "post": { + "tags": [ + "Documents" + ], + "summary": "Delete documents by filter", + "description": "Delete a set of documents based on a filter.", + "operationId": "delete_documents_by_filter", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentDeletionByFilter" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentDeletion", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.delete", + "documents.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new DeleteDocumentsQuery() { Filter = \"genres = action OR genres = adventure\" });" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").DeleteDocumentsByFilter(\"genres=action OR genres=adventure\")" + }, + { + "lang": "JS", + "source": "client.index('movies').deleteDocuments({\n filter: 'genres = action OR genres = adventure'\n})" + }, + { + "lang": "Java", + "source": "String filter = \"genres = action OR genres = adventure\";\nclient.index(\"movies\").deleteDocumentsByFilter(filter);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->deleteDocuments(['filter' => 'genres = action OR genres = adventure']);" + }, + { + "lang": "Python", + "source": "client.index('movies').delete_documents(filter='genres=action OR genres=adventure')" + }, + { + "lang": "Ruby", + "source": "client.index('movies').delete_documents(filter: 'genres = action OR genres = adventure')" + }, + { + "lang": "Rust", + "source": "let index = client.index(\"movies\");\nlet task = DocumentDeletionQuery::new(&index)\n .with_filter(\"genres = action OR genres = adventure\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/movies/documents/delete \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"genres = action OR genres = adventure\"\n }'" + } + ] + } + }, + "/indexes/{indexUid}/documents/delete-batch": { + "post": { + "tags": [ + "Documents" + ], + "summary": "Delete documents by batch", + "description": "Delete a set of documents based on an array of document ids.", + "operationId": "delete_documents_batch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": {} + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentAdditionOrUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.delete", + "documents.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new[] { \"23488\", \"153738\", \"437035\", \"363869\" });" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").DeleteDocuments([]string{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\",\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').deleteDocuments([23488, 153738, 437035, 363869])" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").deleteDocuments(Arrays.asList(new String[]\n{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\"\n}));" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->deleteDocuments([23488, 153738, 437035, 363869]);" + }, + { + "lang": "Python", + "source": "client.index('movies').delete_documents([23488, 153738, 437035, 363869])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').delete_documents([23488, 153738, 437035, 363869])" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_documents(&[23488, 153738, 437035, 363869])\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents/delete-batch' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n 23488,\n 153738,\n 437035,\n 363869\n ]'" + } + ] + } + }, + "/indexes/{indexUid}/documents/edit": { + "post": { + "tags": [ + "Documents" + ], + "summary": "Edit documents by function.", + "description": "Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to edit one or more documents directly in Meilisearch.", + "operationId": "edit_documents_by_function", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentEditionByFunction" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentDeletion", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/documents/fetch": { + "post": { + "tags": [ + "Documents" + ], + "summary": "Get documents with POST", + "description": "Get a set of documents.", + "operationId": "documents_by_query_post", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BrowseQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationView_Value" + }, + "example": { + "results": [ + { + "title": "The Travels of Ibn Battuta", + "genres": [ + "Travel", + "Adventure" + ], + "language": "English", + "rating": 4.5 + }, + { + "title": "Pride and Prejudice", + "genres": [ + "Classics", + "Fiction", + "Romance", + "Literature" + ], + "language": "English", + "rating": 4 + } + ], + "offset": 0, + "limit": 2, + "total": 5 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.delete", + "documents.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() {\n Limit = 3,\n Fields = new List { \"title\", \"genres\", \"rating\", \"language\"},\n Filter = \"(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English\"\n});" + }, + { + "lang": "Go", + "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"books\").GetDocuments(&meilisearch.DocumentsQuery{\n Fields: []string{\"title\", \"genres\", \"rating\", \"language\"},\n Filter: \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n}, &result)" + }, + { + "lang": "JS", + "source": "client.index('books').getDocuments({\n filter: '(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English',\n fields: ['title', 'genres', 'rating', 'language'],\n limit: 3\n})" + }, + { + "lang": "Java", + "source": "DocumentsQuery query = new DocumentsQuery()\n .setFilter(new String[] {\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\"})\n .setFields(new String[] {\"title\", \"genres\", \"rating\", \"language\"})\n .setLimit(3);\nclient.index(\"books\").getDocuments(query, TargetClassName.class);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->getDocuments(\n (new DocumentsQuery())\n ->setFilter('(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English')\n ->setLimit(3)\n ->setFields(['title', 'genres', 'rating', 'language'])\n);" + }, + { + "lang": "Python", + "source": "client.index('books').get_documents({\n 'limit':3,\n 'fields': ['title', 'genres', 'rating', 'language'],\n 'filter': '(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English',\n 'sort': 'rating:desc, title:asc' # comma-separated string format\n})" + }, + { + "lang": "Ruby", + "source": "client.index('books').get_documents(\n filter: '(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English',\n limit: 3,\n fields: ['title', 'genres', 'rating', 'language']\n)" + }, + { + "lang": "Rust", + "source": "let index = client.index(\"books\");\nlet documents: DocumentsResults = DocumentsQuery::new(&index)\n .with_filter(\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\")\n .with_fields([\"title\", \"genres\", \"rating\", \"language\"])\n .with_limit(2)\n .execute::()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/books/documents/fetch \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n \"fields\": [\"title\", \"genres\", \"rating\", \"language\"],\n \"limit\": 3\n }'" + } + ] + } + }, + "/indexes/{indexUid}/documents/{documentId}": { + "get": { + "tags": [ + "Documents" + ], + "summary": "Get one document", + "description": "Get one document from its primary key.", + "operationId": "get_document", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "documentId", + "in": "path", + "description": "The document identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "85087" + }, + { + "name": "fields", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "retrieveVectors", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "The document is returned", + "content": { + "application/json": { + "schema": {}, + "example": { + "id": 25684, + "title": "American Ninja 5", + "poster": "https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg", + "overview": "When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.", + "release_date": 725846400 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Document not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Document `a` not found.", + "code": "document_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#document_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.get", + "documents.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetDocumentAsync(25684, new List { \"id\", \"title\", \"poster\", \"release_date\" });" + }, + { + "lang": "Go", + "source": "var a interface{}\nclient.Index(\"movies\").GetDocument(\"25684\",&meilisearch.DocumentQuery{\n Fields: []string{\"id\", \"title\", \"poster\", \"release_date\"},\n}, &a)" + }, + { + "lang": "JS", + "source": "client\n .index('movies')\n .getDocument(25684, { fields: ['id', 'title', 'poster', 'release_date'] })" + }, + { + "lang": "Java", + "source": "DocumentQuery query = new DocumentQuery().setFields(new String[] {\"id\", \"title\", \"poster\", \"release_date\"});\nclient.index(\"movies\").getDocument(\"25684\", query);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getDocument(25684, ['id', 'title', 'poster', 'release_date']);" + }, + { + "lang": "Python", + "source": "client.index('movies').get_document(25684, {\n 'fields': ['id', 'title', 'poster', 'release_date']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').document(25684, fields: ['id', 'title', 'poster', 'release_date'])" + }, + { + "lang": "Rust", + "source": "let index = client\n .index(\"movies\");\nlet document = DocumentQuery::new(&index)\n .with_fields([\"id\", \"title\", \"poster\", \"release_date\"])\n .execute::(\"25684\")\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getDocument(25684) { (result: Result) in\n switch result {\n case .success(let movie):\n print(movie)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents/25684?fields=id,title,poster,release_date'" + } + ] + }, + "delete": { + "tags": [ + "Documents" + ], + "summary": "Delete a document", + "description": "Delete a single document by id.", + "operationId": "delete_document", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "documentId", + "in": "path", + "description": "Document Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "853" + } + ], + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentAdditionOrUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.delete", + "documents.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/facet-search": { + "post": { + "tags": [ + "Facet Search" + ], + "summary": "Perform a facet search", + "description": "Search for a facet value within a given facet.", + "operationId": "search", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacetSearchQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchResult" + }, + "example": { + "hits": [ + { + "id": 2770, + "title": "American Pie 2", + "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", + "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", + "release_date": 997405200 + }, + { + "id": 190859, + "title": "American Sniper", + "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", + "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", + "release_date": 1418256000 + } + ], + "offset": 0, + "limit": 2, + "estimatedTotalHits": 976, + "processingTimeMs": 35, + "query": "american " + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var query = new SearchFacetsQuery()\n{\n FacetQuery = \"fiction\",\n Filter = \"rating > 3\"\n};\nawait client.Index(\"books\").FacetSearchAsync(\"genres\", query);" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").FacetSearch(&meilisearch.FacetSearchRequest{\n FacetQuery: \"fiction\",\n FacetName: \"genres\",\n Filter: \"rating > 3\",\n})" + }, + { + "lang": "JS", + "source": "client.index('books').searchForFacetValues({\n facetQuery: 'fiction',\n facetName: 'genres'\n filter: 'rating > 3'\n})" + }, + { + "lang": "Java", + "source": "FacetSearchRequest fsr = FacetSearchRequest.builder().facetName(\"genres\").facetQuery(\"fiction\").filter(new String[]{\"rating > 3\"}).build();\nclient.index(\"books\").facetSearch(fsr);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->facetSearch(\n (new FacetSearchQuery())\n ->setFacetQuery('fiction')\n ->setFacetName('genres')\n ->setFilter(['rating > 3'])\n);" + }, + { + "lang": "Python", + "source": "client.index('books').facet_search('genres', 'fiction', {\n 'filter': 'rating > 3'\n})" + }, + { + "lang": "Ruby", + "source": "client.index('books').facet_search('genres', 'fiction', filter: 'rating > 3')" + }, + { + "lang": "Rust", + "source": "let res = client.index(\"books\")\n .facet_search(\"genres\")\n .with_facet_query(\"fiction\")\n .with_filter(\"rating > 3\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"facetQuery\": \"fiction\",\n \"facetName\": \"genres\",\n \"filter\": \"rating > 3\"\n }'" + } + ] + } + }, + "/indexes/{indexUid}/search": { + "get": { + "tags": [ + "Indexes", + "Search" + ], + "summary": "Search an index with GET", + "description": "Search for documents matching a specific query in the given index.", + "operationId": "search_with_url_query", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "q", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "vector", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "explode": false + }, + { + "name": "offset", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "default": 20, + "minimum": 0 + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "hitsPerPage", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "attributesToRetrieve", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false + }, + { + "name": "retrieveVectors", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "attributesToCrop", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false + }, + { + "name": "cropLength", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "default": 10, + "minimum": 0 + } + }, + { + "name": "attributesToHighlight", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "distinct", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "showMatchesPosition", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "showRankingScore", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "showRankingScoreDetails", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "facets", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false + }, + { + "name": "highlightPreTag", + "in": "query", + "required": true, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "highlightPostTag", + "in": "query", + "required": true, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "cropMarker", + "in": "query", + "required": true, + "schema": { + "type": "string", + "default": "…" + } + }, + { + "name": "matchingStrategy", + "in": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/MatchingStrategy" + } + }, + { + "name": "attributesToSearchOn", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false + }, + { + "name": "hybridEmbedder", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "hybridSemanticRatio", + "in": "query", + "required": true, + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "rankingScoreThreshold", + "in": "query", + "required": true, + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "locales", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Locale" + } + }, + "explode": false + }, + { + "name": "personalizeUserContext", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchResult" + }, + "example": { + "hits": [ + { + "id": 2770, + "title": "American Pie 2", + "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", + "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", + "release_date": 997405200 + }, + { + "id": 190859, + "title": "American Sniper", + "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", + "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", + "release_date": 1418256000 + } + ], + "offset": 0, + "limit": 2, + "estimatedTotalHits": 976, + "processingTimeMs": 35, + "query": "american " + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "JS", + "source": "client.index('movies').searchGet('American ninja')" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/search?q=american%20ninja'" + } + ] + }, + "post": { + "tags": [ + "Indexes", + "Search" + ], + "summary": "Search with POST", + "description": "Search for documents matching a specific query in the given index.", + "operationId": "search_with_post", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchResult" + }, + "example": { + "hits": [ + { + "id": 2770, + "title": "American Pie 2", + "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", + "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", + "release_date": 997405200 + }, + { + "id": 190859, + "title": "American Sniper", + "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", + "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", + "release_date": 1418256000 + } + ], + "offset": 0, + "limit": 2, + "estimatedTotalHits": 976, + "processingTimeMs": 35, + "query": "american " + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").SearchAsync(\"American ninja\");" + }, + { + "lang": "Dart", + "source": "await client.index('movies').search('American ninja');" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").Search(\"american ninja\", &meilisearch.SearchRequest{})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('American ninja')" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").search(\"American ninja\");" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('american ninja');" + }, + { + "lang": "Python", + "source": "client.index('movies').search('American ninja')" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('american ninja')" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"american ninja\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(query: \"American ninja\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"american ninja\" }'" + } + ] + } + }, + "/indexes/{indexUid}/settings": { + "get": { + "tags": [ + "Settings" + ], + "summary": "All settings", + "description": "This route allows you to retrieve, configure, or reset all of an index's settings at once.", + "operationId": "get_all", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "Settings are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Settings_Unchecked" + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetSettingsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getSettings();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetSettings()" + }, + { + "lang": "JS", + "source": "client.index('movies').getSettings()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getSettings();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_settings()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').settings" + }, + { + "lang": "Rust", + "source": "let settings: Settings = client\n .index(\"movies\")\n .get_settings()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getSettings { (result) in\n switch result {\n case .success(let setting):\n print(setting)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset settings", + "description": "Reset all the settings of an index to their default value.", + "operationId": "delete_all", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSettingsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetSettings();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetSettings()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetSettings()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetSettings();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_settings()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_settings" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_settings()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").resetSettings { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings'" + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update settings", + "description": "Update the settings of an index.\nPassing null to an index setting will reset it to its default value.\nUpdates in the settings route are partial. This means that any parameters not provided in the body will be left unchanged.\nIf the provided index does not exist, it will be created.", + "operationId": "update_all", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Settings_Unchecked" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "Settings newSettings = new Settings\n{\n RankingRules = new string[]\n {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n },\n DistinctAttribute = \"movie_id\",\n SearchableAttributes = new string[] { \"title\", \"overview\", \"genres\" },\n DisplayedAttributes = new string[] { \"title\", \"overview\", \"genres\", \"release_date\" },\n SortableAttributes = new string[] { \"title\", \"release_date\" },\n StopWords = new string[] { \"the\", \"a\", \"an\" },\n Synonyms = new Dictionary>\n {\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\" } },\n },\n FilterableAttributes = new string[] { },\n TypoTolerance = new TypoTolerance\n {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeForTypos = new TypoTolerance.TypoSize\n {\n OneTypo = 8,\n TwoTypos = 10\n }\n },\n SearchCutoffMs = 150\n};\nTaskInfo task = await client.Index(\"movies\").UpdateSettingsAsync(newFilters);" + }, + { + "lang": "Go", + "source": "distinctAttribute := \"movie_id\"\nsettings := meilisearch.Settings{\n RankingRules: []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\",\n },\n DistinctAttribute: &distinctAttribute,\n SearchableAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n },\n DisplayedAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n },\n StopWords: []string{\n \"the\",\n \"a\",\n \"an\",\n },\n SortableAttributes: []string{\n \"title\",\n \"release_date\",\n },\n Synonyms: map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\"},\n },\n TypoTolerance: &meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 8,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n },\n Pagination: &meilisearch.Pagination{\n MaxTotalHits: 5000,\n },\n Faceting: &meilisearch.Faceting{\n MaxValuesPerFacet: 200,\n },\n SearchCutoffMs: 150,\n}\nclient.Index(\"movies\").UpdateSettings(&settings)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateSettings({\n rankingRules: [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n distinctAttribute: 'movie_id',\n searchableAttributes: [\n 'title',\n 'overview',\n 'genres'\n ],\n displayedAttributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n stopWords: [\n 'the',\n 'a',\n 'an'\n ],\n sortableAttributes: [\n 'title',\n 'release_date'\n ],\n synonyms: {\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine']\n },\n typoTolerance: {\n 'minWordSizeForTypos': {\n 'oneTypo': 8,\n 'twoTypos': 10\n },\n 'disableOnAttributes': [\n 'title'\n ]\n },\n pagination: {\n maxTotalHits: 5000\n },\n faceting: {\n maxValuesPerFacet: 200\n },\n searchCutoffMs: 150\n})" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setRankingRules(\n new String[] {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n });\nsettings.setDistinctAttribute(\"movie_id\");\nsettings.setSearchableAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\"\n });\nsettings.setDisplayedAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n });\nsettings.setStopWords(\n new String[] {\n \"the\",\n \"a\",\n \"an\"\n });\nsettings.setSortableAttributes(\n new String[] {\n \"title\",\n \"release_date\"\n });\n\nHashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nsettings.setSynonyms(synonyms);\n\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 8);\n put(\"twoTypos\", 10);\n }\n };\nTypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\nsettings.setTypoTolerance(typoTolerance);\nsettings.setSearchCutoffMs(150);\nclient.index(\"movies\").updateSettings(settings);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateSettings([\n 'rankingRules' => [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n 'distinctAttribute' => 'movie_id',\n 'searchableAttributes' => [\n 'title',\n 'overview',\n 'genres'\n ],\n 'displayedAttributes' => [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n 'stopWords' => [\n 'the',\n 'a',\n 'an'\n ],\n 'sortableAttributes' => [\n 'title',\n 'release_date'\n ],\n 'synonyms' => [\n 'wolverine' => ['xmen', 'logan'],\n 'logan' => ['wolverine']\n ],\n 'typoTolerance' => [\n 'minWordSizeForTypos' => [\n 'oneTypo' => 8,\n 'twoTypos' => 10\n ],\n 'disableOnAttributes' => ['title']\n ],\n 'pagination' => [\n 'maxTotalHits' => 5000\n ],\n 'faceting' => [\n 'maxValuesPerFacet' => 200\n ],\n 'searchCutoffMs' => 150\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_settings({\n 'rankingRules': [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n 'distinctAttribute': 'movie_id',\n 'searchableAttributes': [\n 'title',\n 'overview',\n 'genres'\n ],\n 'displayedAttributes': [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n 'sortableAttributes': [\n 'title',\n 'release_date'\n ],\n 'stopWords': [\n 'the',\n 'a',\n 'an'\n ],\n 'synonyms': {\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine']\n },\n 'typoTolerance': {\n 'minWordSizeForTypos': {\n 'oneTypo': 8,\n 'twoTypos': 10\n },\n 'disableOnAttributes': ['title']\n },\n 'pagination': {\n 'maxTotalHits': 5000\n },\n 'faceting': {\n 'maxValuesPerFacet': 200\n },\n 'searchCutoffMs': 150\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_settings({\n ranking_rules: [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n distinct_attribute: 'movie_id',\n searchable_attributes: [\n 'title',\n 'overview',\n 'genres'\n ],\n displayed_attributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n stop_words: [\n 'the',\n 'a',\n 'an'\n ],\n sortable_attributes: [\n 'title',\n 'release_date'\n ],\n synonyms: {\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine']\n },\n pagination: {\n max_total_hits: 5000\n },\n faceting: {\n max_values_per_facet: 200\n },\n search_cutoff_ms: 150\n})" + }, + { + "lang": "Rust", + "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"wolverine\"), vec![\"xmen\", \"logan\"]);\nsynonyms.insert(String::from(\"logan\"), vec![\"wolverine\"]);\n\nlet min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(4),\n two_typos; Some(12)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![\"title\".to_string()]),\n disable_on_words: Some(vec![])\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet settings = Settings::new()\n .with_ranking_rules([\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ])\n .with_distinct_attribute(Some(\"movie_id\"))\n .with_searchable_attributes([\n \"title\",\n \"overview\",\n \"genres\"\n ])\n .with_displayed_attributes([\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ])\n .with_stop_words([\n \"the\",\n \"a\",\n \"an\"\n ])\n .with_sortable_attributes([\n \"title\",\n \"release_date\"\n ])\n .with_synonyms(synonyms)\n .with_typo_tolerance(typo_tolerance)\n .with_search_cutoff(150);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_settings(&settings)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let settings = Setting(rankingRules: [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n], searchableAttributes: [\n \"title\",\n \"overview\",\n \"genres\"\n], displayedAttributes: [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n], stopWords: [\n \"the\",\n \"a\",\n \"an\"\n], synonyms: [\n \"wolverine\": [\"xmen\", \"logan\"],\n \"logan\": [\"wolverine\"]\n], distinctAttribute: \"movie_id\",\nsortableAttributes: [\n \"title\",\n \"release_date\"\n])\nclient.index(\"movies\").updateSettings(settings) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"rankingRules\": [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ],\n \"distinctAttribute\": \"movie_id\",\n \"searchableAttributes\": [\n \"title\",\n \"overview\",\n \"genres\"\n ],\n \"displayedAttributes\": [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ],\n \"stopWords\": [\n \"the\",\n \"a\",\n \"an\"\n ],\n \"sortableAttributes\": [\n \"title\",\n \"release_date\"\n ],\n \"synonyms\": {\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\"wolverine\"]\n },\n \"typoTolerance\": {\n \"minWordSizeForTypos\": {\n \"oneTypo\": 8,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n },\n \"pagination\": {\n \"maxTotalHits\": 5000\n },\n \"faceting\": {\n \"maxValuesPerFacet\": 200\n },\n \"searchCutoffMs\": 150\n }'" + } + ] + } + }, + "/indexes/{indexUid}/settings/chat": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get chat", + "description": "Get an user defined chat", + "operationId": "getchat", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "chat is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChatSettings" + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset chat", + "description": "Reset an index's chat to its default value", + "operationId": "deletechat", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChatSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update chat", + "description": "Update an index's user defined chat", + "operationId": "patchchat", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChatSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/dictionary": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get dictionary", + "description": "Get an user defined dictionary", + "operationId": "getdictionary", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "dictionary is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var indexDictionary = await client.Index(\"books\").GetDictionaryAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetDictionary()" + }, + { + "lang": "JS", + "source": "client.index('books').getDictionary()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").getDictionarySettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->getDictionary();" + }, + { + "lang": "Python", + "source": "client.index('books').get_dictionary()" + }, + { + "lang": "Ruby", + "source": "client.index('books').dictionary" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('books')\n .get_dictionary()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").getDictionary { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/dictionary'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update dictionary", + "description": "Update an index's user defined dictionary", + "operationId": "putdictionary", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var newDictionary = new string[] { \"J. R. R.\", \"W. E. B.\" };\nawait client.Index(\"books\").UpdateDictionaryAsync(newDictionary);" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateDictionary([]string{\n \"J. R. R.\",\n \"W. E. B.\",\n})" + }, + { + "lang": "JS", + "source": "client.index('books').updateDictionary(['J. R. R.', 'W. E. B.'])" + }, + { + "lang": "Java", + "source": "client.index(\"books\").updateDictionarySettings(new String[] {\"J. R. R.\", \"W. E. B.\"});" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateDictionary(['J. R. R.', 'W. E. B.']);" + }, + { + "lang": "Python", + "source": "client.index('books').update_dictionary([\"J. R. R.\", \"W. E. B.\"])" + }, + { + "lang": "Ruby", + "source": "client.index('books').update_dictionary(['J. R. R.', 'W. E. B.'])" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('books')\n .set_dictionary(['J. R. R.', 'W. E. B.'])\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").updateDictionary([\"J. R. R.\", \"W. E. B.\"]) { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/dictionary' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"J. R. R.\",\n \"W. E. B.\"\n ]'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset dictionary", + "description": "Reset an index's dictionary to its default value", + "operationId": "deletedictionary", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").ResetDictionaryAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetDictionary()" + }, + { + "lang": "JS", + "source": "client.index('books').resetDictionary()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").resetDictionarySettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->resetDictionary();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_dictionary()" + }, + { + "lang": "Ruby", + "source": "client.index('books').reset_dictionary" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('books')\n .reset_dictionary()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").resetDictionary { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/dictionary'" + } + ] + } + }, + "/indexes/{indexUid}/settings/displayed-attributes": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get displayedAttributes", + "description": "Get an user defined displayedAttributes", + "operationId": "getdisplayedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "displayedAttributes is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetDisplayedAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getDisplayedAttributes();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetDisplayedAttributes()" + }, + { + "lang": "JS", + "source": "client.index('movies').getDisplayedAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getDisplayedAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getDisplayedAttributes();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_displayed_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').get_displayed_attributes" + }, + { + "lang": "Rust", + "source": "let displayed_attributes: Vec = client\n .index(\"movies\")\n .get_displayed_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getDisplayedAttributes { (result) in\n switch result {\n case .success(let displayedAttributes):\n print(displayedAttributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update displayedAttributes", + "description": "Update an index's user defined displayedAttributes", + "operationId": "putdisplayedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateDisplayedAttributesAsync(new[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" + }, + { + "lang": "Go", + "source": "displayedAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n}\nclient.Index(\"movies\").UpdateDisplayedAttributes(&displayedAttributes)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateDisplayedAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" + }, + { + "lang": "Rust", + "source": "let displayed_attributes = [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_displayed_attributes(&displayed_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let displayedAttributes: [String] = [\"title\", \"overview\", \"genres\", \"release_date\"]\nclient.index(\"movies\").updateDisplayedAttributes(displayedAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ]'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset displayedAttributes", + "description": "Reset an index's displayedAttributes to its default value", + "operationId": "deletedisplayedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetDisplayedAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetDisplayedAttributes();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetDisplayedAttributes()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetDisplayedAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetDisplayedAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetDisplayedAttributes();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_displayed_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_displayed_attributes" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_displayed_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").resetDisplayedAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" + } + ] + } + }, + "/indexes/{indexUid}/settings/distinct-attribute": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get distinctAttribute", + "description": "Get an user defined distinctAttribute", + "operationId": "getdistinctAttribute", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "distinctAttribute is returned", + "content": { + "application/json": { + "schema": { + "type": "string" + }, + "example": "" + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "string result = await client.Index(\"shoes\").GetDistinctAttributeAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('shoes').getDistinctAttribute();" + }, + { + "lang": "Go", + "source": "client.Index(\"shoes\").GetDistinctAttribute()" + }, + { + "lang": "JS", + "source": "client.index('shoes').getDistinctAttribute()" + }, + { + "lang": "Java", + "source": "client.index(\"shoes\").getDistinctAttributeSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('shoes')->getDistinctAttribute();" + }, + { + "lang": "Python", + "source": "client.index('shoes').get_distinct_attribute()" + }, + { + "lang": "Ruby", + "source": "client.index('shoes').distinct_attribute" + }, + { + "lang": "Rust", + "source": "let distinct_attribute: Option = client\n .index(\"shoes\")\n .get_distinct_attribute()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"shoes\").getDistinctAttribute { (result) in\n switch result {\n case .success(let distinctAttribute):\n print(distinctAttribute)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update distinctAttribute", + "description": "Update an index's user defined distinctAttribute", + "operationId": "putdistinctAttribute", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "TaskInfo result = await client.Index(\"shoes\").UpdateDistinctAttributeAsync(\"skuid\");" + }, + { + "lang": "Dart", + "source": "await client.index('shoes').updateDistinctAttribute('skuid');" + }, + { + "lang": "Go", + "source": "client.Index(\"shoes\").UpdateDistinctAttribute(\"skuid\")" + }, + { + "lang": "JS", + "source": "client.index('shoes').updateDistinctAttribute('skuid')" + }, + { + "lang": "Java", + "source": "client.index(\"shoes\").updateDistinctAttributeSettings(\"skuid\");" + }, + { + "lang": "PHP", + "source": "$client->index('shoes')->updateDistinctAttribute('skuid');" + }, + { + "lang": "Python", + "source": "client.index('shoes').update_distinct_attribute('skuid')" + }, + { + "lang": "Ruby", + "source": "client.index('shoes').update_distinct_attribute('skuid')" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"shoes\")\n .set_distinct_attribute(\"skuid\")\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"shoes\").updateDistinctAttribute(\"skuid\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"skuid\"'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset distinctAttribute", + "description": "Reset an index's distinctAttribute to its default value", + "operationId": "deletedistinctAttribute", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "TaskInfo result = await client.Index(\"shoes\").ResetDistinctAttributeAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('shoes').resetDistinctAttribute();" + }, + { + "lang": "Go", + "source": "client.Index(\"shoes\").ResetDistinctAttribute()" + }, + { + "lang": "JS", + "source": "client.index('shoes').resetDistinctAttribute()" + }, + { + "lang": "Java", + "source": "client.index(\"shoes\").resetDistinctAttributeSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('shoes')->resetDistinctAttribute();" + }, + { + "lang": "Python", + "source": "client.index('shoes').reset_distinct_attribute()" + }, + { + "lang": "Ruby", + "source": "client.index('shoes').reset_distinct_attribute" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"shoes\")\n .reset_distinct_attribute()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"shoes\").resetDistinctAttribute { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" + } + ] + } + }, + "/indexes/{indexUid}/settings/embedders": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get embedders", + "description": "Get an user defined embedders", + "operationId": "getembedders", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "embedders is returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SettingEmbeddingSettings" + }, + "propertyNames": { + "type": "string" + } + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').embedders" + }, + { + "lang": "Rust", + "source": "let embedders = index.get_embedders().await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset embedders", + "description": "Reset an index's embedders to its default value", + "operationId": "deleteembedders", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SettingEmbeddingSettings" + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').reset_embedders" + }, + { + "lang": "Rust", + "source": "index.reset_embedders().await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update embedders", + "description": "Update an index's user defined embedders", + "operationId": "patchembedders", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SettingEmbeddingSettings" + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "JS", + "source": "client.index('INDEX_NAME').updateEmbedders({\n default: {\n source: 'openAi',\n apiKey: 'OPEN_AI_API_KEY',\n model: 'text-embedding-3-small',\n documentTemplate: 'A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}'\n }\n});" + }, + { + "lang": "PHP", + "source": "$client->updateEmbedders([\n 'default' => [\n 'source' => 'openAi',\n 'apiKey' => 'OPEN_AI_API_KEY',\n 'model' => 'text-embedding-3-small',\n 'documentTemplate' => 'A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}'\n ]\n]);" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').update_embedders(\n default: {\n source: 'openAi',\n api_key: 'OPEN_AI_API_KEY',\n model: 'text-embedding-3-small',\n document_template: \"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\"\n }\n)" + }, + { + "lang": "Rust", + "source": "let embedders = HashMap::from([(\n String::from(\"default\"),\n Embedder {\n source: EmbedderSource::OpenAi,\n api_key: Some(String::from(\"OPEN_AI_API_KEY\")),\n model: Some(String::from(\"text-embedding-3-small\")),\n document_template: Some(String::from(\"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\")),\n ..Embedder::default()\n }\n)]);\nlet task = index\n .set_embedders(&embedders)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"default\": {\n \"source\": \"openAi\",\n \"apiKey\": \"OPEN_AI_API_KEY\",\n \"model\": \"text-embedding-3-small\",\n \"documentTemplate\": \"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\"\n }\n }'" + } + ] + } + }, + "/indexes/{indexUid}/settings/facet-search": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get facetSearch", + "description": "Get an user defined facetSearch", + "operationId": "getfacetSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "facetSearch is returned", + "content": { + "application/json": { + "schema": { + "type": "boolean" + }, + "example": false + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.Index(\"books\").GetFacetSearch()" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').getFacetSearch();" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->getFacetSearch();" + }, + { + "lang": "Python", + "source": "client.index('books').get_facet_search_settings()" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_UID').facet_search_setting" + }, + { + "lang": "Rust", + "source": "let facet_search: bool = client\n .index(INDEX_UID)\n .get_facet_search()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update facetSearch", + "description": "Update an index's user defined facetSearch", + "operationId": "putfacetSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "boolean" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateFacetSearch(false)" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').updateFacetSearch(false);" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->updateFacetSearch(false);" + }, + { + "lang": "Python", + "source": "client.index('books').update_facet_search_settings(False)" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_UID').update_facet_search_setting(false)" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_facet_search(false)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary 'false'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset facetSearch", + "description": "Reset an index's facetSearch to its default value", + "operationId": "deletefacetSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "boolean" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.Index(\"books\").ResetFacetSearch()" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').resetFacetSearch();" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->resetFacetSearch();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_facet_search_settings()" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_UID').reset_facet_search_setting" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_facet_search()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" + } + ] + } + }, + "/indexes/{indexUid}/settings/faceting": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get faceting", + "description": "Get an user defined faceting", + "operationId": "getfaceting", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "faceting is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacetingSettings" + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetFacetingAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getFaceting();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetFaceting()" + }, + { + "lang": "JS", + "source": "client.index('books').getFaceting()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").getFacetingSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->getFaceting();" + }, + { + "lang": "Python", + "source": "client.index('books').get_faceting_settings()" + }, + { + "lang": "Ruby", + "source": "client.index('books').faceting" + }, + { + "lang": "Rust", + "source": "let faceting: FacetingSettings = client\n .index(\"books\")\n .get_faceting()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/faceting'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset faceting", + "description": "Reset an index's faceting to its default value", + "operationId": "deletefaceting", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacetingSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetFacetingAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetFaceting();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetFaceting()" + }, + { + "lang": "JS", + "source": "client.index('books').resetFaceting()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").resetFacetingSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->resetFaceting();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_faceting_settings()" + }, + { + "lang": "Ruby", + "source": "index('books').reset_faceting" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_faceting()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/faceting'" + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update faceting", + "description": "Update an index's user defined faceting", + "operationId": "patchfaceting", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacetingSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var faceting = new Faceting\n{\n MaxValuesPerFacet = 2,\n SortFacetValuesBy = new Dictionary\n {\n [\"*\"] = SortFacetValuesByType.Alpha,\n [\"genres\"] = SortFacetValuesByType.Count\n }\n};\nawait client.Index(\"books\").UpdateFacetingAsync(faceting);" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateFaceting(&meilisearch.Faceting{\n MaxValuesPerFacet: 2,\n SortFacetValuesBy: {\n \"*\": SortFacetTypeAlpha,\n \"genres\": SortFacetTypeCount,\n }\n})" + }, + { + "lang": "JS", + "source": "client.index('books').updateFaceting({\n maxValuesPerFacet: 2\n sortFacetValuesBy: {\n '*': 'alpha',\n genres: 'count'\n }\n})" + }, + { + "lang": "Java", + "source": "Faceting newFaceting = new Faceting();\nnewFaceting.setMaxValuesPerFacet(2);\nHashMap facetSortValues = new HashMap<>();\nfacetSortValues.put(\"*\", FacetSortValue.ALPHA);\nfacetSortValues.put(\"genres\", FacetSortValue.COUNT);\nnewFaceting.setSortFacetValuesBy(facetSortValues);\nclient.index(\"books\").updateFacetingSettings(newFaceting);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateFaceting([\n 'maxValuesPerFacet' => 2,\n 'sortFacetValuesBy' => ['*' => 'alpha', 'genres' => 'count']\n]);" + }, + { + "lang": "Python", + "source": "params = {\n 'maxValuesPerFacet': 2,\n 'sortFacetValuesBy': {\n '*': 'count',\n 'genres': 'count'\n }\n}\nclient.index('books').update_faceting_settings(params)" + }, + { + "lang": "Ruby", + "source": "client.index('books').update_faceting({\n max_values_per_facet: 2,\n sort_facet_values_by: {\n '*': 'alpha',\n genres: 'count'\n }\n})" + }, + { + "lang": "Rust", + "source": "let mut facet_sort_setting = BTreeMap::new();\nfacet_sort_setting.insert(String::from(\"*\"), FacetSortValue::Alpha);\nfacet_sort_setting.insert(String::from(\"genres\"), FacetSortValue::Count);\nlet mut faceting = FacetingSettings {\n max_values_per_facet: 2,\n sort_facet_values_by: Some(facet_sort_setting),\n};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_faceting(&faceting)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/faceting' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxValuesPerFacet\": 2,\n \"sortFacetValuesBy\": {\n \"*\": \"alpha\",\n \"genres\": \"count\"\n }\n }'" + } + ] + } + }, + "/indexes/{indexUid}/settings/filterable-attributes": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get filterableAttributes", + "description": "Get an user defined filterableAttributes", + "operationId": "getfilterableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "filterableAttributes is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FilterableAttributesRule" + } + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "IEnumerable attributes = await client.Index(\"movies\").GetFilterableAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getFilterableAttributes();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetFilterableAttributes()" + }, + { + "lang": "JS", + "source": "client.index('movies').getFilterableAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getFilterableAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getFilterableAttributes();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_filterable_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').filterable_attributes" + }, + { + "lang": "Rust", + "source": "let filterable_attributes: Vec = client\n .index(\"movies\")\n .get_filterable_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update filterableAttributes", + "description": "Update an index's user defined filterableAttributes", + "operationId": "putfilterableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FilterableAttributesRule" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "List attributes = new() { \"genres\", \"director\" };\nTaskInfo result = await client.Index(\"movies\").UpdateFilterableAttributesAsync(attributes);" + }, + { + "lang": "Go", + "source": "filterableAttributes := []interface{}{\n \"genres\",\n \"director\",\n AttributeRule{\n AttributePatterns: []string{\"tag\"}\n Features: AttributeFeatures{\n FacetSearch: false,\n Filter: FilterFeatures{\n Equality: true,\n Comparison: false,\n }\n }\n },\n map[string]interface{}{\n \"attributePatterns\": []interface{}{\"year\"}\n \"features\": map[string]interface{}{\n \"facetSearch\": false,\n \"filter\": map[string]interface{}{\n \"equality\": true,\n \"comparison\": true,\n }\n }\n }\n}\nclient.Index(\"movies\").UpdateFilterableAttributes(&filterableAttributes)" + }, + { + "lang": "JS", + "source": "client.index('movies')\n .updateFilterableAttributes([\n \"genres\",\n {\n attributePatterns: [\"genre\"],\n features: {\n facetSearch: true,\n filter: { equality: true, comparison: false },\n },\n }\n ])" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setFilterableAttributes(new String[] {\"genres\", \"director\"});\nclient.index(\"movies\").updateSettings(settings);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateFilterableAttributes([\n 'author',\n [\n 'attributePatterns' => ['genres'],\n 'features' => [\n 'facetSearch' => true,\n 'filter' => [\n 'equality' => true,\n 'comparison' => false,\n ],\n ],\n ],\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_filterable_attributes([\n 'genres',\n 'director'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_filterable_attributes([\n 'genres',\n 'director'\n])" + }, + { + "lang": "Rust", + "source": "let filterable_attributes = [\n \"genres\",\n \"director\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_filterable_attributes(&filterable_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").updateFilterableAttributes([\"genre\", \"director\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"genres\",\n \"director\",\n {\n \"attributePatterns\": [\"*_ratings\"],\n \"features\": {\n \"facetSearch\": false,\n \"filter\": {\n \"equality\": true,\n \"comparison\": false\n }\n }\n }\n ]'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset filterableAttributes", + "description": "Reset an index's filterableAttributes to its default value", + "operationId": "deletefilterableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FilterableAttributesRule" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "TaskInfo result = await client.Index(\"movies\").ResetFilterableAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetFilterableAttributes();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetFilterableAttributes()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetFilterableAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetFilterableAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetFilterableAttributes();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_filterable_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_filterable_attributes" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_filterable_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").resetFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" + } + ] + } + }, + "/indexes/{indexUid}/settings/localized-attributes": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get localizedAttributes", + "description": "Get an user defined localizedAttributes", + "operationId": "getlocalizedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "localizedAttributes is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalizedAttributesRuleView" + } + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.index(\"INDEX_NAME\").GetLocalizedAttributes()" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').getLocalizedAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"INDEX_NAME\").getLocalizedAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->getLocalizedAttributes();" + }, + { + "lang": "Python", + "source": "client.index('INDEX_NAME').get_localized_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').localized_attributes" + }, + { + "lang": "Rust", + "source": "let localized_attributes: Option> = client\n .index(\"books\")\n .get_localized_attributes()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update localizedAttributes", + "description": "Update an index's user defined localizedAttributes", + "operationId": "putlocalizedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalizedAttributesRuleView" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.index(\"INDEX_NAME\").UpdateLocalizedAttributes([]*LocalizedAttributes{\n { AttributePatterns: [\"*_ja\"], Locales: [\"jpn\"] },\n})" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').updateLocalizedAttributes([\n { attributePatterns: ['*_ja'], locales: ['jpn'] },\n])" + }, + { + "lang": "Java", + "source": "LocalizedAttribute attribute = new LocalizedAttribute();\nattribute.setAttributePatterns(new String[] {\"jpn\"});\nattribute.setLocales(new String[] {\"*_ja\"});\n\nclient.index(\"INDEX_NAME\").updateLocalizedAttributesSettings(\n new LocalizedAttributes[] {attribute}\n);" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->updateLocalizedAttributes([\n 'locales' => ['jpn'],\n 'attributePatterns' => ['*_ja']\n]);" + }, + { + "lang": "Python", + "source": "client.index('INDEX_NAME').update_localized_attributes([\n {'attribute_patterns': ['*_ja'], 'locales': ['jpn']}\n])" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').update_localized_attributes([\n { attribute_patterns: ['*_ja'], locales: ['jpn'] },\n])" + }, + { + "lang": "Rust", + "source": "let localized_attributes = vec![LocalizedAttributes {\n locales: vec![\"jpn\".to_string()],\n attribute_patterns: vec![\"*_ja\".to_string()],\n}];\nlet task: TaskInfo = client\n .index(\"books\")\n .set_localized_attributes(&localizced_attributes)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\"locales\": [\"jpn\"], \"attributePatterns\": [\"*_ja\"]}\n ]'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset localizedAttributes", + "description": "Reset an index's localizedAttributes to its default value", + "operationId": "deletelocalizedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalizedAttributesRuleView" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.index(\"INDEX_NAME\").ResetLocalizedAttributes()" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').resetLocalizedAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"INDEX_NAME\").resetLocalizedAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->resetLocalizedAttributes();" + }, + { + "lang": "Python", + "source": "client.index('INDEX_NAME').reset_localized_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').reset_localized_attributes" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_localized_attributes()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" + } + ] + } + }, + "/indexes/{indexUid}/settings/non-separator-tokens": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get nonSeparatorTokens", + "description": "Get an user defined nonSeparatorTokens", + "operationId": "getnonSeparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "nonSeparatorTokens is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetNonSeparatorTokensAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").GetNonSeparatorTokens()" + }, + { + "lang": "JS", + "source": "client.index('books').getNonSeparatorTokens()" + }, + { + "lang": "Java", + "source": "client.index(\"articles\").getNonSeparatorTokensSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('articles')->getNonSeparatorTokens();" + }, + { + "lang": "Python", + "source": "client.index('articles').get_non_separator_tokens()" + }, + { + "lang": "Ruby", + "source": "client.index('articles').non_separator_tokens" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('articles')\n .get_non_separator_tokens()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").getNonSeparatorTokens { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update nonSeparatorTokens", + "description": "Update an index's user defined nonSeparatorTokens", + "operationId": "putnonSeparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateNonSeparatorTokensAsync(new[] { \"@\", \"#\" });" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").UpdateNonSeparatorTokens([]string{\n \"@\",\n \"#\",\n})" + }, + { + "lang": "JS", + "source": "client.index('books').updateNonSeparatorTokens(['@', '#'])" + }, + { + "lang": "Java", + "source": "String[] newSeparatorTokens = { \"@\", \"#\" };\nclient.index(\"articles\").updateNonSeparatorTokensSettings(newSeparatorTokens);" + }, + { + "lang": "PHP", + "source": "$client->index('articles')->updateNonSeparatorTokens(['@', '#']);" + }, + { + "lang": "Python", + "source": "client.index('articles').update_non_separator_tokens([\"@\", \"#\"])" + }, + { + "lang": "Ruby", + "source": "client.index('articles').update_non_separator_tokens(['@', '#'])" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('articles')\n .set_non_separator_tokens(&vec!['@'.to_string(), '#'.to_string()])\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").updateNonSeparatorTokens([\"@\", \"#\"]) { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"@\", \"#\"]'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset nonSeparatorTokens", + "description": "Reset an index's nonSeparatorTokens to its default value", + "operationId": "deletenonSeparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetNonSeparatorTokensAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").ResetNonSeparatorTokens()" + }, + { + "lang": "JS", + "source": "client.index('books').resetNonSeparatorTokens()" + }, + { + "lang": "Java", + "source": "client.index(\"articles\").resetNonSeparatorTokensSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('articles')->resetNonSeparatorTokens();" + }, + { + "lang": "Python", + "source": "client.index('articles').reset_non_separator_tokens()" + }, + { + "lang": "Ruby", + "source": "client.index('articles').reset_non_separator_tokens" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('articles')\n .reset_non_separator_tokens()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").resetNonSeparatorTokens { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" + } + ] + } + }, + "/indexes/{indexUid}/settings/pagination": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get pagination", + "description": "Get an user defined pagination", + "operationId": "getpagination", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "pagination is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationSettings" + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetPaginationAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getPagination();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetPagination()" + }, + { + "lang": "JS", + "source": "client.index('books').getPagination()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").getPaginationSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->getPagination();" + }, + { + "lang": "Python", + "source": "client.index('books').get_pagination_settings()" + }, + { + "lang": "Ruby", + "source": "index('books').pagination" + }, + { + "lang": "Rust", + "source": "let pagination: PaginationSetting = client\n .index(\"books\")\n .get_pagination()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/pagination'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset pagination", + "description": "Reset an index's pagination to its default value", + "operationId": "deletepagination", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetPaginationAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetPagination();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetPagination()" + }, + { + "lang": "JS", + "source": "client.index('books').resetPagination()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").resetPaginationSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->resetPagination();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_pagination_settings()" + }, + { + "lang": "Ruby", + "source": "index('books').reset_pagination" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_pagination()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/pagination'" + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update pagination", + "description": "Update an index's user defined pagination", + "operationId": "patchpagination", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var pagination = new Pagination {\n MaxTotalHits = 20\n};\nawait client.Index(\"movies\").UpdatePaginationAsync(pagination);" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdatePagination(&meilisearch.Pagination{\n MaxTotalHits: 100,\n})" + }, + { + "lang": "JS", + "source": "client.index('books').updateSettings({ pagination: { maxTotalHits: 100 }})" + }, + { + "lang": "Java", + "source": "Pagination newPagination = new Pagination();\nnewPagination.setMaxTotalHits(100);\nclient.index(\"books\").updatePaginationSettings(newPagination);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateSettings([\n 'pagination' => [\n 'maxTotalHits' => 100\n ]\n]);" + }, + { + "lang": "Python", + "source": "client.index('books').update_pagination_settings({'maxTotalHits': 100})" + }, + { + "lang": "Ruby", + "source": "index('books').update_pagination({ max_total_hits: 100 })" + }, + { + "lang": "Rust", + "source": "let pagination = PaginationSetting {max_total_hits:100};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_pagination(pagination)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/pagination' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxTotalHits\": 100\n }'" + } + ] + } + }, + "/indexes/{indexUid}/settings/prefix-search": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get prefixSearch", + "description": "Get an user defined prefixSearch", + "operationId": "getprefixSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "prefixSearch is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrefixSearchSettings" + }, + "example": "indexingTime" + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.Index(\"books\").GetPrefixSearch()" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').getPrefixSearch();" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->getPrefixSearch();" + }, + { + "lang": "Python", + "source": "client.index('books').get_prefix_search()" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_UID').prefix_search" + }, + { + "lang": "Rust", + "source": "let prefix_search: PrefixSearchSettings = client\n .index(INDEX_UID)\n .get_prefix_search()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update prefixSearch", + "description": "Update an index's user defined prefixSearch", + "operationId": "putprefixSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrefixSearchSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.Index(\"books\").UpdatePrefixSearch(\"disabled\")" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').updatePrefixSearch('disabled');" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->updatePrefixSearch('disabled');" + }, + { + "lang": "Python", + "source": "client.index('books').update_prefix_search(PrefixSearch.DISABLED)" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_UID').update_prefix_search('disabled')" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_prefix_search(PrefixSearchSettings::Disabled)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"disabled\"'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset prefixSearch", + "description": "Reset an index's prefixSearch to its default value", + "operationId": "deleteprefixSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrefixSearchSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.Index(\"books\").ResetPrefixSearch()" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').resetPrefixSearch();" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->resetPrefixSearch();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_prefix_search()" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_UID').reset_prefix_search" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_prefix_search()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" + } + ] + } + }, + "/indexes/{indexUid}/settings/proximity-precision": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get proximityPrecision", + "description": "Get an user defined proximityPrecision", + "operationId": "getproximityPrecision", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "proximityPrecision is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProximityPrecisionView" + }, + "example": "byWord" + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").GetProximityPrecisionAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetProximityPrecision()" + }, + { + "lang": "JS", + "source": "client.index('books').getProximityPrecision()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").getProximityPrecisionSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->getProximityPrecision();" + }, + { + "lang": "Python", + "source": "client.index('books').get_proximity_precision()" + }, + { + "lang": "Ruby", + "source": "client.index('books').proximity_precision" + }, + { + "lang": "Rust", + "source": "let proximity_precision: String = client\n .index(\"books\")\n .get_proximity_precision()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let precisionValue = try await self.client.index(\"books\").getProximityPrecision()" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update proximityPrecision", + "description": "Update an index's user defined proximityPrecision", + "operationId": "putproximityPrecision", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProximityPrecisionView" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").UpdateProximityPrecisionAsync(\"byAttribute\");" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateProximityPrecision(ByAttribute)" + }, + { + "lang": "JS", + "source": "client.index('books').updateProximityPrecision('byAttribute')" + }, + { + "lang": "Java", + "source": "client.index(\"books\").updateProximityPrecisionSettings(\"byAttribute\");" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateProximityPrecision('byAttribute');" + }, + { + "lang": "Python", + "source": "client.index('books').update_proximity_precision(ProximityPrecision.BY_ATTRIBUTE)" + }, + { + "lang": "Ruby", + "source": "client.index('books').update_proximity_precision('byAttribute')" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .set_proximity_precision(\"byAttribute\".to_string())\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let task = try await self.client.index(\"books\").updateProximityPrecision(.byWord)" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/proximity-precision' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"byAttribute\"'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset proximityPrecision", + "description": "Reset an index's proximityPrecision to its default value", + "operationId": "deleteproximityPrecision", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProximityPrecisionView" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").ResetProximityPrecisionAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetProximityPrecision()" + }, + { + "lang": "JS", + "source": "client.index('books').resetProximityPrecision()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").resetProximityPrecisionSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->resetProximityPrecision();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_proximity_precision()" + }, + { + "lang": "Ruby", + "source": "client.index('books').reset_proximity_precision" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_proximity_precision()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let task = try await self.client.index(\"books\").resetProximityPrecision()" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" + } + ] + } + }, + "/indexes/{indexUid}/settings/ranking-rules": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get rankingRules", + "description": "Get an user defined rankingRules", + "operationId": "getrankingRules", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "rankingRules is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RankingRuleView" + } + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetRankingRulesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getRankingRules();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetRankingRules()" + }, + { + "lang": "JS", + "source": "client.index('movies').getRankingRules()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getRankingRulesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getRankingRules();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_ranking_rules()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').ranking_rules" + }, + { + "lang": "Rust", + "source": "let ranking_rules: Vec = client\n .index(\"movies\")\n .get_ranking_rules()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getRankingRules { (result) in\n switch result {\n case .success(let rankingRules):\n print(rankingRules)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update rankingRules", + "description": "Update an index's user defined rankingRules", + "operationId": "putrankingRules", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RankingRuleView" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateRankingRulesAsync(new[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});" + }, + { + "lang": "Go", + "source": "rankingRules := []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\",\n}\nclient.Index(\"movies\").UpdateRankingRules(&rankingRules)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateRankingRules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setRankingRules(new String[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});\nclient.index(\"movies\").updateSettings(settings);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateRankingRules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_ranking_rules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_ranking_rules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" + }, + { + "lang": "Rust", + "source": "let ranking_rules = [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\",\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_ranking_rules(&ranking_rules)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let rankingRules: [String] = [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n]\nclient.index(\"movies\").updateRankingRules(rankingRules) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n ]'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset rankingRules", + "description": "Reset an index's rankingRules to its default value", + "operationId": "deleterankingRules", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RankingRuleView" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetRankingRulesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetRankingRules();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetRankingRules()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetRankingRules()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetRankingRulesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetRankingRules();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_ranking_rules()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_ranking_rules" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_ranking_rules()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").resetRankingRules { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" + } + ] + } + }, + "/indexes/{indexUid}/settings/search-cutoff-ms": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get searchCutoffMs", + "description": "Get an user defined searchCutoffMs", + "operationId": "getsearchCutoffMs", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "searchCutoffMs is returned", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + }, + "example": 0 + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var searchCutoff = await client.Index(\"movies\").GetSearchCutoffMsAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetSearchCutoffMs()" + }, + { + "lang": "JS", + "source": "client.index('movies').getSearchCutoffMs()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getSearchCutoffMsSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getSearchCutoffMs();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_search_cutoff_ms()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search_cutoff_ms" + }, + { + "lang": "Rust", + "source": "let search_cutoff_ms: String = client\n .index(\"movies\")\n .get_search_cutoff_ms()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let precisionValue = try await self.client.index(\"books\").getSearchCutoffMs()" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update searchCutoffMs", + "description": "Update an index's user defined searchCutoffMs", + "operationId": "putsearchCutoffMs", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSearchCutoffMsAsync(150);" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateSearchCutoffMs(150)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateSearchCutoffMs(150)" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateSearchCutoffMsSettings(150);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateSearchCutoffMs(150);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_search_cutoff_ms(150)" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_search_cutoff_ms(150)" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .set_search_cutoff_ms(Some(150))\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let task = try await self.client.index(\"books\").updateSearchCutoffMs(150)" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '150'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset searchCutoffMs", + "description": "Reset an index's searchCutoffMs to its default value", + "operationId": "deletesearchCutoffMs", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSearchCutoffMsAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetSearchCutoffMs()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetSearchCutoffMs()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetSearchCutoffMsSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetSearchCutoffMs();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_search_cutoff_ms()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_search_cutoff_ms" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_search_cutoff_ms()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let task = try await self.client.index(\"books\").resetSearchCutoffMs()" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" + } + ] + } + }, + "/indexes/{indexUid}/settings/searchable-attributes": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get searchableAttributes", + "description": "Get an user defined searchableAttributes", + "operationId": "getsearchableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "searchableAttributes is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetSearchableAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getSearchableAttributes();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetSearchableAttributes()" + }, + { + "lang": "JS", + "source": "client.index('movies').getSearchableAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getSearchableAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getSearchableAttributes();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_searchable_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').searchable_attributes" + }, + { + "lang": "Rust", + "source": "let searchable_attributes: Vec = client\n .index(\"movies\")\n .get_searchable_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getSearchableAttributes { (result) in\n switch result {\n case .success(let searchableAttributes):\n print(searchableAttributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update searchableAttributes", + "description": "Update an index's user defined searchableAttributes", + "operationId": "putsearchableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSearchableAttributesAsync(new[] {\"title\", \"overview\", \"genres\"});" + }, + { + "lang": "Go", + "source": "searchableAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n}\nclient.Index(\"movies\").UpdateSearchableAttributes(&searchableAttributes)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n])" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateSearchableAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\"\n});" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" + }, + { + "lang": "Rust", + "source": "let searchable_attributes = [\n \"title\",\n \"overview\",\n \"genres\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_searchable_attributes(&searchable_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let searchableAttributes: [String] = [\"title\", \"overview\", \"genres\"]\nclient.index(\"movies\").updateSearchableAttributes(searchableAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\"\n ]'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset searchableAttributes", + "description": "Reset an index's searchableAttributes to its default value", + "operationId": "deletesearchableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSearchableAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetSearchableAttributes();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetSearchableAttributes()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetSearchableAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetSearchableAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetSearchableAttributes();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_searchable_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_searchable_attributes" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_searchable_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").resetSearchableAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" + } + ] + } + }, + "/indexes/{indexUid}/settings/separator-tokens": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get separatorTokens", + "description": "Get an user defined separatorTokens", + "operationId": "getseparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "separatorTokens is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetSeparatorTokensAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").GetSeparatorTokens()" + }, + { + "lang": "JS", + "source": "client.index('books').getSeparatorTokens()" + }, + { + "lang": "Java", + "source": "client.index(\"articles\").getSeparatorTokensSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('articles')->getSeparatorTokens();" + }, + { + "lang": "Python", + "source": "client.index('articles').get_separator_tokens()" + }, + { + "lang": "Ruby", + "source": "client.index('articles').separator_tokens" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('articles')\n .get_separator_tokens()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").getSeparatorTokens { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update separatorTokens", + "description": "Update an index's user defined separatorTokens", + "operationId": "putseparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSeparatorTokensAsync(new[] { \"|\", \"…\" });" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").UpdateSeparatorTokens([]string{\n \"|\",\n \"…\",\n})" + }, + { + "lang": "JS", + "source": "client.index('books').updateSeparatorTokens(['|', '…'])" + }, + { + "lang": "Java", + "source": "String[] newSeparatorTokens = { \"|\", \"…\" };\nclient.index(\"articles\").updateSeparatorTokensSettings(newSeparatorTokens);" + }, + { + "lang": "PHP", + "source": "$client->index('articles')->updateSeparatorTokens(['|', '…']);" + }, + { + "lang": "Python", + "source": "client.index('articles').update_separator_tokens([\"|\", \"…\"])" + }, + { + "lang": "Ruby", + "source": "client.index('articles').update_separator_tokens(['|', '…'])" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('articles')\n .set_separator_tokens(&vec!['|'.to_string(), '…'.to_string()])\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").updateSeparatorTokens([\"|\", \"…\"]) { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"|\", \"…\"]'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset separatorTokens", + "description": "Reset an index's separatorTokens to its default value", + "operationId": "deleteseparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSeparatorTokensAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").ResetSeparatorTokens()" + }, + { + "lang": "JS", + "source": "client.index('books').resetSeparatorTokens()" + }, + { + "lang": "Java", + "source": "client.index(\"articles\").resetSeparatorTokensSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('articles')->resetSeparatorTokens();" + }, + { + "lang": "Python", + "source": "client.index('articles').reset_separator_tokens()" + }, + { + "lang": "Ruby", + "source": "client.index('articles').reset_separator_tokens" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('articles')\n .reset_separator_tokens()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").resetSeparatorTokens { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" + } + ] + } + }, + "/indexes/{indexUid}/settings/sortable-attributes": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get sortableAttributes", + "description": "Get an user defined sortableAttributes", + "operationId": "getsortableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "sortableAttributes is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").GetSortableAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('books').getSortableAttributes();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetSortableAttributes()" + }, + { + "lang": "JS", + "source": "client.index('books').getSortableAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").getSortableAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->getSortableAttributes();" + }, + { + "lang": "Python", + "source": "client.index('books').get_sortable_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('books').sortable_attributes" + }, + { + "lang": "Rust", + "source": "let sortable_attributes: Vec = client\n .index(\"books\")\n .get_sortable_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").getSortableAttributes { (result: Result, Swift.Error>) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update sortableAttributes", + "description": "Update an index's user defined sortableAttributes", + "operationId": "putsortableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").UpdateSortableAttributesAsync(new [] { \"price\", \"author\" });" + }, + { + "lang": "Go", + "source": "sortableAttributes := []string{\n \"price\",\n \"author\",\n}\nclient.Index(\"books\").UpdateSortableAttributes(&sortableAttributes)" + }, + { + "lang": "JS", + "source": "client.index('books')\n .updateSortableAttributes([\n 'price',\n 'author'\n ])" + }, + { + "lang": "Java", + "source": "client.index(\"books\").updateSortableAttributesSettings(new String[] {\"price\", \"author\"});" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateSortableAttributes([\n 'price',\n 'author'\n]);" + }, + { + "lang": "Python", + "source": "client.index('books').update_sortable_attributes([\n 'price',\n 'author'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('books').update_sortable_attributes([\n 'price',\n 'author'\n])" + }, + { + "lang": "Rust", + "source": "let sortable_attributes = [\n \"price\",\n \"author\"\n];\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_sortable_attributes(&sortable_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").updateSortableAttributes([\"price\", \"author\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"price\",\n \"author\"\n ]'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset sortableAttributes", + "description": "Reset an index's sortableAttributes to its default value", + "operationId": "deletesortableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").ResetSortableAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('books').resetSortableAttributes();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetSortableAttributes()" + }, + { + "lang": "JS", + "source": "client.index('books').resetSortableAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").resetSortableAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->resetSortableAttributes();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_sortable_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('books').reset_sortable_attributes" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_sortable_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").resetSortableAttributes() { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" + } + ] + } + }, + "/indexes/{indexUid}/settings/stop-words": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get stopWords", + "description": "Get an user defined stopWords", + "operationId": "getstopWords", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "stopWords is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetStopWordsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getStopWords();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetStopWords()" + }, + { + "lang": "JS", + "source": "client.index('movies').getStopWords()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getStopWordsSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getStopWords();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_stop_words()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').stop_words" + }, + { + "lang": "Rust", + "source": "let stop_words: Vec = client\n .index(\"movies\")\n .get_stop_words()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getStopWords { (result) in\n switch result {\n case .success(let stopWords):\n print(stopWords)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update stopWords", + "description": "Update an index's user defined stopWords", + "operationId": "putstopWords", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateStopWordsAsync(new[] {\"of\", \"the\", \"to\"});" + }, + { + "lang": "Dart", + "source": "await client.index('movies').updateStopWords(['of', 'the', 'to']);" + }, + { + "lang": "Go", + "source": "stopWords := []string{\"of\", \"the\", \"to\"}\nclient.Index(\"movies\").UpdateStopWords(&stopWords)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateStopWords(['of', 'the', 'to'])" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateStopWordsSettings(new String[] {\"of\", \"the\", \"to\"});" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateStopWords(['the', 'of', 'to']);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_stop_words(['of', 'the', 'to'])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_stop_words(['of', 'the', 'to'])" + }, + { + "lang": "Rust", + "source": "let stop_words = [\"of\", \"the\", \"to\"];\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_stop_words(&stop_words)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let stopWords: [String] = [\"of\", \"the\", \"to\"]\nclient.index(\"movies\").updateStopWords(stopWords) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/stop-words' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"the\",\n \"of\",\n \"to\"\n ]'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset stopWords", + "description": "Reset an index's stopWords to its default value", + "operationId": "deletestopWords", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetStopWordsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetStopWords();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetStopWords()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetStopWords()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetStopWordsSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetStopWords();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_stop_words()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_stop_words" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_stop_words()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").resetStopWords { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" + } + ] + } + }, + "/indexes/{indexUid}/settings/synonyms": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get synonyms", + "description": "Get an user defined synonyms", + "operationId": "getsynonyms", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "synonyms is returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + } + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetSynonymsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getSynonyms();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetSynonyms()" + }, + { + "lang": "JS", + "source": "client.index('movies').getSynonyms()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getSynonymsSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getSynonyms();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_synonyms()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').synonyms" + }, + { + "lang": "Rust", + "source": "let synonyms: HashMap> = client\n .index(\"movies\")\n .get_synonyms()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getSynonyms { (result) in\n switch result {\n case .success(let synonyms):\n print(synonyms)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update synonyms", + "description": "Update an index's user defined synonyms", + "operationId": "putsynonyms", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var synonyms = new Dictionary>\n{\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\", \"xmen\" } },\n { \"wow\", new string[] { \"world of warcraft\" } }\n};\nawait client.Index(\"movies\").UpdateSynonymsAsync(synonyms);" + }, + { + "lang": "Go", + "source": "synonyms := map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\", \"xmen\"},\n \"wow\": []string{\"world of warcraft\"},\n}\nclient.Index(\"movies\").UpdateSynonyms(&synonyms)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateSynonyms({\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine', 'xmen'],\n wow: ['world of warcraft']\n})" + }, + { + "lang": "Java", + "source": "HashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nclient.index(\"movies\").updateSynonymsSettings(synonyms);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateSynonyms([\n 'wolverine' => ['xmen', 'logan'],\n 'logan' => ['wolverine', 'xmen'],\n 'wow' => ['world of warcraft']\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_synonyms({\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine', 'xmen'],\n 'wow': ['world of warcraft']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_synonyms({\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine', 'xmen'],\n wow: ['world of warcraft']\n})" + }, + { + "lang": "Rust", + "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"wolverine\"), vec![String::from(\"xmen\"), String::from(\"logan\")]);\nsynonyms.insert(String::from(\"logan\"), vec![String::from(\"xmen\"), String::from(\"wolverine\")]);\nsynonyms.insert(String::from(\"wow\"), vec![String::from(\"world of warcraft\")]);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_synonyms(&synonyms)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let synonyms: [String: [String]] = [\n \"wolverine\": [\"xmen\", \"logan\"],\n \"logan\": [\"wolverine\", \"xmen\"],\n \"wow\": [\"world of warcraft\"]\n]\nclient.index(\"movies\").updateSynonyms(synonyms) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/synonyms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\n \"wolverine\",\n \"xmen\"\n ],\n \"wow\": [\"world of warcraft\"]\n }'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset synonyms", + "description": "Reset an index's synonyms to its default value", + "operationId": "deletesynonyms", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSynonymsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetSynonyms();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetSynonyms()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetSynonyms()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetSynonymsSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetSynonyms();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_synonyms()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_synonyms" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_synonyms()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").resetSynonyms { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" + } + ] + } + }, + "/indexes/{indexUid}/settings/typo-tolerance": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get typoTolerance", + "description": "Get an user defined typoTolerance", + "operationId": "gettypoTolerance", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "typoTolerance is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TypoSettings" + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Dart", + "source": "await client.index('books').getTypoTolerance();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetTypoTolerance()" + }, + { + "lang": "JS", + "source": "client.index('books').getTypoTolerance()" + }, + { + "lang": "PHP", + "source": "$client->index('books')->getTypoTolerance();" + }, + { + "lang": "Python", + "source": "client.index('books').get_typo_tolerance()" + }, + { + "lang": "Ruby", + "source": "index('books').typo_tolerance" + }, + { + "lang": "Rust", + "source": "let typo_tolerance: TypoToleranceSettings = client\n .index(\"books\")\n .get_typo_tolerance()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset typoTolerance", + "description": "Reset an index's typoTolerance to its default value", + "operationId": "deletetypoTolerance", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TypoSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").ResetTypoToleranceAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('books').resetTypoTolerance();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetTypoTolerance()" + }, + { + "lang": "JS", + "source": "client.index('books').resetTypoTolerance()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").resetTypoToleranceSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->resetTypoTolerance();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_typo_tolerance()" + }, + { + "lang": "Ruby", + "source": "index('books').reset_typo_tolerance" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_typo_tolerance()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update typoTolerance", + "description": "Update an index's user defined typoTolerance", + "operationId": "patchtypoTolerance", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TypoSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var typoTolerance = new TypoTolerance {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeTypos = new TypoTolerance.TypoSize {\n OneTypo = 4,\n TwoTypos = 10\n }\n};\n\nawait client.Index(\"books\").UpdateTypoToleranceAsync(typoTolerance);" + }, + { + "lang": "Dart", + "source": "final toUpdate = TypoTolerance(\n minWordSizeForTypos: MinWordSizeForTypos(\n oneTypo: 4,\n twoTypos: 10,\n ),\n disableOnAttributes: ['title'],\n);\nawait client.index('books').updateTypoTolerance(toUpdate);" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 4,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n})" + }, + { + "lang": "JS", + "source": "client.index('books').updateTypoTolerance({\n minWordSizeForTypos: {\n oneTypo: 4,\n twoTypos: 10\n },\n disableOnAttributes: [\n 'title'\n ]\n})" + }, + { + "lang": "Java", + "source": "TypoTolerance typoTolerance = new TypoTolerance();\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 4);\n put(\"twoTypos\", 10);\n }\n };\n\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\ntypoTolerance.setDisableOnAttributes(new String[] {\"title\"});\n\nclient.index(\"books\").updateTypoToleranceSettings(typoTolerance);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateTypoTolerance([\n 'minWordSizeForTypos' => [\n 'oneTypo' => 4,\n 'twoTypos' => 10\n ],\n 'disableOnAttributes' => [\n 'title'\n ]\n]);" + }, + { + "lang": "Python", + "source": "client.index('books').update_typo_tolerance({\n 'minWordSizeForTypos': {\n 'oneTypo': 4,\n 'twoTypos': 10\n },\n 'disableOnAttributes': [\n 'title'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "index('books').update_typo_tolerance({\n min_word_size_for_typos: {\n one_typo: 4,\n two_typos: 10\n },\n disable_on_attributes: ['title']\n})" + }, + { + "lang": "Rust", + "source": "let typo_tolerance = TypoToleranceSettings {\n enabled: Some(false),\n disable_on_attributes: None,\n disable_on_words: None,\n min_word_size_for_typos: None,\n};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"minWordSizeForTypos\": {\n \"oneTypo\": 4,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n }'" + } + ] + } + }, + "/indexes/{indexUid}/settings/vector-store": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get vectorStore", + "description": "Get an user defined vectorStore", + "operationId": "getvectorStore", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "vectorStore is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VectorStoreBackend" + }, + "example": "stable" + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset vectorStore", + "description": "Reset an index's vectorStore to its default value", + "operationId": "deletevectorStore", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VectorStoreBackend" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store'" + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update vectorStore", + "description": "Update an index's user defined vectorStore", + "operationId": "patchvectorStore", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VectorStoreBackend" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"experimental\"'" + } + ] + } + }, + "/indexes/{indexUid}/similar": { + "get": { + "tags": [ + "Similar documents" + ], + "summary": "Get similar documents with GET", + "description": "Retrieve documents similar to a specific search result.", + "operationId": "similar_get", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "id", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "offset", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "default": 20, + "minimum": 0 + } + }, + { + "name": "attributes_to_retrieve", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "retrieve_vectors", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "show_ranking_score", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "show_ranking_score_details", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "ranking_score_threshold", + "in": "query", + "required": false, + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "embedder", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimilarResult" + }, + "example": { + "hits": [ + { + "id": 2770, + "title": "American Pie 2", + "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", + "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", + "release_date": 997405200 + }, + { + "id": 190859, + "title": "American Sniper", + "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", + "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", + "release_date": 1418256000 + } + ], + "offset": 0, + "limit": 2, + "estimatedTotalHits": 976, + "processingTimeMs": 35, + "query": "american " + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/similar?id=TARGET_DOCUMENT_ID&embedder=EMBEDDER_NAME'" + } + ] + }, + "post": { + "tags": [ + "Similar documents" + ], + "summary": "Get similar documents with POST", + "description": "Retrieve documents similar to a specific search result.", + "operationId": "similar_post", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimilarQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimilarResult" + }, + "example": { + "hits": [ + { + "id": 2770, + "title": "American Pie 2", + "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", + "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", + "release_date": 997405200 + }, + { + "id": 190859, + "title": "American Sniper", + "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", + "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", + "release_date": 1418256000 + } + ], + "offset": 0, + "limit": 2, + "estimatedTotalHits": 976, + "processingTimeMs": 35, + "query": "american " + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "resp := new(meilisearch.SimilarDocumentResult)\nclient.Index(\"INDEX_NAME\").SearchSimilarDocuments(&meilisearch.SimilarDocumentQuery{\n Id: \"TARGET_DOCUMENT_ID\",\n Embedder: \"default\",\n}, resp)" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').searchSimilarDocuments({ id: 'TARGET_DOCUMENT_ID', embedder: 'default' })" + }, + { + "lang": "PHP", + "source": "$similarQuery = new SimilarDocumentsQuery('TARGET_DOCUMENT_ID', 'default');\n$client->index('INDEX_NAME')->searchSimilarDocuments($similarQuery);" + }, + { + "lang": "Python", + "source": "client.index(\"INDEX_NAME\").get_similar_documents({\"id\": \"TARGET_DOCUMENT_ID\", \"embedder\": \"default\"})" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').search_similar_documents('TARGET_DOCUMENT_ID', embedder: 'default')" + }, + { + "lang": "Rust", + "source": "let results = index\n .similar_search(\"TARGET_DOCUMENT_ID\", \"EMBEDDER_NAME\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/similar' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"id\": TARGET_DOCUMENT_ID,\n \"embedder\": \"EMBEDDER_NAME\"\n }'" + } + ] + } + }, + "/indexes/{indexUid}/stats": { + "get": { + "tags": [ + "Stats" + ], + "summary": "Get stats of index", + "description": "Get the stats of an index.", + "operationId": "get_index_stats", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "The stats of the index", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IndexStats" + }, + "example": { + "numberOfDocuments": 10, + "rawDocumentDbSize": 10, + "avgDocumentSize": 10, + "numberOfEmbeddings": 10, + "numberOfEmbeddedDocuments": 10, + "isIndexing": true, + "fieldDistribution": { + "genre": 10, + "author": 9 + } + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "stats.get", + "stats.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetStatsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getStats();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetStats()" + }, + { + "lang": "JS", + "source": "client.index('movies').getStats()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getStats();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->stats();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_stats()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').stats" + }, + { + "lang": "Rust", + "source": "let stats: IndexStats = client\n .index(\"movies\")\n .get_stats()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").stats { (result) in\n switch result {\n case .success(let stats):\n print(stats)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/stats'" + } + ] + } + }, + "/indexes{indexUid}/compact": { + "post": { + "tags": [ + "Compact an index" + ], + "summary": "Compact an index", + "operationId": "compact", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "202": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentDeletion", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ] + } + }, + "/keys": { + "get": { + "tags": [ + "Keys" + ], + "summary": "Get API Keys", + "description": "List all API Keys", + "operationId": "list_api_keys", + "parameters": [ + { + "name": "offset", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "default": 20, + "minimum": 0 + } + } + ], + "responses": { + "202": { + "description": "List of keys", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationView_KeyView" + }, + "example": { + "results": [ + { + "uid": "01b4bc42-eb33-4041-b481-254d00cce834", + "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", + "name": "An API Key", + "description": null, + "actions": [ + "documents.add" + ], + "indexes": [ + "movies" + ], + "expiresAt": "2022-11-12T10:00:00Z", + "createdAt": "2021-11-12T10:00:00Z", + "updatedAt": "2021-11-12T10:00:00Z" + } + ], + "limit": 20, + "offset": 0, + "total": 1 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "keys.get", + "keys.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "ResourceResults keyResult = await client.GetKeysAsync(new KeysQuery { Limit = 3 });" + }, + { + "lang": "Dart", + "source": "await client.getKeys(params: KeysQuery(limit: 3));" + }, + { + "lang": "Go", + "source": "client.GetKeys(&meilisearch.KeysQuery{\n Limit: 3\n});" + }, + { + "lang": "JS", + "source": "client.getKeys({ limit: 3 })" + }, + { + "lang": "Java", + "source": "KeysQuery query = new KeysQuery().setLimit(3);\nclient.getKeys(query);" + }, + { + "lang": "PHP", + "source": "$client->getKeys((new KeysQuery())->setLimit(3));" + }, + { + "lang": "Python", + "source": "client.get_keys({'limit': 3})" + }, + { + "lang": "Ruby", + "source": "client.keys(limit: 3)" + }, + { + "lang": "Rust", + "source": "let mut query = KeysQuery::new()\n .with_limit(3)\n .execute(&client)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.getKeys(params: KeysQuery(limit: 3)) { result in\n switch result {\n case .success(let keys):\n print(keys)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys?limit=3' \\\n -H 'Authorization: Bearer MASTER_KEY'" + } + ] + }, + "post": { + "tags": [ + "Keys" + ], + "summary": "Create an API Key", + "description": "Create an API Key.", + "operationId": "create_api_key", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateApiKey" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Key has been created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeyView" + }, + "example": { + "uid": "01b4bc42-eb33-4041-b481-254d00cce834", + "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", + "name": "Indexing Products API key", + "description": null, + "actions": [ + "documents.add" + ], + "indexes": [ + "products" + ], + "expiresAt": "2021-11-13T00:00:00Z", + "createdAt": "2021-11-12T10:00:00Z", + "updatedAt": "2021-11-12T10:00:00Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "keys.create", + "keys.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "Key keyOptions = new Key\n{\n Description = \"Add documents: Products API key\",\n Actions = new KeyAction[] { KeyAction.DocumentsAdd },\n Indexes = new string[] { \"products\" },\n ExpiresAt = DateTime.Parse(\"2042-04-02T00:42:42Z\")\n};\nKey createdKey = await this.client.CreateKeyAsync(keyOptions);" + }, + { + "lang": "Go", + "source": "client.CreateKey(&meilisearch.Key{\n Description: \"Add documents: Products API key\",\n Actions: []string{\"documents.add\"},\n Indexes: []string{\"products\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" + }, + { + "lang": "JS", + "source": "client.createKey({\n description: 'Add documents: Products API key',\n actions: ['documents.add'],\n indexes: ['products'],\n expiresAt: '2021-11-13T00:00:00Z'\n})" + }, + { + "lang": "Java", + "source": "SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\nDate dateParsed = format.parse(\"2042-04-02T00:42:42Z\");\n\nKey keyInfo = new Key();\n\nkeyInfo.setDescription(\"Add documents: Products API key\");\nkeyInfo.setActions(new String[] {\"documents.add\"});\nkeyInfo.setIndexes(new String[] {\"products\"});\nkeyInfo.setExpiresAt(dateParsed);\n\nclient.createKey(keyInfo);" + }, + { + "lang": "PHP", + "source": "$client->createKey([\n 'description' => 'Add documents: Products API key',\n 'actions' => ['documents.add'],\n 'indexes' => ['products'],\n 'expiresAt' => '2042-04-02T00:42:42Z',\n]);" + }, + { + "lang": "Python", + "source": "client.create_key(options={\n 'description': 'Add documents: Products API key',\n 'actions': ['documents.add'],\n 'indexes': ['products'],\n 'expiresAt': '2042-04-02T00:42:42Z'\n})" + }, + { + "lang": "Ruby", + "source": "client.create_key(\n description: 'Add documents: Products API key',\n actions: ['documents.add'],\n indexes: ['products'],\n expires_at: '2042-04-02T00:42:42Z'\n)" + }, + { + "lang": "Rust", + "source": "let mut key_options = KeyBuilder::new();\nkey_options\n .with_name(\"Add documents: Products API key\")\n .with_action(Action::DocumentsAdd)\n .with_expires_at(time::macros::datetime!(2042 - 04 - 02 00:42:42 UTC))\n .with_index(\"products\");\nlet new_key = client\n .create_key(key_options)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let keyParams = KeyParams(\n description: \"Add documents: Products API key\",\n actions: [\"documents.add\"],\n indexes: [\"products\"],\n expiresAt: \"2042-04-02T00:42:42Z\"\n)\nclient.createKey(keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/keys' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"description\": \"Add documents: Products API key\",\n \"actions\": [\"documents.add\"],\n \"indexes\": [\"products\"],\n \"expiresAt\": \"2042-04-02T00:42:42Z\"\n }'" + } + ] + } + }, + "/keys/{uidOrKey}": { + "get": { + "tags": [ + "Keys" + ], + "summary": "Get an API Key", + "description": "Get an API key from its `uid` or its `key` field.", + "operationId": "get_api_key", + "parameters": [ + { + "name": "uidOrKey", + "in": "path", + "description": "The `uid` or `key` field of an existing API key", + "required": true, + "schema": { + "type": "string", + "format": "password" + }, + "example": "7b198a7f-52a0-4188-8762-9ad93cd608b2" + } + ], + "responses": { + "200": { + "description": "The key is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeyView" + }, + "example": { + "uid": "01b4bc42-eb33-4041-b481-254d00cce834", + "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", + "name": "An API Key", + "description": null, + "actions": [ + "documents.add" + ], + "indexes": [ + "movies" + ], + "expiresAt": "2022-11-12T10:00:00Z", + "createdAt": "2021-11-12T10:00:00Z", + "updatedAt": "2021-11-12T10:00:00Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "keys.get", + "keys.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "Key key = await client.GetKeyAsync(\"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4\");" + }, + { + "lang": "Dart", + "source": "await client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" + }, + { + "lang": "Go", + "source": "client.GetKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + }, + { + "lang": "JS", + "source": "client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + }, + { + "lang": "Java", + "source": "client.getKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\");" + }, + { + "lang": "PHP", + "source": "$client->getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" + }, + { + "lang": "Python", + "source": "client.get_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + }, + { + "lang": "Ruby", + "source": "client.key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + }, + { + "lang": "Rust", + "source": "let key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.getKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" + } + ] + }, + "delete": { + "tags": [ + "Keys" + ], + "summary": "Delete a key", + "description": "Delete the specified API key.", + "operationId": "delete_api_key", + "parameters": [ + { + "name": "uidOrKey", + "in": "path", + "description": "The `uid` or `key` field of an existing API key", + "required": true, + "schema": { + "type": "string", + "format": "password" + }, + "example": "7b198a7f-52a0-4188-8762-9ad93cd608b2" + } + ], + "responses": { + "204": { + "description": "The key have been removed" + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "keys.delete", + "keys.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "client.DeleteKeyAsync(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + }, + { + "lang": "Dart", + "source": "await client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" + }, + { + "lang": "Go", + "source": "client.DeleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + }, + { + "lang": "JS", + "source": "client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + }, + { + "lang": "Java", + "source": "client.deleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + }, + { + "lang": "PHP", + "source": "$client->deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" + }, + { + "lang": "Python", + "source": "client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + }, + { + "lang": "Ruby", + "source": "client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + }, + { + "lang": "Rust", + "source": "let key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();\nclient\n .delete_key(&key)\n .await?;" + }, + { + "lang": "Swift", + "source": "client.deleteKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success:\n print(\"success\")\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" + } + ] + }, + "patch": { + "tags": [ + "Keys" + ], + "summary": "Update a Key", + "description": "Update the name and description of an API key.\nUpdates to keys are partial. This means you should provide only the fields you intend to update, as any fields not present in the payload will remain unchanged.", + "operationId": "patch_api_key", + "parameters": [ + { + "name": "uidOrKey", + "in": "path", + "description": "The `uid` or `key` field of an existing API key", + "required": true, + "schema": { + "type": "string", + "format": "password" + }, + "example": "7b198a7f-52a0-4188-8762-9ad93cd608b2" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchApiKey" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "The key have been updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeyView" + }, + "example": { + "uid": "01b4bc42-eb33-4041-b481-254d00cce834", + "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", + "name": "An API Key", + "description": null, + "actions": [ + "documents.add" + ], + "indexes": [ + "movies" + ], + "expiresAt": "2022-11-12T10:00:00Z", + "createdAt": "2021-11-12T10:00:00Z", + "updatedAt": "2021-11-12T10:00:00Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "keys.update", + "keys.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.UpdateKeyAsync(\n \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\",\n description: \"Manage documents: Products/Reviews API key\",\n name: \"Products/Reviews API key\"\n)" + }, + { + "lang": "Go", + "source": "client.UpdateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", &meilisearch.Key{\n Description: \"Manage documents: Products/Reviews API key\",\n Actions: []string{\"documents.add\", \"document.delete\"},\n Indexes: []string{\"products\", \"reviews\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" + }, + { + "lang": "JS", + "source": "client.updateKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d', {\n name: 'Products/Reviews API key',\n description: 'Manage documents: Products/Reviews API key',\n})" + }, + { + "lang": "Java", + "source": "KeyUpdate keyChanges = new KeyUpdate();\nkeyChanges.setName(\"Products/Reviews API key\");\nkeyChanges.setDescription(\"Manage documents: Products/Reviews API key\");\n\nclient.updateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", keyChanges);" + }, + { + "lang": "PHP", + "source": "$client->updateKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n [\n 'name' => 'Products/Reviews API key',\n 'description' => 'Manage documents: Products/Reviews API key'\n ]);" + }, + { + "lang": "Python", + "source": "client.update_key(key_or_uid='6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n options={\n 'name': 'Products/Reviews API key',\n 'description': 'Manage documents: Products/Reviews API key'\n})" + }, + { + "lang": "Ruby", + "source": "client.update_key(\n '6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n {\n description: 'Manage documents: Products/Reviews API key',\n name: 'Products/Reviews API key'\n }\n)" + }, + { + "lang": "Rust", + "source": "let mut key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();\nkey\n .with_description(\"Manage documents: Products/Reviews API key\".to_string())\n .with_name(\"Products/Reviews API key\".to_string())\n .update(&client)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let keyParams = KeyUpdateParams(\n description: \"Manage documents: Products/Reviews API key\",\n name: \"Products/Reviews API key\"\n)\n\nclient.updateKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", keyParams: keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"name\": \"Products/Reviews API key\",\n \"description\": \"Manage documents: Products/Reviews API key\"\n }'" + } + ] + } + }, + "/logs/stderr": { + "post": { + "tags": [ + "Logs" + ], + "summary": "Update target of the console logs", + "description": "This route lets you specify at runtime the level of the console logs outputted on stderr.", + "operationId": "update_stderr_target", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateStderrLogs" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "The console logs have been updated" + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "metrics.get", + "metrics.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X POST MEILISEARCH_URL/logs/stderr \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"target\": \"milli=trace,index_scheduler=info,actix_web=off\"\n }'" + } + ] + } + }, + "/logs/stream": { + "post": { + "tags": [ + "Logs" + ], + "summary": "Retrieve logs", + "description": "Stream logs over HTTP. The format of the logs depends on the configuration specified in the payload.\nThe logs are sent as multi-part, and the stream never stops, so make sure your clients correctly handle that.\nTo make the server stop sending you logs, you can call the `DELETE /logs/stream` route.\n\nThere can only be one listener at a timeand an error will be returned if you call this route while it's being used by another client.", + "operationId": "get_logs", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetLogs" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Logs are being returned", + "content": { + "application/json": { + "schema": { + "type": "string" + }, + "example": "\n2024-10-08T13:35:02.643750Z WARN HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: tracing_actix_web::middleware: Error encountered while processing the incoming HTTP request: ResponseError { code: 400, message: \"Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625\", error_code: \"feature_not_enabled\", error_type: \"invalid_request\", error_link: \"https://docs.meilisearch.com/errors#feature_not_enabled\" }\n2024-10-08T13:35:02.644191Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: meilisearch: close time.busy=1.66ms time.idle=658µs\n2024-10-08T13:35:18.564152Z INFO HTTP request{method=PATCH host=\"localhost:7700\" route=/experimental-features query_parameters= user_agent=curl/8.6.0 status_code=200}: meilisearch: close time.busy=1.17ms time.idle=127µs\n2024-10-08T13:35:23.094987Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=200}: meilisearch: close time.busy=2.12ms time.idle=595µs\n" + } + } + }, + "400": { + "description": "The route is already being used", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The `/logs/stream` route is currently in use by someone else.", + "code": "bad_request", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#bad_request" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "metrics.get", + "metrics.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X POST MEILISEARCH_URL/logs/stream \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"mode\": \"human\",\n \"target\": \"index_scheduler=trace\"\n }'" + } + ] + }, + "delete": { + "tags": [ + "Logs" + ], + "summary": "Stop retrieving logs", + "description": "Call this route to make the engine stops sending logs through the `POST /logs/stream` route.", + "operationId": "cancel_logs", + "responses": { + "204": { + "description": "Logs are being returned" + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "metrics.get", + "metrics.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X DELETE MEILISEARCH_URL/logs/stream\n}'" + } + ] + } + }, + "/metrics": { + "get": { + "tags": [ + "Stats" + ], + "summary": "Get prometheus metrics", + "description": "Retrieve metrics on the engine. See https://www.meilisearch.com/docs/learn/experimental/metrics\nCurrently, [the feature is experimental](https://www.meilisearch.com/docs/learn/experimental/overview)\nwhich means it must be enabled.", + "operationId": "get_metrics", + "responses": { + "200": { + "description": "The metrics of the instance", + "content": { + "text/plain": { + "schema": { + "type": "string" + }, + "example": "\n# HELP meilisearch_db_size_bytes Meilisearch DB Size In Bytes\n# TYPE meilisearch_db_size_bytes gauge\nmeilisearch_db_size_bytes 1130496\n# HELP meilisearch_batch_running_progress_trace The currently running progress trace\n# TYPE meilisearch_batch_running_progress_trace gauge\nmeilisearch_batch_running_progress_trace{batch_uid=\"0\",step_name=\"document\"} 0.710618582519409\nmeilisearch_batch_running_progress_trace{batch_uid=\"0\",step_name=\"extracting word proximity\"} 0.2222222222222222\nmeilisearch_batch_running_progress_trace{batch_uid=\"0\",step_name=\"indexing\"} 0.6666666666666666\nmeilisearch_batch_running_progress_trace{batch_uid=\"0\",step_name=\"processing tasks\"} 0\n# HELP meilisearch_http_requests_total Meilisearch HTTP requests total\n# TYPE meilisearch_http_requests_total counter\nmeilisearch_http_requests_total{method=\"GET\",path=\"/metrics\",status=\"400\"} 1\nmeilisearch_http_requests_total{method=\"PATCH\",path=\"/experimental-features\",status=\"200\"} 1\n# HELP meilisearch_http_response_time_seconds Meilisearch HTTP response times\n# TYPE meilisearch_http_response_time_seconds histogram\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.005\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.01\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.025\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.05\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.075\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.25\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.75\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"2.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"7.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"10\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"+Inf\"} 0\nmeilisearch_http_response_time_seconds_sum{method=\"GET\",path=\"/metrics\"} 0\nmeilisearch_http_response_time_seconds_count{method=\"GET\",path=\"/metrics\"} 0\n# HELP meilisearch_last_finished_batches_progress_trace_ms The last few batches progress trace in milliseconds\n# TYPE meilisearch_last_finished_batches_progress_trace_ms gauge\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks\"} 19360\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks > computing document changes\"} 368\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks > computing document changes > preparing payloads\"} 367\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks > computing document changes > preparing payloads > payload\"} 367\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks > indexing\"} 18970\n# HELP meilisearch_index_count Meilisearch Index Count\n# TYPE meilisearch_index_count gauge\nmeilisearch_index_count 1\n# HELP meilisearch_index_docs_count Meilisearch Index Docs Count\n# TYPE meilisearch_index_docs_count gauge\nmeilisearch_index_docs_count{index=\"mieli\"} 2\n# HELP meilisearch_is_indexing Meilisearch Is Indexing\n# TYPE meilisearch_is_indexing gauge\nmeilisearch_is_indexing 0\n# HELP meilisearch_last_update Meilisearch Last Update\n# TYPE meilisearch_last_update gauge\nmeilisearch_last_update 1726675964\n# HELP meilisearch_nb_tasks Meilisearch Number of tasks\n# TYPE meilisearch_nb_tasks gauge\nmeilisearch_nb_tasks{kind=\"indexes\",value=\"mieli\"} 39\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"canceled\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"enqueued\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"failed\"} 4\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"processing\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"succeeded\"} 35\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentAdditionOrUpdate\"} 9\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentDeletion\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentEdition\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"dumpCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexDeletion\"} 8\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexSwap\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexUpdate\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"settingsUpdate\"} 22\nmeilisearch_nb_tasks{kind=\"types\",value=\"snapshotCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskCancelation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskDeletion\"} 0\n# HELP meilisearch_used_db_size_bytes Meilisearch Used DB Size In Bytes\n# TYPE meilisearch_used_db_size_bytes gauge\nmeilisearch_used_db_size_bytes 409600\n" + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "metrics.get", + "metrics.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/metrics'" + } + ] + } + }, + "/multi-search": { + "post": { + "tags": [ + "Multi-search" + ], + "summary": "Perform a multi-search", + "description": "Bundle multiple search queries in a single API request. Use this endpoint to search through multiple indexes at once.", + "operationId": "multi_search_with_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FederatedSearch" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Federated multi-search", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FederatedSearchResult" + }, + "example": { + "hits": [ + { + "id": 42, + "title": "Batman returns", + "overview": "The overview of batman returns", + "_federation": { + "indexUid": "movies", + "queriesPosition": 0 + } + }, + { + "comicsId": "batman-killing-joke", + "description": "This comic is really awesome", + "title": "Batman: the killing joke", + "_federation": { + "indexUid": "comics", + "queriesPosition": 1 + } + } + ], + "processingTimeMs": 0, + "limit": 20, + "offset": 0, + "estimatedTotalHits": 2, + "semanticHitCount": 0 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.MultiSearchAsync(new MultiSearchQuery()\n{\n Queries = new System.Collections.Generic.List()\n {\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"booh\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"nemo\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movie_ratings\",\n Q = \"us\",\n },\n }\n});" + }, + { + "lang": "Go", + "source": "client.MultiSearch(&MultiSearchRequest{\n Queries: []SearchRequest{\n {\n IndexUID: \"movies\",\n Query: \"pooh\",\n Limit: 5,\n },\n {\n IndexUID: \"movies\",\n Query: \"nemo\",\n Limit: 5,\n },\n {\n IndexUID: \"movie_ratings\",\n Query: \"us\",\n },\n },\n})" + }, + { + "lang": "JS", + "source": "client.multiSearch({ queries: [\n {\n indexUid: 'movies',\n q: 'pooh',\n limit: 5,\n },\n {\n indexUid: 'movies',\n q: 'nemo',\n limit: 5,\n },\n {\n indexUid: 'movie_ratings',\n q: 'us',\n },\n]})" + }, + { + "lang": "Java", + "source": "MultiSearchRequest multiSearchRequest = new MultiSearchRequest();\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"pooh\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"nemo\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movie_ratings\").setQuery(\"us\"));\n\nclient.multiSearch(multiSearchRequest);" + }, + { + "lang": "PHP", + "source": "$client->multiSearch([\n (new SearchQuery())\n ->setIndexUid('movies')\n ->setQuery('pooh')\n ->setLimit(5),\n (new SearchQuery())\n ->setIndexUid('movies')\n ->setQuery('nemo')\n ->setLimit(5),\n (new SearchQuery())\n ->setIndexUid('movie_ratings')\n ->setQuery('us')\n ]);" + }, + { + "lang": "Python", + "source": "client.multi_search(\n [\n {'indexUid': 'movies', 'q': 'pooh', 'limit': 5},\n {'indexUid': 'movies', 'q': 'nemo', 'limit': 5},\n {'indexUid': 'movie_ratings', 'q': 'us'}\n ]\n)" + }, + { + "lang": "Ruby", + "source": "client.multi_search([\n { index_uid: 'books', q: 'prince' },\n { index_uid: 'movies', q: 'pooh', limit: 5 }\n { index_uid: 'movies', q: 'nemo', limit: 5 }\n { index_uid: 'movie_ratings', q: 'us' }\n])" + }, + { + "lang": "Rust", + "source": "let movie = client.index(\"movie\");\nlet movie_ratings = client.index(\"movie_ratings\");\n\nlet search_query_1 = SearchQuery::new(&movie)\n .with_query(\"pooh\")\n .with_limit(5)\n .build();\nlet search_query_2 = SearchQuery::new(&movie)\n .with_query(\"nemo\")\n .with_limit(5)\n .build();\nlet search_query_3 = SearchQuery::new(&movie_ratings)\n .with_query(\"us\")\n .build();\n\nlet response = client\n .multi_search()\n .with_search_query(search_query_1)\n .with_search_query(search_query_2)\n .with_search_query(search_query_3)\n .execute::()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/multi-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"queries\": [\n {\n \"indexUid\": \"movies\",\n \"q\": \"pooh\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movies\",\n \"q\": \"nemo\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movie_ratings\",\n \"q\": \"us\"\n }\n ]\n }'" + } + ] + } + }, + "/network": { + "get": { + "tags": [ + "Network" + ], + "summary": "Get network topology", + "description": "Get a list of all Meilisearch instances currently known to this instance.", + "operationId": "get_network", + "responses": { + "200": { + "description": "Known nodes are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Network" + }, + "example": { + "self": "ms-0", + "remotes": { + "ms-0": { + "url": "http://localhost:7700", + "searchApiKey": null, + "writeApiKey": null + }, + "ms-1": { + "url": "http://localhost:7701", + "searchApiKey": "foo", + "writeApiKey": "bar" + }, + "ms-2": { + "url": "http://localhost:7702", + "searchApiKey": "bar", + "writeApiKey": "foo" + } + } + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "network.get", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/network'" + } + ] + }, + "patch": { + "tags": [ + "Network" + ], + "summary": "Configure Network", + "description": "Add or remove nodes from network.", + "operationId": "patch_network", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Network" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "New network state is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Network" + }, + "example": { + "self": "ms-0", + "remotes": { + "ms-0": { + "url": "http://localhost:7700", + "searchApiKey": null, + "writeApiKey": null + }, + "ms-1": { + "url": "http://localhost:7701", + "searchApiKey": "foo", + "writeApiKey": "bar" + }, + "ms-2": { + "url": "http://localhost:7702", + "searchApiKey": "bar", + "writeApiKey": "foo" + } + } + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "network.update", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/network' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"self\": \"ms-00\",\n \"remotes\": {\n \"ms-00\": {\n \"url\": \"http://INSTANCE_URL\",\n \"searchApiKey\": \"INSTANCE_API_KEY\"\n },\n \"ms-01\": {\n \"url\": \"http://ANOTHER_INSTANCE_URL\",\n \"searchApiKey\": \"ANOTHER_INSTANCE_API_KEY\"\n }\n }\n }'" + } + ] + } + }, + "/snapshots": { + "post": { + "tags": [ + "Snapshots" + ], + "summary": "Create a snapshot", + "description": "Triggers a snapshot creation process. Once the process is complete, a snapshot is created in the snapshot directory. If the snapshot directory does not exist yet, it will be created.", + "operationId": "create_snapshot", + "responses": { + "202": { + "description": "Snapshot is being created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 0, + "indexUid": null, + "status": "enqueued", + "type": "snapshotCreation", + "enqueuedAt": "2021-01-01T09:39:00.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "snapshots.create", + "snapshots.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.CreateSnapshotAsync();" + }, + { + "lang": "Go", + "source": "client.CreateSnapshot()" + }, + { + "lang": "JS", + "source": "client.createSnapshot()" + }, + { + "lang": "Java", + "source": "client.createSnapshot();" + }, + { + "lang": "PHP", + "source": "$client->createSnapshot();" + }, + { + "lang": "Python", + "source": "client.create_snapshot()" + }, + { + "lang": "Ruby", + "source": "client.create_snapshot" + }, + { + "lang": "Rust", + "source": "client\n .create_snapshot()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let task = try await self.client.createSnapshot()" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/snapshots'" + } + ] + } + }, + "/stats": { + "get": { + "tags": [ + "Stats" + ], + "summary": "Get stats of all indexes.", + "description": "Get stats of all indexes.", + "operationId": "get_stats", + "responses": { + "200": { + "description": "The stats of the instance", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Stats" + }, + "example": { + "databaseSize": 567, + "usedDatabaseSize": 456, + "lastUpdate": "2019-11-20T09:40:33.711324Z", + "indexes": { + "movies": { + "numberOfDocuments": 10, + "rawDocumentDbSize": 100, + "maxDocumentSize": 16, + "avgDocumentSize": 10, + "isIndexing": true, + "fieldDistribution": { + "genre": 10, + "author": 9 + } + } + } + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "stats.get", + "stats.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.GetStatsAsync();" + }, + { + "lang": "Dart", + "source": "await client.getStats();" + }, + { + "lang": "Go", + "source": "client.GetStats()" + }, + { + "lang": "JS", + "source": "client.getStats()" + }, + { + "lang": "Java", + "source": "client.getStats();" + }, + { + "lang": "PHP", + "source": "$client->stats();" + }, + { + "lang": "Python", + "source": "client.get_all_stats()" + }, + { + "lang": "Ruby", + "source": "client.stats" + }, + { + "lang": "Rust", + "source": "let stats: ClientStats = client\n .get_stats()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.allStats { (result) in\n switch result {\n case .success(let stats):\n print(stats)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/stats'" + } + ] + } + }, + "/swap-indexes": { + "post": { + "tags": [ + "Indexes" + ], + "summary": "Swap indexes", + "description": "Swap the documents, settings, and task history of two or more indexes. You can only swap indexes in pairs. However, a single request can swap as many index pairs as you wish.\nSwapping indexes is an atomic transaction: either all indexes are successfully swapped, or none are.\nSwapping indexA and indexB will also replace every mention of indexA by indexB and vice-versa in the task history. enqueued tasks are left unmodified.", + "operationId": "swap_indexes", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SwapIndexesPayload" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 3, + "indexUid": null, + "status": "enqueued", + "type": "indexSwap", + "enqueuedAt": "2021-08-12T10:00:00.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.SwapIndexesAsync(new List { new IndexSwap(\"indexA\", \"indexB\"), new IndexSwap(\"indexX\", \"indexY\") } });" + }, + { + "lang": "Go", + "source": "client.SwapIndexes([]SwapIndexesParams{\n {Indexes: []string{\"indexA\", \"indexB\"}},\n {Indexes: []string{\"indexX\", \"indexY\"}},\n})" + }, + { + "lang": "JS", + "source": "client.swapIndexes([\n { 'indexes': ['indexA', 'indexB'] },\n { 'indexes': ['indexX', 'indexY'] }\n])" + }, + { + "lang": "Java", + "source": "SwapIndexesParams[] params =\n new SwapIndexesParams[] {\n new SwapIndexesParams().setIndexes(new String[] {\"indexA\", \"indexB\"}),\n new SwapIndexesParams().setIndexes(new String[] {\"indexX\", \"indexY\"})\n };\nTaskInfo task = client.swapIndexes(params);" + }, + { + "lang": "PHP", + "source": "$client->swapIndexes([['indexA', 'indexB'], ['indexX', 'indexY']]);" + }, + { + "lang": "Python", + "source": "client.swap_indexes([{'indexes': ['indexA', 'indexB']}, {'indexes': ['indexX', 'indexY']}])" + }, + { + "lang": "Ruby", + "source": "client.swap_indexes(['indexA', 'indexB'], ['indexX', 'indexY'])" + }, + { + "lang": "Rust", + "source": "client.swap_indexes([\n &SwapIndexes {\n indexes: (\n \"indexA\".to_string(),\n \"indexB\".to_string(),\n ),\n }, &SwapIndexes {\n indexes: (\n \"indexX\".to_string(),\n \"indexY\".to_string(),\n ),\n}])" + }, + { + "lang": "Swift", + "source": "let task = try await self.client.swapIndexes([\n (\"indexA\", \"indexB\"),\n (\"indexX\", \"indexY\")\n])" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/swap-indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"indexes\": [\n \"indexA\",\n \"indexB\"\n ]\n },\n {\n \"indexes\": [\n \"indexX\",\n \"indexY\"\n ]\n }\n ]'" + } + ] + } + }, + "/tasks": { + "get": { + "tags": [ + "Tasks" + ], + "summary": "Get all tasks", + "description": "Get all [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)", + "operationId": "get_tasks", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "Maximum number of results to return.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "default": 20, + "minimum": 0 + }, + "example": 12 + }, + { + "name": "from", + "in": "query", + "description": "Fetch the next set of results from the given uid.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "example": 12421 + }, + { + "name": "reverse", + "in": "query", + "description": "The order you want to retrieve the objects.", + "required": false, + "schema": { + "type": "boolean" + }, + "example": true + }, + { + "name": "batchUids", + "in": "query", + "description": "Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "example": 12421 + }, + { + "name": "uids", + "in": "query", + "description": "Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598, + "*" + ] + }, + { + "name": "canceledBy", + "in": "query", + "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 374, + "*" + ] + }, + { + "name": "types", + "in": "query", + "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "documentAdditionOrUpdate", + "*" + ] + }, + { + "name": "statuses", + "in": "query", + "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Status" + } + }, + "example": [ + "succeeded", + "failed", + "canceled", + "enqueued", + "processing", + "*" + ] + }, + { + "name": "indexUids", + "in": "query", + "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "movies", + "theater", + "*" + ] + }, + { + "name": "afterEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + } + ], + "responses": { + "200": { + "description": "Get all tasks", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AllTasks" + }, + "example": { + "results": [ + { + "uid": 144, + "indexUid": "mieli", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "settings": { + "filterableAttributes": [ + "play_count" + ] + } + }, + "error": null, + "duration": "PT0.009330S", + "enqueuedAt": "2024-08-08T09:01:13.348471Z", + "startedAt": "2024-08-08T09:01:13.349442Z", + "finishedAt": "2024-08-08T09:01:13.358772Z" + } + ], + "total": 1, + "limit": 1, + "from": 144, + "next": null + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.get", + "tasks.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Dart", + "source": "await client.getTasks();" + }, + { + "lang": "Go", + "source": "client.GetTasks(nil);" + }, + { + "lang": "JS", + "source": "client.tasks.getTasks()" + }, + { + "lang": "Java", + "source": "client.getTasks();" + }, + { + "lang": "PHP", + "source": "$client->getTasks();" + }, + { + "lang": "Python", + "source": "client.get_tasks()" + }, + { + "lang": "Ruby", + "source": "client.tasks" + }, + { + "lang": "Rust", + "source": "let tasks: TasksResults = client\n .get_tasks()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.getTasks { (result) in\n switch result {\n case .success(let tasks):\n print(tasks)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks'" + } + ] + }, + "delete": { + "tags": [ + "Tasks" + ], + "summary": "Delete tasks", + "description": "Delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) on filter", + "operationId": "delete_tasks", + "parameters": [ + { + "name": "uids", + "in": "query", + "description": "Permits to filter tasks by their uid. By default, when the `uids` query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598, + "*" + ] + }, + { + "name": "batchUids", + "in": "query", + "description": "Lets you filter tasks by their `batchUid`.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598, + "*" + ] + }, + { + "name": "canceledBy", + "in": "query", + "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 374, + "*" + ] + }, + { + "name": "types", + "in": "query", + "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Kind" + } + }, + "example": [ + "documentDeletion", + "*" + ] + }, + { + "name": "statuses", + "in": "query", + "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Status" + } + }, + "example": [ + "succeeded", + "failed", + "canceled", + "*" + ] + }, + { + "name": "indexUids", + "in": "query", + "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "movies", + "theater", + "*" + ] + }, + { + "name": "afterEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + } + ], + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "taskDeletion", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "400": { + "description": "A filter is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Query parameters to filter the tasks to delete are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.", + "code": "missing_task_filters", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#missing_task_filters" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "The task uid does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Task :taskUid not found.", + "code": "task_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors/#task_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.delete", + "tasks.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.DeleteTasksAsync(new DeleteTasksQuery { Uids = new List { 1, 2 } });" + }, + { + "lang": "Dart", + "source": "await client.deleteTasks(params: DeleteTasksQuery(uids: [1, 2]));" + }, + { + "lang": "Go", + "source": "client.DeleteTaks(&meilisearch.DeleteTasksQuery{\n UIDS: []int64{1, 2},\n});" + }, + { + "lang": "JS", + "source": "client.tasks.deleteTasks({ uids: [1, 2] })" + }, + { + "lang": "Java", + "source": "DeleteTasksQuery query = new DeleteTasksQuery().setUids(new int[] {1, 2})\nclient.deleteTasks(query);" + }, + { + "lang": "PHP", + "source": "$client->deleteTasks((new DeleteTasksQuery())->setUids([1, 2]));" + }, + { + "lang": "Python", + "source": "client.delete_tasks({'uids': ['1', '2']})" + }, + { + "lang": "Ruby", + "source": "client.delete_tasks(uids: [1, 2])" + }, + { + "lang": "Rust", + "source": "let mut query = tasks::TasksDeleteQuery::new(&client);\nquery.with_uids([1, 2]);\n\nlet res = client.delete_tasks_with(&query).await.unwrap();" + }, + { + "lang": "Swift", + "source": "client.deleteTasks(filter: DeleteTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/tasks?uids=1,2'" + } + ] + } + }, + "/tasks/cancel": { + "post": { + "tags": [ + "Tasks" + ], + "summary": "Cancel tasks", + "description": "Cancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", + "operationId": "cancel_tasks", + "parameters": [ + { + "name": "uids", + "in": "query", + "description": "Permits to filter tasks by their uid. By default, when the `uids` query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598, + "*" + ] + }, + { + "name": "batchUids", + "in": "query", + "description": "Lets you filter tasks by their `batchUid`.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598, + "*" + ] + }, + { + "name": "canceledBy", + "in": "query", + "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 374, + "*" + ] + }, + { + "name": "types", + "in": "query", + "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Kind" + } + }, + "example": [ + "documentDeletion", + "*" + ] + }, + { + "name": "statuses", + "in": "query", + "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Status" + } + }, + "example": [ + "succeeded", + "failed", + "canceled", + "*" + ] + }, + { + "name": "indexUids", + "in": "query", + "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "movies", + "theater", + "*" + ] + }, + { + "name": "afterEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + } + ], + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "taskCancelation", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "400": { + "description": "A filter is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Query parameters to filter the tasks to cancel are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.", + "code": "missing_task_filters", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#missing_task_filters" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "The task uid does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Task :taskUid not found.", + "code": "task_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors/#task_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.cancel", + "tasks.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.CancelTasksAsync(new CancelTasksQuery { Uids = new List { 1, 2 } });" + }, + { + "lang": "Dart", + "source": "await client.cancelTasks(params: CancelTasksQuery(uids: [1, 2]));" + }, + { + "lang": "Go", + "source": "client.CancelTasks(&meilisearch.CancelTasksQuery{\n UIDS: []int64{1, 2},\n});" + }, + { + "lang": "JS", + "source": "client.tasks.cancelTasks({ uids: [1, 2] })" + }, + { + "lang": "Java", + "source": "CancelTasksQuery query = new CancelTasksQuery().setUids(new int[] {1, 2})\nclient.cancelTasks(query);" + }, + { + "lang": "PHP", + "source": "$client->cancelTasks((new CancelTasksQuery())->setUids([1, 2]));" + }, + { + "lang": "Python", + "source": "client.cancel_tasks({'uids': ['1', '2']})" + }, + { + "lang": "Ruby", + "source": "client.cancel_tasks(uids: [1, 2])" + }, + { + "lang": "Rust", + "source": "let mut query = tasks::TasksCancelQuery::new(&client);\nquery.with_uids([1, 2]);\n\nlet res = client.cancel_task_with(&query).await.unwrap();" + }, + { + "lang": "Swift", + "source": "client.cancelTasks(filter: CancelTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/tasks/cancel?uids=1,2'" + } + ] + } + }, + "/tasks/{taskUid}": { + "get": { + "tags": [ + "Tasks" + ], + "summary": "Get a task", + "description": "Get a [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", + "operationId": "get_task", + "parameters": [ + { + "name": "taskUid", + "in": "path", + "description": "The task identifier", + "required": true, + "schema": { + "type": "string", + "format": "u-int32" + }, + "example": 0 + } + ], + "responses": { + "200": { + "description": "Task successfully retrieved", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskView" + }, + "example": { + "uid": 1, + "indexUid": "movies", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 79000, + "indexedDocuments": 79000 + }, + "error": null, + "duration": "PT1S", + "enqueuedAt": "2021-01-01T09:39:00.000000Z", + "startedAt": "2021-01-01T09:39:01.000000Z", + "finishedAt": "2021-01-01T09:39:02.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "The task uid does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Task :taskUid not found.", + "code": "task_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors/#task_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.get", + "tasks.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "ResourceResults taskResult = await client.GetTasksAsync(new TasksQuery { Limit = 2, From = 10 });" + }, + { + "lang": "C#", + "source": "ResourceResults taskResult = await client.GetTasksAsync(new TasksQuery { Limit = 2, From = 8 });" + }, + { + "lang": "Dart", + "source": "await client.getTask(1);" + }, + { + "lang": "Dart", + "source": "await client.getTasks(params: TasksQuery(limit: 2, from: 10));" + }, + { + "lang": "Dart", + "source": "await client.getTasks(params: TasksQuery(limit: 2, from: 8));" + }, + { + "lang": "Go", + "source": "client.GetTask(1);" + }, + { + "lang": "Go", + "source": "client.GetTasks(&meilisearch.TasksQuery{\n Limit: 2,\n From: 10,\n});" + }, + { + "lang": "Go", + "source": "client.GetTasks(&meilisearch.TasksQuery{\n Limit: 2,\n From: 8,\n});" + }, + { + "lang": "JS", + "source": "client.tasks.getTask(1)" + }, + { + "lang": "JS", + "source": "client.tasks.getTasks({ limit: 2, from: 10 })" + }, + { + "lang": "JS", + "source": "client.tasks.getTasks({ limit: 2, from: 8 })" + }, + { + "lang": "Java", + "source": "client.getTask(1);" + }, + { + "lang": "Java", + "source": "TasksQuery query = new TasksQuery()\n .setLimit(2)\n .setFrom(10);\n\nclient.index(\"movies\").getTasks(query);" + }, + { + "lang": "Java", + "source": "TasksQuery query = new TasksQuery()\n .setLimit(2)\n .setFrom(8);\n\nclient.index(\"movies\").getTasks(query);" + }, + { + "lang": "PHP", + "source": "$client->getTask(1);" + }, + { + "lang": "PHP", + "source": "$taskQuery = (new TasksQuery())->setLimit(2)->setFrom(10));\n$client->getTasks($taskQuery);" + }, + { + "lang": "PHP", + "source": "$taskQuery = (new TasksQuery())->setLimit(2)->setFrom(8));\n$client->getTasks($taskQuery);" + }, + { + "lang": "Python", + "source": "client.get_task(1)" + }, + { + "lang": "Python", + "source": "client.get_tasks({\n 'limit': 2,\n 'from': 10\n})" + }, + { + "lang": "Python", + "source": "client.get_tasks({\n 'limit': 2,\n 'from': 8\n})" + }, + { + "lang": "Ruby", + "source": "client.task(1)" + }, + { + "lang": "Ruby", + "source": "client.tasks(limit: 2, from: 10)" + }, + { + "lang": "Ruby", + "source": "client.tasks(limit: 2, from: 8)" + }, + { + "lang": "Rust", + "source": "let task: Task = client\n .get_task(1)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let mut query = TasksSearchQuery::new(&client)\n .with_limit(2)\n .with_from(10)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let mut query = TasksSearchQuery::new(&client)\n .with_limit(2)\n .from(8)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.getTask(taskUid: 1) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" + }, + { + "lang": "Swift", + "source": "client.getTasks(params: TasksQuery(limit: 2, from: 10)) { result in\n switch result {\n case .success(let taskResult):\n print(taskResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.getTasks(params: TasksQuery(limit: 2, from: 8)) { result in\n switch result {\n case .success(let taskResult):\n print(taskResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks/1'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks?limit=2&from=10" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks?limit=2&from=8" + } + ] + } + }, + "/version": { + "get": { + "tags": [ + "Version" + ], + "summary": "Get version", + "description": "Current version of Meilisearch.", + "operationId": "get_version", + "responses": { + "200": { + "description": "Instance is healthy", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionResponse" + }, + "example": { + "commitSha": "b46889b5f0f2f8b91438a08a358ba8f05fc09fc1", + "commitDate": "2021-07-08", + "pkgVersion": "0.23.0" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "version", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.GetVersionAsync();" + }, + { + "lang": "C#", + "source": "await client.Index(\"jackets\").UpdateDistinctAttributeAsync(\"product_id\");" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSearchableAttributesAsync(new[]\n{\n \"title\",\n \"overview\",\n \"genres\"\n});" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateDisplayedAttributesAsync(new[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" + }, + { + "lang": "C#", + "source": "SearchQuery filters = new SearchQuery() { Filter = \"release_date > \\\"795484800\\\"\" };\nvar movies = await client.Index(\"movie_ratings\").SearchAsync(\"Avengers\", filters);" + }, + { + "lang": "C#", + "source": "SearchQuery filters = new SearchQuery() { Filter = \"release_date > 795484800 AND (director =\n\\\"Tim Burton\\\" OR director = \\\"Christopher Nolan\\\")\" };\nvar movies = await client.Index(\"movie_ratings\").SearchAsync(\"Batman\", filters);" + }, + { + "lang": "C#", + "source": "SearchQuery filters = new SearchQuery() { Filter = \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\" };\nvar movies = await client.Index(\"movie_ratings\").SearchAsync(\"Planet of the Apes\", filters);" + }, + { + "lang": "C#", + "source": "var filters = new SearchQuery() { Filter = \"rating.users >= 90\" };\nvar movies = await client.Index(\"movie_ratings\").SearchAsync(\"thriller\", filters);" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").SearchAsync(\"shifu\");" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n Offset = 1\n};\nvar result = await client.Index(\"movies\").SearchAsync(\"shifu\", sq);\nif(result is SearchResult pagedResults)\n{\n}" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n Limit = 2\n};\nvar result = await client.Index(\"movies\").SearchAsync(\"shifu\", sq);\nif(result is SearchResult pagedResults)\n{\n}" + }, + { + "lang": "C#", + "source": "var result = await client.Index(\"movies\").SearchAsync(\"\", new SearchQuery { HitsPerPage = 15 });\nif(result is PaginatedSearchResult pagedResults)\n{\n}" + }, + { + "lang": "C#", + "source": "var result = await client.Index(\"movies\").SearchAsync(\"\", new SearchQuery { Page = 2 });\nif(result is PaginatedSearchResult pagedResults)\n{\n}" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n AttributesToRetrieve = new[] {\"overview\", \"title\"}\n};\nawait client.Index(\"movies\").SearchAsync(\"shifu\", sq);" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n AttributesToCrop = new[] {\"overview\"},\n CropLength = 5\n};\nawait client.Index(\"movies\").SearchAsync(\"shifu\", sq);" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n AttributesToCrop = new[] {\"overview\"},\n CropMarker = \"[...]\"\n};\nawait client.Index(\"movies\").SearchAsync(\"shifu\", sq);" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n AttributesToHighlight = new[] {\"overview\"}\n};\nawait client.Index(\"movies\").SearchAsync(\"winter feast\", sq);" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n AttributesToHighlight = new[] {\"overview\"},\n HighlightPreTag = \"\",\n HighlightPostTag = \"\"\n};\nawait client.Index(\"movies\").SearchAsync(\"winter feast\", sq);" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").SearchAsync(\n \"winter feast\",\n new SearchQuery\n {\n ShowMatchesPosition = True,\n });" + }, + { + "lang": "C#", + "source": "// Make sure to add this using to your code\nusing System.IO;\n\nvar jsonDocuments = await File.ReadAllTextAsync(\"movies.json\");\nawait client.Index(\"movies\").AddDocumentsJsonAsync(jsonDocuments);" + }, + { + "lang": "C#", + "source": "// In the command line:\n// dotnet add package Meilisearch\n\n// In your .cs file:\nusing System.IO;\nusing System.Text.Json;\nusing Meilisearch;\nusing System.Threading.Tasks;\nusing System.Collections.Generic;\n\nnamespace Meilisearch_demo\n{\n public class Movie\n {\n public string Id { get; set; }\n public string Title { get; set; }\n public string Poster { get; set; }\n public string Overview { get; set; }\n public IEnumerable Genres { get; set; }\n }\n\n internal class Program\n {\n static async Task Main(string[] args)\n {\n MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"aSampleMasterKey\");\n var options = new JsonSerializerOptions\n {\n PropertyNameCaseInsensitive = true\n };\n\n string jsonString = await File.ReadAllTextAsync(\"movies.json\");\n var movies = JsonSerializer.Deserialize>(jsonString, options);\n\n var index = client.Index(\"movies\");\n await index.AddDocumentsAsync(movies);\n }\n }\n}" + }, + { + "lang": "C#", + "source": "TaskInfo task = await client.GetTaskAsync(0);" + }, + { + "lang": "C#", + "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nvar index = client.Index(\"movies\");\n\nvar movies = await index.SearchAsync(\"botman\");\nforeach (var movie in movies.Hits)\n{\n Console.WriteLine(movie.Title);\n}" + }, + { + "lang": "C#", + "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nvar options = new JsonSerializerOptions\n{\n PropertyNameCaseInsensitive = true\n};\n\nstring jsonString = await File.ReadAllTextAsync(\"meteorites.json\");\nvar meteorites = JsonSerializer.Deserialize>(jsonString, options);\n\nvar index = client.Index(\"meteorites\");\nawait index.AddDocumentsAsync(meteorites);" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateRankingRulesAsync(new string[] {\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\"\n});" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateDisplayedAttributesAsync(new string[] {\n \"title\",\n \"overview\",\n \"poster\"\n});" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSearchableAttributesAsync(new string[] {\n \"title\"\n});" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateStopWordsAsync(new string[] {\n \"the\"\n});" + }, + { + "lang": "C#", + "source": "var newSynonyms = new Dictionary>\n{\n { \"winnie\", new string[] { \"piglet\" } },\n { \"piglet\", new string[] { \"winnie\" } },\n};\nawait client.Index(\"movies\").UpdateSynonymsAsync(newSynonyms);" + }, + { + "lang": "C#", + "source": "SearchQuery filter = new SearchQuery() { Filter = \"mass < 200\" };\nawait client.Index(\"meteorites\").SearchAsync(\"\", filter);" + }, + { + "lang": "C#", + "source": "SearchQuery filter = new SearchQuery() { Filter = \"_geoRadius(46.9480, 7.4474, 210000)\" };\nawait client.Index(\"meteorites\").SearchAsync(\"\", filter);" + }, + { + "lang": "C#", + "source": "SearchQuery sort = new SearchQuery() { Sort = new string[] { \"_geoPoint(48.8583701,2.2922926):asc\" }};\nawait client.Index(\"meteorites\").SearchAsync(\"\", sort);" + }, + { + "lang": "C#", + "source": "SearchQuery searchQuery = new SearchQuery() {\n Sort = new string[] { \"mass:asc\" },\n Filter = \"mass < 200\",\n};\nawait client.Index(\"meteorites\").SearchAsync(\"\", searchQuery);" + }, + { + "lang": "C#", + "source": "var newSettings = new Settings\n{\n FilterableAttributes = new string[] { \"mass\", \"_geo\" },\n SortableAttributes = new string[] { \"mass\", \"_geo\" },\n};\nawait client.Index(\"meteorites\").UpdateSettingsAsync(newSettings);" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n Filter = \"(genre = 'Horror' AND genre = 'Mystery') OR director = 'Jordan Peele'\"\n};\nawait client.Index(\"movies\").SearchAsync(\"thriller\", sq);" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").SearchAsync(\"\\\"african american\\\" horror\");" + }, + { + "lang": "C#", + "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nvar keys = await client.GetKeysAsync();" + }, + { + "lang": "C#", + "source": "await client.Index(\"books\").UpdateSortableAttributesAsync(new [] { \"price\", \"author\" });" + }, + { + "lang": "C#", + "source": "await client.Index(\"books\").UpdateRankingRulesAsync(new[]\n{\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\"\n});" + }, + { + "lang": "C#", + "source": "SearchQuery sort = new SearchQuery() { Sort = new string[] { \"rating.users:asc\" }};\nawait client.Index(\"books\").SearchAsync(\"science fiction\", sort);" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n Sort = new[] { \"price:asc\" },\n};\nawait client.Index(\"books\").SearchAsync(\"science fiction\", sq);" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n Sort = new[] { \"author:desc\" },\n};\nawait client.Index(\"books\").SearchAsync(\"butler\", sq);" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n Sort = new[] { \"price:asc\" },\n};\nawait client.Index(\"books\").SearchAsync(\"science fiction\", sq);" + }, + { + "lang": "C#", + "source": "List attributes = new() { \"_geo\" };\nTaskInfo result = await client.Index(\"movies\").UpdateFilterableAttributesAsync(attributes);" + }, + { + "lang": "C#", + "source": "SearchQuery filters = new SearchQuery() { Filter = \"_geoRadius(45.472735, 9.184019, 2000)\" };\nvar restaurants = await client.Index(\"restaurants\").SearchAsync(\"\", filters);" + }, + { + "lang": "C#", + "source": "SearchQuery filters = new SearchQuery()\n{\n Filter = new string[] { \"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\" }\n};\n\nvar restaurants = await client.Index(\"restaurants\").SearchAsync(\"restaurants\", filters);" + }, + { + "lang": "C#", + "source": "SearchQuery filters = new SearchQuery()\n{\n Filter = \"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\"\n};\nvar restaurants = await client.Index(\"restaurants\").SearchAsync(\"restaurants\", filters);" + }, + { + "lang": "C#", + "source": "List attributes = new() { \"_geo\" };\nTaskInfo result = await client.Index(\"restaurants\").UpdateSortableAttributesAsync(attributes);" + }, + { + "lang": "C#", + "source": "SearchQuery filters = new SearchQuery()\n{\n Sort = new string[] { \"_geoPoint(48.8561446,2.2978204):asc\" }\n};\n\nvar restaurants = await client.Index(\"restaurants\").SearchAsync(\"\", filters);" + }, + { + "lang": "C#", + "source": "SearchQuery filters = new SearchQuery()\n{\n Sort = new string[] {\n \"_geoPoint(48.8561446,2.2978204):asc\",\n \"rating:desc\"\n }\n};\n\nvar restaurants = await client.Index(\"restaurants\").SearchAsync(\"restaurants\", filters);" + }, + { + "lang": "C#", + "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"apiKey\");\nvar searchResult = await client.Index(\"patient_medical_records\").SearchAsync();" + }, + { + "lang": "C#", + "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nawait client.UpdateKeyAsync(\"74c9c733-3368-4738-bbe5-1d18a5fecb37\", description: \"Default Search API Key\");" + }, + { + "lang": "C#", + "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nKey keyOptions = new Key\n{\n Description = \"Search patient records key\",\n Actions = new string[] { \"search\" },\n Indexes = new string[] { \"patient_medical_records\" },\n ExpiresAt = DateTime.Parse(\"2023-01-01T00:00:00Z\")\n};\nKey createdKey = await this.client.CreateKeyAsync(keyOptions);" + }, + { + "lang": "C#", + "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nResourceResults keyResult = await client.GetKeysAsync();\nvar keys = keyResult.Result;" + }, + { + "lang": "C#", + "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nclient.DeleteKeyAsync(\"ac5cd97d-5a4b-4226-a868-2d0eb6d197ab\")" + }, + { + "lang": "C#", + "source": "TaskInfo task = await client.CreateIndexAsync(\"books\", \"reference_number\");" + }, + { + "lang": "C#", + "source": "await index.AddDocumentsAsync(\n new[] {\n new Book {\n ReferenceNumber = 287947,\n Title = \"Diary of a Wimpy Kid\",\n Author = \"Jeff Kinney\",\n Genres = new string[] { \"comedy\", \"humor\" },\n Price = 5.00\n }\n },\n \"reference_number\");" + }, + { + "lang": "C#", + "source": "TaskInfo task = await client.UpdateIndexAsync(\"books\", \"title\");" + }, + { + "lang": "C#", + "source": "var typoTolerance = new TypoTolerance {\n Enabled = false\n};\nawait client.Index(\"movies\").UpdateTypoToleranceAsync(typoTolerance);" + }, + { + "lang": "C#", + "source": "var typoTolerance = new TypoTolerance {\n DisableOnAttributes = new string[] { \"title\" }\n};\nawait client.Index(\"movies\").UpdateTypoToleranceAsync(typoTolerance);" + }, + { + "lang": "C#", + "source": "var typoTolerance = new TypoTolerance {\n DisableOnWords = new string[] { \"shrek\" }\n};\nawait client.Index(\"movies\").UpdateTypoToleranceAsync(typoTolerance);" + }, + { + "lang": "C#", + "source": "var typoTolerance = new TypoTolerance {\n MinWordSizeTypos = new TypoTolerance.TypoSize {\n OneTypo = 4,\n TwoTypos = 10\n }\n};\n\nawait client.Index(\"movies\").UpdateTypoToleranceAsync(typoTolerance);" + }, + { + "lang": "C#", + "source": "var typoTolerance = new TypoTolerance {\n MinWordSizeTypos = new TypoTolerance.TypoSize {\n OneTypo = 4\n }\n};\n\nawait client.Index(\"movies\").UpdateTypoToleranceAsync(typoTolerance);" + }, + { + "lang": "C#", + "source": "var synonyms = new Dictionary>\n{\n { \"great\", new string[] { \"fantastic\" } },\n { \"fantastic\", new string[] { \"great\" } }\n};\nawait client.Index(\"movies\").UpdateSynonymsAsync(synonyms);" + }, + { + "lang": "C#", + "source": "var faceting = new Faceting\n{\n MaxValuesPerFacet = 2,\n SortFacetValuesBy = new Dictionary\n {\n [\"*\"] = SortFacetValuesByType.Count\n }\n};\nawait client.Index(\"movies\").UpdateFacetingAsync(faceting);" + }, + { + "lang": "C#", + "source": "var pagination = new Pagination {\n MaxTotalHits = 500\n};\nawait client.Index(\"movies\").UpdatePaginationAsync(pagination);" + }, + { + "lang": "C#", + "source": "SearchQuery params = new SearchQuery() { MatchingStrategy = \"last\" };\nawait client.Index(\"movies\").SearchAsync(\"big fat liar\", params);" + }, + { + "lang": "C#", + "source": "SearchQuery params = new SearchQuery() { MatchingStrategy = \"all\" };\nawait client.Index(\"movies\").SearchAsync(\"big fat liar\", params);" + }, + { + "lang": "C#", + "source": "string jsonString = await File.ReadAllTextAsync(\"games.json\");\nvar games = JsonSerializer.Deserialize>(jsonString, options);\nvar index = client.Index(\"games\");\nawait index.AddDocumentsAsync(games);" + }, + { + "lang": "C#", + "source": "await client.Index(\"games\").UpdateFilterableAttributesAsync(new string[] { \"release_timestamp\" });" + }, + { + "lang": "C#", + "source": "var filters = new SearchQuery() { Filter = \"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\" };\nvar games = await client.Index(\"games\").SearchAsync(\"\", filters);" + }, + { + "lang": "C#", + "source": "await client.Index(\"games\").UpdateSortableAttributesAsync(new string[] { \"release_timestamp\" });" + }, + { + "lang": "C#", + "source": "SearchQuery sort = new SearchQuery() { Sort = new string[] { \"release_timestamp:desc\" }};\nawait client.Index(\"games\").SearchAsync(\"\", sort);" + }, + { + "lang": "C#", + "source": "await client.GetTasksAsync(new TasksQuery { Statuses = new List { TaskInfoStatus.Failed, TaskInfoStatus.Canceled } });" + }, + { + "lang": "C#", + "source": "var query = new TasksQuery { IndexUids = new List { \"movies\" }, Types = new List { TaskInfo.DocumentAdditionOrUpdate, TaskInfo.DocumentDeletion }, Statuses = new List { TaskInfoStatus.Processing } };\n\nawait client.GetTasksAsync(query);" + }, + { + "lang": "C#", + "source": "List attributes = new() { \"genres\", \"rating\", \"language\" };\nTaskInfo result = await client.Index(\"movie_ratings\").UpdateFilterableAttributesAsync(attributes);" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n Facets = new string[] { \"genres\", \"rating\", \"language\" }\n};\nawait client.Index(\"books\").SearchAsync(\"classic\", sq);" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n Facets = new string[] { \"genres\", \"rating\" }\n};\nawait client.Index(\"movie_ratings\").SearchAsync(\"Batman\", sq);" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateFilterableAttributesAsync(new [] { \"director\", \"genres\" });" + }, + { + "lang": "C#", + "source": "var newFaceting = new Faceting\n{\n SortFacetValuesBy = new Dictionary\n {\n [\"genres\"] = SortFacetValuesByType.Count\n }\n};\nawait client.Index(\"books\").UpdateFacetingAsync(newFaceting);" + }, + { + "lang": "C#", + "source": "var query = new SearchFacetsQuery()\n{\n FacetQuery = \"c\",\n ExhaustiveFacetCount: true\n};\nawait client.Index(\"books\").FacetSearchAsync(\"genres\", query);" + }, + { + "lang": "C#", + "source": "var params = new SearchQuery()\n{\n ShowRankingScore = true\n};\nawait client.Index(\"movies\").SearchAsync(\"dragon\", params);" + }, + { + "lang": "C#", + "source": "var params = new SearchQuery()\n{\n ShowRankingScoreDetails = true\n};\nawait client.Index(\"movies\").SearchAsync(\"dragon\", params);" + }, + { + "lang": "C#", + "source": "var searchQuery = new SearchQuery\n{\n AttributesToSearchOn = new[] { \"overview\" }\n};\nawait client.Index(\"movies\").SearchAsync(\"adventure\", searchQuery);" + }, + { + "lang": "C#", + "source": "var params = new SearchQuery()\n{\n Distinct = \"ATTRIBUTE_A\"\n};\nawait client.Index(\"INDEX_NAME\").SearchAsync(\"QUERY TERMS\", params);" + }, + { + "lang": "C#", + "source": "List attributes = new() { \"product_id\", \"sku\", \"url\" };\nTaskInfo result = await client.Index(\"products\").UpdateFilterableAttributesAsync(attributes);" + }, + { + "lang": "C#", + "source": "var params = new SearchQuery()\n{\n Distinct = \"sku\"\n};\nawait client.Index(\"products\").SearchAsync(\"white shirt\", params);" + }, + { + "lang": "Dart", + "source": "await client.getVersion();" + }, + { + "lang": "Dart", + "source": "await client.index('jackets').updateDistinctAttribute('product_id');" + }, + { + "lang": "Dart", + "source": "await client.index('movies').search('shifu');" + }, + { + "lang": "Dart", + "source": "await client.index('movies').search('shifu', SearchQuery(offset: 1));" + }, + { + "lang": "Dart", + "source": "await client.index('movies').search('shifu', SearchQuery(limit: 2));" + }, + { + "lang": "Dart", + "source": "await client.getTask(0);" + }, + { + "lang": "Dart", + "source": "await client.index('movies').search('botman');" + }, + { + "lang": "Dart", + "source": "await client.index('movies').updateStopWords(['the']);" + }, + { + "lang": "Dart", + "source": "await client.index('movies').search('\"african american\" horror');" + }, + { + "lang": "Dart", + "source": "var client = MeiliSearchClient('http://localhost:7700', 'masterKey');\nawait client.getKeys();" + }, + { + "lang": "Dart", + "source": "await client.index('books').updateSortableAttributes(['author', 'price']);" + }, + { + "lang": "Dart", + "source": "await client.index('restaurants').updateFilterableAttributes(['_geo']);" + }, + { + "lang": "Dart", + "source": "await client.index('restaurants').updateSortableAttributes(['_geo']);" + }, + { + "lang": "Dart", + "source": "var client = MeiliSearchClient('http://localhost:7700', 'apiKey');\nawait client.index('patient_medical_records').search('');" + }, + { + "lang": "Dart", + "source": "var client = MeiliSearchClient('http://localhost:7700', 'masterKey');\nawait client.createKey(\n description: 'Search patient records key',\n actions: ['search'],\n indexes: ['patient_medical_records'],\n expiresAt: DateTime(2023, 01, 01),\n);" + }, + { + "lang": "Dart", + "source": "var client = MeiliSearchClient('http://localhost:7700', 'masterKey');\nawait client.getKeys();" + }, + { + "lang": "Dart", + "source": "var client = MeiliSearchClient('http://localhost:7700', 'masterKey');\nawait client.deleteKey('ac5cd97d-5a4b-4226-a868-2d0eb6d197ab');" + }, + { + "lang": "Dart", + "source": "await client.createIndex('books', primaryKey: 'reference_number');" + }, + { + "lang": "Dart", + "source": "await client.index('movies').addDocuments([\n {\n 'reference_number': 287947,\n 'title': 'Diary of a Wimpy Kid',\n 'author': 'Jeff Kinney',\n 'genres': ['comedy', 'humor'],\n 'price': 5.00\n }\n], primaryKey: 'reference_number');" + }, + { + "lang": "Dart", + "source": "await client.updateIndex('books', 'title');" + }, + { + "lang": "Dart", + "source": "final toUpdate = TypoTolerance(enabled: false);\nawait client.index('movies').updateTypoTolerance(toUpdate);" + }, + { + "lang": "Dart", + "source": "final toUpdate = TypoTolerance(\n disableOnAttributes: ['title'],\n);\nawait client.index('movies').updateTypoTolerance(toUpdate);" + }, + { + "lang": "Dart", + "source": "final toUpdate = TypoTolerance(\n disableOnWords: ['shrek'],\n);\nawait client.index('movies').updateTypoTolerance(toUpdate);" + }, + { + "lang": "Dart", + "source": "final toUpdate = TypoTolerance(\n minWordSizeForTypos: MinWordSizeForTypos(\n oneTypo: 4,\n twoTypos: 10,\n ),\n);\nawait client.index('movies').updateTypoTolerance(toUpdate);" + }, + { + "lang": "Dart", + "source": "final toUpdate = TypoTolerance(\n minWordSizeForTypos: MinWordSizeForTypos(oneTypo: 4),\n);\nawait client.index('movies').updateTypoTolerance(toUpdate);" + }, + { + "lang": "Dart", + "source": "await client.index('movies').updateFilterableAttributes([\n 'director',\n 'genres',\n]);" + }, + { + "lang": "Go", + "source": "client.GetVersion()" + }, + { + "lang": "Go", + "source": "client.Index(\"jackets\").UpdateDistinctAttribute(\"product_id\")" + }, + { + "lang": "Go", + "source": "searchableAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n}\nclient.Index(\"movies\").UpdateSearchableAttributes(&searchableAttributes)" + }, + { + "lang": "Go", + "source": "displayedAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n}\nclient.Index(\"movies\").UpdateDisplayedAttributes(&displayedAttributes)" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movie_ratings\").Search(\"Avengers\", &meilisearch.SearchRequest{\n Filter: \"release_date > \\\"795484800\\\"\",\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movie_ratings\").Search(\"Batman\", &meilisearch.SearchRequest{\n Filter: \"release_date > 795484800 AND (director = \\\"Tim Burton\\\" OR director = \\\"Christopher Nolan\\\")\",\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movie_ratings\").Search(\"Planet of the Apes\", &meilisearch.SearchRequest{\n Filter: \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\",\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movie_ratings\").Search(\"thriller\", &meilisearch.SearchRequest{\n Filter: \"rating.users >= 90\",\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{\n Offset: 1,\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{\n Limit: 2,\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").Search(\"\", &meilisearch.SearchRequest{\n HitsPerPage: 15,\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").Search(\"\", &meilisearch.SearchRequest{\n Page: 2,\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{\n AttributesToRetrieve: []string{\"overview\", \"title\"},\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{\n AttributesToCrop: []string{\"overview\"},\n CropLength: 5,\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{\n AttributesToCrop: []string{\"overview\"},\n CropMarker: \"[…]\",\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"winter feast\", &meilisearch.SearchRequest{\n AttributesToHighlight: []string{\"overview\"},\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"winter feast\", &meilisearch.SearchRequest{\n AttributesToHighlight: []string{\"overview\"},\n HighlightPreTag: \"\",\n HighlightPostTag: \"\",\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"winter feast\", &meilisearch.SearchRequest{\n ShowMatchesPosition: true,\n})" + }, + { + "lang": "Go", + "source": "import (\n \"encoding/json\"\n \"os\"\n)\n\nfile, _ := os.ReadFile(\"movies.json\")\n\nvar movies interface{}\njson.Unmarshal([]byte(file), &movies)\n\nclient.Index(\"movies\").AddDocuments(&movies, nil)" + }, + { + "lang": "Go", + "source": "// In the command line:\n// go get -u github.com/meilisearch/meilisearch-go\n\n// In your .go file:\npackage main\n\nimport (\n \"os\"\n \"encoding/json\"\n \"io\"\n\n \"github.com/meilisearch/meilisearch-go\"\n)\n\nfunc main() {\n client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\n\n jsonFile, _ := os.Open(\"movies.json\")\n defer jsonFile.Close()\n\n byteValue, _ := io.ReadAll(jsonFile)\n var movies []map[string]interface{}\n json.Unmarshal(byteValue, &movies)\n\n _, err := client.Index(\"movies\").AddDocuments(movies, nil)\n if err != nil {\n panic(err)\n }\n}" + }, + { + "lang": "Go", + "source": "client.GetTask(0)" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").Search(\"botman\", &meilisearch.SearchRequest{})" + }, + { + "lang": "Go", + "source": "client := meilisearch.New(\"http://localhost:7700\")\n\njsonFile, _ := os.Open(\"meteorites.json\")\ndefer jsonFile.Close()\n\nbyteValue, _ := io.ReadAll(jsonFile)\nvar meteorites []map[string]interface{}\njson.Unmarshal(byteValue, &meteorites)\n\nclient.Index(\"meteorites\").AddDocuments(meteorites, nil)" + }, + { + "lang": "Go", + "source": "rankingRules := []string{\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\",\n}\nclient.Index(\"movies\").UpdateRankingRules(&rankingRules)" + }, + { + "lang": "Go", + "source": "displayedAttributes := []string{\n \"title\",\n \"overview\",\n \"poster\",\n}\nclient.Index(\"movies\").UpdateDisplayedAttributes(&displayedAttributes)" + }, + { + "lang": "Go", + "source": "searchableAttributes := []string{\n \"title\",\n}\nclient.Index(\"movies\").UpdateSearchableAttributes(&searchableAttributes)" + }, + { + "lang": "Go", + "source": "stopWords := []string{\"the\"}\nclient.Index(\"movies\").UpdateStopWords(&stopWords)" + }, + { + "lang": "Go", + "source": "synonyms := map[string][]string{\n \"winnie\": []string{\"piglet\"},\n \"piglet\": []string{\"winnie\"},\n}\nclient.Index(\"movies\").UpdateSynonyms(&synonyms)" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"meteorites\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"mass < 200\",\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"meteorites\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"_geoRadius(46.9480, 7.4474, 210000)\",\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"meteorites\").Search(\"\", &meilisearch.SearchRequest{\n Sort: []string{\n \"_geoPoint(48.8583701,2.2922926):asc\",\n },\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"meteorites\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"mass < 200\",\n Sort: []string{\n \"mass:asc\",\n },\n})" + }, + { + "lang": "Go", + "source": "settings := meilisearch.Settings{\n FilterableAttributes: []string{\n \"mass\",\n \"_geo\",\n },\n SortableAttributes: []string{\n \"mass\",\n \"_geo\",\n },\n}\nclient.Index(\"meteorites\").UpdateSettings(&settings)" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"thriller\", &meilisearch.SearchRequest{\n Filter: [][]string{\n []string{\"genres = Horror\", \"genres = Mystery\"},\n []string{\"director = \\\"Jordan Peele\\\"\"},\n },\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"\\\"african american\\\" horror\", &meilisearch.SearchRequest{})" + }, + { + "lang": "Go", + "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\nclient.GetKeys(nil);" + }, + { + "lang": "Go", + "source": "sortableAttributes := []string{\n \"author\",\n \"price\",\n}\nclient.Index(\"books\").UpdateSortableAttributes(&sortableAttributes)" + }, + { + "lang": "Go", + "source": "rankingRules := []string{\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\",\n}\nclient.Index(\"books\").UpdateRankingRules(&rankingRules)" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"books\").Search(\"science fiction\", &meilisearch.SearchRequest{\n Sort: []string{\n \"rating.users:asc\",\n },\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"books\").Search(\"science fiction\", &meilisearch.SearchRequest{\n Sort: []string{\n \"price:asc\",\n },\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"books\").Search(\"butler\", &meilisearch.SearchRequest{\n Sort: []string{\n \"author:desc\",\n },\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"books\").Search(\"science fiction\", &meilisearch.SearchRequest{\n Sort: []string{\n \"price:asc\",\n },\n})" + }, + { + "lang": "Go", + "source": "filterableAttributes := []interface{}{\n \"_geo\",\n}\nclient.Index(\"restaurants\").UpdateFilterableAttributes(&filterableAttributes)" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"restaurants\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"_geoRadius(45.472735, 9.184019, 2000)\",\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"restaurants\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\",\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"restaurants\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\",\n})" + }, + { + "lang": "Go", + "source": "sortableAttributes := []string{\n \"_geo\",\n}\nclient.Index(\"restaurants\").UpdateSortableAttributes(&sortableAttributes)" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"restaurants\").Search(\"\", &meilisearch.SearchRequest{\n Sort: []string{\n \"_geoPoint(48.8561446,2.2978204):asc\",\n },\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"restaurants\").Search(\"\", &meilisearch.SearchRequest{\n Sort: []string{\n \"_geoPoint(48.8561446,2.2978204):asc\",\n \"rating:desc\",\n },\n})" + }, + { + "lang": "Go", + "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\nclient.Index(\"patient_medical_records\").Search();" + }, + { + "lang": "Go", + "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\n\nclient.UpdateKey(\"74c9c733-3368-4738-bbe5-1d18a5fecb37\", &meilisearch.Key{\n Indexes: []string{\"doctors\"},\n})" + }, + { + "lang": "Go", + "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\n\nclient.CreateKey(&meilisearch.Key{\n Description: \"Search patient records key\",\n Actions: []string{\"search\"},\n Indexes: []string{\"patient_medical_records\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" + }, + { + "lang": "Go", + "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\nclient.GetKeys(nil);" + }, + { + "lang": "Go", + "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\nclient.DeleteKey(\"74c9c733-3368-4738-bbe5-1d18a5fecb37\");" + }, + { + "lang": "Go", + "source": "client.CreateIndex(&meilisearch.IndexConfig{\n Uid: \"books\",\n PrimaryKey: \"reference_number\",\n})" + }, + { + "lang": "Go", + "source": "documents := []map[string]interface{}{\n {\n \"reference_number\": 287947,\n \"title\": \"Diary of a Wimpy Kid\",\n \"author\": \"Jeff Kinney\",\n \"genres\": []string{\"comedy\", \"humor\"},\n \"price\": 5.00,\n },\n}\nrefrenceNumber := \"reference_number\"\nclient.Index(\"books\").AddDocuments(documents, &refrenceNumber)" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateIndex(&meilisearch.UpdateIndexRequestParams{\n PrimaryKey: \"title\",\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n Enabled: false,\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n DisableOnAttributes: []string{\"title\"},\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n DisableOnWords: []string{\"shrek\"},\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 4,\n TwoTypos: 10,\n },\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n DisableOnNumbers: true\n})" + }, + { + "lang": "Go", + "source": "client.index(\"movies\").UpdateTypoTolerance({\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 4,\n },\n})" + }, + { + "lang": "Go", + "source": "synonyms := map[string][]string{\n \"great\": []string{\"fantastic\"},\n \"fantastic\": []string{\"great\"},\n}\nclient.Index(\"movies\").UpdateSynonyms(&synonyms)" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateFaceting(&meilisearch.Faceting{\n MaxValuesPerFacet: 2,\n SortFacetValuesBy: {\n \"*\": SortFacetTypeCount,\n }\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdatePagination(&meilisearch.Pagination{\n MaxTotalHits: 500,\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"big fat liar\", &meilisearch.SearchRequest{\n MatchingStrategy: Last,\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"big fat liar\", &meilisearch.SearchRequest{\n MatchingStrategy: All,\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").Search(\"white shirt\", &meilisearch.SearchRequest{\n MatchingStrategy: Frequency,\n})" + }, + { + "lang": "Go", + "source": "jsonFile, _ := os.Open(\"games.json\")\ndefer jsonFile.Close()\n\nbyteValue, _ := io.ReadAll(jsonFile)\nvar games []map[string]interface{}\njson.Unmarshal(byteValue, &games)\n\nclient.Index(\"games\").AddDocuments(games, nil)" + }, + { + "lang": "Go", + "source": "filterableAttributes := []interface{}{\"release_timestamp\"}\nclient.Index(\"games\").UpdateFilterableAttributes(&filterableAttributes)" + }, + { + "lang": "Go", + "source": "client.Index(\"games\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\",\n})" + }, + { + "lang": "Go", + "source": "sortableAttributes := []string{\"release_timestamp\",\"author\"}\nclient.Index(\"games\").UpdateSortableAttributes(&sortableAttributes)" + }, + { + "lang": "Go", + "source": "client.Index(\"games\").Search(\"\", &meilisearch.SearchRequest{\n Sort: []string{\n \"release_timestamp:desc\",\n },\n})" + }, + { + "lang": "Go", + "source": "client.GetTasks(&meilisearch.TasksQuery{\n Statuses: []meilisearch.TaskStatus{\n meilisearch.TaskStatusFailed,\n meilisearch.TaskStatusCanceled,\n },\n})" + }, + { + "lang": "Go", + "source": "client.GetTasks(&meilisearch.TasksQuery{\n IndexUIDS: []string{\"movie\"},\n Types: []meilisearch.TaskType{\n meilisearch.TaskTypeDocumentAdditionOrUpdate,\n meilisearch.TaskTypeDocumentDeletion,\n },\n Statuses: []meilisearch.TaskStatus{\n meilisearch.TaskStatusProcessing,\n },\n})" + }, + { + "lang": "Go", + "source": "filterableAttributes := []interface{}{\n \"genres\",\n \"rating\",\n \"language\",\n}\nclient.Index(\"movie_ratings\").UpdateFilterableAttributes(&filterableAttributes)" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"books\").Search(\"classic\", &meilisearch.SearchRequest{\n Facets: []string{\n \"genres\",\n \"rating\",\n \"language\",\n },\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"movie_ratings\").Search(\"Batman\", &meilisearch.SearchRequest{\n Facets: []string{\n \"genres\",\n \"rating\",\n },\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").UpdateFilterableAttributes(&[]interface{}{\n \"director\",\n \"genres\",\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateFaceting(&meilisearch.Faceting{\n SortFacetValuesBy: {\n \"genres\": SortFacetTypeCount,\n }\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").FacetSearch(&meilisearch.FacetSearchRequest{\n FacetQuery: \"c\",\n FacetName: \"genres\",\n ExhaustiveFacetCount: true\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"dragon\", &meilisearch.SearchRequest{\n showRankingScore: true,\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"dragon\", &meilisearch.SearchRequest{\n showRankingScoreDetails: true,\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"adventure\", &meilisearch.SearchRequest{\n AttributesToSearchOn: []string{\"overview\"},\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"INDEX_NAME\").Search(\"QUERY TERMS\", &meilisearch.SearchRequest{\n Distinct: \"ATTRIBUTE_A\",\n})" + }, + { + "lang": "Go", + "source": "filterableAttributes := []interface{}{\n \"product_id\",\n \"sku\",\n \"url\",\n}\nclient.Index(\"products\").UpdateFilterableAttributes(&filterableAttributes)" + }, + { + "lang": "Go", + "source": "client.Index(\"products\").Search(\"white shirt\", &meilisearch.SearchRequest{\n Distinct: \"sku\",\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"INDEX_NAME\").Search(\"badman\", &meilisearch.SearchRequest{\n RankingScoreThreshold: 0.2,\n})" + }, + { + "lang": "Go", + "source": "client.index(\"INDEX_NAME\").Search(\"QUERY TEXT IN JAPANESE\", &meilisearch.SearchRequest{\n Locales: []string{\"jpn\"}\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"INDEX_NAME\").Search(\"\", &meilisearch.SearchRequest{\n Hybrid: &meilisearch.SearchRequestHybrid{\n Embedder: \"EMBEDDER_NAME\",\n },\n Media: map[string]any{\n \"FIELD_A\": \"VALUE_A\",\n \"FIELD_B\": map[string]any{\n \"FIELD_C\": \"VALUE_B\",\n \"FIELD_D\": \"VALUE_C\",\n },\n },\n});" + }, + { + "lang": "JS", + "source": "client.getVersion()" + }, + { + "lang": "JS", + "source": "client.index('jackets').updateDistinctAttribute('product_id')" + }, + { + "lang": "JS", + "source": "client.index('movies').updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres',\n ]\n)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date',\n ]\n)" + }, + { + "lang": "JS", + "source": "client.index('movie_ratings').search('Avengers', {\n filter: 'release_date > 795484800'\n})" + }, + { + "lang": "JS", + "source": "client.index('movie_ratings').search('Batman', {\n filter: 'release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")'\n})" + }, + { + "lang": "JS", + "source": "client.index('movie_ratings').search('Planet of the Apes', {\n filter: \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\"\n})" + }, + { + "lang": "JS", + "source": "client.index('movie_ratings').search('thriller', {\n filter: 'rating.users >= 90'\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('shifu')" + }, + { + "lang": "JS", + "source": "client.index('movies').search('shifu', {\n offset: 1\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('shifu', {\n limit: 2\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('', {\n hitsPerPage: 15\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('', {\n page: 2\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('shifu', {\n attributesToRetrieve: ['overview', 'title']\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('shifu', {\n attributesToCrop: ['overview'],\n cropLength: 5\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('shifu', {\n attributesToCrop: ['overview'],\n cropMarker: '[…]'\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('winter feast', {\n attributesToHighlight: ['overview']\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('winter feast', {\n attributesToHighlight: ['overview'],\n highlightPreTag: '',\n highlightPostTag: ''\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('winter feast', {\n showMatchesPosition: true\n})" + }, + { + "lang": "JS", + "source": "const movies = require('./movies.json')\nclient.index('movies').addDocuments(movies).then((res) => console.log(res))" + }, + { + "lang": "JS", + "source": "// With npm:\n// npm install meilisearch\n\n// Or with yarn:\n// yarn add meilisearch\n\n// In your .js file:\n// With the `require` syntax:\nconst { MeiliSearch } = require('meilisearch')\nconst movies = require('./movies.json')\n// With the `import` syntax:\nimport { MeiliSearch } from 'meilisearch'\nimport movies from './movies.json'\n\nconst client = new MeiliSearch({\n host: 'http://localhost:7700',\n apiKey: 'aSampleMasterKey'\n})\nclient.index('movies').addDocuments(movies)\n .then((res) => console.log(res))" + }, + { + "lang": "JS", + "source": "client.tasks.getTask(0)" + }, + { + "lang": "JS", + "source": "client.index('movies').search('botman').then((res) => console.log(res))" + }, + { + "lang": "JS", + "source": "const meteorites = require('./meteorites.json')\n\nclient.index('meteorites').addDocuments(meteorites)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateRankingRules([\n 'exactness',\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'release_date:asc',\n 'rank:desc'\n])" + }, + { + "lang": "JS", + "source": "client.index('movies').updateDisplayedAttributes([\n 'title',\n 'overview',\n 'poster'\n])" + }, + { + "lang": "JS", + "source": "client.index('movies').updateSearchableAttributes([\n 'title'\n])" + }, + { + "lang": "JS", + "source": "client.index('movies').updateStopWords(['the'])" + }, + { + "lang": "JS", + "source": "client.index('movies').updateSynonyms({\n winnie: ['piglet'],\n piglet: ['winnie']\n})" + }, + { + "lang": "JS", + "source": "client.index('meteorites').search('', { filter: 'mass < 200' })" + }, + { + "lang": "JS", + "source": "client.index('meteorites').search('', { filter: '_geoRadius(46.9480, 7.4474, 210000)' })" + }, + { + "lang": "JS", + "source": "client.index('meteorites').search('', { sort: ['_geoPoint(48.8583701, 2.2922926):asc'] })" + }, + { + "lang": "JS", + "source": "client.index('meteorites').search('', {\n sort: ['mass:asc'],\n filter: 'mass < 200'\n})" + }, + { + "lang": "JS", + "source": "client.index('meteorites').updateSettings({\n filterableAttributes: ['mass', '_geo'],\n sortableAttributes: ['mass', '_geo']\n})" + }, + { + "lang": "JS", + "source": "client.index('movies')\n .search('thriller', {\n filter: [['genres = Horror', 'genres = Mystery'], 'director = \"Jordan Peele\"']\n })" + }, + { + "lang": "JS", + "source": "client.index('movies')\n .search('\"african american\" horror')" + }, + { + "lang": "JS", + "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'masterKey' })\nclient.getKeys()" + }, + { + "lang": "JS", + "source": "client.index('books').updateSortableAttributes([\n 'author',\n 'price'\n ])" + }, + { + "lang": "JS", + "source": "client.index('books').updateRankingRules([\n 'words',\n 'sort',\n 'typo',\n 'proximity',\n 'attribute',\n 'exactness'\n])" + }, + { + "lang": "JS", + "source": "client.index('books').search('science fiction', {\n 'sort': ['rating.users:asc'],\n})" + }, + { + "lang": "JS", + "source": "client.index('books').search('science fiction', {\n sort: ['price:asc'],\n})" + }, + { + "lang": "JS", + "source": "client.index('books').search('butler', {\n sort: ['author:desc'],\n})" + }, + { + "lang": "JS", + "source": "client.index('books').search('science fiction', {\n sort: ['price:asc'],\n})" + }, + { + "lang": "JS", + "source": "client.index('restaurants')\n.updateFilterableAttributes([\n '_geo'\n])" + }, + { + "lang": "JS", + "source": "client.index('restaurants').search('', {\n filter: ['_geoRadius(45.472735, 9.184019, 2000)'],\n})" + }, + { + "lang": "JS", + "source": "client.index('restaurants').search('', {\n filter: ['_geoRadius(45.472735, 9.184019, 2000) AND type = pizza'],\n})" + }, + { + "lang": "JS", + "source": "client.index('restaurants').search('', {\n filter: ['_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])'],\n})" + }, + { + "lang": "JS", + "source": "client.index('restaurants').updateSortableAttributes([\n '_geo'\n])" + }, + { + "lang": "JS", + "source": "client.index('restaurants').search('', {\n sort: ['_geoPoint(48.8561446, 2.2978204):asc'],\n})" + }, + { + "lang": "JS", + "source": "client.index('restaurants').search('', {\n sort: ['_geoPoint(48.8561446, 2.2978204):asc', 'rating:desc'],\n})" + }, + { + "lang": "JS", + "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'apiKey' })\nclient.index('patient_medical_records').search()" + }, + { + "lang": "JS", + "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'masterKey' })\nclient.updateKey('74c9c733-3368-4738-bbe5-1d18a5fecb37', {\n description: 'Default Search API Key'\n})" + }, + { + "lang": "JS", + "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'masterKey' })\nclient.createKey({\n description: 'Search patient records key',\n actions: ['search'],\n indexes: ['patient_medical_records'],\n expiresAt: '2023-01-01T00:00:00Z'\n})" + }, + { + "lang": "JS", + "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'masterKey' })\nclient.getKeys()" + }, + { + "lang": "JS", + "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'masterKey' })\nclient.deleteKey('ac5cd97d-5a4b-4226-a868-2d0eb6d197ab')" + }, + { + "lang": "JS", + "source": "client.createIndex('books', { primaryKey: 'reference_number' })" + }, + { + "lang": "JS", + "source": "client.index('books').addDocuments([\n {\n reference_number: 287947,\n title: 'Diary of a Wimpy Kid',\n author: 'Jeff Kinney',\n genres: ['comedy','humor'],\n price: 5.00\n }\n], { primaryKey: 'reference_number' })" + }, + { + "lang": "JS", + "source": "client.updateIndex('books', {\n primaryKey: 'title'\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').updateTypoTolerance({\n enabled: false\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').updateTypoTolerance({\n disableOnAttributes: ['title']\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').updateTypoTolerance({\n disableOnWords: ['shrek']\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').updateTypoTolerance({\n minWordSizeForTypos: {\n oneTypo: 4,\n twoTypos: 10\n }\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').updateTypoTolerance({\n disableOnNumbers: true\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').updateTypoTolerance({\n minWordSizeForTypos: {\n oneTypo: 4\n }\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').updateSynonyms({\n 'great': ['fantastic'],\n 'fantastic': ['great']\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').updateFaceting({\n maxValuesPerFacet: 2,\n sortFacetValuesBy: {\n '*': 'count'\n }\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').updatePagination({ maxTotalHits: 500 })" + }, + { + "lang": "JS", + "source": "client.index('movies').search('big fat liar', {\n matchingStrategy: 'last'\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('big fat liar', {\n matchingStrategy: 'all'\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('white shirt', {\n matchingStrategy: 'frequency'\n})" + }, + { + "lang": "JS", + "source": "const games = require('./games.json')\nclient.index('games').addDocuments(games).then((res) => console.log(res))" + }, + { + "lang": "JS", + "source": "client.index('games').updateFilterableAttributes(['release_timestamp'])" + }, + { + "lang": "JS", + "source": "client.index('games').search('', {\n filter: 'release_timestamp >= 1514761200 AND release_timestamp < 1672527600'\n})" + }, + { + "lang": "JS", + "source": "client.index('games').updateSortableAttributes(['release_timestamp'])" + }, + { + "lang": "JS", + "source": "client.index('games').search('', {\n sort: ['release_timestamp:desc'],\n})" + }, + { + "lang": "JS", + "source": "client.tasks.getTasks({ statuses: ['failed', 'canceled'] })" + }, + { + "lang": "JS", + "source": "client.tasks.getTasks({\n indexUids: ['movies'],\n types: ['documentAdditionOrUpdate','documentDeletion'],\n statuses: ['processing']\n})" + }, + { + "lang": "JS", + "source": "client.multiSearch({\n federation: {},\n queries: [\n {\n indexUid: 'movies',\n q: 'batman',\n },\n {\n indexUid: 'comics',\n q: 'batman',\n },\n ]\n})" + }, + { + "lang": "JS", + "source": "client.index('movie_ratings').updateFilterableAttributes(['genres', 'rating', 'language'])" + }, + { + "lang": "JS", + "source": "client.index('books').search('classic', { facets: ['genres', 'rating', 'language'] })" + }, + { + "lang": "JS", + "source": "client.index('movie_ratings').search('Batman', { facets: ['genres', 'rating'] })" + }, + { + "lang": "JS", + "source": "client.index('movies')\n .updateFilterableAttributes([\n 'director',\n 'genres'\n ])" + }, + { + "lang": "JS", + "source": "client.index('books').updateFaceting({\n sortFacetValuesBy: {\n genres: 'count'\n }\n})" + }, + { + "lang": "JS", + "source": "client.index('books').searchForFacetValues({\n facetQuery: 'c',\n facetName: 'genres'\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('dragon', {\n showRankingScore: true\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('dragon', { showRankingScoreDetails: true })" + }, + { + "lang": "JS", + "source": "client.index('movies').search('adventure', {\n attributesToSearchOn: ['overview']\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('-escape')" + }, + { + "lang": "JS", + "source": "client.index('movies').search('-\"escape\"')" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').search('QUERY TERMS', { distinct: 'ATTRIBUTE_A' })" + }, + { + "lang": "JS", + "source": "client.index('products').updateFilterableAttributes(['product_id', 'sku', 'url'])" + }, + { + "lang": "JS", + "source": "client.index('products').search('white shirt', { distinct: 'sku' })" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').search('badman', { rankingScoreThreshold: 0.2 })" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').search('QUERY TEXT IN JAPANESE', { locales: ['jpn'] })" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').search('kitchen utensils', {\n hybrid: {\n semanticRatio: 0.9,\n embedder: 'EMBEDDER_NAME'\n }\n})" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').search('kitchen utensils', {\n retrieveVectors: true,\n hybrid: {\n embedder: 'EMBEDDER_NAME'\n }\n})" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').search('a futuristic movie', {\n hybrid: {\n embedder: 'EMBEDDER_NAME'\n },\n media: {\n textAndPoster: {\n text: 'a futuristic movie',\n image: {\n mime: 'image/jpeg',\n data: 'base64EncodedImageData'\n }\n }\n }\n})" + }, + { + "lang": "Java", + "source": "client.getVersion();" + }, + { + "lang": "Java", + "source": "client.index(\"jackets\").updateDistinctAttributeSettings(\"product_id\");" + }, + { + "lang": "Java", + "source": "String[] attributes = {\"title\", \"overview\", \"genres\"}\nclient.index(\"movies\").updateSearchableAttributesSettings(attributes);" + }, + { + "lang": "Java", + "source": "String[] attributes = {\"title\", \"overview\", \"genres\", \"release_date\"}\nclient.index(\"movies\").updateDisplayedAttributesSettings(attributes);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"Avengers\").filter(new String[] {\"release_date > \\\"795484800\\\"\"}).build();\nclient.index(\"movie_ratings\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"Batman\").filter(new String[] {\"release_date > 795484800 AND (director = \\\"Tim Burton\\\" OR director = \\\"Christopher Nolan\\\")\"}).build();\nclient.index(\"movie_ratings\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"Planet of the Apes\").filter(new String[] {\"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\"}).build();\nclient.index(\"movie_ratings\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"thriller\").filter(new String[] {\"rating.users >= 90\"}).build();\nclient.index(\"movie_ratings\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").search(\"shifu\");" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"shifu\").offset(1).build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"shifu\").limit(2).build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").hitsPerPage(15).build();\nSearchResultPaginated searchResult = client.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").page(15).build();\nSearchResultPaginated searchResult = client.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"a\").attributesToRetrieve(new String[] {\"overview\", \"title\"}).build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest =\n SearchRequest.builder()\n .q(\"shifu\")\n .attributesToCrop(new String[] {\"overview\"})\n .cropLength(5)\n .build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest =\n SearchRequest.builder()\n .q(\"shifu\")\n .attributesToCrop(new String[] {\"overview\"})\n .cropMarker(\"[…]\")\n .build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest =\n new SearchRequest(\"winter feast\").setAttributesToHighlight(new String[] {\"overview\"});\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest =\n SearchRequest.builder()\n .q(\"winter feast\")\n .attributesToHighlight(new String[] {\"overview\"})\n .highlightPreTag(\"\")\n .highlightPostTag(\"\")\n .build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"winter feast\").showMatchesPosition(true).build();\nSearchResultPaginated searchResult = client.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "import com.meilisearch.sdk;\nimport org.json.JSONArray;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\nPath fileName = Path.of(\"movies.json\");\nString moviesJson = Files.readString(fileName);\nClient client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\nIndex index = client.index(\"movies\");\nindex.addDocuments(moviesJson);" + }, + { + "lang": "Java", + "source": "// For Maven:\n// Add the following code to the `` section of your project:\n//\n// \n// com.meilisearch.sdk\n// meilisearch-java\n// 0.17.1\n// pom\n// \n\n// For Gradle\n// Add the following line to the `dependencies` section of your `build.gradle`:\n//\n// implementation 'com.meilisearch.sdk:meilisearch-java:0.17.1'\n\n// In your .java file:\nimport com.meilisearch.sdk;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\nPath fileName = Path.of(\"movies.json\");\nString moviesJson = Files.readString(fileName);\nClient client = new Client(new Config(\"http://localhost:7700\", \"aSampleMasterKey\"));\nIndex index = client.index(\"movies\");\nindex.addDocuments(moviesJson);" + }, + { + "lang": "Java", + "source": "client.getTask(0);" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").search(\"botman\");" + }, + { + "lang": "Java", + "source": "import com.meilisearch.sdk;\nimport org.json.JSONArray;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\nPath fileName = Path.of(\"meteorites.json\");\nString meteoritesJson = Files.readString(fileName);\nClient client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\n\nclient.index(\"meteorites\").addDocuments(meteoritesJson);" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setRankingRules(new String[]\n{\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\"\n});\nclient.index(\"movies\").updateSettings(settings);" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setDisplayedAttributes(new String[]\n{\n \"title\",\n \"overview\",\n \"poster\"\n});\nclient.index(\"movies\").updateSettings(settings);" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setSearchableAttributes(new String[]\n{\n \"title\"\n});" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setStopWords(new String[]\n{\n \"the\"\n});\nclient.index(\"movies\").updateSettings(settings);" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nHashMap synonyms = new HashMap();\nsynonyms.put(\"winnie\", new String[] {\"piglet\"});\nsynonyms.put(\"piglet\", new String[] {\"winnie\"});\nsettings.setSynonyms(synonyms);\nclient.index(\"movies\").updateSettings(settings);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"mass < 200\"}).build();\nclient.index(\"meteorites\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"_geoRadius(46.9480, 7.4474, 210000)\"}).build();\nclient.index(\"meteorites\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").sort(new String[] {\"_geoPoint(48.8583701,2.2922926):asc\"}).build();\nclient.index(\"meteorites\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"mass < 200\"}).sort(new String[] {\"mass:asc\"}).build();\nclient.index(\"meteorites\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setFilterableAttributes(new String[] {\"mass\", \"_geo\"});\nsettings.setSortableAttributes(new String[] {\"mass\", \"_geo\"});\nclient.index(\"meteorites\").updateSettings(settings);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest =\n SearchRequest.builder().q(\"thriller\").filterArray(new String[][] {\n new String[] {\"genres = Horror\", \"genres = Mystery\"},\n new String[] {\"director = \\\"Jordan Peele\\\"\"}}).build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").search(\"\\\"african american\\\" horror\");" + }, + { + "lang": "Java", + "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\nclient.getKeys();" + }, + { + "lang": "Java", + "source": "client.index(\"books\").updateSortableAttributesSettings(new String[] {\"price\", \"author\"});" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setRankingRules(new String[]\n{\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\"\n});\nclient.index(\"books\").updateSettings(settings);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"science fiction\").sort(new String[] {\"rating.users:asc\"}).build();\nclient.index(\"books\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"science fiction\").sort(new String[] {\"price:asc\"}).build();\nclient.index(\"books\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"butler\").sort(new String[] {\"author:desc\"}).build();\nclient.index(\"books\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"science fiction\").sort(new String[] {\"price:asc\"}).build();\nclient.index(\"search_parameter_guide_sort_1\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setFilterableAttributes(new String[] {\"_geo\"});\nclient.index(\"restaurants\").updateSettings(settings);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"_geoRadius(45.472735, 9.184019, 2000)\"}).build();\nclient.index(\"restaurants\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\"}).build();\nclient.index(\"restaurants\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q()(\"\").filter(new String[] {\n \"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\"\n }).build();\nclient.index(\"restaurants\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "client.index(\"restaurants\").updateSortableAttributesSettings(new String[] {\"_geo\"});" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").sort(new String[] {\"_geoPoint(48.8561446,2.2978204):asc\"}).build();\nclient.index(\"restaurants\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q()(\"\").sort(new String[] {\n \"_geoPoint(48.8561446,2.2978204):asc\",\n \"rating:desc\",\n }).build();\nclient.index(\"restaurants\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"apiKey\"));\nclient.index(\"patient_medical_records\").search();" + }, + { + "lang": "Java", + "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\nclient.updateKey(\"74c9c733-3368-4738-bbe5-1d18a5fecb37\", new KeyUpdate().setDescription(\"Default Search API Key\"));" + }, + { + "lang": "Java", + "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\n\nSimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\nDate dateParsed = format.parse(\"2023-01-01T00:00:00Z\");\n\nKey keyInfo = new Key();\n\nkeyInfo.setDescription(\"Search patient records key\");\nkeyInfo.setActions(new String[] {\"search\"});\nkeyInfo.setIndexes(new String[] {\"patient_medical_records\"});\nkeyInfo.setExpiresAt(dateParsed);\n\nclient.createKey(keyInfo);" + }, + { + "lang": "Java", + "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\nclient.getKeys();" + }, + { + "lang": "Java", + "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\nclient.deleteKey(\"c5cd97d-5a4b-4226-a868-2d0eb6d197ab\");" + }, + { + "lang": "Java", + "source": "client.createIndex(\"books\", \"reference_number\");" + }, + { + "lang": "Java", + "source": "client.index(\"books\").addDocuments(\"[{\"\n + \"\\\"reference_number\\\": 2879,\"\n + \"\\\"title\\\": \\\"Diary of a Wimpy Kid\\\",\"\n + \"\\\"author\\\": \\\"Jeff Kinney\\\",\"\n + \"\\\"genres\\\": [\\\"comedy\\\", \\\"humor\\\"],\"\n + \"\\\"price\\\": 5.00\"\n + \"}]\"\n, \"reference_number\");" + }, + { + "lang": "Java", + "source": "client.updateIndex(\"books\", \"title\");" + }, + { + "lang": "Java", + "source": "TypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setEnabled(false);\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" + }, + { + "lang": "Java", + "source": "TypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setDisableOnAttributes(new String[] {\"title\"});\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" + }, + { + "lang": "Java", + "source": "TypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setDisableOnWords(new String[] {\"shrek\"});\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" + }, + { + "lang": "Java", + "source": "TypoTolerance typoTolerance = new TypoTolerance();\n HashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 4);\n put(\"twoTypos\", 10);\n }\n };\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" + }, + { + "lang": "Java", + "source": "TypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setDisableOnNumbers(true);\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" + }, + { + "lang": "Java", + "source": "HashMap minWordSizeTypos =\nnew HashMap() {\n {\n put(\"oneTypo\", 4);\n }\n};\n\nTypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\n\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" + }, + { + "lang": "Java", + "source": "HashMap synonyms = new HashMap();\nsynonyms.put(\"great\", new String[] {\"fantastic\"});\nsynonyms.put(\"fantastic\", new String[] {\"great\"});\n\nclient.index(\"movies\").updateSynonymsSettings(synonyms);" + }, + { + "lang": "Java", + "source": "Faceting newFaceting = new Faceting();\nnewFaceting.setMaxValuesPerFacet(2);\nHashMap facetSortValues = new HashMap<>();\nfacetSortValues.put(\"*\", FacetSortValue.COUNT);\nnewFaceting.setSortFacetValuesBy(facetSortValues);\nclient.index(\"movies\").updateFacetingSettings(newFaceting);" + }, + { + "lang": "Java", + "source": "Pagination newPagination = new Pagination();\nnewPagination.setMaxTotalHits(500);\nclient.index(\"movies\").updatePaginationSettings(newPagination);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"big fat liar\").matchingStrategy(MatchingStrategy.LAST).build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"big fat liar\").matchingStrategy(MatchingStrategy.ALL).build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"white shirt\").matchingStrategy(MatchingStrategy.FREQUENCY).build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "import com.meilisearch.sdk;\nimport org.json.JSONArray;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\nPath fileName = Path.of(\"games.json\");\nString gamesJson = Files.readString(fileName);\nIndex index = client.index(\"games\");\nindex.addDocuments(gamesJson);" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateFilterableAttributesSettings(new String[] { \"release_timestamp\" });" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\"}).build();\nclient.index(\"games\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setSortableAttributes(new String[] {\"release_timestamp\"});\nclient.index(\"games\").updateSettings(settings);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").sort(new String[] {\"release_timestamp:desc\"}).build();\nclient.index(\"games\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "TasksQuery query = new TasksQuery().setStatuses(new String[] {\"failed\", \"canceled\"});\nclient.getTasks(query);" + }, + { + "lang": "Java", + "source": "TasksQuery query =\n new TasksQuery()\n .setStatuses(new String[] {\"processing\"})\n .setTypes(new String[] {\"documentAdditionOrUpdate\", \"documentDeletion\"})\n .setIndexUids(new String[] {\"movies\"});\n\nclient.getTasks(query);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"classic\").facets(new String[]\n{\n \"genres\",\n \"rating\",\n \"language\"\n}).build();\nclient.index(\"books\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"Batman\").facets(new String[]\n{\n \"genres\",\n \"rating\"\n}).build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateFilterableAttributesSettings(new String[]\n{\n \"genres\",\n \"director\"\n});" + }, + { + "lang": "Java", + "source": "Faceting newFaceting = new Faceting();\nHashMap facetSortValues = new HashMap<>();\nfacetSortValues.put(\"genres\", FacetSortValue.COUNT);\nnewFaceting.setSortFacetValuesBy(facetSortValues);\nclient.index(\"books\").updateFacetingSettings(newFaceting);" + }, + { + "lang": "Java", + "source": "FacetSearchRequest fsr = FacetSearchRequest.builder().facetName(\"genres\").facetQuery(\"c\").build();\nclient.index(\"books\").facetSearch(fsr);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"dragon\").showRankingScore(true).build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"dragon\").showRankingScoreDetails(true).build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"adventure\").attributesToSearchOn(new String[] {\"overview\"});\nclient.index(\"movies\").searchRequest(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"QUERY TERMS\").distinct(\"ATTRIBUTE_A\").build();\nclient.index(\"INDEX_NAME\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setFilterableAttributes(new String[] {\"product_id\", \"SKU\", \"url\"});\nclient.index(\"products\").updateSettings(settings);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"white shirt\").distinct(\"sku\").build();\nclient.index(\"products\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"badman\").rankingScoreThreshold(0.2).build();\nclient.index(\"INDEX_NAME\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"QUERY TEXT IN JAPANESE\").locales(new String[]{\"jpn\"}).build();\nclient.index(\"INDEX_NAME\").search(searchRequest);" + }, + { + "lang": "PHP", + "source": "$client->version();" + }, + { + "lang": "PHP", + "source": "$client->index('jackets')->updateDistinctAttribute('product_id');" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movie_ratings')->search('Avengers', [\n 'filter' => 'release_date > 795484800'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movie_ratings')->search('Batman', [\n 'filter' => 'release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movie_ratings')->search('Planet of the Apes', [\n 'filter' => 'release_date > 1577884550 AND (NOT director = \"Tim Burton\")'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movie_ratings')->search('thriller', [\n 'filter' => 'rating.users >= 90'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('shifu');" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('shifu', ['offset' => 1]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('shifu', ['limit' => 2]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('', ['hitsPerPage' => 15]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('', ['page' => 2]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('shifu', [\n 'attributesToRetrieve' => ['overview', 'title']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('shifu', [\n 'attributesToCrop' => ['overview'],\n 'cropLength' => 5\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('shifu', [\n 'attributesToCrop' => ['overview'],\n 'cropMarker' => '[…]'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('winter feast', [\n 'attributesToHighlight' => ['overview']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('winter feast', [\n 'attributesToHighlight' => ['overview'],\n 'highlightPreTag' => '',\n 'highlightPostTag' => ''\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('winter feast', [\n 'attributesToHighlight' => ['overview'],\n 'showMatchesPosition' => true\n]);" + }, + { + "lang": "PHP", + "source": "$moviesJson = file_get_contents('movies.json');\n$movies = json_decode($moviesJson);\n\n$client->index('movies')->addDocuments($movies);" + }, + { + "lang": "PHP", + "source": "/**\n * Using `meilisearch-php` with the Guzzle HTTP client, in the command line:\n * composer require meilisearch/meilisearch-php \\\n * guzzlehttp/guzzle \\\n * http-interop/http-factory-guzzle:^1.0\n */\n\n/**\n * In your PHP file:\n */\nindex('movies')->addDocuments($movies);" + }, + { + "lang": "PHP", + "source": "$client->getTask(0);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('botman');" + }, + { + "lang": "PHP", + "source": "$client = new Client('http://localhost:7700');\n\n$meteorites_json = file_get_contents('meteorites.json');\n$meteorites = json_decode($meteorites_json);\n\n$client->index('meteorites')->addDocuments($meteorites);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateRankingRules([\n 'exactness',\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'release_date:asc',\n 'rank:desc'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateDisplayedAttributes([\n 'title',\n 'overview',\n 'poster'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateSearchableAttributes(['title']);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateStopWords(['the']);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateSynonyms([\n 'winnie' => ['piglet'],\n 'piglet' => ['winnie']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('meteorites')->search('', [\n 'filter' => 'mass < 200'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('meteorites')->search('', [\n 'filter' => '_geoRadius(46.9480, 7.4474, 210000)'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('meteorites')->search('', [\n 'sort' => ['_geoPoint(48.8583701,2.2922926):asc']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('meteorites')->search('', [\n 'filter' => 'mass < 200',\n 'sort' => ['mass:asc']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('meteorites')->updateSettings([\n 'filterableAttributes' => [\n 'mass',\n '_geo'\n ],\n 'sortableAttributes' => [\n 'mass',\n '_geo'\n ]\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('thriller', [\n 'filter' => [['genres = Horror', 'genres = Mystery'], 'director = \"Jordan Peele\"']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('\"african american\" horror');" + }, + { + "lang": "PHP", + "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->getKeys();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateSortableAttributes([\n 'author',\n 'price'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateRankingRules([\n 'words',\n 'sort',\n 'typo',\n 'proximity',\n 'attribute',\n 'exactness'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->search('science fiction', ['sort' => ['rating.users:asc']]);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->search('science fiction', ['sort' => ['price:asc']]);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->search('butler', ['sort' => ['author:desc']]);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->search('science fiction', ['sort' => ['price:asc']]);" + }, + { + "lang": "PHP", + "source": "$client->index('restaurants')->updateFilterableAttributes([\n '_geo'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('restaurants')->search('', [\n 'filter' => '_geoRadius(45.472735, 9.184019, 2000)'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('restaurants')->search('', [\n 'filter' => '_geoRadius(45.472735, 9.184019, 2000) AND type = pizza'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('restaurants')->search('', [\n 'filter' => '_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('restaurants')->updateSortableAttributes([\n '_geo'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('restaurants')->search('', [\n 'sort' => ['_geoPoint(48.8561446,2.2978204):asc']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('restaurants')->search('', [\n 'sort' => ['_geoPoint(48.8561446,2.2978204):asc', 'rating:desc']\n]);" + }, + { + "lang": "PHP", + "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->index('patient_medical_records')->search();" + }, + { + "lang": "PHP", + "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->updateKey('74c9c733-3368-4738-bbe5-1d18a5fecb37',\n ['description' => 'Default Search API Key']\n);" + }, + { + "lang": "PHP", + "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->createKey([\n 'description' => 'Search patient records key',\n 'actions' => ['search'],\n 'indexes' => ['patient_medical_records'],\n 'expiresAt' => '2023-01-01T00:00:00Z',\n]);" + }, + { + "lang": "PHP", + "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->getKeys();" + }, + { + "lang": "PHP", + "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->deleteKey('ac5cd97d-5a4b-4226-a868-2d0eb6d197ab');" + }, + { + "lang": "PHP", + "source": "$client->createIndex('books', ['primaryKey' => 'reference_number']);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->addDocuments([\n [\n 'reference_number' => 287947,\n 'title' => 'Diary of a Wimpy Kid',\n 'author' => 'Jeff Kinney',\n 'genres' => ['comedy', 'humor'],\n 'price' => 5.00\n ]\n], 'reference_number');" + }, + { + "lang": "PHP", + "source": "$client->updateIndex('books', ['primaryKey' => 'title']);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateTypoTolerance([\n 'enabled' => false\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateTypoTolerance([\n 'disableOnAttributes' => ['title']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateTypoTolerance([\n 'disableOnWords' => ['shrek']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateTypoTolerance([\n 'minWordSizeForTypos' => [\n 'oneTypo' => 4,\n 'twoTypos' => 10\n ]\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateTypoTolerance([\n 'disableOnNumbers' => true\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateTypoTolerance([\n 'minWordSizeForTypos' => [\n 'oneTypo' => 4\n ]\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateSynonyms([\n 'great' => ['fantastic'],\n 'fantastic' => ['great'],\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')\n ->updateFaceting([\n 'maxValuesPerFacet' => 2,\n 'sortFacetValuesBy' => ['*' => 'count']\n ]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updatePagination(['maxTotalHits' => 500]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('big fat liar', ['matchingStrategy' => 'last']);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('big fat liar', ['matchingStrategy' => 'all']);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('white shirt', ['matchingStrategy' => 'frequency']);" + }, + { + "lang": "PHP", + "source": "$gamesJson = file_get_contents('games.json');\n$games = json_decode($gamesJson);\n\n$client->index('games')->addDocuments($games);" + }, + { + "lang": "PHP", + "source": "$client->index('games')->updateFilterableAttributes(['release_timestamp']);" + }, + { + "lang": "PHP", + "source": "$client->index('games')->search('', [\n 'filter' => ['release_timestamp >= 1514761200 AND release_timestamp < 1672527600']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('games')->updateSortableAttributes(['release_timestamp']);" + }, + { + "lang": "PHP", + "source": "$client->index('games')->search('', ['sort' => ['release_timestamp:desc']]);" + }, + { + "lang": "PHP", + "source": "$client->getTasks((new TasksQuery())->setStatuses(['failed', 'canceled']));" + }, + { + "lang": "PHP", + "source": "$client->getTasks(\n (new TasksQuery())\n ->setStatuses(['processing'])\n ->setUids(['movies'])\n ->setTypes(['documentAdditionOrUpdate', 'documentDeletion'])\n);" + }, + { + "lang": "PHP", + "source": "$client->multiSearch([\n (new SearchQuery())\n ->setIndexUid('movies'))\n ->setQuery('batman'),\n (new SearchQuery())\n ->setIndexUid('comics')\n ->setQuery('batman'),\n ],\n (new MultiSearchFederation())\n);" + }, + { + "lang": "PHP", + "source": "$client->index('movie_ratings')->updateFilterableAttributes(['genres', 'rating', 'language']);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->search('classic', [\n 'facets' => ['genres', 'rating', 'language']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movie_ratings')->search('Batman', [\n 'facets' => ['genres', 'rating']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateFilterableAttributes(['director', 'genres']);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateFaceting(['sortFacetValuesBy' => ['genres' => 'count']]);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->facetSearch(\n (new FacetSearchQuery())\n ->setFacetQuery('c')\n ->setFacetName('genres')\n);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('dragon', [\n 'showRankingScore' => true\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('dragon', [\n 'showRankingScoreDetails' => true\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('adventure', [\n 'attributesToSearchOn' => ['overview']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('-escape');" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('-\"escape\"');" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->search('QUERY TERMS', [\n 'distinct' => 'ATTRIBUTE_A'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('products')->updateFilterableAttributes(['product_id', 'sku', 'url']);" + }, + { + "lang": "PHP", + "source": "$client->index('products')->search('white shirt', [\n 'distinct' => 'sku'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->search('badman', [\n 'rankingScoreThreshold' => 0.2\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->search('QUERY TEXT IN JAPANESE', [\n 'locales' => ['jpn']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->search('kitchen utensils', [\n 'hybrid' => [\n 'semanticRatio' => 0.9,\n 'embedder' => 'EMBEDDER_NAME'\n ]\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->search('kitchen utensils', [\n 'retrieveVectors' => true,\n 'hybrid' => [\n 'embedder': 'EMBEDDER_NAME'\n ]\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->search('a futuristic movie', [\n 'hybrid' => [\n 'embedder' => 'EMBEDDER_NAME'\n ],\n 'media' => [\n 'textAndPoster' => [\n 'text' => 'a futuristic movie',\n 'image' => [\n 'mime' => 'image/jpeg',\n 'data' => 'base64EncodedImageData'\n ]\n ]\n ]\n]);" + }, + { + "lang": "Python", + "source": "client.get_version()" + }, + { + "lang": "Python", + "source": "client.index('jackets').update_distinct_attribute('product_id')" + }, + { + "lang": "Python", + "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" + }, + { + "lang": "Python", + "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" + }, + { + "lang": "Python", + "source": "client.index('movie_ratings').search('Avengers', {\n 'filter': 'release_date > 795484800'\n})" + }, + { + "lang": "Python", + "source": "client.index('movie_ratings').search('Batman', {\n 'filter': 'release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")'\n})" + }, + { + "lang": "Python", + "source": "client.index('movie_ratings').search('Planet of the Apes', {\n 'filter': 'release_date > 1577884550 AND (NOT director = \"Tim Burton\"))'\n})" + }, + { + "lang": "Python", + "source": "client.index('movie_ratings').search('thriller', {\n 'filter': 'rating.users >= 90'\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('shifu')" + }, + { + "lang": "Python", + "source": "client.index('movies').search('shifu', {\n 'offset': 1\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('shifu', {\n 'limit': 2\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('', {'hitsPerPage': 15})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('', {'page': 2})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('shifu', {\n 'attributesToRetrieve': ['overview', 'title']\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('shifu', {\n 'attributesToCrop': ['overview'],\n 'cropLength': 5\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('shifu', {\n 'attributesToCrop': ['overview'],\n 'cropMarker': '[…]'\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('winter feast', {\n 'attributesToHighlight': ['overview']\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('winter feast', {\n 'attributesToHighlight': ['overview'],\n 'highlightPreTag': '',\n 'highlightPostTag': ''\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('winter feast', {\n 'showMatchesPosition': True\n})" + }, + { + "lang": "Python", + "source": "import json\n\njson_file = open('movies.json', encoding='utf-8')\nmovies = json.load(json_file)\nclient.index('movies').add_documents(movies)" + }, + { + "lang": "Python", + "source": "# In the command line:\n# pip3 install meilisearch\n\n# In your .py file:\nimport meilisearch\nimport json\n\nclient = meilisearch.Client('http://localhost:7700', 'aSampleMasterKey')\n\njson_file = open('movies.json', encoding='utf-8')\nmovies = json.load(json_file)\nclient.index('movies').add_documents(movies)" + }, + { + "lang": "Python", + "source": "client.get_task(0)" + }, + { + "lang": "Python", + "source": "client.index('movies').search('botman')" + }, + { + "lang": "Python", + "source": "import json\n\njson_file = open('meteorites.json', encoding='utf-8')\nmeteorites = json.load(json_file)\nclient.index('meteorites').add_documents(meteorites)" + }, + { + "lang": "Python", + "source": "client.index('movies').update_ranking_rules([\n 'exactness',\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'release_date:asc',\n 'rank:desc'\n])" + }, + { + "lang": "Python", + "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'poster'\n])" + }, + { + "lang": "Python", + "source": "client.index('movies').update_searchable_attributes([\n 'title'\n])" + }, + { + "lang": "Python", + "source": "client.index('movies').update_stop_words(['the'])" + }, + { + "lang": "Python", + "source": "client.index('movies').update_synonyms({\n 'winnie': ['piglet'],\n 'piglet': ['winnie']\n})" + }, + { + "lang": "Python", + "source": "client.index('meteorites').search('', {\n 'filter': 'mass < 200'\n})" + }, + { + "lang": "Python", + "source": "client.index('meteorites').search('', {\n 'filter': '_geoRadius(46.9480, 7.4474, 210000)'\n})" + }, + { + "lang": "Python", + "source": "client.index('meteorites').search('', {\n 'sort': ['_geoPoint(48.8583701,2.2922926):asc']\n})" + }, + { + "lang": "Python", + "source": "client.index('meteorites').search('', {\n 'filter': 'mass < 200',\n 'sort': ['mass:asc']\n})" + }, + { + "lang": "Python", + "source": "client.index('meteorites').update_settings({\n 'filterableAttributes': [\n 'mass',\n '_geo'\n ],\n 'sortableAttributes': [\n 'mass',\n '_geo'\n ]\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('thriller', {\n 'filter': [['genres = Horror', 'genres = Mystery'], 'director = \"Jordan Peele\"']\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('\"african american\" horror')" + }, + { + "lang": "Python", + "source": "client = Client('http://localhost:7700', 'masterKey')\nclient.get_keys()" + }, + { + "lang": "Python", + "source": "client.index('books').update_sortable_attributes([\n 'author',\n 'price'\n])" + }, + { + "lang": "Python", + "source": "client.index('books').update_ranking_rules([\n 'words',\n 'sort',\n 'typo',\n 'proximity',\n 'attribute',\n 'exactness'\n])" + }, + { + "lang": "Python", + "source": "client.index('books').search('science fiction', {\n 'sort': ['rating.users:asc']\n})" + }, + { + "lang": "Python", + "source": "client.index('books').search('science fiction', {\n 'sort': ['price:asc']\n})" + }, + { + "lang": "Python", + "source": "client.index('books').search('butler', {\n 'sort': ['author:desc']\n})" + }, + { + "lang": "Python", + "source": "client.index('books').search('science fiction', {\n 'sort': ['price:asc']\n})" + }, + { + "lang": "Python", + "source": "client.index('restaurants').update_filterable_attributes([\n '_geo'\n])" + }, + { + "lang": "Python", + "source": "client.index('restaurants').search('', {\n 'filter': '_geoRadius(45.472735, 9.184019, 2000)'\n})" + }, + { + "lang": "Python", + "source": "client.index('restaurants').search('', {\n 'filter': '_geoRadius(45.472735, 9.184019, 2000) AND type = pizza'\n})" + }, + { + "lang": "Python", + "source": "client.index('restaurants').search('Batman', {\n 'filter': '_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])'\n})" + }, + { + "lang": "Python", + "source": "client.index('restaurants').update_sortable_attributes([\n '_geo'\n])" + }, + { + "lang": "Python", + "source": "client.index('restaurants').search('', {\n 'sort': ['_geoPoint(48.8561446,2.2978204):asc']\n})" + }, + { + "lang": "Python", + "source": "client.index('restaurants').search('', {\n 'sort': ['_geoPoint(48.8561446,2.2978204):asc', 'rating:desc']\n})" + }, + { + "lang": "Python", + "source": "client = Client('http://localhost:7700', 'apiKey')\nclient.index('patient_medical_records').search()" + }, + { + "lang": "Python", + "source": "client = Client('http://localhost:7700', 'masterKey')\nclient.update_key(key_or_uid='74c9c733-3368-4738-bbe5-1d18a5fecb37', options={\n 'description': 'Default Search API Key'\n})" + }, + { + "lang": "Python", + "source": "client = Client('http://localhost:7700', 'masterKey')\n client.create_key(options={\n 'description': 'Search patient records key',\n 'actions': ['search'],\n 'indexes': ['patient_medical_records'],\n 'expiresAt': '2023-01-01T00:00:00Z'\n})" + }, + { + "lang": "Python", + "source": "client = Client('http://localhost:7700', 'masterKey')\nclient.get_keys()" + }, + { + "lang": "Python", + "source": "client = Client('http://localhost:7700', 'masterKey')\nclient.delete_key('ac5cd97d-5a4b-4226-a868-2d0eb6d197ab')" + }, + { + "lang": "Python", + "source": "client.create_index('books', {'primaryKey': 'reference_number'})" + }, + { + "lang": "Python", + "source": "client.index('books').add_documents([{\n 'reference_number': 287947,\n 'title': 'Diary of a Wimpy Kid',\n 'author': 'Jeff Kinney',\n 'genres': ['comedy', 'humor'],\n 'price': 5.00\n}], 'reference_number')" + }, + { + "lang": "Python", + "source": "client.index('books').update(primary_key='title')" + }, + { + "lang": "Python", + "source": "client.index('movies').update_typo_tolerance({\n 'enabled': False\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').update_typo_tolerance({\n 'disableOnAttributes': ['title']\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').update_typo_tolerance({\n 'disableOnWords': ['shrek']\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').update_typo_tolerance({\n 'minWordSizeForTypos': {\n 'oneTypo': 4,\n 'twoTypos': 10\n }\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').update_typo_tolerance({\n 'disableOnNumbers': True\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').update_typo_tolerance({\n 'minWordSizeForTypos': {\n 'oneTypo': 4\n }\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').update_synonyms({\n 'great': ['fantastic'],\n 'fantastic': ['great']\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').update_faceting_settings({\n 'maxValuesPerFacet': 2,\n 'sortFacetValuesBy': {\n '*': 'count'\n }\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').update_pagination_settings({'maxTotalHits': 500})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('big fat liar', {\n 'matchingStrategy': 'last'\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('big fat liar', {\n 'matchingStrategy': 'all'\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('big fat liar', {\n 'matchingStrategy': 'frequency'\n})" + }, + { + "lang": "Python", + "source": "import json\n\njson_file = open('./games.json', encoding='utf-8')\ngames = json.load(json_file)\nclient.index('games').add_documents(games)" + }, + { + "lang": "Python", + "source": "client.index('games').update_filterable_attributes(['release_timestamp'])" + }, + { + "lang": "Python", + "source": "client.index('games').search('', {\n 'filter': 'release_timestamp >= 1514761200 AND release_timestamp < 1672527600'\n})" + }, + { + "lang": "Python", + "source": "client.index('games').update_sortable_attributes(['release_timestamp'])" + }, + { + "lang": "Python", + "source": "client.index('games').search('', {\n 'sort': ['release_timestamp:desc']\n})" + }, + { + "lang": "Python", + "source": "client.get_tasks({'statuses': ['failed', 'canceled']})" + }, + { + "lang": "Python", + "source": "client.get_tasks(\n {\n 'indexUids': 'movies',\n 'types': ['documentAdditionOrUpdate', 'documentDeletion'],\n 'statuses': ['processing'],\n }\n)" + }, + { + "lang": "Python", + "source": "client.multi_search(\n [{\"indexUid\": \"movies\", \"q\": \"batman\"}, {\"indexUid\": \"comics\", \"q\": \"batman\"}],\n {}\n)" + }, + { + "lang": "Python", + "source": "client.index('movie_ratings').update_filterable_attributes([\n 'genres',\n 'director',\n 'language'\n])" + }, + { + "lang": "Python", + "source": "client.index('books').search('classic', {\n 'facets': ['genres', 'rating', 'language']\n})" + }, + { + "lang": "Python", + "source": "client.index('movie_ratings').search('Batman', {\n 'facets': ['genres', 'rating']\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').update_filterable_attributes([\n 'director',\n 'genres',\n])" + }, + { + "lang": "Python", + "source": "client.index('books').update_faceting_settings({ 'sortFacetValuesBy': { 'genres': 'count' } })" + }, + { + "lang": "Python", + "source": "client.index('books').facet_search('genres', 'c')" + }, + { + "lang": "Python", + "source": "client.index('movies').search('dragon', {\n 'showRankingScore': True\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('dragon', {\n 'showRankingScoreDetails': True\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('adventure', {\n 'attributesToSearchOn': ['overview']\n})" + }, + { + "lang": "Python", + "source": "client.index('INDEX_NAME').search('QUERY_TERMS', { distinct: 'ATTRIBUTE_A' })" + }, + { + "lang": "Python", + "source": "client.index('products').update_filterable_attributes(['product_id', 'sku', 'url'])" + }, + { + "lang": "Python", + "source": "client.index('products').search('white shirt', { distinct: 'sku' })" + }, + { + "lang": "Python", + "source": "client.index('INDEX_NAME').search('badman', { 'rankingScoreThreshold': 0.2 })" + }, + { + "lang": "Python", + "source": "client.index('INDEX_NAME').search('進撃の巨人', { 'locales': ['jpn'] })" + }, + { + "lang": "Ruby", + "source": "client.version" + }, + { + "lang": "Ruby", + "source": "client.index('jackets').update_distinct_attribute('product_id')" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_settings({\n displayed_attributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movie_ratings').search('Avengers', { filter: 'release_date > 795484800' })" + }, + { + "lang": "Ruby", + "source": "client.index('movie_ratings').search('Batman', {\n filter: 'release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")'\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movie_ratings').search('Planet of the Apes', {\n filter: \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\"\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies_ratings').search('thriller', {\n filter: 'rating.users >= 90'\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('shifu')" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('shifu', {\n offset: 1\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('shifu', {\n limit: 2\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('', hits_per_page: 15)" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('', page: 2)" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('shifu', {\n attributes_to_retrieve: ['overview', 'title']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('shifu', {\n attributes_to_crop: ['overview'],\n crop_length: 5\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('shifu', {\n attributes_to_crop: ['overview'],\n crop_marker: '[…]'\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('winter feast', {\n attributes_to_highlight: ['overview']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('winter feast', {\n attributes_to_highlight: ['overview'],\n highlight_pre_tag: '',\n highlight_post_tag: ''\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('winter feast', {\n show_matches_position: true\n})" + }, + { + "lang": "Ruby", + "source": "require 'json'\n\nmovies_json = File.read('movies.json')\nmovies = JSON.parse(movies_json)\nclient.index('movies').add_documents(movies)" + }, + { + "lang": "Ruby", + "source": "# In the command line:\n# bundle add meilisearch\n\n# In your .rb file:\nrequire 'json'\nrequire 'meilisearch'\n\nclient = MeiliSearch::Client.new('http://localhost:7700', 'aSampleMasterKey')\n\nmovies_json = File.read('movies.json')\nmovies = JSON.parse(movies_json)\n\nclient.index('movies').add_documents(movies)" + }, + { + "lang": "Ruby", + "source": "client.task(0)" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('botman')" + }, + { + "lang": "Ruby", + "source": "file = File.read('meteorites.json')\njson = JSON.parse(file)\n\nclient.index('meteorites').add_documents(json)" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_ranking_rules([\n 'exactness',\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'release_date:asc',\n 'rank:desc'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'poster'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_searchable_attributes([\n 'title'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_stop_words(['the'])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_synonyms({\n winnie: ['piglet'],\n piglet: ['winnie']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('meteorites').search('', { filter: 'mass < 200' })" + }, + { + "lang": "Ruby", + "source": "client.index('meteorites').search('', { filter: '_geoRadius(46.9480, 7.4474, 210000)' })" + }, + { + "lang": "Ruby", + "source": "client.index('meteorites').search('', { sort: ['_geoPoint(48.8583701, 2.2922926):asc'] })" + }, + { + "lang": "Ruby", + "source": "client.index('meteorites').search('', {\n sort: ['mass:asc'],\n filter: 'mass < 200'\n})" + }, + { + "lang": "Ruby", + "source": "client.index('meteorites').update_settings({\n filterable_attributes: ['mass', '_geo'],\n sortable_attributes: ['mass', '_geo']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('thriller', {\n filter: [['genres = Horror', 'genres = Mystery'], 'director = \"Jordan Peele\"']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('\"african american\" horror')" + }, + { + "lang": "Ruby", + "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'masterKey')\nclient.keys" + }, + { + "lang": "Ruby", + "source": "client.index('books').update_sortable_attributes(['author', 'price'])" + }, + { + "lang": "Ruby", + "source": "client.index('books').update_ranking_rules([\n 'words',\n 'sort',\n 'typo',\n 'proximity',\n 'attribute',\n 'exactness'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('books').search('science fiction', { sort: ['rating.users:asc'] })" + }, + { + "lang": "Ruby", + "source": "client.index('books').search('science fiction', { sort: ['price:asc'] })" + }, + { + "lang": "Ruby", + "source": "client.index('books').search('butler', { sort: ['author:desc'] })" + }, + { + "lang": "Ruby", + "source": "client.index('books').search('science fiction', { sort: ['price:asc'] })" + }, + { + "lang": "Ruby", + "source": "client.index('restaurants').update_filterable_attributes(['_geo'])" + }, + { + "lang": "Ruby", + "source": "client.index('restaurants').search('', { filter: '_geoRadius(45.472735, 9.184019, 2000)' })" + }, + { + "lang": "Ruby", + "source": "client.index('restaurants').search('', { filter: '_geoRadius(45.472735, 9.184019, 2000) AND type = pizza' })" + }, + { + "lang": "Ruby", + "source": "client.index('restaurants').search('', { filter: ['_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])'] })" + }, + { + "lang": "Ruby", + "source": "client.index('restaurants').update_sortable_attributes(['_geo'])" + }, + { + "lang": "Ruby", + "source": "client.index('restaurants').search('', { sort: ['_geoPoint(48.8561446, 2.2978204):asc'] })" + }, + { + "lang": "Ruby", + "source": "client.index('restaurants').search('', { sort: ['_geoPoint(48.8561446, 2.2978204):asc', 'rating:desc'] })" + }, + { + "lang": "Ruby", + "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'apiKey')\nclient.index('patient_medical_records').search" + }, + { + "lang": "Ruby", + "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'masterKey')\nclient.update_key('74c9c733-3368-4738-bbe5-1d18a5fecb37', description: 'Default Search API Key')" + }, + { + "lang": "Ruby", + "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'masterKey')\nclient.create_key(\n description: 'Search patient records key',\n actions: ['search'],\n indexes: ['patient_medical_records'],\n expires_at: '2023-01-01T00:00:00Z'\n)" + }, + { + "lang": "Ruby", + "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'masterKey')\nclient.keys" + }, + { + "lang": "Ruby", + "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'masterKey')\nclient.delete_key('ac5cd97d-5a4b-4226-a868-2d0eb6d197ab')" + }, + { + "lang": "Ruby", + "source": "client.create_index('books', primary_key: 'reference_number')" + }, + { + "lang": "Ruby", + "source": "client.index('books').add_documents([\n {\n reference_number: 287947,\n title: 'Diary of a Wimpy Kid',\n author: 'Jeff Kinney',\n genres: ['comedy', 'humor'],\n price: 5.00\n }\n], 'reference_number')" + }, + { + "lang": "Ruby", + "source": "client.index('books').update(primary_key: 'title')" + }, + { + "lang": "Ruby", + "source": "index('books').update_typo_tolerance({ enabled: false })" + }, + { + "lang": "Ruby", + "source": "index('books').update_typo_tolerance({ disable_on_attributes: ['title'] })" + }, + { + "lang": "Ruby", + "source": "index('books').update_typo_tolerance({ disable_on_words: ['shrek'] })" + }, + { + "lang": "Ruby", + "source": "index('books').update_typo_tolerance({\n min_word_size_for_typos: {\n one_typo: 4,\n two_typos: 10\n }\n})" + }, + { + "lang": "Ruby", + "source": "index('books').update_typo_tolerance({ disable_on_numbers: true })" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_typo_tolerance({ min_word_size_for_typos: { one_typo: 4 } })" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_synonyms({\n great: ['fantastic'],\n fantastic: ['great']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_faceting({\n max_values_per_facet: 2,\n sort_facet_values_by: {\n genres: 'count'\n }\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_pagination(max_total_hits: 500)" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('big fat liar', {\n matching_strategy: 'last'\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('big fat liar', {\n matching_strategy: 'all'\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('white shirt', {\n matching_strategy: 'frequency'\n})" + }, + { + "lang": "Ruby", + "source": "require 'json'\n\ngames = JSON.parse(File.read('games.json'))\nclient.index('games').add_documents(games)" + }, + { + "lang": "Ruby", + "source": "client.index('games').update_filterable_attributes(['release_timestamp'])" + }, + { + "lang": "Ruby", + "source": "client.index('games').search('', {\n filter: 'release_timestamp >= 1514761200 AND release_timestamp < 1672527600'\n})" + }, + { + "lang": "Ruby", + "source": "client.index('games').update_sortable_attributes(['release_timestamp'])" + }, + { + "lang": "Ruby", + "source": "client.index('games').search('', sort: ['release_timestamp:desc'])" + }, + { + "lang": "Ruby", + "source": "client.get_tasks(statuses: ['failed', 'canceled'])" + }, + { + "lang": "Ruby", + "source": "client.get_tasks(index_uids: ['movies'], types: ['documentAdditionOrUpdate', 'documentDeletion'], statuses: ['processing'])" + }, + { + "lang": "Ruby", + "source": "client.multi_search(\n queries: [{ index_uid: 'movies', q: 'batman' }, { index_uid: 'comics', q: 'batman' }],\n federation: {}\n)" + }, + { + "lang": "Ruby", + "source": "client.index('movie_ratings').update_filterable_attributes(['genres', 'rating', 'language'])" + }, + { + "lang": "Ruby", + "source": "client.index('books').search('classic', {\n facets: ['genres', 'rating', 'language']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movie_ratings').search('Batman', {\n facets: ['genres', 'rating']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_filterable_attributes([\n 'director',\n 'genres'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('books').update_faceting(\n sort_facet_values_by: {\n genres: 'count'\n }\n)" + }, + { + "lang": "Ruby", + "source": "client.index('books').facet_search('genres', 'c')" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('dragon', {\n show_ranking_score: true\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('dragon', {\n show_ranking_score_details: true\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('adventure', {\n attributes_to_search_on: ['overview']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').search('QUERY TERMS', {\n distinct: 'ATTRIBUTE_A'\n})" + }, + { + "lang": "Ruby", + "source": "client.index('products').update_filterable_attributes([\n 'product_id',\n 'sku',\n 'url'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('products').search('white shirt', {\n distinct: 'sku'\n})" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').search('badman', {\n rankingScoreThreshold: 0.2\n})" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').search('進撃の巨人', { locales: ['jpn'] })" + }, + { + "lang": "Rust", + "source": "let version: Version = client\n .get_version()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"jackets\")\n .set_distinct_attribute(\"product_id\")\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let searchable_attributes = [\n \"title\",\n \"overview\",\n \"genres\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_searchable_attributes(&searchable_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let displayed_attributes = [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_displayed_attributes(&displayed_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movie_ratings\")\n .search()\n .with_query(\"Avengers\")\n .with_filter(\"release_date > 795484800\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movie_ratings\")\n .search()\n .with_query(\"Batman\")\n .with_filter(r#\"release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")\"#)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movie_ratings\")\n .search()\n .with_query(\"Planet of the Apes\")\n .with_filter(r#\"release_date > 1577884550 AND (NOT director = \"Tim Burton\")\"#)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movie_rating\")\n .search()\n .with_query(\"thriller\")\n .with_filter(\"rating.users >= 90\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .with_offset(1)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .with_limit(2)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "client.index(\"movies\").search().with_hits_per_page(15).execute().await?;" + }, + { + "lang": "Rust", + "source": "client.index(\"movies\").search().with_page(2).execute().await?;" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .with_attributes_to_retrieve(Selectors::Some(&[\"overview\", \"title\"]))\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .with_attributes_to_crop(Selectors::Some(&[(\"overview\", None)]))\n .with_crop_length(5)\n .execute()\n .await\n .unwrap();\n\n// Get the formatted results\nlet formatted_results: Vec<&Movie> = results\n .hits\n .iter()\n .map(|r| r.formatted_result.as_ref().unwrap())\n .collect();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .with_attributes_to_crop(Selectors::Some(&[(\"overview\", None)]))\n .with_crop_marker(\"[…]\")\n .execute()\n .await\n .unwrap();\n\n// Get the formatted results\nlet formatted_results: Vec<&Movie> = results\n .hits\n .iter()\n .map(|r| r.formatted_result.as_ref().unwrap())\n .collect();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"winter feast\")\n .with_attributes_to_highlight(Selectors::Some(&[\"overview\"]))\n .execute()\n .await\n .unwrap();\n\n// Get the formatted results\nlet formatted_results: Vec<&Movie> = results\n .hits\n .iter()\n .map(|r| r.formatted_result.as_ref().unwrap())\n .collect();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"winter feast\")\n .with_attributes_to_highlight(Selectors::Some(&[\"overview\"]))\n .with_highlight_pre_tag(\"\")\n .with_highlight_post_tag(\"\")\n .execute()\n .await\n .unwrap();\n\n// Get the formatted results\nlet formatted_results: Vec<&Movie> = results\n .hits\n .iter()\n .map(|r| r.formatted_result.as_ref().unwrap())\n .collect();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"winter feast\")\n .with_show_matches_position(true)\n .execute()\n .await\n .unwrap();\n\n// Get the matches info\nlet matches_position: Vec<&HashMap>> = results\n .hits\n .iter()\n .map(|r| r.matches_position.as_ref().unwrap())\n .collect();" + }, + { + "lang": "Rust", + "source": "use meilisearch_sdk::{\n indexes::*,\n client::*,\n search::*,\n settings::*\n};\nuse serde::{Serialize, Deserialize};\nuse std::{io::prelude::*, fs::File};\nuse futures::executor::block_on;\n\nfn main() { block_on(async move {\n let client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\n\n // reading and parsing the file\n let mut file = File::open(\"movies.json\")\n .unwrap();\n let mut content = String::new();\n file\n .read_to_string(&mut content)\n .unwrap();\n let movies_docs: Vec = serde_json::from_str(&content)\n .unwrap();\n\n // adding documents\n client\n .index(\"movies\")\n .add_documents(&movies_docs, None)\n .await\n .unwrap();\n})}" + }, + { + "lang": "Rust", + "source": "// In your .toml file:\n [dependencies]\n meilisearch-sdk = \"0.31.0\"\n # futures: because we want to block on futures\n futures = \"0.3\"\n # serde: required if you are going to use documents\n serde = { version=\"1.0\", features = [\"derive\"] }\n # serde_json: required in some parts of this guide\n serde_json = \"1.0\"\n```\n\n// In your .rs file:\n// Documents in the Rust library are strongly typed\n#[derive(Serialize, Deserialize)]\nstruct Movie {\n id: i64,\n title: String,\n poster: String,\n overview: String,\n release_date: i64,\n genres: Vec\n}\n\n// You will often need this `Movie` struct in other parts of this documentation. (you will have to change it a bit sometimes)\n// You can also use schemaless values, by putting a `serde_json::Value` inside your own struct like this:\n#[derive(Serialize, Deserialize)]\nstruct Movie {\n id: i64,\n #[serde(flatten)]\n value: serde_json::Value,\n}\n\n// Then, add documents into the index:\nuse meilisearch_sdk::{\n indexes::*,\n client::*,\n search::*,\n settings::*\n};\nuse serde::{Serialize, Deserialize};\nuse std::{io::prelude::*, fs::File};\nuse futures::executor::block_on;\n\nfn main() { block_on(async move {\n let client = Client::new(\"http://localhost:7700\", Some(\"aSampleMasterKey\"));\n\n // Reading and parsing the file\n let mut file = File::open(\"movies.json\")\n .unwrap();\n let mut content = String::new();\n file\n .read_to_string(&mut content)\n .unwrap();\n let movies_docs: Vec = serde_json::from_str(&content)\n .unwrap();\n\n // Adding documents\n client\n .index(\"movies\")\n .add_documents(&movies_docs, None)\n .await\n .unwrap();\n})}" + }, + { + "lang": "Rust", + "source": "client\n .get_task(0)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "// You can build a `SearchQuery` and execute it later:\nlet query: SearchQuery = SearchQuery::new(&movies)\n .with_query(\"botman\")\n .build();\n\nlet results: SearchResults = client\n .index(\"movies\")\n .execute_query(&query)\n .await\n .unwrap();\n\n// You can build a `SearchQuery` and execute it directly:\nlet results: SearchResults = SearchQuery::new(&movies)\n .with_query(\"botman\")\n .execute()\n .await\n .unwrap();\n\n// You can search in an index directly:\nlet results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"botman\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "use serde::{Serialize, Deserialize};\nuse std::fs::File;\n\n#[derive(Serialize, Deserialize)]\nstruct Geo {\n lat: f64,\n lon: f64\n}\n\nstruct Meteorite {\n name: String,\n id: String,\n nametype: String,\n recclass: String,\n mass: i64,\n fall: String,\n _geo: Geo\n}\n\nlet mut file = File::open(\"meteorites.json\")?;\nlet meteorites: Vec = serde_json::from_reader(file)?;\n\nclient\n .index(\"meteorites\")\n .add_documents(&meteorites, None)\n .await?;" + }, + { + "lang": "Rust", + "source": "let ranking_rules = [\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\"\n];\n\nclient\n .index(\"movies\")\n .set_ranking_rules(&ranking_rules)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let displayed_attributes = [\n \"title\",\n \"overview\",\n \"poster\",\n];\n\nclient\n .index(\"movies\")\n .set_displayed_attributes(&displayed_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let searchable_attributes = [\n \"title\"\n];\n\nclient\n .index(\"movies\")\n .set_searchable_attributes(&searchable_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let stop_words = [\"the\"];\nclient\n .index(\"movies\")\n .set_stop_words(&stop_words)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"winnie\"), vec![String::from(\"piglet\")]);\nsynonyms.insert(String::from(\"piglet\"), vec![String::from(\"winnie\")]);\n\nclient\n .index(\"movies\")\n .set_synonyms(&synonyms)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"meteorites\")\n .search()\n .with_filter(\"mass < 200\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"meteorites\")\n .search()\n .with_filter(\"_geoRadius(46.9480, 7.4474, 210000)\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"meteorites\")\n .search()\n .with_sort(&[\"_geoPoint(48.8583701, 2.2922926):asc\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"meteorites\")\n .search()\n .with_filter(\"mass < 200\")\n .with_sort(&[\"mass:asc\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let settings = Settings::new()\n .with_filterable_attributes([\n \"mass\",\n \"_geo\"\n ])\n .with_sortable_attributes([\n \"mass\",\n \"_geo\"\n ])\nlet task: TaskInfo = client\n .index(\"meteorites\")\n .set_settings(&settings)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"thriller\")\n .with_filter(\"(genres = Horror AND genres = Mystery) OR director = \\\"Jordan Peele\\\"\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"\\\"african american\\\" horror\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let sortable_attributes = [\n \"author\",\n \"price\"\n];\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_sortable_attributes(&sortable_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let ranking_rules = [\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\"\n];\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_ranking_rules(&ranking_rules)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"books\")\n .search()\n .with_query(\"science fiction\")\n .with_sort(&[\"rating.users:asc\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"books\")\n .search()\n .with_query(\"science fiction\")\n .with_sort(&[\"price:asc\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"books\")\n .search()\n .with_query(\"butler\")\n .with_sort(&[\"author:desc\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"books\")\n .search()\n .with_query(\"science fiction\")\n .with_sort(&[\"price:asc\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"restaurants\")\n .set_filterable_attributes(&[\"_geo\"])\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"restaurants\")\n .search()\n .with_filter(\"_geoRadius(45.472735, 9.184019, 2000)\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"restaurants\")\n .search()\n .with_filter(\"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"restaurants\")\n .search()\n .with_filter(\"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"restaurants\")\n .set_sortable_attributes(&[\"_geo\"])\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"restaurants\")\n .search()\n .with_sort(&[\"_geoPoint(48.8561446, 2.2978204):asc\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"restaurants\")\n .search()\n .with_sort(&[\"_geoPoint(48.8561446, 2.2978204):asc\", \"rating:desc\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"MASTER_KEY\"));\nclient\n .get_keys()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"DEFAULT_ADMIN_API_KEY\"));\nlet task = client\n .create_index(\"medical_records\", Some(\"id\"))\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"DEFAULT_SEARCH_API_KEY\"));\nlet index = client.index(\"medical_records\");\nindex\n .search()\n .with_query(\"appointments\")\n .execute::()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet result = client.index(\"patient_medical_records\")\n .search()\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet mut key = client\n .get_key(\"74c9c733-3368-4738-bbe5-1d18a5fecb37\")\n .await\n .unwrap();\nkey\n .with_description(\"Default Search API key\".to_string())\n .update(&client);" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet mut key_options = KeyBuilder::new();\nkey_options\n .with_name(\"Search patient records key\")\n .with_action(Action::Search)\n .with_expires_at(time::macros::datetime!(2023 - 01 - 01 00:00:00 UTC))\n .with_index(\"patient_medical_records\");\nlet new_key = client\n .create_key(key_options)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet keys = client\n .get_keys()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet key = client\n .get_key(\"ac5cd97d-5a4b-4226-a868-2d0eb6d197ab\")\n .await\n .unwrap();\nclient\n .delete_key(&key)\n .await?;" + }, + { + "lang": "Rust", + "source": "client\n .create_index(\"books\", Some(\"reference_number\"))\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "#[derive(Serialize, Deserialize)]\nstruct Book {\n reference_number: String,\n title: String,\n author: String,\n genres: Vec,\n price: f64\n}\n\nlet task: TaskInfo = client\n .index(\"books\")\n .add_documents(&[\n Book {\n reference_number: \"287947\".to_string(),\n title: \"Diary of a Wimpy Kid\".to_string(),\n author: \"Jeff Kinney\".to_string(),\n genres: vec![\"comedy\".to_string(),\"humor\".to_string()],\n price: 5.00\n }\n ], Some(\"reference_number\"))\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let task = IndexUpdater::new(\"books\", &client)\n .with_primary_key(\"title\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let typo_tolerance = TypoToleranceSettings {\n enabled: Some(false),\n disable_on_attributes: None,\n disable_on_words: None,\n min_word_size_for_typos: None,\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(5),\n two_typos: Some(12)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![\"title\".to_string()]),\n disable_on_words: None,\n min_word_size_for_typos: None,\n};\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(5),\n two_typos: Some(12)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: None,\n disable_on_words: Some(vec![\"shrek\".to_string()]),\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(4),\n two_typos: Some(12)\n};\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![]),\n disable_on_words: Some(vec![\"title\".to_string()]),\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "// Deactivate typo tolerance on numbers and other high entropy words\nlet typo_tolerance = TypoToleranceSettings {\n disable_on_numbers: Some(true),\n ..Default::default()\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(5),\n two_typos: Some(4)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![]),\n disable_on_words: Some(vec![\"title\".to_string()]),\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"great\"), vec![String::from(\"fantastic\")]);\nsynonyms.insert(String::from(\"fantastic\"), vec![String::from(\"great\")]);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_synonyms(&synonyms)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let mut facet_sort_setting = BTreeMap::new();\nfacet_sort_setting.insert(\"*\".to_string(), FacetSortValue::Count);\nlet mut faceting = FacetingSettings {\n max_values_per_facet: 2,\n sort_facet_values_by: Some(facet_sort_setting),\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_faceting(&faceting)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let pagination = PaginationSetting {max_total_hits:500};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_pagination(pagination)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n.index(\"movies\")\n.search()\n.with_query(\"big fat liar\")\n.with_matching_strategy(MatchingStrategies::LAST)\n.execute()\n.await\n.unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n.index(\"movies\")\n.search()\n.with_query(\"big fat liar\")\n.with_matching_strategy(MatchingStrategies::ALL)\n.execute()\n.await\n.unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n.index(\"movies\")\n.search()\n.with_query(\"white shirt\")\n.with_matching_strategy(MatchingStrategies::FREQUENCY)\n.execute()\n.await\n.unwrap();" + }, + { + "lang": "Rust", + "source": "let mut file = File::open(\"games.json\")\n .unwrap();\nlet mut content = String::new();\nfile\n .read_to_string(&mut content)\n .unwrap();\nlet docs: Vec = serde_json::from_str(&content)\n .unwrap();\n\nclient\n .index(\"games\")\n .add_documents(&docs, None)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let settings = Settings::new()\n .with_filterable_attributes([\"release_timestamp\"]);\n\nlet task: TaskInfo = client\n .index(\"games\")\n .set_settings(&settings)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"games\")\n .search()\n .with_filter(\"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let settings = Settings::new()\n .with_sortable_attributes([\"release_timestamp\"]);\n\nlet task: TaskInfo = client\n .index(\"games\")\n .set_settings(&settings)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"games\")\n .search()\n .with_sort([\"release_timestamp:desc\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let mut query = TasksQuery::new(&client);\nlet tasks = query\n .with_statuses([\"failed\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let mut query = TasksQuery::new(&client);\nlet tasks = query\n .with_statuses([\"failed\", \"canceled\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let mut query = TasksQuery::new(&client);\nlet tasks = query\n .with_index_uids([\"movies\"])\n .with_types([\"documentAdditionOrUpdate\",\"documentDeletion\"])\n .with_statuses([\"processing\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movie_ratings\")\n .set_filterable_attributes(&[\"genres\", \"rating\", \"language\"])\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let books = client.index(\"books\");\n\nlet results: SearchResults = SearchQuery::new(&books)\n .with_query(\"classic\")\n .with_facets(Selectors::Some(&[\"genres\", \"rating\", \"language\"]))\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let books = client.index(\"movie_ratings\");\nlet results: SearchResults = SearchQuery::new(&books)\n .with_query(\"Batman\")\n .with_facets(Selectors::Some(&[\"genres\", \"rating\"))\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .set_filterable_attributes([\"director\", \"genres\"])\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let mut facet_sort_setting = BTreeMap::new();\nfacet_sort_setting.insert(\"genres\".to_string(), FacetSortValue::Count);\nlet faceting = FacetingSettings {\n max_values_per_facet: 100,\n sort_facet_values_by: Some(facet_sort_setting),\n};\n\nlet res = client.index(\"books\")\n .set_faceting(&faceting)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let res = client.index(\"books\")\n .facet_search(\"genres\")\n .with_facet_query(\"c\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"dragon\")\n .with_show_ranking_score(true)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"dragon\")\n .with_show_ranking_score_details(true)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"adventure\")\n .with_attributes_to_search_on(&[\"overview\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let searchable_attributes: Vec = index\n .get_searchable_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let task = index\n .set_searchable_attributes([\"title\", \"overview\"])\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let task_status = index.get_task(&task).await.unwrap();" + }, + { + "lang": "Rust", + "source": "let results = index.search()\n .with_query(\"-escape\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results = index.search()\n .with_query(\"-\\\"escape room\\\"\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let res = client\n .index(\"INDEX_NAME\")\n .search()\n .with_query(\"QUERY TERMS\")\n .with_distinct(\"ATTRIBUTE_A\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"products\")\n .settings()\n .set_filterable_attributes([\"product_id\", \"sku\", \"url\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let res = client\n .index(\"products\")\n .search()\n .with_query(\"white shirt\")\n .with_distinct(\"sku\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let res = client\n .index(\"INDEX_NAME\")\n .search()\n .with_query(\"badman\")\n .with_ranking_score_threshold(0.2)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let res = client\n .index(\"books\")\n .search()\n .with_query(\"進撃の巨人\")\n .with_locales(&[\"jpn\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results = index\n .search()\n .with_query(\"kitchen utensils\")\n .with_hybrid(\"EMBEDDER_NAME\", 0.9)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results = index\n .search()\n .with_vector(&[0.0, 1.0, 2.0])\n .with_hybrid(\"EMBEDDER_NAME\", 1.0)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results = index\n .search()\n .with_query(\"kitchen utensils\")\n .with_retrieve_vectors(true)\n .with_hybrid(\"EMBEDDER_NAME\", 0.5)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let embedders = HashMap::from([(\n String::from(\"movies-text\"),\n Embedder {\n source: EmbedderSource::OpenAi,\n api_key: Some(String::from(\"OPENAI_API_KEY\")),\n model: Some(String::from(\"text-embedding-3-small\")),\n document_template: Some(String::from(\"A movie titled '{{doc.title}}' released in {{ doc.release_date }}. The movie genres are: {{doc.genres}}. The story is about: {{doc.overview|truncatewords: 20}}\")),\n ..Embedder::default()\n }\n)]);\nmovies.set_embedders(&embedders)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results = movies.search()\n .with_query(\"batman\")\n .with_hybrid(\"EMBEDDER_NAME\", 0.5)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results = movies.similar_search(\"192\", \"EMBEDDER_NAME\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_A' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"uid\": \"INDEX_B\" }'" + }, + { + "lang": "Rust", + "source": "let results = index\n .search()\n .with_hybrid(\"EMBEDDER_NAME\", 0.5)\n .with_media(json!({\n \"FIELD_A\": \"VALUE_A\",\n \"FIELD_B\": {\n \"FIELD_C\": \"VALUE_B\",\n \"FIELD_D\": \"VALUE_C\"\n }\n }))\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.version { (result) in\n switch result {\n case .success(let version):\n print(version)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.index(\"jackets\").updateDistinctAttribute(\"product_id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchableAttributes: [String] = [\n \"title\",\n \"overview\",\n \"genres\"\n]\nclient.index(\"movies\").updateSearchableAttributes(searchableAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let displayedAttributes: [String] = [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n]\nclient.index(\"movies\").updateDisplayedAttributes(displayedAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"Avengers\",\n filter: \"release_date > 795484800\"\n)\nclient.index(\"movie_ratings\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"Batman\",\n filter: \"release_date > 795484800 AND (director = \\\"Tim Burton\\\" OR director = \\\"Christopher Nolan\\\"\")\nclient.index(\"movie_ratings\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"Planet of the Apes\",\n filter: \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\"))\nclient.index(\"movie_ratings\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"thriller\",\n filter: \"rating.users >= 90\"\n)\nclient.index(\"movie_ratings\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").search(SearchParameters(query: \"shifu\")) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"shifu\",\n offset: 1)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"shifu\",\n limit: 2)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(query: \"\", hitsPerPage: 15)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(query: \"\", page: 15)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"shifu\",\n attributesToRetrieve: [\"overview\", \"title\"])\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"shifu\",\n attributesToCrop: [\"overview\"],\n cropLength: 5)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"shifu\",\n attributesToCrop: [\"overview\"],\n cropMarker: \"[…]\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"winter feast\",\n attributesToHighlight: [\"overview\"])\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"winter feast\",\n attributesToHighlight: [\"overview\"],\n highlightPreTag: \"\",\n highlightPostTag: \"\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"winter feast\",\n showMatchesPosition: true)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let path = Bundle.main.url(forResource: \"movies\", withExtension: \"json\")!\nlet documents: Data = try Data(contentsOf: path)\n\nclient.index(\"movies\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "// Add this to your `Package.swift`\ndependencies: [\n .package(url: \"https://github.com/meilisearch/meilisearch-swift.git\", from: \"0.17.0\")\n]\n\n// In your .swift file:\nlet path = Bundle.main.url(forResource: \"movies\", withExtension: \"json\")!\nlet documents: Data = try Data(contentsOf: path)\nlet client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"aSampleMasterKey\")\n\nclient.index(\"movies\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.getTask(taskUid: 0) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").search(SearchParameters(query: \"botman\")) { (result) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let file = \"meteorites.json\"\nlet path = URL(fileURLWithPath: file)\nlet documents: Data = try Data(contentsOf: path)\n\nclient.index(\"meteorites\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let rankingRules: [String] = [\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\"\n]\nclient.index(\"movies\").updateRankingRules(rankingRules) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let displayedAttributes: [String] = [\"title\", \"overview\", \"poster\"]\nclient.index(\"movies\").updateDisplayedAttributes(displayedAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" + }, + { + "lang": "Swift", + "source": "let searchableAttributes: [String] = [\"title\"]\nclient.index(\"movies\").updateSearchableAttributes(searchableAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let stopWords: [String] = [\"the\"]\nclient.index(\"movies\").updateStopWords(stopWords) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let synonyms: [String: [String]] = [\n \"winnie\": [\"piglet\"],\n \"piglet\": [\"winnie\"]\n]\n client.index(\"movies\").updateSynonyms(synonyms) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"\",\n filter: \"mass < 200\"\n )\n client.index(\"meteorites\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n }" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"\",\n filter: \"_geoRadius(46.9480, 7.4474, 210000)\"\n)\nclient.index(\"meteorites\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"\",\n sort: [\"_geoPoint(48.8583701, 2.2922926):asc\"]\n)\nclient.index(\"meteorites\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"\",\n filter: \"mass < 200\",\n sort: [\"mass:asc\"]\n)\nclient.index(\"meteorites\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let settings = Setting(\n filterableAttributes: [\"mass\", \"_geo\"],\n sortableAttributes: [\"mass\", \"_geo\"]\n)\nclient.index(\"meteorites\").updateSettings(settings) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"thriller\",\n filter: [\n [\n \"genres = Horror\",\n \"genres = Mystery\"\n ],\n \"director = \\\"Jordan Peele\\\"\"\n ])\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"\\\"african american\\\" horror\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"masterKey\")\nclient.getKeys { result in\n switch result {\n case .success(let keys):\n print(keys)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").updateSortableAttributes([\"price\", \"author\"]) { (result: Result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let rankingRules: [String] = [\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\"\n]\nclient.index(\"books\").updateRankingRules(rankingRules) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"science fiction\",\n sort: [\"rating.users:asc\"]\n)\nclient.index(\"books\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"science fiction\",\n sort: [\"price:asc\"]\n)\nclient.index(\"books\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"butler\",\n sort: [\"author:desc\"]\n)\nclient.index(\"books\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"science fiction\",\n sort: [\"price:asc\"]\n)\nclient.index(\"books\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.index(\"restaurants\").updateFilterableAttributes([\"_geo\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n filter: \"_geoRadius(45.472735, 9.184019, 2000)\"\n)\nclient.index(\"restaurants\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n filter: \"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\"\n)\nclient.index(\"restaurants\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n filter: \"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\"\n)\nclient.index(\"restaurants\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.index(\"restaurants\").updateSortableAttributes([\"_geo\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"\",\n sort: [\"_geoPoint(48.8561446, 2.2978204):asc\"]\n)\nclient.index(\"restaurants\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"\",\n sort: [\"_geoPoint(48.8561446, 2.2978204):asc\", \"rating:desc\"]\n)\nclient.index(\"restaurants\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"apiKey\")\nclient.index(\"patient_medical_records\")\n .search(SearchParameters(query: \"\")) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"masterKey\")\nlet keyParams = KeyUpdateParams(description: \"Default Search API Key\")\n\nclient.updateKey(key: \"74c9c733-3368-4738-bbe5-1d18a5fecb37\", keyParams: keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"masterKey\")\n\nlet keyParams = KeyParams(\n description: \"Search patient records key\",\n actions: [\"search\"],\n indexes: [\"patient_medical_records\"],\n expiresAt: \"2023-01-01T00:00:00Z\"\n)\nclient.createKey(keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"masterKey\")\n\nclient.getKeys() { result in\n switch result {\n case .success(let keys):\n print(keys)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"masterKey\")\n\nclient.deleteKey(keyOrUid: \"ac5cd97d-5a4b-4226-a868-2d0eb6d197ab\") { result in\n switch result {\n case .success:\n print(\"success\")\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.createIndex(uid: \"books\", primaryKey: \"reference_number\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let documents: Data = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Diary of a Wimpy Kid\",\n \"author\": \"Jeff Kinney\",\n \"genres\": [\"comedy\", \"humor\"],\n \"price\": 5\n }\n]\n\"\"\".data(using: .utf8)!\n\nclient.index(\"books\").addDocuments(documents: documents, primaryKey: \"reference_number\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.updateIndex(uid: \"movies\", primaryKey: \"title\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let synonyms: [String: [String]] = [\n \"great\": [\"fantastic\"],\n \"fantastic\": [\"great\"]\n]\n\nclient.index(\"movies\").updateSynonyms(synonyms) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").updateFaceting({ maxValuesPerFacet: 2 })" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").updatePagination({ maxTotalHits: 500 })" + }, + { + "lang": "Swift", + "source": "let path = Bundle.main.url(forResource: \"games\", withExtension: \"json\")!\nlet documents: Data = try Data(contentsOf: path)\n\nclient.index(\"games\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.index(\"games\").updateFilterableAttributes([\"release_timestamp\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"\",\n filter: \"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\"\n)\nclient.index(\"games\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.index(\"games\").updateSortableAttributes([\"release_timestamp\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"\",\n sort: [\"release_timestamp:desc\"],\n)\n\nclient.index(\"games\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.getTasks(params: TasksQuery(statuses: [.failed, .canceled])) { result in\n switch result {\n case .success(let taskResult):\n print(taskResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.getTasks(params: TasksQuery(indexUids: \"movies\", types: [\"documentAdditionOrUpdate\", \"documentDeletion\"], statuses: [\"processing\"])) { result in\n switch result {\n case .success(let taskResult):\n print(taskResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").updateFilterableAttributes([\"genre\", \"director\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(query: \"dragon\", showRankingScore: true)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult.rankingScore)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(query: \"dragon\", showRankingScoreDetails: true)\nlet movies: Searchable = try await client.index(\"movies\").search(searchParameters)" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(query: \"adventure\", attributesToSearchOn: [\"overview\"])\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/version'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/jackets/settings/distinct-attribute' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"product_id\"'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movie_ratings/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"Avengers\",\n \"filter\": \"release_date > 795484800\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movie_ratings/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"Batman\",\n \"filter\": \"release_date > 795484800 AND (director = \\\"Tim Burton\\\" OR director = \\\"Christopher Nolan\\\")\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movie_ratings/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"Planet of the Apes\",\n \"filter\": \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\"\n }' \\" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movie_ratings/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"thriller\",\n \"filter\": \"rating.users >= 90\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"shifu\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"shifu\",\n \"offset\": 1\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"shifu\",\n \"limit\": 2\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"\",\n \"hitsPerPage\": 15\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"\",\n \"page\": 2\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"shifu\",\n \"attributesToRetrieve\": [\n \"overview\",\n \"title\"\n ]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"shifu\",\n \"attributesToCrop\": [\"overview\"],\n \"cropLength\": 5\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"shifu\",\n \"cropMarker\": \"[…]\",\n \"attributesToCrop\": [\"overview\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"winter feast\",\n \"attributesToHighlight\": [\"overview\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"winter feast\",\n \"attributesToHighlight\": [\"overview\"],\n \"highlightPreTag\": \"\",\n \"highlightPostTag\": \"\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"winter feast\",\n \"showMatchesPosition\": true\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents'\\\n -H 'Content-Type: application/json' \\\n --data-binary @movies.json" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents?primaryKey=id' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer aSampleMasterKey' \\\n --data-binary @movies.json" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks/0' \\\n -H 'Authorization: Bearer aSampleMasterKey'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer aSampleMasterKey' \\\n --data-binary '{ \"q\": \"botman\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/meteorites/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary @meteorites.json" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"poster\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"title\"]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/stop-words' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"the\"]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/synonyms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"winnie\": [\"piglet\"],\n \"piglet\": [\"winnie\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/meteorites/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"filter\": \"mass < 200\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/meteorites/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"filter\": \"_geoRadius(46.9480, 7.4474, 210000)\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/meteorites/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"sort\": [\"_geoPoint(48.8583701,2.2922926):asc\"] }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/meteorites/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"mass < 200\",\n \"sort\": [\"mass:asc\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/meteorites/settings' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filterableAttributes\": [\n \"mass\",\n \"_geo\"\n ],\n \"sortableAttributes\": [\n \"mass\",\n \"_geo\"\n ]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"thriller\",\n \"filter\": [\n [\n \"genres = Horror\",\n \"genres = Mystery\"\n ],\n \"director = \\\"Jordan Peele\\\"\"\n ]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n--data-binary '{ \"q\": \"\\\"african american\\\" horror\" }'" + }, + { + "lang": "cURL", + "source": "# replace the MASTER_KEY placeholder with your master key\ncurl \\\n -X GET 'MEILISEARCH_URL/keys' \\\n -H 'Authorization: Bearer MASTER_KEY'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"author\",\n \"price\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/ranking-rules' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"science fiction\",\n \"sort\": [\"rating.users:asc\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"science fiction\",\n \"sort\": [\"price:asc\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"butler\",\n \"sort\": [\"author:desc\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"science fiction\",\n \"sort\": [\"price:asc\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/restaurants/settings/filterable-attributes' \\\n -H 'Content-type:application/json' \\\n --data-binary '[\"_geo\"]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"filter\": \"_geoRadius(45.472735, 9.184019, 2000)\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"filter\": \"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"filter\": \"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"filter\": \"_geoPolygon([45.494181, 9.214024], [45.449484, 9.179175], [45.449486, 9.179177])\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/restaurants/settings/sortable-attributes' \\\n -H 'Content-type:application/json' \\\n --data-binary '[\"_geo\"]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"sort\": [\"_geoPoint(48.8561446,2.2978204):asc\"] }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{\n \"sort\": [\n \"_geoPoint(48.8561446,2.2978204):asc\",\n \"rating:desc\"\n ]\n }'" + }, + { + "lang": "cURL", + "source": "curl -X GET 'MEILISEARCH_URL/keys' \\\n-H 'Authorization: Bearer MASTER_KEY'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_ADMIN_API_KEY' \\\n --data-binary '{\n \"uid\": \"medical_records\",\n \"primaryKey\": \"id\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/medical_records/search' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{ \"q\": \"appointments\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/patient_medical_records/search' \\\n -H 'Authorization: Bearer API_KEY'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/keys/74c9c733-3368-4738-bbe5-1d18a5fecb37' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"description\": \"Default Search API Key\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/keys' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n --data-binary '{\n \"description\": \"Search patient records key\",\n \"actions\": [\"search\"],\n \"indexes\": [\"patient_medical_records\"],\n \"expiresAt\": \"2023-01-01T00:00:00Z\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys' \\\n -H 'Authorization: Bearer MASTER_KEY'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/keys/ac5cd97d-5a4b-4226-a868-2d0eb6d197ab' \\\n -H 'Authorization: Bearer MASTER_KEY'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"uid\": \"books\",\n \"primaryKey\": \"reference_number\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/documents?primaryKey=reference_number' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"reference_number\": 287947,\n \"title\": \"Diary of a Wimpy Kid\",\n \"author\": \"Jeff Kinney\",\n \"genres\": [\n \"comedy\",\n \"humor\"\n ],\n \"price\": 5.00\n }\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"primaryKey\": \"title\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/patient_medical_records/search' \\\n -H 'Authorization: Bearer TENANT_TOKEN'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"enabled\": false }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"disableOnAttributes\": [\"title\"] }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"disableOnWords\": [\n \"shrek\"\n ]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"minWordSizeForTypos\": {\n \"oneTypo\": 4,\n \"twoTypos\": 10\n }\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"disableOnNumbers\": true\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'http:///version' \\\n -H 'Authorization: Bearer API_KEY'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'http:///version' \\\n -H 'X-Meili-API-Key: API_KEY'" + }, + { + "lang": "cURL", + "source": "# whenever you see {index_uid}, replace it with your index's unique id\ncurl \\\n -X GET 'http:///indexes/{index_uid}/settings/displayed-attributes' \\\n -H 'X-Meili-API-Key: API_KEY'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'http:///indexes/{index_uid}/settings/displayed-attributes' \\\n -H 'X-Meili-API-Key: API_KEY'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'http:///dumps' \\\n -H 'Authorization: Bearer API_KEY'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"minWordSizeForTypos\": { \"oneTypo\": 4 }\n}'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/synonyms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"great\": [\"fantastic\"], \"fantastic\": [\"great\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/faceting' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxValuesPerFacet\": 2,\n \"sortFacetValuesBy\": {\n \"*\": \"count\"\n }\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/pagination' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxTotalHits\": 500\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"big fat liar\",\n \"matchingStrategy\": \"last\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"big fat liar\",\n \"matchingStrategy\": \"all\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"white shirt\",\n \"matchingStrategy\": \"frequency\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -x POST 'MEILISEARCH_URL/indexes/games/documents' \\\n -h 'content-type: application/json' \\\n --data-binary @games.json" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/games/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"release_timestamp\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/games/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"\",\n \"filter\": \"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/games/settings/sortable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"release_timestamp\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/games/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"\",\n \"sort\": [\"release_timestamp:desc\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks?statuses=failed'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks?statuses=failed,canceled'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks?indexUids=movies&types=documentAdditionOrUpdate,documentDeletion&statuses=processing'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/multi-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"federation\": {},\n \"queries\": [\n {\n \"indexUid\": \"movies\",\n \"q\": \"batman\"\n },\n {\n \"indexUid\": \"comics\",\n \"q\": \"batman\"\n }\n ]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"genres\", \"rating\", \"language\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"classic\",\n \"facets\": [\n \"genres\", \"rating\", \"language\"\n ]\n}'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movie_ratings/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"Batman\",\n \"facets\": [\"genres\", \"rating\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movie_ratings/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"genres\",\n \"director\",\n \"release_date\",\n \"ratings\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/faceting' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"sortFacetValuesBy\": {\n \"genres\": \"count\"\n }\n}'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"facetQuery\": \"c\",\n \"facetName\": \"genres\"\n}'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"dragon\",\n \"showRankingScore\": true\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"dragon\",\n \"showRankingScoreDetails\": true\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"adventure\",\n \"attributesToSearchOn\": [\"overview\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/searchable-attributes'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks/TASK_UID'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"-escape\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"-\\\"escape room\\\"\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'https://PROJECT_URL/events' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"eventType\": \"click\",\n \"eventName\": \"Search Result Clicked\",\n \"indexUid\": \"products\",\n \"userId\": \"SEARCH_USER_ID\",\n \"queryUid\": \"019a01b7-a1c2-7782-a410-bb1274c81393\",\n \"objectId\": \"0\",\n \"objectName\": \"DOCUMENT_DESCRIPTION\",\n \"position\": 0\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'https://PROJECT_URL/events' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"eventType\": \"conversion\",\n \"eventName\": \"Product Added To Cart\",\n \"indexUid\": \"products\",\n \"userId\": \"SEARCH_USER_ID\",\n \"objectId\": \"0\",\n \"objectName\": \"DOCUMENT_DESCRIPTION\",\n \"position\": 0\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n -H 'X-MS-USER-ID: MEILISEARCH_USER_ID' \\\n --data-binary '{}'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'https://PROJECT_URL/events' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n -H 'X-MS-USER-ID: SEARCH_USER_ID' \\\n --data-binary '{\n \"eventType\": \"click\",\n \"eventName\": \"Search Result Clicked\",\n \"indexUid\": \"products\",\n \"objectId\": \"0\",\n \"position\": 0\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'https://PROJECT_URL/events' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"eventType\": \"click\",\n \"userId\": \"SEARCH_USER_ID\",\n \"eventName\": \"Search Result Clicked\",\n \"indexUid\": \"products\",\n \"objectId\": \"0\",\n \"position\": 0\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"QUERY TERMS\",\n \"distinct\": \"ATTRIBUTE_A\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/products/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"product_id\",\n \"sku\",\n \"url\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/products/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"white shirt\",\n \"distinct\": \"sku\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n-X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n-H 'Content-Type: application/json' \\\n--data-binary '{\n \"q\": \"badman\",\n \"rankingScoreThreshold\": 0.2\n}'" + }, + { + "lang": "cURL", + "source": "curl \\\n-X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n-H 'Content-Type: application/json' \\\n--data-binary '{\n \"q\": \"QUERY TEXT IN JAPANESE\",\n \"locales\": [\"jpn\"]\n}'" + }, + { + "lang": "cURL", + "source": "curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'content-type: application/json' \\\n --data-binary '{\n \"q\": \"kitchen utensils\",\n \"hybrid\": {\n \"semanticRatio\": 0.9,\n \"embedder\": \"EMBEDDER_NAME\"\n }\n }'" + }, + { + "lang": "cURL", + "source": "curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'content-type: application/json' \\\n --data-binary '{\n \"vector\": [0, 1, 2],\n \"hybrid\": {\n \"embedder\": \"EMBEDDER_NAME\"\n }\n }'" + }, + { + "lang": "cURL", + "source": "curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'content-type: application/json' \\\n --data-binary '{\n \"q\": \"kitchen utensils\",\n \"retrieveVectors\": true,\n \"hybrid\": {\n \"embedder\": \"EMBEDDER_NAME\"\n }\n }'" + }, + { + "lang": "cURL", + "source": "curl -X PATCH 'MEILISEARCH_URL/indexes/movies/settings'\n -H 'Content-Type: application/json'\n -H 'Authorization: Bearer MEILISEARCH_API_KEY'\n --data-binary '{\n \"embedders\": {\n \"movies-text\": {\n \"source\": \"openAi\",\n \"apiKey\": \"OPENAI_API_KEY\",\n \"model\": \"text-embedding-3-small\",\n \"documentTemplate\": \"A movie titled '{{doc.title}}' released in {{ doc.release_date }}. The movie genres are: {{doc.genres}}. The story is about: {{doc.overview|truncatewords: 20}}\"\n }\n }\n }'" + }, + { + "lang": "cURL", + "source": "curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'content-type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"q\": \"batman\",\n \"hybrid\": {\n \"embedder\": \"EMBEDDER_NAME\"\n }\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/similar' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"id\": 192,\n \"embedder\": \"EMBEDDER_NAME\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_A' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"uid\": \"INDEX_B\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/multi-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"federation\": {},\n \"queries\": [\n {\n \"indexUid\": \"movies\",\n \"q\": \"batman\",\n \"federationOptions\": {\n \"remote\": \"ms-00\"\n }\n },\n {\n \"indexUid\": \"movies\",\n \"q\": \"batman\",\n \"federationOptions\": {\n \"remote\": \"ms-01\"\n }\n }\n ]" + }, + { + "lang": "cURL", + "source": "curl \\\n-X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n-H 'Content-Type: application/json' \\\n--data-binary '{\n \"hybrid\": {\n \"embedder\": \"EMBEDDER_NAME\"\n },\n \"media\": {\n \"FIELD_A\": \"VALUE_A\",\n \"FIELD_B\" : {\n \"FIELD_C\": \"VALUE_B\"\n \"FIELD_D\": \"VALUE_C\"\n }\n }\n}'" + } + ] + } + }, + "/webhooks": { + "get": { + "tags": [ + "Webhooks" + ], + "operationId": "get_webhooks", + "responses": { + "200": { + "description": "Webhooks are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookResults" + }, + "example": { + "results": [ + { + "uuid": "550e8400-e29b-41d4-a716-446655440000", + "url": "https://your.site/on-tasks-completed", + "headers": { + "Authorization": "Bearer a-secret-token" + }, + "isEditable": true + }, + { + "uuid": "550e8400-e29b-41d4-a716-446655440001", + "url": "https://another.site/on-tasks-completed", + "isEditable": true + } + ] + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "webhooks.get", + "webhooks.*", + "*.get", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.ListWebhooks();" + }, + { + "lang": "JS", + "source": "client.getWebhooks()" + }, + { + "lang": "Python", + "source": "client.get_webhooks()" + }, + { + "lang": "Rust", + "source": "let webhooks = client.get_webhooks().await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks'" + } + ] + }, + "post": { + "tags": [ + "Webhooks" + ], + "operationId": "post_webhook", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookSettings" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Webhook created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" + }, + "example": { + "uuid": "550e8400-e29b-41d4-a716-446655440000", + "url": "https://your.site/on-tasks-completed", + "headers": { + "Authorization": "Bearer a-secret-token" + }, + "isEditable": true + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "webhooks.create", + "webhooks.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.AddWebhook(&meilisearch.AddWebhookRequest{\n URL: \"WEBHOOK_TARGET_URL\",\n Headers: map[string]string{\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n },\n});" + }, + { + "lang": "JS", + "source": "client.createWebhook({\n url: 'WEBHOOK_TARGET_URL',\n headers: {\n authorization: 'SECURITY_KEY',\n referer: 'https://example.com'\n }\n})" + }, + { + "lang": "Python", + "source": "client.create_webhook({\n 'url': 'https://example.com/webhook',\n 'headers': {\"Authorization\":\"\", \"X-Custom-Header\":\"test\"},\n})" + }, + { + "lang": "Rust", + "source": "let mut payload = meilisearch_sdk::webhooks::WebhookCreate::new(\"WEBHOOK_TARGET_URL\");\npayload\n .insert_header(\"authorization\", \"SECURITY_KEY\")\n .insert_header(\"referer\", \"https://example.com\");\nlet webhook = client.create_webhook(&payload).await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/webhooks' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"WEBHOOK_TARGET_URL\",\n \"headers\": {\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n }\n }'" + } + ] + } + }, + "/webhooks/{uuid}": { + "get": { + "tags": [ + "Webhooks" + ], + "operationId": "get_webhook", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "The universally unique identifier of the webhook", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Webhook found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" + }, + "example": { + "uuid": "550e8400-e29b-41d4-a716-446655440000", + "url": "https://your.site/on-tasks-completed", + "headers": { + "Authorization": "Bearer a-secret" + }, + "isEditable": true + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + }, + "404": { + "description": "Webhook not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "webhooks.get", + "webhooks.*", + "*.get", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Webhooks" + ], + "operationId": "delete_webhook", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "The universally unique identifier of the webhook", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "Webhook deleted successfully" + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + }, + "404": { + "description": "Webhook not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "webhooks.delete", + "webhooks.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Webhooks" + ], + "operationId": "patch_webhook", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "The universally unique identifier of the webhook", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Webhook updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" + }, + "example": { + "uuid": "550e8400-e29b-41d4-a716-446655440000", + "url": "https://your.site/on-tasks-completed", + "headers": { + "Authorization": "Bearer a-secret-token" + }, + "isEditable": true + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "webhooks.update", + "webhooks.*", + "*" + ] + } + ] + } + } + }, + "components": { + "schemas": { + "Action": { + "type": "string", + "enum": [ + "*", + "search", + "documents.*", + "documents.add", + "documents.get", + "documents.delete", + "indexes.*", + "indexes.create", + "indexes.get", + "indexes.update", + "indexes.delete", + "indexes.swap", + "tasks.*", + "tasks.cancel", + "tasks.delete", + "tasks.get", + "settings.*", + "settings.get", + "settings.update", + "stats.*", + "stats.get", + "metrics.*", + "metrics.get", + "dumps.*", + "dumps.create", + "snapshots.*", + "snapshots.create", + "version", + "keys.create", + "keys.get", + "keys.update", + "keys.delete", + "experimental.get", + "experimental.update", + "export", + "network.get", + "network.update", + "chatCompletions", + "chats.*", + "chats.get", + "chats.delete", + "chatsSettings.*", + "chatsSettings.get", + "chatsSettings.update", + "*.get", + "webhooks.get", + "webhooks.update", + "webhooks.delete", + "webhooks.create", + "webhooks.*", + "indexes.compact" + ] + }, + "AllBatches": { + "type": "object", + "required": [ + "results", + "total", + "limit" + ], + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BatchView" + } + }, + "total": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + }, + "limit": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "from": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "minimum": 0 + }, + "next": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "minimum": 0 + } + } + }, + "AllTasks": { + "type": "object", + "required": [ + "results", + "total", + "limit" + ], + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskView" + }, + "description": "The list of tasks that matched the filter." + }, + "total": { + "type": "integer", + "format": "u-int64", + "description": "Total number of browsable results using offset/limit parameters for the given resource.", + "minimum": 0 + }, + "limit": { + "type": "integer", + "format": "u-int32", + "description": "Limit given for the query. If limit is not provided as a query parameter, this parameter displays the default limit value.", + "minimum": 0 + }, + "from": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "description": "The first task uid returned.", + "minimum": 0 + }, + "next": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "description": "Represents the value to send in from to fetch the next slice of the results. The first item for the next slice starts at this exact number. When the returned value is null, it means that all the data have been browsed in the given order.", + "minimum": 0 + } + } + }, + "AttributePatterns": { + "type": "object", + "required": [ + "patterns" + ], + "properties": { + "patterns": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "title", + "overview_*", + "release_date" + ] + } + } + }, + "BTreeMap": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "object", + "required": [ + "start", + "length" + ], + "properties": { + "start": { + "type": "integer", + "minimum": 0 + }, + "length": { + "type": "integer", + "minimum": 0 + }, + "indices": { + "type": [ + "array", + "null" + ], + "items": { + "type": "integer", + "minimum": 0 + } + } + } + } + }, + "propertyNames": { + "type": "string" + } + }, + "BatchStats": { + "type": "object", + "required": [ + "totalNbTasks", + "status", + "types", + "indexUids" + ], + "properties": { + "totalNbTasks": { + "$ref": "#/components/schemas/u32" + }, + "status": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "propertyNames": { + "type": "string", + "description": "The status of a task.", + "enum": [ + "enqueued", + "processing", + "succeeded", + "failed", + "canceled" + ], + "example": "processing" + } + }, + "types": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "propertyNames": { + "type": "string", + "description": "The type of the task.", + "enum": [ + "documentAdditionOrUpdate", + "documentEdition", + "documentDeletion", + "settingsUpdate", + "indexCreation", + "indexDeletion", + "indexUpdate", + "indexSwap", + "taskCancelation", + "taskDeletion", + "dumpCreation", + "snapshotCreation", + "export", + "upgradeDatabase", + "indexCompaction" + ], + "example": [ + "documentAdditionOrUpdate", + "documentEdition", + "documentDeletion", + "settingsUpdate", + "indexCreation", + "indexDeletion", + "indexUpdate", + "indexSwap", + "taskCancelation", + "taskDeletion", + "dumpCreation", + "snapshotCreation", + "export", + "upgradeDatabase", + "indexCompaction" + ] + } + }, + "indexUids": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "propertyNames": { + "type": "string" + } + }, + "progressTrace": { + "type": "object", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "writeChannelCongestion": { + "type": [ + "object", + "null" + ], + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "internalDatabaseSizes": { + "type": "object", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + } + } + }, + "BatchStatsView": { + "allOf": [ + { + "$ref": "#/components/schemas/BatchStats" + }, + { + "type": "object", + "properties": { + "embedderRequests": { + "$ref": "#/components/schemas/EmbedderStatsView" + } + } + } + ] + }, + "BatchView": { + "type": "object", + "required": [ + "uid", + "details", + "stats" + ], + "properties": { + "uid": { + "$ref": "#/components/schemas/u32" + }, + "progress": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ProgressView" + } + ] + }, + "details": { + "$ref": "#/components/schemas/DetailsView" + }, + "stats": { + "$ref": "#/components/schemas/BatchStatsView" + }, + "duration": { + "type": [ + "string", + "null" + ] + }, + "startedAt": { + "type": "string", + "format": "date-time" + }, + "finishedAt": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "batchStrategy": { + "type": "string" + } + } + }, + "BrowseQuery": { + "type": "object", + "required": [ + "offset", + "limit", + "retrieveVectors" + ], + "properties": { + "offset": { + "type": "integer", + "example": 150, + "minimum": 0 + }, + "limit": { + "type": "integer", + "default": 20, + "example": 1, + "minimum": 0 + }, + "fields": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "example": [ + "title, description" + ] + }, + "retrieveVectors": { + "type": "boolean", + "example": true + }, + "ids": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "example": [ + "cody", + "finn", + "brandy", + "gambit" + ] + }, + "filter": {}, + "sort": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "example": [ + "title:asc", + "rating:desc" + ] + } + } + }, + "ChatSearchParams": { + "type": "object", + "properties": { + "hybrid": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/HybridQuery" + } + ] + }, + "limit": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "sort": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "distinct": { + "type": [ + "string", + "null" + ] + }, + "matchingStrategy": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/MatchingStrategy" + } + ] + }, + "attributesToSearchOn": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "rankingScoreThreshold": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/RankingScoreThreshold" + } + ] + } + }, + "additionalProperties": false + }, + "ChatSettings": { + "type": "object", + "properties": { + "description": { + "type": [ + "string", + "null" + ] + }, + "documentTemplate": { + "type": [ + "string", + "null" + ], + "description": "A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text." + }, + "documentTemplateMaxBytes": { + "type": [ + "integer", + "null" + ], + "description": "Rendered texts are truncated to this size. Defaults to 400.", + "minimum": 0 + }, + "searchParameters": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ChatSearchParams", + "description": "The search parameters to use for the LLM." + } + ] + } + }, + "additionalProperties": false + }, + "Code": { + "type": "string", + "enum": [ + "api_key_already_exists", + "api_key_not_found", + "bad_parameter", + "bad_request", + "database_size_limit_reached", + "document_not_found", + "dump_already_processing", + "dump_not_found", + "dump_process_failed", + "duplicate_index_found", + "immutable_api_key_actions", + "immutable_api_key_created_at", + "immutable_api_key_expires_at", + "immutable_api_key_indexes", + "immutable_api_key_key", + "immutable_api_key_uid", + "immutable_api_key_updated_at", + "immutable_index_created_at", + "immutable_index_updated_at", + "index_already_exists", + "index_creation_failed", + "index_not_found", + "index_primary_key_already_exists", + "index_primary_key_multiple_candidates_found", + "index_primary_key_no_candidate_found", + "internal", + "invalid_api_key", + "invalid_api_key_actions", + "invalid_api_key_description", + "invalid_api_key_expires_at", + "invalid_api_key_indexes", + "invalid_api_key_limit", + "invalid_api_key_name", + "invalid_api_key_offset", + "invalid_api_key_uid", + "invalid_content_type", + "invalid_document_csv_delimiter", + "invalid_document_fields", + "invalid_document_retrieve_vectors", + "missing_document_filter", + "missing_document_edition_function", + "inconsistent_document_change_headers", + "invalid_document_filter", + "invalid_document_sort", + "invalid_document_geo_field", + "invalid_document_geojson_field", + "invalid_header_value", + "invalid_vector_dimensions", + "invalid_vectors_type", + "invalid_document_id", + "invalid_document_ids", + "invalid_document_limit", + "invalid_document_offset", + "invalid_search_embedder", + "invalid_similar_embedder", + "invalid_search_hybrid_query", + "invalid_index_limit", + "invalid_index_offset", + "invalid_index_primary_key", + "invalid_index_custom_metadata", + "invalid_index_uid", + "invalid_multi_search_facets", + "invalid_multi_search_facets_by_index", + "invalid_multi_search_facet_order", + "invalid_multi_search_query_personalization", + "invalid_multi_search_federated", + "invalid_multi_search_federation_options", + "invalid_multi_search_max_values_per_facet", + "invalid_multi_search_merge_facets", + "invalid_multi_search_query_facets", + "invalid_multi_search_query_pagination", + "invalid_multi_search_query_ranking_rules", + "invalid_multi_search_query_position", + "invalid_multi_search_remote", + "invalid_multi_search_weight", + "invalid_network_remotes", + "invalid_network_self", + "invalid_network_sharding", + "invalid_network_search_api_key", + "invalid_network_write_api_key", + "invalid_network_url", + "invalid_search_attributes_to_search_on", + "invalid_search_attributes_to_crop", + "invalid_search_attributes_to_highlight", + "invalid_similar_attributes_to_retrieve", + "invalid_similar_retrieve_vectors", + "invalid_search_attributes_to_retrieve", + "invalid_search_ranking_score_threshold", + "invalid_similar_ranking_score_threshold", + "invalid_search_retrieve_vectors", + "invalid_search_crop_length", + "invalid_search_crop_marker", + "invalid_search_facets", + "invalid_search_semantic_ratio", + "invalid_search_locales", + "invalid_facet_search_exhaustive_facet_count", + "invalid_facet_search_facet_name", + "invalid_similar_id", + "invalid_search_filter", + "invalid_similar_filter", + "invalid_search_highlight_post_tag", + "invalid_search_highlight_pre_tag", + "invalid_search_hits_per_page", + "invalid_similar_limit", + "invalid_search_limit", + "invalid_search_matching_strategy", + "invalid_similar_offset", + "invalid_search_offset", + "invalid_search_page", + "invalid_search_q", + "invalid_facet_search_query", + "invalid_facet_search_name", + "facet_search_disabled", + "invalid_search_vector", + "invalid_search_media", + "invalid_search_show_matches_position", + "invalid_search_show_ranking_score", + "invalid_similar_show_ranking_score", + "invalid_search_show_ranking_score_details", + "invalid_similar_show_ranking_score_details", + "invalid_search_sort", + "invalid_search_distinct", + "invalid_search_personalize", + "invalid_search_personalize_user_context", + "invalid_search_media_and_vector", + "invalid_settings_displayed_attributes", + "invalid_settings_distinct_attribute", + "invalid_settings_proximity_precision", + "invalid_settings_facet_search", + "invalid_settings_prefix_search", + "invalid_settings_faceting", + "invalid_settings_filterable_attributes", + "invalid_settings_pagination", + "invalid_settings_search_cutoff_ms", + "invalid_settings_embedders", + "invalid_settings_ranking_rules", + "invalid_settings_searchable_attributes", + "invalid_settings_sortable_attributes", + "invalid_settings_stop_words", + "invalid_settings_non_separator_tokens", + "invalid_settings_separator_tokens", + "invalid_settings_dictionary", + "invalid_settings_synonyms", + "invalid_settings_typo_tolerance", + "invalid_settings_localized_attributes", + "invalid_state", + "invalid_store_file", + "invalid_swap_duplicate_index_found", + "invalid_swap_indexes", + "invalid_swap_rename", + "invalid_task_after_enqueued_at", + "invalid_task_after_finished_at", + "invalid_task_after_started_at", + "invalid_task_before_enqueued_at", + "invalid_task_before_finished_at", + "invalid_task_before_started_at", + "invalid_task_canceled_by", + "invalid_task_from", + "invalid_task_limit", + "invalid_task_reverse", + "invalid_task_statuses", + "invalid_task_types", + "invalid_task_uids", + "invalid_batch_uids", + "io_error", + "feature_not_enabled", + "malformed_payload", + "max_fields_limit_exceeded", + "missing_api_key_actions", + "missing_api_key_expires_at", + "missing_api_key_indexes", + "missing_authorization_header", + "missing_content_type", + "missing_document_id", + "missing_facet_search_facet_name", + "missing_index_uid", + "missing_master_key", + "missing_network_url", + "missing_payload", + "missing_search_hybrid", + "missing_swap_indexes", + "missing_task_filters", + "no_space_left_on_device", + "payload_too_large", + "remote_bad_response", + "remote_bad_request", + "remote_could_not_send_request", + "remote_invalid_api_key", + "remote_remote_error", + "remote_timeout", + "too_many_search_requests", + "task_not_found", + "task_file_not_found", + "batch_not_found", + "too_many_open_files", + "too_many_vectors", + "unretrievable_document", + "unretrievable_error_code", + "unsupported_media_type", + "invalid_s3_snapshot_request", + "invalid_s3_snapshot_parameters", + "s3_snapshot_server_error", + "vector_embedding_error", + "not_found_similar_id", + "invalid_document_edition_context", + "invalid_document_edition_function_filter", + "edit_documents_by_function_error", + "invalid_settings_index_chat", + "invalid_settings_vector_store", + "invalid_export_url", + "invalid_export_api_key", + "invalid_export_payload_size", + "invalid_export_indexes_patterns", + "invalid_export_index_filter", + "invalid_export_index_override_settings", + "unimplemented_external_function_calling", + "unimplemented_non_streaming_chat_completions", + "unimplemented_multi_choice_chat_completions", + "chat_not_found", + "invalid_chat_setting_document_template", + "invalid_chat_completion_org_id", + "invalid_chat_completion_project_id", + "invalid_chat_completion_api_version", + "invalid_chat_completion_deployment_id", + "invalid_chat_completion_source", + "invalid_chat_completion_base_api", + "invalid_chat_completion_api_key", + "invalid_chat_completion_prompts", + "invalid_chat_completion_system_prompt", + "invalid_chat_completion_search_description_prompt", + "invalid_chat_completion_search_query_param_prompt", + "invalid_chat_completion_search_filter_param_prompt", + "invalid_chat_completion_search_index_uid_param_prompt", + "invalid_chat_completion_pre_query_prompt", + "requires_enterprise_edition", + "invalid_webhooks", + "invalid_webhook_url", + "invalid_webhook_headers", + "immutable_webhook", + "invalid_webhook_uuid", + "webhook_not_found", + "immutable_webhook_uuid", + "immutable_webhook_is_editable" + ] + }, + "ComputedFacets": { + "type": "object", + "required": [ + "distribution", + "stats" + ], + "properties": { + "distribution": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + }, + "propertyNames": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + } + }, + "stats": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FacetStats" + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "CreateApiKey": { + "type": "object", + "required": [ + "uid", + "actions", + "indexes" + ], + "properties": { + "description": { + "type": [ + "string", + "null" + ], + "description": "A description for the key. `null` if empty.", + "example": null + }, + "name": { + "type": [ + "string", + "null" + ], + "description": "A human-readable name for the key. `null` if empty.", + "example": "Indexing Products API key" + }, + "uid": { + "type": "string", + "format": "uuid", + "description": "A uuid v4 to identify the API Key. If not specified, it's generated by Meilisearch.", + "example": null + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Action" + }, + "description": "A list of actions permitted for the key. `[\"*\"]` for all actions. The `*` character can be used as a wildcard when located at the last position. e.g. `documents.*` to authorize access on all documents endpoints.", + "example": [ + "documents.add" + ] + }, + "indexes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of accessible indexes permitted for the key. `[\"*\"]` for all indexes. The `*` character can be used as a wildcard when located at the last position. e.g. `products_*` to allow access to all indexes whose names start with `products_`.", + "example": [ + "products" + ] + }, + "expiresAt": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "Represent the expiration date and time as RFC 3339 format. `null` equals to no expiration time." + } + } + }, + "DetailsExportIndexSettings": { + "allOf": [ + { + "$ref": "#/components/schemas/ExportIndexSettings" + }, + { + "type": "object", + "properties": { + "matchedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "minimum": 0 + } + } + } + ] + }, + "DetailsView": { + "allOf": [ + { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/Settings_Unchecked", + "description": "[Learn more about the settings in this guide](https://www.meilisearch.com/docs/reference/api/settings)." + } + ] + }, + { + "type": "object", + "properties": { + "receivedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of documents received for documentAdditionOrUpdate task.", + "minimum": 0 + }, + "indexedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of documents finally indexed for documentAdditionOrUpdate task or a documentAdditionOrUpdate batch of tasks.", + "minimum": 0 + }, + "editedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of documents edited for editDocumentByFunction task.", + "minimum": 0 + }, + "primaryKey": { + "type": [ + "string", + "null" + ], + "description": "Value for the primaryKey field encountered if any for indexCreation or indexUpdate task." + }, + "providedIds": { + "type": [ + "integer", + "null" + ], + "description": "Number of provided document ids for the documentDeletion task.", + "minimum": 0 + }, + "deletedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of documents finally deleted for documentDeletion and indexDeletion tasks.", + "minimum": 0 + }, + "matchedTasks": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of tasks that match the request for taskCancelation or taskDeletion tasks.", + "minimum": 0 + }, + "canceledTasks": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of tasks canceled for taskCancelation.", + "minimum": 0 + }, + "deletedTasks": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of tasks deleted for taskDeletion.", + "minimum": 0 + }, + "originalFilter": { + "type": [ + "string", + "null" + ], + "description": "Original filter query for taskCancelation or taskDeletion tasks." + }, + "dumpUid": { + "type": [ + "string", + "null" + ], + "description": "Identifier generated for the dump for dumpCreation task." + }, + "context": { + "type": [ + "object", + "null" + ] + }, + "function": { + "type": [ + "string", + "null" + ] + }, + "swaps": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/IndexSwap" + } + }, + "upgradeFrom": { + "type": [ + "string", + "null" + ] + }, + "upgradeTo": { + "type": [ + "string", + "null" + ] + }, + "url": { + "type": [ + "string", + "null" + ] + }, + "apiKey": { + "type": [ + "string", + "null" + ] + }, + "payloadSize": { + "type": [ + "string", + "null" + ] + }, + "indexes": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/DetailsExportIndexSettings" + }, + "propertyNames": { + "type": "string" + } + }, + "oldIndexUid": { + "type": [ + "string", + "null" + ] + }, + "newIndexUid": { + "type": [ + "string", + "null" + ] + }, + "preCompactionSize": { + "type": [ + "string", + "null" + ] + }, + "postCompactionSize": { + "type": [ + "string", + "null" + ] + } + } + } + ] + }, + "DistributionShift": { + "type": "object", + "description": "Describes the mean and sigma of distribution of embedding similarity in the embedding space.\n\nThe intended use is to make the similarity score more comparable to the regular ranking score.\nThis allows to correct effects where results are too \"packed\" around a certain value.", + "required": [ + "current_mean", + "current_sigma" + ], + "properties": { + "current_mean": { + "type": "number", + "format": "float", + "description": "Value where the results are \"packed\".\n\nSimilarity scores are translated so that they are packed around 0.5 instead" + }, + "current_sigma": { + "type": "number", + "format": "float", + "description": "standard deviation of a similarity score.\n\nSet below 0.4 to make the results less packed around the mean, and above 0.4 to make them more packed." + } + } + }, + "DocumentDeletionByFilter": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": {} + } + }, + "DocumentEditionByFunction": { + "type": "object", + "required": [ + "function" + ], + "properties": { + "filter": { + "description": "A string containing a RHAI function." + }, + "context": { + "description": "A string containing a filter expression." + }, + "function": { + "type": "string", + "description": "An object with data Meilisearch should make available for the editing function." + } + } + }, + "EmbedderSource": { + "type": "string", + "enum": [ + "openAi", + "huggingFace", + "ollama", + "userProvided", + "rest", + "composite" + ] + }, + "EmbedderStatsView": { + "type": "object", + "required": [ + "total", + "failed" + ], + "properties": { + "total": { + "type": "integer", + "minimum": 0 + }, + "failed": { + "type": "integer", + "minimum": 0 + }, + "lastError": { + "type": [ + "string", + "null" + ] + } + } + }, + "ErrorType": { + "type": "string", + "enum": [ + "internal", + "invalid_request", + "auth", + "system" + ] + }, + "Export": { + "type": "object", + "properties": { + "url": { + "type": [ + "string", + "null" + ], + "example": "https://ms-1234.heaven.meilisearch.com" + }, + "apiKey": { + "type": [ + "string", + "null" + ], + "example": "1234abcd" + }, + "payloadSize": { + "type": [ + "string", + "null" + ], + "example": "24MiB" + }, + "indexes": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/ExportIndexSettings" + }, + "propertyNames": { + "type": "string" + }, + "example": { + "*": { + "filter": null + } + } + } + } + }, + "ExportIndexSettings": { + "type": "object", + "properties": { + "filter": { + "type": [ + "string", + "null" + ], + "example": "genres = action" + }, + "overrideSettings": { + "type": [ + "boolean", + "null" + ], + "example": true + } + } + }, + "FacetSearchQuery": { + "type": "object", + "required": [ + "facet_name", + "matching_strategy" + ], + "properties": { + "facet_query": { + "type": [ + "string", + "null" + ] + }, + "facet_name": { + "type": "string" + }, + "q": { + "type": [ + "string", + "null" + ] + }, + "vector": { + "type": [ + "array", + "null" + ], + "items": { + "type": "number", + "format": "float" + } + }, + "media": {}, + "hybrid": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/HybridQuery" + } + ] + }, + "filter": {}, + "matching_strategy": { + "$ref": "#/components/schemas/MatchingStrategy" + }, + "attributes_to_search_on": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "ranking_score_threshold": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/RankingScoreThreshold" + } + ] + }, + "locales": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/Locale" + } + }, + "exhaustive_facet_count": { + "type": [ + "boolean", + "null" + ] + } + } + }, + "FacetStats": { + "type": "object", + "required": [ + "min", + "max" + ], + "properties": { + "min": { + "type": "number", + "format": "double" + }, + "max": { + "type": "number", + "format": "double" + } + } + }, + "FacetValuesSort": { + "type": "string", + "enum": [ + "alpha", + "count" + ] + }, + "FacetingSettings": { + "type": "object", + "properties": { + "maxValuesPerFacet": { + "type": [ + "integer", + "null" + ], + "example": 10, + "minimum": 0 + }, + "sortFacetValuesBy": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/FacetValuesSort" + }, + "propertyNames": { + "type": "string" + }, + "example": { + "genre": "count" + } + } + }, + "additionalProperties": false + }, + "FederatedFacets": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ComputedFacets" + }, + "propertyNames": { + "type": "string" + } + }, + "FederatedSearch": { + "type": "object", + "required": [ + "queries" + ], + "properties": { + "queries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchQueryWithIndex" + } + }, + "federation": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/Federation" + } + ] + } + } + }, + "FederatedSearchResult": { + "allOf": [ + { + "$ref": "#/components/schemas/HitsInfo" + }, + { + "type": "object", + "required": [ + "hits", + "processingTimeMs" + ], + "properties": { + "hits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchHit" + } + }, + "processingTimeMs": { + "type": "integer", + "minimum": 0 + }, + "queryVectors": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/Vec" + }, + "propertyNames": { + "type": "integer", + "minimum": 0 + } + }, + "semanticHitCount": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "minimum": 0 + }, + "facetDistribution": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + }, + "propertyNames": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + } + }, + "facetStats": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/FacetStats" + }, + "propertyNames": { + "type": "string" + } + }, + "facetsByIndex": { + "$ref": "#/components/schemas/FederatedFacets" + }, + "requestUid": { + "type": [ + "string", + "null" + ], + "format": "uuid" + }, + "metadata": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/SearchMetadata" + } + }, + "remoteErrors": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/ResponseError" + }, + "propertyNames": { + "type": "string" + } + } + } + } + ] + }, + "Federation": { + "type": "object", + "required": [ + "limit", + "offset", + "facetsByIndex" + ], + "properties": { + "limit": { + "type": "integer", + "minimum": 0 + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "facetsByIndex": { + "type": "object", + "additionalProperties": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string", + "description": "An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long", + "example": "movies" + } + }, + "mergeFacets": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/MergeFacets" + } + ] + } + } + }, + "FederationOptions": { + "type": "object", + "required": [ + "weight" + ], + "properties": { + "weight": { + "type": "number", + "format": "double" + }, + "remote": { + "type": [ + "string", + "null" + ] + }, + "queryPosition": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + } + } + }, + "FilterFeatures": { + "type": "object", + "properties": { + "equality": { + "type": "boolean" + }, + "comparison": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "FilterableAttributesFeatures": { + "type": "object", + "properties": { + "facetSearch": { + "type": "boolean" + }, + "filter": { + "$ref": "#/components/schemas/FilterFeatures" + } + }, + "additionalProperties": false + }, + "FilterableAttributesPatterns": { + "type": "object", + "required": [ + "attributePatterns" + ], + "properties": { + "attributePatterns": { + "$ref": "#/components/schemas/AttributePatterns" + }, + "features": { + "$ref": "#/components/schemas/FilterableAttributesFeatures" + } + }, + "additionalProperties": false + }, + "FilterableAttributesRule": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/FilterableAttributesPatterns" + } + ] + }, + "GetLogs": { + "type": "object", + "required": [ + "target", + "mode", + "profileMemory" + ], + "properties": { + "target": { + "type": "string", + "description": "Lets you specify which parts of the code you want to inspect and is formatted like that: code_part=log_level,code_part=log_level\n- If the `code_part` is missing, then the `log_level` will be applied to everything.\n- If the `log_level` is missing, then the `code_part` will be selected in `info` log level.", + "default": "info", + "example": "milli=trace,index_scheduler,actix_web=off" + }, + "mode": { + "oneOf": [ + { + "$ref": "#/components/schemas/LogMode", + "description": "Lets you customize the format of the logs." + } + ], + "default": "Human" + }, + "profileMemory": { + "type": "boolean", + "description": "A boolean to indicate if you want to profile the memory as well. This is only useful while using the `profile` mode.\nBe cautious, though; it slows down the engine a lot.", + "default": false + } + } + }, + "HealthResponse": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/HealthStatus", + "description": "The status of the instance." + } + } + }, + "HealthStatus": { + "type": "string", + "enum": [ + "available" + ] + }, + "HitsInfo": { + "oneOf": [ + { + "type": "object", + "required": [ + "hitsPerPage", + "page", + "totalPages", + "totalHits" + ], + "properties": { + "hitsPerPage": { + "type": "integer", + "minimum": 0 + }, + "page": { + "type": "integer", + "minimum": 0 + }, + "totalPages": { + "type": "integer", + "minimum": 0 + }, + "totalHits": { + "type": "integer", + "minimum": 0 + } + } + }, + { + "type": "object", + "required": [ + "limit", + "offset", + "estimatedTotalHits" + ], + "properties": { + "limit": { + "type": "integer", + "minimum": 0 + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "estimatedTotalHits": { + "type": "integer", + "minimum": 0 + } + } + } + ] + }, + "HybridQuery": { + "type": "object", + "required": [ + "embedder" + ], + "properties": { + "semanticRatio": { + "type": "number", + "format": "float" + }, + "embedder": { + "type": "string" + } + } + }, + "IndexCreateRequest": { + "type": "object", + "required": [ + "uid" + ], + "properties": { + "uid": { + "$ref": "#/components/schemas/IndexUid", + "description": "The name of the index" + }, + "primaryKey": { + "type": [ + "string", + "null" + ], + "description": "The primary key of the index", + "example": "id" + } + } + }, + "IndexStats": { + "type": "object", + "description": "Stats of an `Index`, as known to the `stats` route.", + "required": [ + "numberOfDocuments", + "rawDocumentDbSize", + "avgDocumentSize", + "isIndexing", + "fieldDistribution" + ], + "properties": { + "numberOfDocuments": { + "type": "integer", + "format": "u-int64", + "description": "Number of documents in the index", + "minimum": 0 + }, + "rawDocumentDbSize": { + "type": "integer", + "format": "u-int64", + "description": "Size of the documents database, in bytes.", + "minimum": 0 + }, + "avgDocumentSize": { + "type": "integer", + "format": "u-int64", + "description": "Average size of a document in the documents database.", + "minimum": 0 + }, + "isIndexing": { + "type": "boolean", + "description": "Whether or not the index is currently ingesting document" + }, + "numberOfEmbeddings": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of embeddings in the index", + "minimum": 0 + }, + "numberOfEmbeddedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of embedded documents in the index", + "minimum": 0 + }, + "fieldDistribution": { + "type": "object", + "description": "Association of every field name with the number of times it occurs in the documents.", + "additionalProperties": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "IndexSwap": { + "type": "object", + "required": [ + "indexes" + ], + "properties": { + "indexes": { + "type": "array", + "items": false, + "prefixItems": [ + { + "type": "string" + }, + { + "type": "string" + } + ] + }, + "rename": { + "type": "boolean" + } + } + }, + "IndexUid": { + "type": "string", + "description": "An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long", + "example": "movies" + }, + "IndexView": { + "type": "object", + "required": [ + "uid", + "createdAt", + "updatedAt" + ], + "properties": { + "uid": { + "type": "string", + "description": "Unique identifier for the index" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "An `RFC 3339` format for date/time/duration." + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "An `RFC 3339` format for date/time/duration." + }, + "primaryKey": { + "type": [ + "string", + "null" + ], + "description": "Custom primaryKey for documents" + } + } + }, + "KeyView": { + "type": "object", + "required": [ + "key", + "uid", + "actions", + "indexes", + "createdAt", + "updatedAt" + ], + "properties": { + "name": { + "type": [ + "string", + "null" + ], + "description": "The name of the API Key if any" + }, + "description": { + "type": [ + "string", + "null" + ], + "description": "The description of the API Key if any" + }, + "key": { + "type": "string", + "description": "The actual API Key you can send to Meilisearch" + }, + "uid": { + "type": "string", + "format": "uuid", + "description": "The `Uuid` specified while creating the key or autogenerated by Meilisearch." + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Action" + }, + "description": "The actions accessible with this key." + }, + "indexes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The indexes accessible with this key." + }, + "expiresAt": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "The expiration date of the key. Once this timestamp is exceeded the key is not deleted but cannot be used anymore." + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The date of creation of this API Key.", + "readOnly": true + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "The date of the last update made on this key.", + "readOnly": true + } + } + }, + "Kind": { + "type": "string", + "description": "The type of the task.", + "enum": [ + "documentAdditionOrUpdate", + "documentEdition", + "documentDeletion", + "settingsUpdate", + "indexCreation", + "indexDeletion", + "indexUpdate", + "indexSwap", + "taskCancelation", + "taskDeletion", + "dumpCreation", + "snapshotCreation", + "export", + "upgradeDatabase", + "indexCompaction" + ], + "example": [ + "documentAdditionOrUpdate", + "documentEdition", + "documentDeletion", + "settingsUpdate", + "indexCreation", + "indexDeletion", + "indexUpdate", + "indexSwap", + "taskCancelation", + "taskDeletion", + "dumpCreation", + "snapshotCreation", + "export", + "upgradeDatabase", + "indexCompaction" + ] + }, + "Locale": { + "type": "string", + "enum": [ + "af", + "ak", + "am", + "ar", + "az", + "be", + "bn", + "bg", + "ca", + "cs", + "da", + "de", + "el", + "en", + "eo", + "et", + "fi", + "fr", + "gu", + "he", + "hi", + "hr", + "hu", + "hy", + "id", + "it", + "jv", + "ja", + "kn", + "ka", + "km", + "ko", + "la", + "lv", + "lt", + "ml", + "mr", + "mk", + "my", + "ne", + "nl", + "nb", + "or", + "pa", + "fa", + "pl", + "pt", + "ro", + "ru", + "si", + "sk", + "sl", + "sn", + "es", + "sr", + "sv", + "ta", + "te", + "tl", + "th", + "tk", + "tr", + "uk", + "ur", + "uz", + "vi", + "yi", + "zh", + "zu", + "afr", + "aka", + "amh", + "ara", + "aze", + "bel", + "ben", + "bul", + "cat", + "ces", + "dan", + "deu", + "ell", + "eng", + "epo", + "est", + "fin", + "fra", + "guj", + "heb", + "hin", + "hrv", + "hun", + "hye", + "ind", + "ita", + "jav", + "jpn", + "kan", + "kat", + "khm", + "kor", + "lat", + "lav", + "lit", + "mal", + "mar", + "mkd", + "mya", + "nep", + "nld", + "nob", + "ori", + "pan", + "pes", + "pol", + "por", + "ron", + "rus", + "sin", + "slk", + "slv", + "sna", + "spa", + "srp", + "swe", + "tam", + "tel", + "tgl", + "tha", + "tuk", + "tur", + "ukr", + "urd", + "uzb", + "vie", + "yid", + "zho", + "zul", + "cmn" + ] + }, + "LocalizedAttributesRuleView": { + "type": "object", + "required": [ + "attributePatterns", + "locales" + ], + "properties": { + "attributePatterns": { + "$ref": "#/components/schemas/AttributePatterns" + }, + "locales": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Locale" + } + } + } + }, + "LogMode": { + "type": "string", + "enum": [ + "human", + "json", + "profile" + ] + }, + "MatchingStrategy": { + "type": "string", + "description": "This is unfortunately a duplication of the struct in .\nThe reason why it is duplicated is because milli cannot depend on meilisearch. It would be cyclic imports.", + "enum": [ + "last", + "all", + "frequency" + ] + }, + "MergeFacets": { + "type": "object", + "properties": { + "maxValuesPerFacet": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + } + } + }, + "MinWordSizeTyposSetting": { + "type": "object", + "properties": { + "oneTypo": { + "type": [ + "integer", + "null" + ], + "format": "u-int8", + "example": 5, + "minimum": 0 + }, + "twoTypos": { + "type": [ + "integer", + "null" + ], + "format": "u-int8", + "example": 9, + "minimum": 0 + } + }, + "additionalProperties": false + }, + "Network": { + "type": "object", + "properties": { + "remotes": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/Remote" + }, + "propertyNames": { + "type": "string" + }, + "example": "http://localhost:7700" + }, + "self": { + "type": [ + "string", + "null" + ], + "example": "ms-00" + }, + "sharding": { + "type": [ + "boolean", + "null" + ], + "example": true + } + } + }, + "Origin": { + "type": "object", + "required": [ + "remoteName", + "taskUid" + ], + "properties": { + "remoteName": { + "type": "string" + }, + "taskUid": { + "type": "integer", + "minimum": 0 + } + } + }, + "OverridePooling": { + "type": "string", + "enum": [ + "useModel", + "forceCls", + "forceMean" + ] + }, + "PaginationSettings": { + "type": "object", + "properties": { + "maxTotalHits": { + "type": [ + "integer", + "null" + ], + "example": 250, + "minimum": 0 + } + }, + "additionalProperties": false + }, + "PaginationView_IndexView": { + "type": "object", + "required": [ + "results", + "offset", + "limit", + "total" + ], + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "createdAt", + "updatedAt" + ], + "properties": { + "uid": { + "type": "string", + "description": "Unique identifier for the index" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "An `RFC 3339` format for date/time/duration." + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "An `RFC 3339` format for date/time/duration." + }, + "primaryKey": { + "type": [ + "string", + "null" + ], + "description": "Custom primaryKey for documents" + } + } + } + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 0 + }, + "total": { + "type": "integer", + "minimum": 0 + } + } + }, + "PaginationView_KeyView": { + "type": "object", + "required": [ + "results", + "offset", + "limit", + "total" + ], + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "uid", + "actions", + "indexes", + "createdAt", + "updatedAt" + ], + "properties": { + "name": { + "type": [ + "string", + "null" + ], + "description": "The name of the API Key if any" + }, + "description": { + "type": [ + "string", + "null" + ], + "description": "The description of the API Key if any" + }, + "key": { + "type": "string", + "description": "The actual API Key you can send to Meilisearch" + }, + "uid": { + "type": "string", + "format": "uuid", + "description": "The `Uuid` specified while creating the key or autogenerated by Meilisearch." + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Action" + }, + "description": "The actions accessible with this key." + }, + "indexes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The indexes accessible with this key." + }, + "expiresAt": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "The expiration date of the key. Once this timestamp is exceeded the key is not deleted but cannot be used anymore." + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The date of creation of this API Key.", + "readOnly": true + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "The date of the last update made on this key.", + "readOnly": true + } + } + } + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 0 + }, + "total": { + "type": "integer", + "minimum": 0 + } + } + }, + "PaginationView_Value": { + "type": "object", + "required": [ + "results", + "offset", + "limit", + "total" + ], + "properties": { + "results": { + "type": "array", + "items": {} + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 0 + }, + "total": { + "type": "integer", + "minimum": 0 + } + } + }, + "PatchApiKey": { + "type": "object", + "properties": { + "description": { + "type": [ + "string", + "null" + ], + "example": "This key is used to update documents in the products index" + }, + "name": { + "type": [ + "string", + "null" + ], + "example": "Indexing Products API key" + } + } + }, + "Personalize": { + "type": "object", + "required": [ + "user_context" + ], + "properties": { + "user_context": { + "type": "string" + } + } + }, + "PrefixSearchSettings": { + "type": "string", + "enum": [ + "indexingTime", + "disabled" + ] + }, + "ProgressStepView": { + "type": "object", + "required": [ + "currentStep", + "finished", + "total" + ], + "properties": { + "currentStep": { + "type": "string" + }, + "finished": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "total": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + } + }, + "ProgressView": { + "type": "object", + "required": [ + "steps", + "percentage" + ], + "properties": { + "steps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProgressStepView" + } + }, + "percentage": { + "type": "number", + "format": "float" + } + } + }, + "ProximityPrecisionView": { + "type": "string", + "enum": [ + "byWord", + "byAttribute" + ] + }, + "RankingRuleView": { + "oneOf": [ + { + "type": "string", + "description": "Sorted by decreasing number of matched query terms.\nQuery words at the front of an attribute is considered better than if it was at the back.", + "enum": [ + "Words" + ] + }, + { + "type": "string", + "description": "Sorted by increasing number of typos.", + "enum": [ + "Typo" + ] + }, + { + "type": "string", + "description": "Sorted by increasing distance between matched query terms.", + "enum": [ + "Proximity" + ] + }, + { + "type": "string", + "description": "Documents with quey words contained in more important\nattributes are considered better.", + "enum": [ + "Attribute" + ] + }, + { + "type": "string", + "description": "Dynamically sort at query time the documents. None, one or multiple Asc/Desc sortable\nattributes can be used in place of this criterion at query time.", + "enum": [ + "Sort" + ] + }, + { + "type": "string", + "description": "Sorted by the similarity of the matched words with the query words.", + "enum": [ + "Exactness" + ] + }, + { + "type": "object", + "description": "Sorted by the increasing value of the field specified.", + "required": [ + "Asc" + ], + "properties": { + "Asc": { + "type": "string", + "description": "Sorted by the increasing value of the field specified." + } + } + }, + { + "type": "object", + "description": "Sorted by the decreasing value of the field specified.", + "required": [ + "Desc" + ], + "properties": { + "Desc": { + "type": "string", + "description": "Sorted by the decreasing value of the field specified." + } + } + } + ] + }, + "RankingScoreThreshold": { + "type": "number", + "format": "double" + }, + "Remote": { + "type": "object", + "properties": { + "url": { + "type": [ + "string", + "null" + ], + "example": { + "ms-0": { + "url": "http://localhost:7700", + "searchApiKey": null, + "writeApiKey": null + }, + "ms-1": { + "url": "http://localhost:7701", + "searchApiKey": "foo", + "writeApiKey": "bar" + }, + "ms-2": { + "url": "http://localhost:7702", + "searchApiKey": "bar", + "writeApiKey": "foo" + } + } + }, + "searchApiKey": { + "type": [ + "string", + "null" + ], + "example": "XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU" + }, + "writeApiKey": { + "type": [ + "string", + "null" + ], + "example": "XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU" + } + } + }, + "RemoteTask": { + "type": "object", + "properties": { + "taskUid": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/u32" + } + ] + }, + "error": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ResponseError" + } + ] + } + } + }, + "ResponseError": { + "type": "object", + "required": [ + "message", + "code", + "type", + "link" + ], + "properties": { + "message": { + "type": "string", + "description": "The error message." + }, + "code": { + "$ref": "#/components/schemas/Code", + "description": "The error code." + }, + "type": { + "$ref": "#/components/schemas/ErrorType", + "description": "The error type." + }, + "link": { + "type": "string", + "description": "A link to the documentation about this specific error." + } + } + }, + "RuntimeTogglableFeatures": { + "type": "object", + "properties": { + "metrics": { + "type": [ + "boolean", + "null" + ] + }, + "logsRoute": { + "type": [ + "boolean", + "null" + ] + }, + "editDocumentsByFunction": { + "type": [ + "boolean", + "null" + ] + }, + "containsFilter": { + "type": [ + "boolean", + "null" + ] + }, + "network": { + "type": [ + "boolean", + "null" + ] + }, + "getTaskDocumentsRoute": { + "type": [ + "boolean", + "null" + ] + }, + "compositeEmbedders": { + "type": [ + "boolean", + "null" + ] + }, + "chatCompletions": { + "type": [ + "boolean", + "null" + ] + }, + "multimodal": { + "type": [ + "boolean", + "null" + ] + }, + "vectorStoreSetting": { + "type": [ + "boolean", + "null" + ] + } + } + }, + "SearchHit": { + "type": "object", + "properties": { + "_formatted": { + "type": "object", + "additionalProperties": true + }, + "_matchesPosition": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/BTreeMap" + } + ] + }, + "_rankingScore": { + "type": [ + "number", + "null" + ], + "format": "double" + }, + "_rankingScoreDetails": { + "type": [ + "object", + "null" + ], + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + } + }, + "additionalProperties": {} + }, + "SearchMetadata": { + "type": "object", + "required": [ + "queryUid", + "indexUid" + ], + "properties": { + "queryUid": { + "type": "string", + "format": "uuid" + }, + "indexUid": { + "type": "string" + }, + "primaryKey": { + "type": [ + "string", + "null" + ] + }, + "remote": { + "type": [ + "string", + "null" + ] + } + } + }, + "SearchQuery": { + "type": "object", + "required": [ + "offset", + "limit", + "retrieve_vectors", + "crop_length", + "show_matches_position", + "show_ranking_score", + "show_ranking_score_details", + "highlight_pre_tag", + "highlight_post_tag", + "crop_marker", + "matching_strategy" + ], + "properties": { + "q": { + "type": [ + "string", + "null" + ] + }, + "vector": { + "type": [ + "array", + "null" + ], + "items": { + "type": "number", + "format": "float" + } + }, + "media": {}, + "hybrid": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/HybridQuery" + } + ] + }, + "offset": { + "type": "integer", + "default": 0, + "minimum": 0 + }, + "limit": { + "type": "integer", + "default": 20, + "minimum": 0 + }, + "page": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "hits_per_page": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "attributes_to_retrieve": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "retrieve_vectors": { + "type": "boolean" + }, + "attributes_to_crop": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "crop_length": { + "type": "integer", + "default": 10, + "minimum": 0 + }, + "attributes_to_highlight": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "show_matches_position": { + "type": "boolean" + }, + "show_ranking_score": { + "type": "boolean" + }, + "show_ranking_score_details": { + "type": "boolean" + }, + "filter": {}, + "sort": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "distinct": { + "type": [ + "string", + "null" + ] + }, + "facets": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "highlight_pre_tag": { + "type": "string", + "default": "" + }, + "highlight_post_tag": { + "type": "string", + "default": "" + }, + "crop_marker": { + "type": "string", + "default": "…" + }, + "matching_strategy": { + "$ref": "#/components/schemas/MatchingStrategy" + }, + "attributes_to_search_on": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "ranking_score_threshold": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/RankingScoreThreshold" + } + ] + }, + "locales": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/Locale" + } + }, + "personalize": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/Personalize" + } + ] + } + } + }, + "SearchQueryWithIndex": { + "type": "object", + "description": "A `SearchQuery` + an index UID and optional FederationOptions.", + "required": [ + "indexUid", + "retrieveVectors", + "cropLength", + "showRankingScore", + "showRankingScoreDetails", + "showMatchesPosition", + "highlightPreTag", + "highlightPostTag", + "cropMarker", + "matchingStrategy" + ], + "properties": { + "indexUid": { + "$ref": "#/components/schemas/IndexUid" + }, + "q": { + "type": [ + "string", + "null" + ] + }, + "vector": { + "type": [ + "array", + "null" + ], + "items": { + "type": "number", + "format": "float" + } + }, + "media": {}, + "hybrid": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/HybridQuery" + } + ] + }, + "offset": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "limit": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "page": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "hitsPerPage": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "attributesToRetrieve": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "retrieveVectors": { + "type": "boolean" + }, + "attributesToCrop": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "cropLength": { + "type": "integer", + "minimum": 0 + }, + "attributesToHighlight": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "showRankingScore": { + "type": "boolean" + }, + "showRankingScoreDetails": { + "type": "boolean" + }, + "showMatchesPosition": { + "type": "boolean" + }, + "filter": {}, + "sort": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "distinct": { + "type": [ + "string", + "null" + ] + }, + "facets": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "highlightPreTag": { + "type": "string" + }, + "highlightPostTag": { + "type": "string" + }, + "cropMarker": { + "type": "string" + }, + "matchingStrategy": { + "$ref": "#/components/schemas/MatchingStrategy" + }, + "attributesToSearchOn": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "rankingScoreThreshold": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/RankingScoreThreshold" + } + ] + }, + "locales": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/Locale" + } + }, + "federationOptions": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/FederationOptions" + } + ] + } + } + }, + "SearchResult": { + "allOf": [ + { + "$ref": "#/components/schemas/HitsInfo" + }, + { + "type": "object", + "required": [ + "hits", + "query", + "processingTimeMs" + ], + "properties": { + "hits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchHit" + } + }, + "query": { + "type": "string" + }, + "queryVector": { + "type": [ + "array", + "null" + ], + "items": { + "type": "number", + "format": "float" + } + }, + "processingTimeMs": { + "type": "integer", + "minimum": 0 + }, + "facetDistribution": { + "type": [ + "object", + "null" + ], + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "facetStats": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/FacetStats" + }, + "propertyNames": { + "type": "string" + } + }, + "requestUid": { + "type": [ + "string", + "null" + ], + "format": "uuid" + }, + "metadata": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SearchMetadata" + } + ] + }, + "semanticHitCount": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "minimum": 0 + } + } + } + ] + }, + "SearchResultWithIndex": { + "allOf": [ + { + "$ref": "#/components/schemas/SearchResult" + }, + { + "type": "object", + "required": [ + "indexUid" + ], + "properties": { + "indexUid": { + "type": "string" + } + } + } + ] + }, + "SearchResults": { + "type": "object", + "required": [ + "results" + ], + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchResultWithIndex" + } + } + } + }, + "SettingEmbeddingSettings": { + "type": "object", + "description": "\"Technical\" type that is required due to utoipa.\n\nWe did not find a way to implement [`utoipa::ToSchema`] for the [`Setting`] enum,\nbut most types can use the `value_type` macro parameter to workaround that issue.\n\nHowever that type is used in the settings route, including through the macro that auto-generate\nall the settings route, so we can't remap the `value_type`.", + "properties": { + "inner": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "source": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/EmbedderSource", + "description": "The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`" + } + ] + }, + "model": { + "type": [ + "string", + "null" + ], + "description": "The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`" + }, + "revision": { + "type": [ + "string", + "null" + ], + "description": "The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`" + }, + "pooling": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/OverridePooling", + "description": "The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior." + } + ] + }, + "apiKey": { + "type": [ + "string", + "null" + ], + "description": "The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings" + }, + "dimensions": { + "type": [ + "string", + "null" + ], + "description": "The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text." + }, + "binaryQuantized": { + "type": [ + "boolean", + "null" + ], + "description": "Whether to binary quantize the embeddings of this embedder.\n\nBinary quantized embeddings are smaller than regular embeddings, which improves\ndisk usage and retrieval speed, at the cost of relevancy.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🏗️ When set to `true`, embeddings are not regenerated, but they are binary quantized, which takes time.\n\n# Defaults\n\n- Defaults to `false`\n\n# Note\n\nAs binary quantization is a destructive operation, it is not possible to disable again this setting after\nfirst enabling it. If you are unsure of whether the performance-relevancy tradeoff is right for you,\nwe recommend to use this parameter on a test index first." + }, + "documentTemplate": { + "type": [ + "boolean", + "null" + ], + "description": "A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text." + }, + "documentTemplateMaxBytes": { + "type": [ + "integer", + "null" + ], + "description": "Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400", + "minimum": 0 + }, + "url": { + "type": [ + "string", + "null" + ], + "description": "URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated" + }, + "indexingFragments": { + "type": [ + "object", + "null" + ], + "description": "Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "searchFragments": { + "type": [ + "object", + "null" + ], + "description": "Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "request": { + "description": "Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" + }, + "response": { + "description": "Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" + }, + "headers": { + "type": [ + "object", + "null" + ], + "description": "Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "additionalProperties": { + "type": "string" + }, + "propertyNames": { + "type": "string" + } + }, + "searchEmbedder": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SubEmbeddingSettings" + } + ] + }, + "indexingEmbedder": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SubEmbeddingSettings" + } + ] + }, + "distribution": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/DistributionShift", + "description": "Affine transformation applied to the semantic score to make it more comparable to the ranking score.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings" + } + ] + } + }, + "additionalProperties": false + } + ] + } + } + }, + "Settings_Checked": { + "type": "object", + "description": "Holds all the settings for an index. `T` can either be `Checked` if they represents settings\nwhose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a\ncall to `check` will return a `Settings` from a `Settings`.", + "properties": { + "displayedAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Fields displayed in the returned documents.", + "example": [ + "id", + "title", + "description", + "url" + ] + }, + "searchableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Fields in which to search for matching query words sorted by order of importance.", + "example": [ + "title", + "description" + ] + }, + "filterableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/FilterableAttributesRule" + }, + "description": "Attributes to use for faceting and filtering. See [Filtering and Faceted Search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).", + "example": [ + "release_date", + "genre" + ] + }, + "sortableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Attributes to use when sorting search results.", + "example": [ + "release_date" + ] + }, + "rankingRules": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of ranking rules sorted by order of importance. The order is customizable.\n[A list of ordered built-in ranking rules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).", + "example": [ + "words", + "typo", + "proximity", + "attribute", + "exactness" + ] + }, + "stopWords": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of words ignored when present in search queries.", + "example": [ + "the", + "a", + "them", + "their" + ] + }, + "nonSeparatorTokens": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of characters not delimiting where one term begins and ends.", + "example": [ + " ", + "\n" + ] + }, + "separatorTokens": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of characters delimiting where one term begins and ends.", + "example": [ + "S" + ] + }, + "dictionary": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of strings Meilisearch should parse as a single term.", + "example": [ + "iPhone pro" + ] + }, + "synonyms": { + "type": [ + "object", + "null" + ], + "description": "List of associated words treated similarly. A word associated to an array of word as synonyms.", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + }, + "example": { + "he": [ + "she", + "they", + "them" + ], + "phone": [ + "iPhone", + "android" + ] + } + }, + "distinctAttribute": { + "type": [ + "string", + "null" + ], + "description": "Search returns documents with distinct (different) values of the given field.", + "example": "sku" + }, + "proximityPrecision": { + "type": [ + "string", + "null" + ], + "description": "Precision level when calculating the proximity ranking rule.", + "example": "byAttribute" + }, + "typoTolerance": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/TypoSettings", + "description": "Customize typo tolerance feature." + } + ] + }, + "faceting": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/FacetingSettings", + "description": "Faceting settings." + } + ] + }, + "pagination": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/PaginationSettings", + "description": "Pagination settings." + } + ] + }, + "embedders": { + "type": [ + "object", + "null" + ], + "description": "Embedder required for performing semantic search queries.", + "additionalProperties": { + "$ref": "#/components/schemas/SettingEmbeddingSettings" + }, + "propertyNames": { + "type": "string" + } + }, + "searchCutoffMs": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Maximum duration of a search query.", + "example": 50, + "minimum": 0 + }, + "localizedAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/LocalizedAttributesRuleView" + }, + "example": 50 + }, + "facetSearch": { + "type": [ + "boolean", + "null" + ], + "example": true + }, + "prefixSearch": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/PrefixSearchSettings" + } + ] + }, + "chat": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ChatSettings", + "description": "Customize the chat prompting." + } + ] + }, + "vectorStore": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/VectorStoreBackend" + } + ] + } + }, + "additionalProperties": false + }, + "Settings_Unchecked": { + "type": "object", + "description": "Holds all the settings for an index. `T` can either be `Checked` if they represents settings\nwhose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a\ncall to `check` will return a `Settings` from a `Settings`.", + "properties": { + "displayedAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Fields displayed in the returned documents.", + "example": [ + "id", + "title", + "description", + "url" + ] + }, + "searchableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Fields in which to search for matching query words sorted by order of importance.", + "example": [ + "title", + "description" + ] + }, + "filterableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/FilterableAttributesRule" + }, + "description": "Attributes to use for faceting and filtering. See [Filtering and Faceted Search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).", + "example": [ + "release_date", + "genre" + ] + }, + "sortableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Attributes to use when sorting search results.", + "example": [ + "release_date" + ] + }, + "rankingRules": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of ranking rules sorted by order of importance. The order is customizable.\n[A list of ordered built-in ranking rules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).", + "example": [ + "words", + "typo", + "proximity", + "attribute", + "exactness" + ] + }, + "stopWords": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of words ignored when present in search queries.", + "example": [ + "the", + "a", + "them", + "their" + ] + }, + "nonSeparatorTokens": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of characters not delimiting where one term begins and ends.", + "example": [ + " ", + "\n" + ] + }, + "separatorTokens": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of characters delimiting where one term begins and ends.", + "example": [ + "S" + ] + }, + "dictionary": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of strings Meilisearch should parse as a single term.", + "example": [ + "iPhone pro" + ] + }, + "synonyms": { + "type": [ + "object", + "null" + ], + "description": "List of associated words treated similarly. A word associated to an array of word as synonyms.", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + }, + "example": { + "he": [ + "she", + "they", + "them" + ], + "phone": [ + "iPhone", + "android" + ] + } + }, + "distinctAttribute": { + "type": [ + "string", + "null" + ], + "description": "Search returns documents with distinct (different) values of the given field.", + "example": "sku" + }, + "proximityPrecision": { + "type": [ + "string", + "null" + ], + "description": "Precision level when calculating the proximity ranking rule.", + "example": "byAttribute" + }, + "typoTolerance": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/TypoSettings", + "description": "Customize typo tolerance feature." + } + ] + }, + "faceting": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/FacetingSettings", + "description": "Faceting settings." + } + ] + }, + "pagination": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/PaginationSettings", + "description": "Pagination settings." + } + ] + }, + "embedders": { + "type": [ + "object", + "null" + ], + "description": "Embedder required for performing semantic search queries.", + "additionalProperties": { + "$ref": "#/components/schemas/SettingEmbeddingSettings" + }, + "propertyNames": { + "type": "string" + } + }, + "searchCutoffMs": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Maximum duration of a search query.", + "example": 50, + "minimum": 0 + }, + "localizedAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/LocalizedAttributesRuleView" + }, + "example": 50 + }, + "facetSearch": { + "type": [ + "boolean", + "null" + ], + "example": true + }, + "prefixSearch": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/PrefixSearchSettings" + } + ] + }, + "chat": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ChatSettings", + "description": "Customize the chat prompting." + } + ] + }, + "vectorStore": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/VectorStoreBackend" + } + ] + } + }, + "additionalProperties": false + }, + "SimilarQuery": { + "type": "object", + "required": [ + "id", + "offset", + "limit", + "embedder", + "retrieve_vectors", + "show_ranking_score", + "show_ranking_score_details", + "ranking_score_threshold" + ], + "properties": { + "id": { + "type": "string" + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 0 + }, + "filter": {}, + "embedder": { + "type": "string" + }, + "attributes_to_retrieve": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "retrieve_vectors": { + "type": "boolean" + }, + "show_ranking_score": { + "type": "boolean" + }, + "show_ranking_score_details": { + "type": "boolean" + }, + "ranking_score_threshold": { + "type": "number", + "format": "double" + } + } + }, + "SimilarResult": { + "allOf": [ + { + "$ref": "#/components/schemas/HitsInfo" + }, + { + "type": "object", + "required": [ + "hits", + "id", + "processingTimeMs" + ], + "properties": { + "hits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchHit" + } + }, + "id": { + "type": "string" + }, + "processingTimeMs": { + "type": "integer", + "minimum": 0 + } + } + } + ] + }, + "Stats": { + "type": "object", + "required": [ + "databaseSize", + "usedDatabaseSize", + "indexes" + ], + "properties": { + "databaseSize": { + "type": "integer", + "format": "u-int64", + "description": "The disk space used by the database, in bytes.", + "minimum": 0 + }, + "usedDatabaseSize": { + "type": "integer", + "format": "u-int64", + "description": "The size of the database, in bytes.", + "minimum": 0 + }, + "lastUpdate": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "The date of the last update in the RFC 3339 formats. Can be `null` if no update has ever been processed." + }, + "indexes": { + "type": "object", + "description": "The stats of every individual index your API key lets you access.", + "additionalProperties": { + "$ref": "#/components/schemas/IndexStats" + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "Status": { + "type": "string", + "description": "The status of a task.", + "enum": [ + "enqueued", + "processing", + "succeeded", + "failed", + "canceled" + ], + "example": "processing" + }, + "SubEmbeddingSettings": { + "type": "object", + "properties": { + "source": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/EmbedderSource", + "description": "The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`" + } + ] + }, + "model": { + "type": [ + "string", + "null" + ], + "description": "The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`" + }, + "revision": { + "type": [ + "string", + "null" + ], + "description": "The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`" + }, + "pooling": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/OverridePooling", + "description": "The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior." + } + ] + }, + "apiKey": { + "type": [ + "string", + "null" + ], + "description": "The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings" + }, + "dimensions": { + "type": [ + "string", + "null" + ], + "description": "The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text." + }, + "documentTemplate": { + "type": [ + "boolean", + "null" + ], + "description": "A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text." + }, + "documentTemplateMaxBytes": { + "type": [ + "integer", + "null" + ], + "description": "Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400", + "minimum": 0 + }, + "url": { + "type": [ + "string", + "null" + ], + "description": "URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated" + }, + "indexingFragments": { + "type": [ + "object", + "null" + ], + "description": "Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "searchFragments": { + "type": [ + "object", + "null" + ], + "description": "Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "request": { + "description": "Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" + }, + "response": { + "description": "Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" + }, + "headers": { + "type": [ + "object", + "null" + ], + "description": "Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "additionalProperties": { + "type": "string" + }, + "propertyNames": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "SummarizedTaskView": { + "type": "object", + "required": [ + "taskUid", + "status", + "type", + "enqueuedAt" + ], + "properties": { + "taskUid": { + "type": "integer", + "format": "u-int32", + "description": "The task unique identifier.", + "minimum": 0 + }, + "indexUid": { + "type": [ + "string", + "null" + ], + "description": "The index affected by this task. May be `null` if the task is not linked to any index." + }, + "status": { + "$ref": "#/components/schemas/Status", + "description": "The status of the task." + }, + "type": { + "$ref": "#/components/schemas/Kind", + "description": "The type of the task." + }, + "enqueuedAt": { + "type": "string", + "format": "date-time", + "description": "The date on which the task was enqueued." + }, + "customMetadata": { + "type": [ + "string", + "null" + ] + } + } + }, + "SwapIndexesPayload": { + "type": "object", + "required": [ + "indexes", + "rename" + ], + "properties": { + "indexes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IndexUid" + }, + "description": "Array of the two indexUids to be swapped" + }, + "rename": { + "type": "boolean", + "description": "If set to true, instead of swapping the left and right indexes it'll change the name of the first index to the second" + } + } + }, + "TaskNetwork": { + "oneOf": [ + { + "type": "object", + "required": [ + "origin" + ], + "properties": { + "origin": { + "$ref": "#/components/schemas/Origin" + } + } + }, + { + "type": "object", + "required": [ + "remote_tasks" + ], + "properties": { + "remote_tasks": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/RemoteTask" + }, + "propertyNames": { + "type": "string" + } + } + } + } + ] + }, + "TaskView": { + "type": "object", + "required": [ + "uid", + "status", + "type", + "enqueuedAt" + ], + "properties": { + "uid": { + "type": "integer", + "format": "u-int32", + "description": "The unique sequential identifier of the task.", + "example": 4312, + "minimum": 0 + }, + "batchUid": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "description": "The unique identifier of the index where this task is operated.", + "example": "movies", + "minimum": 0 + }, + "indexUid": { + "type": [ + "string", + "null" + ] + }, + "status": { + "$ref": "#/components/schemas/Status" + }, + "type": { + "$ref": "#/components/schemas/Kind", + "description": "The type of the task." + }, + "canceledBy": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "description": "The uid of the task that performed the taskCancelation if the task has been canceled.", + "example": 4326, + "minimum": 0 + }, + "details": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/DetailsView" + } + ] + }, + "error": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ResponseError" + } + ] + }, + "duration": { + "type": [ + "string", + "null" + ], + "description": "Total elasped time the engine was in processing state expressed as a `ISO-8601` duration format.", + "example": null + }, + "enqueuedAt": { + "type": "string", + "description": "An `RFC 3339` format for date/time/duration.", + "example": "2024-08-08_14:12:09.393Z" + }, + "startedAt": { + "type": "string", + "description": "An `RFC 3339` format for date/time/duration.", + "example": "2024-08-08_14:12:09.393Z" + }, + "finishedAt": { + "type": "string", + "description": "An `RFC 3339` format for date/time/duration.", + "example": "2024-08-08_14:12:09.393Z" + }, + "network": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/TaskNetwork" + } + ] + }, + "customMetadata": { + "type": [ + "string", + "null" + ] + } + } + }, + "TypoSettings": { + "type": "object", + "properties": { + "enabled": { + "type": [ + "boolean", + "null" + ], + "example": true + }, + "minWordSizeForTypos": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/MinWordSizeTyposSetting" + } + ] + }, + "disableOnWords": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "example": [ + "iPhone", + "phone" + ], + "uniqueItems": true + }, + "disableOnAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "example": [ + "uuid", + "url" + ], + "uniqueItems": true + }, + "disableOnNumbers": { + "type": [ + "boolean", + "null" + ], + "example": true + } + }, + "additionalProperties": false + }, + "Unchecked": { + "default": null + }, + "UpdateIndexRequest": { + "type": "object", + "properties": { + "primaryKey": { + "type": [ + "string", + "null" + ], + "description": "The new primary key of the index" + }, + "uid": { + "type": [ + "string", + "null" + ], + "description": "The new uid of the index (for renaming)" + } + } + }, + "UpdateStderrLogs": { + "type": "object", + "required": [ + "target" + ], + "properties": { + "target": { + "type": "string", + "description": "Lets you specify which parts of the code you want to inspect and is formatted like that: code_part=log_level,code_part=log_level\n- If the `code_part` is missing, then the `log_level` will be applied to everything.\n- If the `log_level` is missing, then the `code_part` will be selected in `info` log level.", + "default": "info", + "example": "milli=trace,index_scheduler,actix_web=off" + } + } + }, + "Vec": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "VectorStoreBackend": { + "type": "string", + "enum": [ + "stable", + "experimental" + ] + }, + "VersionResponse": { + "type": "object", + "required": [ + "commitSha", + "commitDate", + "pkgVersion" + ], + "properties": { + "commitSha": { + "type": "string", + "description": "The commit used to compile this build of Meilisearch." + }, + "commitDate": { + "type": "string", + "description": "The date of this build." + }, + "pkgVersion": { + "type": "string", + "description": "The version of Meilisearch." + } + } + }, + "WebhookResults": { + "type": "object", + "required": [ + "results" + ], + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" + } + } + } + }, + "WebhookSettings": { + "type": "object", + "properties": { + "url": { + "type": [ + "string", + "null" + ], + "example": "https://your.site/on-tasks-completed" + }, + "headers": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "type": "string" + }, + "propertyNames": { + "type": "string" + }, + "example": { + "Authorization": "Bearer a-secret-token" + } + } + } + }, + "WebhookWithMetadataRedactedAuthorization": { + "allOf": [ + { + "$ref": "#/components/schemas/WebhookSettings" + }, + { + "type": "object", + "required": [ + "uuid", + "isEditable" + ], + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "isEditable": { + "type": "boolean" + } + } + } + ] + }, + "u32": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "securitySchemes": { + "Bearer": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "Uuidv4, string or JWT", + "description": "An API key is a token that you provide when making API calls. Include the token in a header parameter called `Authorization`.\nExample: `Authorization: Bearer 8fece4405662dd830e4cb265e7e047aab2e79672a760a12712d2a263c9003509`" + } + } + }, + "tags": [ + { + "name": "Stats", + "description": "Stats gives extended information and metrics about indexes and the Meilisearch database." + }, + { + "name": "Tasks", + "description": "The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html).", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/tasks" + } + }, + { + "name": "Batches", + "description": "The /batches route gives information about the progress of batches of asynchronous operations.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/batches" + } + }, + { + "name": "Indexes", + "description": "An index is an entity that gathers a set of [documents](https://www.meilisearch.com/docs/learn/getting_started/documents) with its own [settings](https://www.meilisearch.com/docs/reference/api/settings). Learn more about indexes.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/indexes" + } + }, + { + "name": "Documents", + "description": "Documents are objects composed of fields that can store any type of data. Each field contains an attribute and its associated value. Documents are stored inside [indexes](https://www.meilisearch.com/docs/learn/getting_started/indexes).", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/learn/getting_started/documents" + } + }, + { + "name": "Facet Search", + "description": "The `/facet-search` route allows you to search for facet values. Facet search supports prefix search and typo tolerance. The returned hits are sorted lexicographically in ascending order. You can configure how facets are sorted using the sortFacetValuesBy property of the faceting index settings.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/facet_search" + } + }, + { + "name": "Similar documents", + "description": "The /similar route uses AI-powered search to return a number of documents similar to a target document.\n\nMeilisearch exposes two routes for retrieving similar documents: POST and GET. In the majority of cases, POST will offer better performance and ease of use.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/similar" + } + }, + { + "name": "Settings", + "description": "Use the /settings route to customize search settings for a given index. You can either modify all index settings at once using the update settings endpoint, or use a child route to configure a single setting.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/settings" + } + }, + { + "name": "Compact an index", + "description": "The /compact route uses compacts the database to reorganize and make it smaller and more efficient.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/compact" + } + }, + { + "name": "Search", + "description": "Meilisearch exposes two routes to perform searches:\n\n- A POST route: this is the preferred route when using API authentication, as it allows [preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) caching and better performance.\n- A GET route: the usage of this route is discouraged, unless you have good reason to do otherwise (specific caching abilities for example)", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/search" + } + }, + { + "name": "Snapshots", + "description": "The snapshots route allows the creation of database snapshots. Snapshots are .snapshot files that can be used to launch Meilisearch.\nCreating a snapshot is also referred to as exporting it, whereas launching Meilisearch with a snapshot is referred to as importing it.\nDuring a snapshot export, all indexes of the current instance are exported—together with their documents and settings—and saved as a single .snapshot file.\nDuring a snapshot import, all indexes contained in the indicated .snapshot file are imported along with their associated documents and settings.\nSnapshot imports are performed at launch using an option.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/snapshots" + } + }, + { + "name": "Dumps", + "description": "The `dumps` route allows the creation of database dumps.\nDumps are `.dump` files that can be used to launch Meilisearch. Dumps are compatible between Meilisearch versions.\nCreating a dump is also referred to as exporting it, whereas launching Meilisearch with a dump is referred to as importing it.\nDuring a [dump export](https://www.meilisearch.com/docs/reference/api/dump#create-a-dump), all indexes of the current instance are\nexported—together with their documents and settings—and saved as a single `.dump` file. During a dump import,\nall indexes contained in the indicated `.dump` file are imported along with their associated documents and settings.\nAny existing index with the same uid as an index in the dump file will be overwritten.\nDump imports are [performed at launch](https://www.meilisearch.com/docs/learn/advanced/dumps#importing-a-dump) using an option.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/dump" + } + }, + { + "name": "Keys", + "description": "Manage API `keys` for a Meilisearch instance. Each key has a given set of permissions.\nYou must have the master key or the default admin key to access the keys route. More information about the keys and their rights.\nAccessing any route under `/keys` without having set a master key will result in an error.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/keys" + } + }, + { + "name": "Logs", + "description": "Everything about retrieving or customizing logs.\nCurrently [experimental](https://www.meilisearch.com/docs/learn/experimental/overview).", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/learn/experimental/log_customization" + } + }, + { + "name": "Multi-search", + "description": "The `/multi-search` route allows you to perform multiple search queries on one or more indexes by bundling them into a single HTTP request. Multi-search is also known as federated search.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/multi_search" + } + }, + { + "name": "Experimental features", + "description": "The `/experimental-features` route allows you to activate or deactivate some of Meilisearch's experimental features.\n\nThis route is **synchronous**. This means that no task object will be returned, and any activated or deactivated features will be made available or unavailable immediately.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/experimental_features" + } + }, + { + "name": "Export", + "description": "The `/export` route allows you to trigger an export process to a remote Meilisearch instance.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/export" + } + }, + { + "name": "Network", + "description": "The `/network` route allows you to describe the topology of a network of Meilisearch instances.\n\nThis route is **synchronous**. This means that no task object will be returned, and any change to the network will be made available immediately.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/network" + } + }, + { + "name": "Webhooks", + "description": "The `/webhooks` route allows you to register endpoints to be called once tasks are processed.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/webhooks" + } + } + ] +} \ No newline at end of file From c1d46e84eb4541011ec0ef63707fd00e99f61c03 Mon Sep 17 00:00:00 2001 From: curquiza Date: Wed, 10 Dec 2025 14:23:23 +0100 Subject: [PATCH 06/45] Add other languages --- docs.json | 2 +- meilisearch-openapi.json | 23320 +++++++++++++++++++++++++++++++++++++ openapi-curqui.json | 2 +- 3 files changed, 23322 insertions(+), 2 deletions(-) create mode 100644 meilisearch-openapi.json diff --git a/docs.json b/docs.json index 530175e2d..5978ca063 100644 --- a/docs.json +++ b/docs.json @@ -150,7 +150,7 @@ "display": "simple" }, "examples": { - "languages": ["curl", "python", "javascript"], + "languages": ["curl", "javascript", "php", "python", "java", "ruby", "go", "csharp", "rust", "dart", "swift"], "defaults": "required", "prefill": true } diff --git a/meilisearch-openapi.json b/meilisearch-openapi.json new file mode 100644 index 000000000..9bb6e27a7 --- /dev/null +++ b/meilisearch-openapi.json @@ -0,0 +1,23320 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "meilisearch", + "description": "Meilisearch HTTP server", + "contact": { + "name": "Quentin de Quelen", + "email": "quentin@dequelen.me" + }, + "license": { + "name": "MIT", + "identifier": "MIT" + }, + "version": "1.28.2" + }, + "servers": [ + { + "url": "/", + "description": "Local server" + } + ], + "paths": { + "/batches": { + "get": { + "tags": [ + "Batches" + ], + "summary": "Get batches", + "description": "List all batches, regardless of index. The batch objects are contained in the results array.\nBatches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first.\nBatch results are paginated and can be filtered with query parameters.", + "operationId": "get_batches", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "Maximum number of results to return.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "default": 20, + "minimum": 0 + }, + "example": 12 + }, + { + "name": "from", + "in": "query", + "description": "Fetch the next set of results from the given uid.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "example": 12421 + }, + { + "name": "reverse", + "in": "query", + "description": "The order you want to retrieve the objects.", + "required": false, + "schema": { + "type": "boolean" + }, + "example": true + }, + { + "name": "batchUids", + "in": "query", + "description": "Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "example": 12421 + }, + { + "name": "uids", + "in": "query", + "description": "Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598, + "*" + ] + }, + { + "name": "canceledBy", + "in": "query", + "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 374, + "*" + ] + }, + { + "name": "types", + "in": "query", + "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "documentAdditionOrUpdate", + "*" + ] + }, + { + "name": "statuses", + "in": "query", + "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Status" + } + }, + "example": [ + "succeeded", + "failed", + "canceled", + "enqueued", + "processing", + "*" + ] + }, + { + "name": "indexUids", + "in": "query", + "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "movies", + "theater", + "*" + ] + }, + { + "name": "afterEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + } + ], + "responses": { + "200": { + "description": "Return the batches", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AllBatches" + }, + "example": { + "results": [ + { + "uid": 2, + "details": { + "stopWords": [ + "of", + "the" + ] + }, + "progress": null, + "stats": { + "totalNbTasks": 1, + "status": { + "succeeded": 1 + }, + "types": { + "settingsUpdate": 1 + }, + "indexUids": { + "INDEX_NAME": 1 + } + }, + "duration": "PT0.110083S", + "startedAt": "2024-12-10T15:49:04.995321Z", + "finishedAt": "2024-12-10T15:49:05.105404Z" + } + ], + "total": 3, + "limit": 1, + "from": 2, + "next": 1 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.get", + "tasks.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.GetBatches();" + }, + { + "lang": "JS", + "source": "client.batches.getBatches();" + }, + { + "lang": "PHP", + "source": "$client->getBatches();" + }, + { + "lang": "Python", + "source": "client.get_batches()" + }, + { + "lang": "Ruby", + "source": "client.batches" + }, + { + "lang": "Rust", + "source": "let mut query = meilisearch_sdk::batches::BatchesQuery::new(&client);\nquery.with_limit(20);\nlet batches: meilisearch_sdk::batches::BatchesResults =\n client.get_batches_with(&query).await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches'" + } + ] + } + }, + "/batches/{batchUid}": { + "get": { + "tags": [ + "Batches" + ], + "summary": "Get one batch", + "description": "Get a single batch.", + "operationId": "get_batch", + "parameters": [ + { + "name": "batchUid", + "in": "path", + "description": "The unique batch id", + "required": true, + "schema": { + "type": "string" + }, + "example": "8685" + } + ], + "responses": { + "200": { + "description": "Return the batch", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchView" + }, + "example": { + "uid": 1, + "details": { + "receivedDocuments": 1, + "indexedDocuments": 1 + }, + "progress": null, + "stats": { + "totalNbTasks": 1, + "status": { + "succeeded": 1 + }, + "types": { + "documentAdditionOrUpdate": 1 + }, + "indexUids": { + "INDEX_NAME": 1 + } + }, + "duration": "PT0.364788S", + "startedAt": "2024-12-10T15:48:49.672141Z", + "finishedAt": "2024-12-10T15:48:50.036929Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.get", + "tasks.*", + "*" + ] + } + ] + } + }, + "/dumps": { + "post": { + "tags": [ + "Dumps" + ], + "summary": "Create a dump", + "description": "Triggers a dump creation process. Once the process is complete, a dump is created in the\n[dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory).\nIf the dump directory does not exist yet, it will be created.", + "operationId": "create_dump", + "responses": { + "202": { + "description": "Dump is being created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 0, + "indexUid": null, + "status": "enqueued", + "type": "DumpCreation", + "enqueuedAt": "2021-01-01T09:39:00.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "dumps.create", + "dumps.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.CreateDumpAsync();" + }, + { + "lang": "Dart", + "source": "await client.createDump();" + }, + { + "lang": "Go", + "source": "resp, err := client.CreateDump()" + }, + { + "lang": "JS", + "source": "client.createDump()" + }, + { + "lang": "Java", + "source": "client.createDump();" + }, + { + "lang": "PHP", + "source": "$client->createDump();" + }, + { + "lang": "Python", + "source": "client.create_dump()" + }, + { + "lang": "Ruby", + "source": "client.create_dump" + }, + { + "lang": "Rust", + "source": "client\n .create_dump()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.createDump { result in\n switch result {\n case .success(let dumpStatus):\n print(dumpStatus)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/dumps'" + } + ] + } + }, + "/experimental-features": { + "get": { + "tags": [ + "Experimental features" + ], + "summary": "Get all experimental features", + "description": "Get a list of all experimental features that can be activated via the /experimental-features route and whether or not they are currently activated.", + "operationId": "get_features", + "responses": { + "200": { + "description": "Experimental features are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuntimeTogglableFeatures" + }, + "example": { + "metrics": true, + "logsRoute": false, + "editDocumentsByFunction": false, + "containsFilter": false, + "network": false, + "getTaskDocumentsRoute": false, + "compositeEmbedders": false, + "chatCompletions": false, + "multimodal": false, + "vectorStoreSetting": false + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "experimental_features.get", + "experimental_features.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.ExperimentalFeatures().Get()" + }, + { + "lang": "Ruby", + "source": "client.experimental_features" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nlet res = features\n .get()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/experimental-features/'" + } + ] + }, + "patch": { + "tags": [ + "Experimental features" + ], + "summary": "Configure experimental features", + "description": "Activate or deactivate experimental features.", + "operationId": "patch_features", + "responses": { + "200": { + "description": "Experimental features are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuntimeTogglableFeatures" + }, + "example": { + "metrics": true, + "logsRoute": false, + "editDocumentsByFunction": false, + "containsFilter": false, + "network": false, + "getTaskDocumentsRoute": false, + "compositeEmbedders": false, + "chatCompletions": false, + "multimodal": false, + "vectorStoreSetting": false + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "experimental_features.update", + "experimental_features.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.ExperimentalFeatures().SetMetrics(true).Update()" + }, + { + "lang": "Ruby", + "source": "client.update_experimental_features(metrics: true)" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nfeatures.set_metrics(true)\nlet res = features\n .update()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/experimental-features/' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"metrics\": true\n }'" + } + ] + } + }, + "/export": { + "post": { + "tags": [ + "Export" + ], + "operationId": "export", + "responses": { + "202": { + "description": "Export successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 1, + "status": "enqueued", + "type": "export", + "enqueuedAt": "2021-08-11T09:25:53.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "export", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Java", + "source": "Map indexes = new HashMap<>();\nindexes.put(\"*\", ExportIndexFilter.builder().overrideSettings(true).build());\nExportRequest request = ExportRequest.builder().url(\"TARGET_INSTANCE_URL\").indexes(indexes).build();\nclient.export(request);" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/export' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"TARGET_INSTANCE_URL\",\n \"indexes\": {\n \"*\": {\n \"overrideSettings\": true\n }\n }\n }'" + } + ] + } + }, + "/health": { + "get": { + "tags": [ + "Health" + ], + "summary": "Get Health", + "description": "The health check endpoint enables you to periodically test the health of your Meilisearch instance.", + "operationId": "get_health", + "responses": { + "200": { + "description": "Instance is healthy", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HealthResponse" + }, + "example": { + "status": "available" + } + } + } + } + }, + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.HealthAsync();" + }, + { + "lang": "Dart", + "source": "await client.health();" + }, + { + "lang": "Go", + "source": "client.Health()" + }, + { + "lang": "JS", + "source": "client.health()" + }, + { + "lang": "Java", + "source": "client.health();" + }, + { + "lang": "PHP", + "source": "$client->health();" + }, + { + "lang": "Python", + "source": "client.health()" + }, + { + "lang": "Ruby", + "source": "client.health" + }, + { + "lang": "Rust", + "source": "// health() return an Err() if the server is not healthy, so this example would panic due to the unwrap\nclient\n .health()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.health { (result) in\n switch result {\n case .success:\n print(\"Healthy!\")\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/health'" + } + ] + } + }, + "/indexes": { + "get": { + "tags": [ + "Indexes" + ], + "summary": "List indexes", + "description": "List all indexes.", + "operationId": "list_indexes", + "parameters": [ + { + "name": "offset", + "in": "query", + "description": "The number of indexes to skip before starting to retrieve anything", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "example": 100 + }, + { + "name": "limit", + "in": "query", + "description": "The number of indexes to retrieve", + "required": false, + "schema": { + "type": "integer", + "default": 20, + "minimum": 0 + }, + "example": 1 + } + ], + "responses": { + "200": { + "description": "Indexes are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationView_IndexView" + }, + "example": { + "results": [ + { + "uid": "movies", + "primaryKey": "movie_id", + "createdAt": "2019-11-20T09:40:33.711324Z", + "updatedAt": "2019-11-20T09:40:33.711324Z" + } + ], + "limit": 1, + "offset": 0, + "total": 1 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "indexes.get", + "indexes.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.GetAllIndexesAsync(new IndexesQuery { Limit = 3 });" + }, + { + "lang": "Dart", + "source": "await client.getIndexes(params: IndexesQuery(limit: 3));" + }, + { + "lang": "Go", + "source": "client.GetIndexes(&meilisearch.IndexesQuery{\n Limit: 3,\n})" + }, + { + "lang": "JS", + "source": "client.getIndexes({ limit: 3 })" + }, + { + "lang": "Java", + "source": "IndexesQuery query = new IndexesQuery().setLimit(3);\nclient.getIndexes(query);" + }, + { + "lang": "PHP", + "source": "$client->getIndexes((new IndexesQuery())->setLimit(3));" + }, + { + "lang": "Python", + "source": "client.get_indexes({'limit': 3})" + }, + { + "lang": "Ruby", + "source": "client.indexes(limit: 3)" + }, + { + "lang": "Rust", + "source": "let mut indexes = IndexesQuery::new(&client)\n .with_limit(3)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.getIndexes { (result) in\n switch result {\n case .success(let indexes):\n print(indexes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes?limit=3'" + } + ] + }, + "post": { + "tags": [ + "Indexes" + ], + "summary": "Create index", + "description": "Create an index.", + "operationId": "create_index", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IndexCreateRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "indexCreation", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "indexes.create", + "indexes.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "TaskInfo task = await client.CreateIndexAsync(\"movies\", \"id\");" + }, + { + "lang": "Dart", + "source": "await client.createIndex('movies', primaryKey: 'id');" + }, + { + "lang": "Go", + "source": "client.CreateIndex(&meilisearch.IndexConfig{\n Uid: \"movies\",\n PrimaryKey: \"id\",\n})" + }, + { + "lang": "JS", + "source": "client.createIndex('movies', { primaryKey: 'id' })" + }, + { + "lang": "Java", + "source": "client.createIndex(\"movies\", \"id\");" + }, + { + "lang": "PHP", + "source": "$client->createIndex('movies', ['primaryKey' => 'id']);" + }, + { + "lang": "Python", + "source": "client.create_index('movies', {'primaryKey': 'id'})" + }, + { + "lang": "Ruby", + "source": "client.create_index('movies', primary_key: 'id')" + }, + { + "lang": "Rust", + "source": "client.create_index(\"movies\", Some(\"id\"))\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.createIndex(uid: \"movies\", primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"uid\": \"movies\",\n \"primaryKey\": \"id\"\n }'" + } + ] + } + }, + "/indexes/{indexUid}": { + "get": { + "tags": [ + "Indexes" + ], + "summary": "Get index", + "description": "Get information about an index.", + "operationId": "get_index", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "The index is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IndexView" + }, + "example": { + "uid": "movies", + "primaryKey": "movie_id", + "createdAt": "2019-11-20T09:40:33.711324Z", + "updatedAt": "2019-11-20T09:40:33.711324Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "indexes.get", + "indexes.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.GetIndexAsync(\"movies\");" + }, + { + "lang": "Dart", + "source": "await client.getIndex('movies');" + }, + { + "lang": "Go", + "source": "client.GetIndex(\"movies\")" + }, + { + "lang": "JS", + "source": "client.index('movies').getRawInfo()" + }, + { + "lang": "Java", + "source": "client.getIndex(\"movies\");" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->fetchRawInfo();" + }, + { + "lang": "Python", + "source": "client.get_index('movies')" + }, + { + "lang": "Ruby", + "source": "client.fetch_index('movies')" + }, + { + "lang": "Rust", + "source": "let movies: Index = client\n .get_index(\"movies\")\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.getIndex(\"movies\") { (result) in\n switch result {\n case .success(let index):\n print(index)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies'" + } + ] + }, + "delete": { + "tags": [ + "Indexes" + ], + "summary": "Delete index", + "description": "Delete an index.", + "operationId": "delete_index", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "202": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 0, + "indexUid": "movies", + "status": "enqueued", + "type": "indexDeletion", + "enqueuedAt": "2021-01-01T09:39:00.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "indexes.delete", + "indexes.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.DeleteIndexAsync(\"movies\");" + }, + { + "lang": "Dart", + "source": "await client.index('movies').delete();" + }, + { + "lang": "Go", + "source": "client.DeleteIndex(\"movies\")\n// OR\nclient.Index(\"movies\").Delete()" + }, + { + "lang": "JS", + "source": "client.deleteIndex('movies')" + }, + { + "lang": "Java", + "source": "client.deleteIndex(\"movies\");" + }, + { + "lang": "PHP", + "source": "$client->deleteIndex('movies');" + }, + { + "lang": "Python", + "source": "client.delete_index('movies')\n// OR\nclient.index('movies').delete()" + }, + { + "lang": "Ruby", + "source": "client.delete_index('movies')" + }, + { + "lang": "Rust", + "source": "client.index(\"movies\")\n .delete()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").delete { (result) in\n switch result {\n case .success:\n print(\"Index deleted\")\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies'" + } + ] + }, + "patch": { + "tags": [ + "Indexes" + ], + "summary": "Update index", + "description": "Update the `primaryKey` of an index.\nReturn an error if the index doesn't exists yet or if it contains documents.", + "operationId": "update_index", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateIndexRequest" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 0, + "indexUid": "movies", + "status": "enqueued", + "type": "indexUpdate", + "enqueuedAt": "2021-01-01T09:39:00.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "indexes.update", + "indexes.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "TaskInfo task = await client.UpdateIndexAsync(\"movies\", \"id\");" + }, + { + "lang": "Dart", + "source": "await client.index('movies').update(primaryKey: 'id');" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateIndex(&meilisearch.UpdateIndexRequestParams{\n PrimaryKey: \"id\",\n})" + }, + { + "lang": "JS", + "source": "client.updateIndex('movies', { primaryKey: 'id' })" + }, + { + "lang": "Java", + "source": "client.updateIndex(\"movies\", \"id\");" + }, + { + "lang": "PHP", + "source": "$client->updateIndex('movies', ['primaryKey' => 'id']);" + }, + { + "lang": "Python", + "source": "client.index('movies').update(primary_key='id')" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update(primary_key: 'movie_id')" + }, + { + "lang": "Rust", + "source": "let task = IndexUpdater::new(\"movies\", &client)\n .with_primary_key(\"movie_review_id\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").update(primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"primaryKey\": \"id\" }'" + } + ] + } + }, + "/indexes/{indexUid}/compact": { + "post": { + "tags": [ + "Compact an index" + ], + "summary": "Compact an index", + "operationId": "compact", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "202": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentDeletion", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Java", + "source": "client.index(\"INDEX_NAME\").compact();" + }, + { + "lang": "Python", + "source": "client.index('movies').compact()" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"INDEX_UID\")\n .compact()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_UID/compact'" + } + ] + } + }, + "/indexes/{indexUid}/documents": { + "get": { + "tags": [ + "Documents" + ], + "summary": "Get documents", + "description": "Get documents by batches.", + "operationId": "get_documents", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "fields", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "retrieveVectors", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ids", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "example": "popularity > 1000" + }, + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationView_Value" + }, + "example": { + "results": [ + { + "id": 25684, + "title": "American Ninja 5", + "poster": "https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg", + "overview": "When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.", + "release_date": 725846400 + }, + { + "id": 45881, + "title": "The Bridge of San Luis Rey", + "poster": "https://image.tmdb.org/t/p/w500/4X7quIcdkc24Cveg5XdpfRqxtYA.jpg", + "overview": "The Bridge of San Luis Rey is American author Thornton Wilder's second novel, first published in 1927 to worldwide acclaim. It tells the story of several interrelated people who die in the collapse of an Inca rope-fiber suspension bridge in Peru, and the events that lead up to their being on the bridge.[ A friar who has witnessed the tragic accident then goes about inquiring into the lives of the victims, seeking some sort of cosmic answer to the question of why each had to die. The novel won the Pulitzer Prize in 1928.", + "release_date": 1072915200 + } + ], + "limit": 20, + "offset": 0, + "total": 2 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.get", + "documents.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() { Limit = 2, Filter = \"genres = action\" });" + }, + { + "lang": "Go", + "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"movies\").GetDocuments(&meilisearch.DocumentsQuery{\n Limit: 2,\n Filter: \"genres = action\",\n}, &result)" + }, + { + "lang": "JS", + "source": "client.index('movies').getDocuments({\n limit: 2,\n filter: 'genres = action'\n})" + }, + { + "lang": "Java", + "source": "DocumentsQuery query = new DocumentsQuery().setLimit(2).setFilter(new String[] {\"genres = action\"});\nclient.index(\"movies\").getDocuments(query, TargetClassName.class);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getDocuments((new DocumentsQuery())->setFilter('genres = action')->setLimit(2));" + }, + { + "lang": "Python", + "source": "client.index('movies').get_documents({\n 'limit':2, 'filter': 'genres=action',\n 'sort': ['rating:desc', 'release_date:asc'] # list format\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').get_documents(limit: 2, filter: 'genres = action')" + }, + { + "lang": "Rust", + "source": "let index = client.index(\"movies\");\nlet documents: DocumentsResults = DocumentsQuery::new(&index)\n .with_filter(\"genres = action\")\n .with_limit(2)\n .execute::()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getDocuments(params: DocumentsQuery(limit: 2)) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let movies):\n print(movies)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents?limit=2&filter=genres=action'" + } + ] + }, + "put": { + "tags": [ + "Documents" + ], + "summary": "Add or update documents", + "description": "Add a list of documents or update them if they already exist.\nIf you send an already existing document (same id) the old document will be only partially updated according to the fields of the new document. Thus, any fields not present in the new document are kept and remained unchanged.\nTo completely overwrite a document, see Add or replace documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document. `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved `_vectors` field in your documents.\n> It can accept an array of floats, multiple arrays of floats in an outer array or an object.\n> This object accepts keys corresponding to the different embedders defined your index settings.", + "operationId": "update_documents", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "primaryKey", + "in": "query", + "description": "The primary key of the documents. primaryKey is optional. If you want to set the primary key of your index through this route,\nit only has to be done the first time you add documents to the index. After which it will be ignored if given.", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "csvDelimiter", + "in": "query", + "description": "Customize the csv delimiter when importing CSV documents.", + "required": true, + "schema": { + "type": "string", + "default": "," + }, + "example": ";" + }, + { + "name": "customMetadata", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "example": "custom" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentAdditionOrUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.add", + "documents.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var movie = new[]\n{\n new Movie { Id = \"287947\", Title = \"Shazam ⚡️\", Genres = \"comedy\" }\n};\nawait index.UpdateDocumentsAsync(movie);" + }, + { + "lang": "Go", + "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\",\n },\n}\nclient.Index(\"movies\").UpdateDocuments(documents, nil)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateDocuments([{\n id: 287947,\n title: 'Shazam ⚡️',\n genres: 'comedy'\n}])" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateDocuments(\"[{\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam ⚡️\\\",\"\n + \"\\\"genres\\\": \\\"comedy\\\"\"\n + \"}]\"\n);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateDocuments([\n [\n 'id' => 287947,\n 'title' => 'Shazam ⚡️',\n 'genres' => 'comedy'\n ]\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_documents([{\n 'id': 287947,\n 'title': 'Shazam ⚡️',\n 'genres': 'comedy'\n}])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_documents([\n {\n id: 287947,\n title: 'Shazam ⚡️',\n genres: 'comedy'\n }\n])" + }, + { + "lang": "Rust", + "source": "// Define the type of our documents\n#[derive(Serialize, Deserialize)]\nstruct IncompleteMovie {\n id: usize,\n title: String,\n genres: String\n}\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .add_or_update(&[\n IncompleteMovie {\n id: 287947,\n title: \"Shazam ⚡️\".to_string(),\n genres: \"comedy\".to_string()\n }\n ], None)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let documentJsonString = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\"\n }\n]\n\"\"\"\nlet documents: Data = documentJsonString.data(using: .utf8)!\n\nclient.index(\"movies\").updateDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\"\n }\n ]'" + } + ] + }, + "post": { + "tags": [ + "Documents" + ], + "summary": "Add or replace documents", + "description": "Add a list of documents or replace them if they already exist.\n\nIf you send an already existing document (same id) the whole existing document will be overwritten by the new document. Fields previously in the document not present in the new document are removed.\n\nFor a partial update of the document see Add or update documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document. `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved `_vectors` field in your documents.\n> It can accept an array of floats, multiple arrays of floats in an outer array or an object.\n> This object accepts keys corresponding to the different embedders defined your index settings.", + "operationId": "replace_documents", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "primaryKey", + "in": "query", + "description": "The primary key of the documents. primaryKey is optional. If you want to set the primary key of your index through this route,\nit only has to be done the first time you add documents to the index. After which it will be ignored if given.", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "csvDelimiter", + "in": "query", + "description": "Customize the csv delimiter when importing CSV documents.", + "required": true, + "schema": { + "type": "string", + "default": "," + }, + "example": ";" + }, + { + "name": "customMetadata", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "example": "custom" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentAdditionOrUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.add", + "documents.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var movie = new[]\n{\n new Movie\n {\n Id = \"287947\",\n Title = \"Shazam\",\n Poster = \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n Overview = \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n ReleaseDate = \"2019-03-23\"\n }\n};\nawait index.AddDocumentsAsync(movie);" + }, + { + "lang": "Dart", + "source": "await client.index('movies').addDocuments([\n {\n 'id': 287947,\n 'title': 'Shazam',\n 'poster':\n 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview':\n 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n }\n]);" + }, + { + "lang": "Go", + "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\",\n },\n}\nclient.Index(\"movies\").AddDocuments(documents, nil)" + }, + { + "lang": "JS", + "source": "client.index('movies').addDocuments([{\n id: 287947,\n title: 'Shazam',\n poster: 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n overview: 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n release_date: '2019-03-23'\n}])" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").addDocuments(\"[{\"\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam\\\",\"\n + \"\\\"poster\\\": \\\"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\\\",\"\n + \"\\\"overview\\\": \\\"A boy is given the ability to become an adult superhero in times of need with a single magic word.\\\",\"\n + \"\\\"release_date\\\": \\\"2019-03-23\\\"\"\n + \"}]\"\n);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->addDocuments([\n [\n 'id' => 287947,\n 'title' => 'Shazam',\n 'poster' => 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview' => 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date' => '2019-03-23'\n ]\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').add_documents([{\n 'id': 287947,\n 'title': 'Shazam',\n 'poster': 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview': 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n}])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').add_documents([\n {\n id: 287947,\n title: 'Shazam',\n poster: 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n overview: 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n release_date: '2019-03-23'\n }\n])" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .add_or_replace(&[\n Movie {\n id: 287947,\n title: \"Shazam\".to_string(),\n poster: \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\".to_string(),\n overview: \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\".to_string(),\n release_date: \"2019-03-23\".to_string(),\n }\n ], None)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let documentJsonString = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n]\n\"\"\"\nlet documents: Data = documentJsonString.data(using: .utf8)!\n\nclient.index(\"movies\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n ]'" + } + ] + }, + "delete": { + "tags": [ + "Documents" + ], + "summary": "Delete all documents", + "description": "Delete all documents in the specified index.", + "operationId": "clear_all_documents", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentDeletion", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.delete", + "documents.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteAllDocumentsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').deleteAllDocuments();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").DeleteAllDocuments()" + }, + { + "lang": "JS", + "source": "client.index('movies').deleteAllDocuments()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").deleteAllDocuments();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->deleteAllDocuments();" + }, + { + "lang": "Python", + "source": "client.index('movies').delete_all_documents()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').delete_all_documents" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_all_documents()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").deleteAllDocuments() { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/documents'" + } + ] + } + }, + "/indexes/{indexUid}/documents/delete": { + "post": { + "tags": [ + "Documents" + ], + "summary": "Delete documents by filter", + "description": "Delete a set of documents based on a filter.", + "operationId": "delete_documents_by_filter", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentDeletionByFilter" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentDeletion", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.delete", + "documents.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new DeleteDocumentsQuery() { Filter = \"genres = action OR genres = adventure\" });" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").DeleteDocumentsByFilter(\"genres=action OR genres=adventure\")" + }, + { + "lang": "JS", + "source": "client.index('movies').deleteDocuments({\n filter: 'genres = action OR genres = adventure'\n})" + }, + { + "lang": "Java", + "source": "String filter = \"genres = action OR genres = adventure\";\nclient.index(\"movies\").deleteDocumentsByFilter(filter);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->deleteDocuments(['filter' => 'genres = action OR genres = adventure']);" + }, + { + "lang": "Python", + "source": "client.index('movies').delete_documents(filter='genres=action OR genres=adventure')" + }, + { + "lang": "Ruby", + "source": "client.index('movies').delete_documents(filter: 'genres = action OR genres = adventure')" + }, + { + "lang": "Rust", + "source": "let index = client.index(\"movies\");\nlet task = DocumentDeletionQuery::new(&index)\n .with_filter(\"genres = action OR genres = adventure\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/movies/documents/delete \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"genres = action OR genres = adventure\"\n }'" + } + ] + } + }, + "/indexes/{indexUid}/documents/delete-batch": { + "post": { + "tags": [ + "Documents" + ], + "summary": "Delete documents by batch", + "description": "Delete a set of documents based on an array of document ids.", + "operationId": "delete_documents_batch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": {} + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentAdditionOrUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.delete", + "documents.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new[] { \"23488\", \"153738\", \"437035\", \"363869\" });" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").DeleteDocuments([]string{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\",\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').deleteDocuments([23488, 153738, 437035, 363869])" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").deleteDocuments(Arrays.asList(new String[]\n{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\"\n}));" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->deleteDocuments([23488, 153738, 437035, 363869]);" + }, + { + "lang": "Python", + "source": "client.index('movies').delete_documents([23488, 153738, 437035, 363869])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').delete_documents([23488, 153738, 437035, 363869])" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_documents(&[23488, 153738, 437035, 363869])\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents/delete-batch' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n 23488,\n 153738,\n 437035,\n 363869\n ]'" + } + ] + } + }, + "/indexes/{indexUid}/documents/edit": { + "post": { + "tags": [ + "Documents" + ], + "summary": "Edit documents by function.", + "description": "Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to edit one or more documents directly in Meilisearch.", + "operationId": "edit_documents_by_function", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentEditionByFunction" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentDeletion", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/documents/fetch": { + "post": { + "tags": [ + "Documents" + ], + "summary": "Get documents with POST", + "description": "Get a set of documents.", + "operationId": "documents_by_query_post", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BrowseQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationView_Value" + }, + "example": { + "results": [ + { + "title": "The Travels of Ibn Battuta", + "genres": [ + "Travel", + "Adventure" + ], + "language": "English", + "rating": 4.5 + }, + { + "title": "Pride and Prejudice", + "genres": [ + "Classics", + "Fiction", + "Romance", + "Literature" + ], + "language": "English", + "rating": 4 + } + ], + "offset": 0, + "limit": 2, + "total": 5 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.delete", + "documents.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() {\n Limit = 3,\n Fields = new List { \"title\", \"genres\", \"rating\", \"language\"},\n Filter = \"(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English\"\n});" + }, + { + "lang": "Go", + "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"books\").GetDocuments(&meilisearch.DocumentsQuery{\n Fields: []string{\"title\", \"genres\", \"rating\", \"language\"},\n Filter: \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n}, &result)" + }, + { + "lang": "JS", + "source": "client.index('books').getDocuments({\n filter: '(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English',\n fields: ['title', 'genres', 'rating', 'language'],\n limit: 3\n})" + }, + { + "lang": "Java", + "source": "DocumentsQuery query = new DocumentsQuery()\n .setFilter(new String[] {\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\"})\n .setFields(new String[] {\"title\", \"genres\", \"rating\", \"language\"})\n .setLimit(3);\nclient.index(\"books\").getDocuments(query, TargetClassName.class);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->getDocuments(\n (new DocumentsQuery())\n ->setFilter('(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English')\n ->setLimit(3)\n ->setFields(['title', 'genres', 'rating', 'language'])\n);" + }, + { + "lang": "Python", + "source": "client.index('books').get_documents({\n 'limit':3,\n 'fields': ['title', 'genres', 'rating', 'language'],\n 'filter': '(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English',\n 'sort': 'rating:desc, title:asc' # comma-separated string format\n})" + }, + { + "lang": "Ruby", + "source": "client.index('books').get_documents(\n filter: '(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English',\n limit: 3,\n fields: ['title', 'genres', 'rating', 'language']\n)" + }, + { + "lang": "Rust", + "source": "let index = client.index(\"books\");\nlet documents: DocumentsResults = DocumentsQuery::new(&index)\n .with_filter(\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\")\n .with_fields([\"title\", \"genres\", \"rating\", \"language\"])\n .with_limit(2)\n .execute::()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/books/documents/fetch \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n \"fields\": [\"title\", \"genres\", \"rating\", \"language\"],\n \"limit\": 3\n }'" + } + ] + } + }, + "/indexes/{indexUid}/documents/{documentId}": { + "get": { + "tags": [ + "Documents" + ], + "summary": "Get one document", + "description": "Get one document from its primary key.", + "operationId": "get_document", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "documentId", + "in": "path", + "description": "The document identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "85087" + }, + { + "name": "fields", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "retrieveVectors", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "The document is returned", + "content": { + "application/json": { + "schema": {}, + "example": { + "id": 25684, + "title": "American Ninja 5", + "poster": "https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg", + "overview": "When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.", + "release_date": 725846400 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Document not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Document `a` not found.", + "code": "document_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#document_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.get", + "documents.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetDocumentAsync(25684, new List { \"id\", \"title\", \"poster\", \"release_date\" });" + }, + { + "lang": "Go", + "source": "var a interface{}\nclient.Index(\"movies\").GetDocument(\"25684\",&meilisearch.DocumentQuery{\n Fields: []string{\"id\", \"title\", \"poster\", \"release_date\"},\n}, &a)" + }, + { + "lang": "JS", + "source": "client\n .index('movies')\n .getDocument(25684, { fields: ['id', 'title', 'poster', 'release_date'] })" + }, + { + "lang": "Java", + "source": "DocumentQuery query = new DocumentQuery().setFields(new String[] {\"id\", \"title\", \"poster\", \"release_date\"});\nclient.index(\"movies\").getDocument(\"25684\", query);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getDocument(25684, ['id', 'title', 'poster', 'release_date']);" + }, + { + "lang": "Python", + "source": "client.index('movies').get_document(25684, {\n 'fields': ['id', 'title', 'poster', 'release_date']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').document(25684, fields: ['id', 'title', 'poster', 'release_date'])" + }, + { + "lang": "Rust", + "source": "let index = client\n .index(\"movies\");\nlet document = DocumentQuery::new(&index)\n .with_fields([\"id\", \"title\", \"poster\", \"release_date\"])\n .execute::(\"25684\")\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getDocument(25684) { (result: Result) in\n switch result {\n case .success(let movie):\n print(movie)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents/25684?fields=id,title,poster,release_date'" + } + ] + }, + "delete": { + "tags": [ + "Documents" + ], + "summary": "Delete a document", + "description": "Delete a single document by id.", + "operationId": "delete_document", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "documentId", + "in": "path", + "description": "Document Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "853" + } + ], + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentAdditionOrUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.delete", + "documents.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/facet-search": { + "post": { + "tags": [ + "Facet Search" + ], + "summary": "Perform a facet search", + "description": "Search for a facet value within a given facet.", + "operationId": "search", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacetSearchQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchResult" + }, + "example": { + "hits": [ + { + "id": 2770, + "title": "American Pie 2", + "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", + "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", + "release_date": 997405200 + }, + { + "id": 190859, + "title": "American Sniper", + "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", + "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", + "release_date": 1418256000 + } + ], + "offset": 0, + "limit": 2, + "estimatedTotalHits": 976, + "processingTimeMs": 35, + "query": "american " + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var query = new SearchFacetsQuery()\n{\n FacetQuery = \"fiction\",\n Filter = \"rating > 3\"\n};\nawait client.Index(\"books\").FacetSearchAsync(\"genres\", query);" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").FacetSearch(&meilisearch.FacetSearchRequest{\n FacetQuery: \"fiction\",\n FacetName: \"genres\",\n Filter: \"rating > 3\",\n})" + }, + { + "lang": "JS", + "source": "client.index('books').searchForFacetValues({\n facetQuery: 'fiction',\n facetName: 'genres'\n filter: 'rating > 3'\n})" + }, + { + "lang": "Java", + "source": "FacetSearchRequest fsr = FacetSearchRequest.builder().facetName(\"genres\").facetQuery(\"fiction\").filter(new String[]{\"rating > 3\"}).build();\nclient.index(\"books\").facetSearch(fsr);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->facetSearch(\n (new FacetSearchQuery())\n ->setFacetQuery('fiction')\n ->setFacetName('genres')\n ->setFilter(['rating > 3'])\n);" + }, + { + "lang": "Python", + "source": "client.index('books').facet_search('genres', 'fiction', {\n 'filter': 'rating > 3'\n})" + }, + { + "lang": "Ruby", + "source": "client.index('books').facet_search('genres', 'fiction', filter: 'rating > 3')" + }, + { + "lang": "Rust", + "source": "let res = client.index(\"books\")\n .facet_search(\"genres\")\n .with_facet_query(\"fiction\")\n .with_filter(\"rating > 3\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"facetQuery\": \"fiction\",\n \"facetName\": \"genres\",\n \"filter\": \"rating > 3\"\n }'" + } + ] + } + }, + "/indexes/{indexUid}/search": { + "get": { + "tags": [ + "Indexes", + "Search" + ], + "summary": "Search an index with GET", + "description": "Search for documents matching a specific query in the given index.", + "operationId": "search_with_url_query", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "q", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "vector", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "explode": false + }, + { + "name": "offset", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "default": 20, + "minimum": 0 + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "hitsPerPage", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "attributesToRetrieve", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false + }, + { + "name": "retrieveVectors", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "attributesToCrop", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false + }, + { + "name": "cropLength", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "default": 10, + "minimum": 0 + } + }, + { + "name": "attributesToHighlight", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "distinct", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "showMatchesPosition", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "showRankingScore", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "showRankingScoreDetails", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "facets", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false + }, + { + "name": "highlightPreTag", + "in": "query", + "required": true, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "highlightPostTag", + "in": "query", + "required": true, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "cropMarker", + "in": "query", + "required": true, + "schema": { + "type": "string", + "default": "…" + } + }, + { + "name": "matchingStrategy", + "in": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/MatchingStrategy" + } + }, + { + "name": "attributesToSearchOn", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false + }, + { + "name": "hybridEmbedder", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "hybridSemanticRatio", + "in": "query", + "required": true, + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "rankingScoreThreshold", + "in": "query", + "required": true, + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "locales", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Locale" + } + }, + "explode": false + }, + { + "name": "personalizeUserContext", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchResult" + }, + "example": { + "hits": [ + { + "id": 2770, + "title": "American Pie 2", + "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", + "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", + "release_date": 997405200 + }, + { + "id": 190859, + "title": "American Sniper", + "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", + "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", + "release_date": 1418256000 + } + ], + "offset": 0, + "limit": 2, + "estimatedTotalHits": 976, + "processingTimeMs": 35, + "query": "american " + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "JS", + "source": "client.index('movies').searchGet('American ninja')" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/search?q=american%20ninja'" + } + ] + }, + "post": { + "tags": [ + "Indexes", + "Search" + ], + "summary": "Search with POST", + "description": "Search for documents matching a specific query in the given index.", + "operationId": "search_with_post", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchResult" + }, + "example": { + "hits": [ + { + "id": 2770, + "title": "American Pie 2", + "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", + "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", + "release_date": 997405200 + }, + { + "id": 190859, + "title": "American Sniper", + "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", + "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", + "release_date": 1418256000 + } + ], + "offset": 0, + "limit": 2, + "estimatedTotalHits": 976, + "processingTimeMs": 35, + "query": "american " + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").SearchAsync(\"American ninja\");" + }, + { + "lang": "Dart", + "source": "await client.index('movies').search('American ninja');" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").Search(\"american ninja\", &meilisearch.SearchRequest{})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('American ninja')" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").search(\"American ninja\");" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('american ninja');" + }, + { + "lang": "Python", + "source": "client.index('movies').search('American ninja')" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('american ninja')" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"american ninja\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(query: \"American ninja\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"american ninja\" }'" + } + ] + } + }, + "/indexes/{indexUid}/settings": { + "get": { + "tags": [ + "Settings" + ], + "summary": "All settings", + "description": "This route allows you to retrieve, configure, or reset all of an index's settings at once.", + "operationId": "get_all", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "Settings are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Settings_Unchecked" + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetSettingsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getSettings();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetSettings()" + }, + { + "lang": "JS", + "source": "client.index('movies').getSettings()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getSettings();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_settings()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').settings" + }, + { + "lang": "Rust", + "source": "let settings: Settings = client\n .index(\"movies\")\n .get_settings()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getSettings { (result) in\n switch result {\n case .success(let setting):\n print(setting)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset settings", + "description": "Reset all the settings of an index to their default value.", + "operationId": "delete_all", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSettingsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetSettings();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetSettings()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetSettings()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetSettings();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_settings()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_settings" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_settings()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").resetSettings { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings'" + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update settings", + "description": "Update the settings of an index.\nPassing null to an index setting will reset it to its default value.\nUpdates in the settings route are partial. This means that any parameters not provided in the body will be left unchanged.\nIf the provided index does not exist, it will be created.", + "operationId": "update_all", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Settings_Unchecked" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "Settings newSettings = new Settings\n{\n RankingRules = new string[]\n {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n },\n DistinctAttribute = \"movie_id\",\n SearchableAttributes = new string[] { \"title\", \"overview\", \"genres\" },\n DisplayedAttributes = new string[] { \"title\", \"overview\", \"genres\", \"release_date\" },\n SortableAttributes = new string[] { \"title\", \"release_date\" },\n StopWords = new string[] { \"the\", \"a\", \"an\" },\n Synonyms = new Dictionary>\n {\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\" } },\n },\n FilterableAttributes = new string[] { },\n TypoTolerance = new TypoTolerance\n {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeForTypos = new TypoTolerance.TypoSize\n {\n OneTypo = 8,\n TwoTypos = 10\n }\n },\n SearchCutoffMs = 150\n};\nTaskInfo task = await client.Index(\"movies\").UpdateSettingsAsync(newFilters);" + }, + { + "lang": "Go", + "source": "distinctAttribute := \"movie_id\"\nsettings := meilisearch.Settings{\n RankingRules: []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\",\n },\n DistinctAttribute: &distinctAttribute,\n SearchableAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n },\n DisplayedAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n },\n StopWords: []string{\n \"the\",\n \"a\",\n \"an\",\n },\n SortableAttributes: []string{\n \"title\",\n \"release_date\",\n },\n Synonyms: map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\"},\n },\n TypoTolerance: &meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 8,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n },\n Pagination: &meilisearch.Pagination{\n MaxTotalHits: 5000,\n },\n Faceting: &meilisearch.Faceting{\n MaxValuesPerFacet: 200,\n },\n SearchCutoffMs: 150,\n}\nclient.Index(\"movies\").UpdateSettings(&settings)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateSettings({\n rankingRules: [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n distinctAttribute: 'movie_id',\n searchableAttributes: [\n 'title',\n 'overview',\n 'genres'\n ],\n displayedAttributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n stopWords: [\n 'the',\n 'a',\n 'an'\n ],\n sortableAttributes: [\n 'title',\n 'release_date'\n ],\n synonyms: {\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine']\n },\n typoTolerance: {\n 'minWordSizeForTypos': {\n 'oneTypo': 8,\n 'twoTypos': 10\n },\n 'disableOnAttributes': [\n 'title'\n ]\n },\n pagination: {\n maxTotalHits: 5000\n },\n faceting: {\n maxValuesPerFacet: 200\n },\n searchCutoffMs: 150\n})" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setRankingRules(\n new String[] {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n });\nsettings.setDistinctAttribute(\"movie_id\");\nsettings.setSearchableAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\"\n });\nsettings.setDisplayedAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n });\nsettings.setStopWords(\n new String[] {\n \"the\",\n \"a\",\n \"an\"\n });\nsettings.setSortableAttributes(\n new String[] {\n \"title\",\n \"release_date\"\n });\n\nHashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nsettings.setSynonyms(synonyms);\n\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 8);\n put(\"twoTypos\", 10);\n }\n };\nTypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\nsettings.setTypoTolerance(typoTolerance);\nsettings.setSearchCutoffMs(150);\nclient.index(\"movies\").updateSettings(settings);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateSettings([\n 'rankingRules' => [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n 'distinctAttribute' => 'movie_id',\n 'searchableAttributes' => [\n 'title',\n 'overview',\n 'genres'\n ],\n 'displayedAttributes' => [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n 'stopWords' => [\n 'the',\n 'a',\n 'an'\n ],\n 'sortableAttributes' => [\n 'title',\n 'release_date'\n ],\n 'synonyms' => [\n 'wolverine' => ['xmen', 'logan'],\n 'logan' => ['wolverine']\n ],\n 'typoTolerance' => [\n 'minWordSizeForTypos' => [\n 'oneTypo' => 8,\n 'twoTypos' => 10\n ],\n 'disableOnAttributes' => ['title']\n ],\n 'pagination' => [\n 'maxTotalHits' => 5000\n ],\n 'faceting' => [\n 'maxValuesPerFacet' => 200\n ],\n 'searchCutoffMs' => 150\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_settings({\n 'rankingRules': [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n 'distinctAttribute': 'movie_id',\n 'searchableAttributes': [\n 'title',\n 'overview',\n 'genres'\n ],\n 'displayedAttributes': [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n 'sortableAttributes': [\n 'title',\n 'release_date'\n ],\n 'stopWords': [\n 'the',\n 'a',\n 'an'\n ],\n 'synonyms': {\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine']\n },\n 'typoTolerance': {\n 'minWordSizeForTypos': {\n 'oneTypo': 8,\n 'twoTypos': 10\n },\n 'disableOnAttributes': ['title']\n },\n 'pagination': {\n 'maxTotalHits': 5000\n },\n 'faceting': {\n 'maxValuesPerFacet': 200\n },\n 'searchCutoffMs': 150\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_settings({\n ranking_rules: [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n distinct_attribute: 'movie_id',\n searchable_attributes: [\n 'title',\n 'overview',\n 'genres'\n ],\n displayed_attributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n stop_words: [\n 'the',\n 'a',\n 'an'\n ],\n sortable_attributes: [\n 'title',\n 'release_date'\n ],\n synonyms: {\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine']\n },\n pagination: {\n max_total_hits: 5000\n },\n faceting: {\n max_values_per_facet: 200\n },\n search_cutoff_ms: 150\n})" + }, + { + "lang": "Rust", + "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"wolverine\"), vec![\"xmen\", \"logan\"]);\nsynonyms.insert(String::from(\"logan\"), vec![\"wolverine\"]);\n\nlet min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(4),\n two_typos; Some(12)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![\"title\".to_string()]),\n disable_on_words: Some(vec![])\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet settings = Settings::new()\n .with_ranking_rules([\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ])\n .with_distinct_attribute(Some(\"movie_id\"))\n .with_searchable_attributes([\n \"title\",\n \"overview\",\n \"genres\"\n ])\n .with_displayed_attributes([\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ])\n .with_stop_words([\n \"the\",\n \"a\",\n \"an\"\n ])\n .with_sortable_attributes([\n \"title\",\n \"release_date\"\n ])\n .with_synonyms(synonyms)\n .with_typo_tolerance(typo_tolerance)\n .with_search_cutoff(150);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_settings(&settings)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let settings = Setting(rankingRules: [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n], searchableAttributes: [\n \"title\",\n \"overview\",\n \"genres\"\n], displayedAttributes: [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n], stopWords: [\n \"the\",\n \"a\",\n \"an\"\n], synonyms: [\n \"wolverine\": [\"xmen\", \"logan\"],\n \"logan\": [\"wolverine\"]\n], distinctAttribute: \"movie_id\",\nsortableAttributes: [\n \"title\",\n \"release_date\"\n])\nclient.index(\"movies\").updateSettings(settings) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"rankingRules\": [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ],\n \"distinctAttribute\": \"movie_id\",\n \"searchableAttributes\": [\n \"title\",\n \"overview\",\n \"genres\"\n ],\n \"displayedAttributes\": [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ],\n \"stopWords\": [\n \"the\",\n \"a\",\n \"an\"\n ],\n \"sortableAttributes\": [\n \"title\",\n \"release_date\"\n ],\n \"synonyms\": {\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\"wolverine\"]\n },\n \"typoTolerance\": {\n \"minWordSizeForTypos\": {\n \"oneTypo\": 8,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n },\n \"pagination\": {\n \"maxTotalHits\": 5000\n },\n \"faceting\": {\n \"maxValuesPerFacet\": 200\n },\n \"searchCutoffMs\": 150\n }'" + } + ] + } + }, + "/indexes/{indexUid}/settings/chat": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get chat", + "description": "Get an user defined chat", + "operationId": "getchat", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "chat is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChatSettings" + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset chat", + "description": "Reset an index's chat to its default value", + "operationId": "deletechat", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChatSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update chat", + "description": "Update an index's user defined chat", + "operationId": "patchchat", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChatSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/dictionary": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get dictionary", + "description": "Get an user defined dictionary", + "operationId": "getdictionary", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "dictionary is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var indexDictionary = await client.Index(\"books\").GetDictionaryAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetDictionary()" + }, + { + "lang": "JS", + "source": "client.index('books').getDictionary()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").getDictionarySettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->getDictionary();" + }, + { + "lang": "Python", + "source": "client.index('books').get_dictionary()" + }, + { + "lang": "Ruby", + "source": "client.index('books').dictionary" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('books')\n .get_dictionary()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").getDictionary { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/dictionary'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update dictionary", + "description": "Update an index's user defined dictionary", + "operationId": "putdictionary", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var newDictionary = new string[] { \"J. R. R.\", \"W. E. B.\" };\nawait client.Index(\"books\").UpdateDictionaryAsync(newDictionary);" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateDictionary([]string{\n \"J. R. R.\",\n \"W. E. B.\",\n})" + }, + { + "lang": "JS", + "source": "client.index('books').updateDictionary(['J. R. R.', 'W. E. B.'])" + }, + { + "lang": "Java", + "source": "client.index(\"books\").updateDictionarySettings(new String[] {\"J. R. R.\", \"W. E. B.\"});" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateDictionary(['J. R. R.', 'W. E. B.']);" + }, + { + "lang": "Python", + "source": "client.index('books').update_dictionary([\"J. R. R.\", \"W. E. B.\"])" + }, + { + "lang": "Ruby", + "source": "client.index('books').update_dictionary(['J. R. R.', 'W. E. B.'])" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('books')\n .set_dictionary(['J. R. R.', 'W. E. B.'])\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").updateDictionary([\"J. R. R.\", \"W. E. B.\"]) { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/dictionary' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"J. R. R.\",\n \"W. E. B.\"\n ]'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset dictionary", + "description": "Reset an index's dictionary to its default value", + "operationId": "deletedictionary", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").ResetDictionaryAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetDictionary()" + }, + { + "lang": "JS", + "source": "client.index('books').resetDictionary()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").resetDictionarySettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->resetDictionary();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_dictionary()" + }, + { + "lang": "Ruby", + "source": "client.index('books').reset_dictionary" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('books')\n .reset_dictionary()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").resetDictionary { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/dictionary'" + } + ] + } + }, + "/indexes/{indexUid}/settings/displayed-attributes": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get displayedAttributes", + "description": "Get an user defined displayedAttributes", + "operationId": "getdisplayedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "displayedAttributes is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetDisplayedAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getDisplayedAttributes();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetDisplayedAttributes()" + }, + { + "lang": "JS", + "source": "client.index('movies').getDisplayedAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getDisplayedAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getDisplayedAttributes();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_displayed_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').get_displayed_attributes" + }, + { + "lang": "Rust", + "source": "let displayed_attributes: Vec = client\n .index(\"movies\")\n .get_displayed_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getDisplayedAttributes { (result) in\n switch result {\n case .success(let displayedAttributes):\n print(displayedAttributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update displayedAttributes", + "description": "Update an index's user defined displayedAttributes", + "operationId": "putdisplayedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateDisplayedAttributesAsync(new[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" + }, + { + "lang": "Go", + "source": "displayedAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n}\nclient.Index(\"movies\").UpdateDisplayedAttributes(&displayedAttributes)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateDisplayedAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" + }, + { + "lang": "Rust", + "source": "let displayed_attributes = [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_displayed_attributes(&displayed_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let displayedAttributes: [String] = [\"title\", \"overview\", \"genres\", \"release_date\"]\nclient.index(\"movies\").updateDisplayedAttributes(displayedAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ]'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset displayedAttributes", + "description": "Reset an index's displayedAttributes to its default value", + "operationId": "deletedisplayedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetDisplayedAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetDisplayedAttributes();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetDisplayedAttributes()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetDisplayedAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetDisplayedAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetDisplayedAttributes();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_displayed_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_displayed_attributes" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_displayed_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").resetDisplayedAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" + } + ] + } + }, + "/indexes/{indexUid}/settings/distinct-attribute": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get distinctAttribute", + "description": "Get an user defined distinctAttribute", + "operationId": "getdistinctAttribute", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "distinctAttribute is returned", + "content": { + "application/json": { + "schema": { + "type": "string" + }, + "example": "" + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "string result = await client.Index(\"shoes\").GetDistinctAttributeAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('shoes').getDistinctAttribute();" + }, + { + "lang": "Go", + "source": "client.Index(\"shoes\").GetDistinctAttribute()" + }, + { + "lang": "JS", + "source": "client.index('shoes').getDistinctAttribute()" + }, + { + "lang": "Java", + "source": "client.index(\"shoes\").getDistinctAttributeSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('shoes')->getDistinctAttribute();" + }, + { + "lang": "Python", + "source": "client.index('shoes').get_distinct_attribute()" + }, + { + "lang": "Ruby", + "source": "client.index('shoes').distinct_attribute" + }, + { + "lang": "Rust", + "source": "let distinct_attribute: Option = client\n .index(\"shoes\")\n .get_distinct_attribute()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"shoes\").getDistinctAttribute { (result) in\n switch result {\n case .success(let distinctAttribute):\n print(distinctAttribute)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update distinctAttribute", + "description": "Update an index's user defined distinctAttribute", + "operationId": "putdistinctAttribute", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "TaskInfo result = await client.Index(\"shoes\").UpdateDistinctAttributeAsync(\"skuid\");" + }, + { + "lang": "Dart", + "source": "await client.index('shoes').updateDistinctAttribute('skuid');" + }, + { + "lang": "Go", + "source": "client.Index(\"shoes\").UpdateDistinctAttribute(\"skuid\")" + }, + { + "lang": "JS", + "source": "client.index('shoes').updateDistinctAttribute('skuid')" + }, + { + "lang": "Java", + "source": "client.index(\"shoes\").updateDistinctAttributeSettings(\"skuid\");" + }, + { + "lang": "PHP", + "source": "$client->index('shoes')->updateDistinctAttribute('skuid');" + }, + { + "lang": "Python", + "source": "client.index('shoes').update_distinct_attribute('skuid')" + }, + { + "lang": "Ruby", + "source": "client.index('shoes').update_distinct_attribute('skuid')" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"shoes\")\n .set_distinct_attribute(\"skuid\")\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"shoes\").updateDistinctAttribute(\"skuid\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"skuid\"'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset distinctAttribute", + "description": "Reset an index's distinctAttribute to its default value", + "operationId": "deletedistinctAttribute", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "TaskInfo result = await client.Index(\"shoes\").ResetDistinctAttributeAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('shoes').resetDistinctAttribute();" + }, + { + "lang": "Go", + "source": "client.Index(\"shoes\").ResetDistinctAttribute()" + }, + { + "lang": "JS", + "source": "client.index('shoes').resetDistinctAttribute()" + }, + { + "lang": "Java", + "source": "client.index(\"shoes\").resetDistinctAttributeSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('shoes')->resetDistinctAttribute();" + }, + { + "lang": "Python", + "source": "client.index('shoes').reset_distinct_attribute()" + }, + { + "lang": "Ruby", + "source": "client.index('shoes').reset_distinct_attribute" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"shoes\")\n .reset_distinct_attribute()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"shoes\").resetDistinctAttribute { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" + } + ] + } + }, + "/indexes/{indexUid}/settings/embedders": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get embedders", + "description": "Get an user defined embedders", + "operationId": "getembedders", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "embedders is returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SettingEmbeddingSettings" + }, + "propertyNames": { + "type": "string" + } + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').embedders" + }, + { + "lang": "Rust", + "source": "let embedders = index.get_embedders().await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset embedders", + "description": "Reset an index's embedders to its default value", + "operationId": "deleteembedders", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SettingEmbeddingSettings" + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').reset_embedders" + }, + { + "lang": "Rust", + "source": "index.reset_embedders().await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update embedders", + "description": "Update an index's user defined embedders", + "operationId": "patchembedders", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SettingEmbeddingSettings" + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "JS", + "source": "client.index('INDEX_NAME').updateEmbedders({\n default: {\n source: 'openAi',\n apiKey: 'OPEN_AI_API_KEY',\n model: 'text-embedding-3-small',\n documentTemplate: 'A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}'\n }\n});" + }, + { + "lang": "PHP", + "source": "$client->updateEmbedders([\n 'default' => [\n 'source' => 'openAi',\n 'apiKey' => 'OPEN_AI_API_KEY',\n 'model' => 'text-embedding-3-small',\n 'documentTemplate' => 'A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}'\n ]\n]);" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').update_embedders(\n default: {\n source: 'openAi',\n api_key: 'OPEN_AI_API_KEY',\n model: 'text-embedding-3-small',\n document_template: \"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\"\n }\n)" + }, + { + "lang": "Rust", + "source": "let embedders = HashMap::from([(\n String::from(\"default\"),\n Embedder {\n source: EmbedderSource::OpenAi,\n api_key: Some(String::from(\"OPEN_AI_API_KEY\")),\n model: Some(String::from(\"text-embedding-3-small\")),\n document_template: Some(String::from(\"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\")),\n ..Embedder::default()\n }\n)]);\nlet task = index\n .set_embedders(&embedders)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"default\": {\n \"source\": \"openAi\",\n \"apiKey\": \"OPEN_AI_API_KEY\",\n \"model\": \"text-embedding-3-small\",\n \"documentTemplate\": \"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\"\n }\n }'" + } + ] + } + }, + "/indexes/{indexUid}/settings/facet-search": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get facetSearch", + "description": "Get an user defined facetSearch", + "operationId": "getfacetSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "facetSearch is returned", + "content": { + "application/json": { + "schema": { + "type": "boolean" + }, + "example": false + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.Index(\"books\").GetFacetSearch()" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').getFacetSearch();" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->getFacetSearch();" + }, + { + "lang": "Python", + "source": "client.index('books').get_facet_search_settings()" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_UID').facet_search_setting" + }, + { + "lang": "Rust", + "source": "let facet_search: bool = client\n .index(INDEX_UID)\n .get_facet_search()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update facetSearch", + "description": "Update an index's user defined facetSearch", + "operationId": "putfacetSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "boolean" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateFacetSearch(false)" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').updateFacetSearch(false);" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->updateFacetSearch(false);" + }, + { + "lang": "Python", + "source": "client.index('books').update_facet_search_settings(False)" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_UID').update_facet_search_setting(false)" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_facet_search(false)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary 'false'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset facetSearch", + "description": "Reset an index's facetSearch to its default value", + "operationId": "deletefacetSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "boolean" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.Index(\"books\").ResetFacetSearch()" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').resetFacetSearch();" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->resetFacetSearch();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_facet_search_settings()" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_UID').reset_facet_search_setting" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_facet_search()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" + } + ] + } + }, + "/indexes/{indexUid}/settings/faceting": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get faceting", + "description": "Get an user defined faceting", + "operationId": "getfaceting", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "faceting is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacetingSettings" + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetFacetingAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getFaceting();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetFaceting()" + }, + { + "lang": "JS", + "source": "client.index('books').getFaceting()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").getFacetingSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->getFaceting();" + }, + { + "lang": "Python", + "source": "client.index('books').get_faceting_settings()" + }, + { + "lang": "Ruby", + "source": "client.index('books').faceting" + }, + { + "lang": "Rust", + "source": "let faceting: FacetingSettings = client\n .index(\"books\")\n .get_faceting()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/faceting'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset faceting", + "description": "Reset an index's faceting to its default value", + "operationId": "deletefaceting", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacetingSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetFacetingAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetFaceting();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetFaceting()" + }, + { + "lang": "JS", + "source": "client.index('books').resetFaceting()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").resetFacetingSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->resetFaceting();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_faceting_settings()" + }, + { + "lang": "Ruby", + "source": "index('books').reset_faceting" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_faceting()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/faceting'" + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update faceting", + "description": "Update an index's user defined faceting", + "operationId": "patchfaceting", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacetingSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var faceting = new Faceting\n{\n MaxValuesPerFacet = 2,\n SortFacetValuesBy = new Dictionary\n {\n [\"*\"] = SortFacetValuesByType.Alpha,\n [\"genres\"] = SortFacetValuesByType.Count\n }\n};\nawait client.Index(\"books\").UpdateFacetingAsync(faceting);" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateFaceting(&meilisearch.Faceting{\n MaxValuesPerFacet: 2,\n SortFacetValuesBy: {\n \"*\": SortFacetTypeAlpha,\n \"genres\": SortFacetTypeCount,\n }\n})" + }, + { + "lang": "JS", + "source": "client.index('books').updateFaceting({\n maxValuesPerFacet: 2\n sortFacetValuesBy: {\n '*': 'alpha',\n genres: 'count'\n }\n})" + }, + { + "lang": "Java", + "source": "Faceting newFaceting = new Faceting();\nnewFaceting.setMaxValuesPerFacet(2);\nHashMap facetSortValues = new HashMap<>();\nfacetSortValues.put(\"*\", FacetSortValue.ALPHA);\nfacetSortValues.put(\"genres\", FacetSortValue.COUNT);\nnewFaceting.setSortFacetValuesBy(facetSortValues);\nclient.index(\"books\").updateFacetingSettings(newFaceting);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateFaceting([\n 'maxValuesPerFacet' => 2,\n 'sortFacetValuesBy' => ['*' => 'alpha', 'genres' => 'count']\n]);" + }, + { + "lang": "Python", + "source": "params = {\n 'maxValuesPerFacet': 2,\n 'sortFacetValuesBy': {\n '*': 'count',\n 'genres': 'count'\n }\n}\nclient.index('books').update_faceting_settings(params)" + }, + { + "lang": "Ruby", + "source": "client.index('books').update_faceting({\n max_values_per_facet: 2,\n sort_facet_values_by: {\n '*': 'alpha',\n genres: 'count'\n }\n})" + }, + { + "lang": "Rust", + "source": "let mut facet_sort_setting = BTreeMap::new();\nfacet_sort_setting.insert(String::from(\"*\"), FacetSortValue::Alpha);\nfacet_sort_setting.insert(String::from(\"genres\"), FacetSortValue::Count);\nlet mut faceting = FacetingSettings {\n max_values_per_facet: 2,\n sort_facet_values_by: Some(facet_sort_setting),\n};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_faceting(&faceting)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/faceting' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxValuesPerFacet\": 2,\n \"sortFacetValuesBy\": {\n \"*\": \"alpha\",\n \"genres\": \"count\"\n }\n }'" + } + ] + } + }, + "/indexes/{indexUid}/settings/filterable-attributes": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get filterableAttributes", + "description": "Get an user defined filterableAttributes", + "operationId": "getfilterableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "filterableAttributes is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FilterableAttributesRule" + } + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "IEnumerable attributes = await client.Index(\"movies\").GetFilterableAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getFilterableAttributes();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetFilterableAttributes()" + }, + { + "lang": "JS", + "source": "client.index('movies').getFilterableAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getFilterableAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getFilterableAttributes();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_filterable_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').filterable_attributes" + }, + { + "lang": "Rust", + "source": "let filterable_attributes: Vec = client\n .index(\"movies\")\n .get_filterable_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update filterableAttributes", + "description": "Update an index's user defined filterableAttributes", + "operationId": "putfilterableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FilterableAttributesRule" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "List attributes = new() { \"genres\", \"director\" };\nTaskInfo result = await client.Index(\"movies\").UpdateFilterableAttributesAsync(attributes);" + }, + { + "lang": "Go", + "source": "filterableAttributes := []interface{}{\n \"genres\",\n \"director\",\n AttributeRule{\n AttributePatterns: []string{\"tag\"}\n Features: AttributeFeatures{\n FacetSearch: false,\n Filter: FilterFeatures{\n Equality: true,\n Comparison: false,\n }\n }\n },\n map[string]interface{}{\n \"attributePatterns\": []interface{}{\"year\"}\n \"features\": map[string]interface{}{\n \"facetSearch\": false,\n \"filter\": map[string]interface{}{\n \"equality\": true,\n \"comparison\": true,\n }\n }\n }\n}\nclient.Index(\"movies\").UpdateFilterableAttributes(&filterableAttributes)" + }, + { + "lang": "JS", + "source": "client.index('movies')\n .updateFilterableAttributes([\n \"genres\",\n {\n attributePatterns: [\"genre\"],\n features: {\n facetSearch: true,\n filter: { equality: true, comparison: false },\n },\n }\n ])" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setFilterableAttributes(new String[] {\"genres\", \"director\"});\nclient.index(\"movies\").updateSettings(settings);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateFilterableAttributes([\n 'author',\n [\n 'attributePatterns' => ['genres'],\n 'features' => [\n 'facetSearch' => true,\n 'filter' => [\n 'equality' => true,\n 'comparison' => false,\n ],\n ],\n ],\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_filterable_attributes([\n 'genres',\n 'director'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_filterable_attributes([\n 'genres',\n 'director'\n])" + }, + { + "lang": "Rust", + "source": "let filterable_attributes = [\n \"genres\",\n \"director\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_filterable_attributes(&filterable_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").updateFilterableAttributes([\"genre\", \"director\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"genres\",\n \"director\",\n {\n \"attributePatterns\": [\"*_ratings\"],\n \"features\": {\n \"facetSearch\": false,\n \"filter\": {\n \"equality\": true,\n \"comparison\": false\n }\n }\n }\n ]'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset filterableAttributes", + "description": "Reset an index's filterableAttributes to its default value", + "operationId": "deletefilterableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FilterableAttributesRule" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "TaskInfo result = await client.Index(\"movies\").ResetFilterableAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetFilterableAttributes();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetFilterableAttributes()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetFilterableAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetFilterableAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetFilterableAttributes();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_filterable_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_filterable_attributes" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_filterable_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").resetFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" + } + ] + } + }, + "/indexes/{indexUid}/settings/localized-attributes": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get localizedAttributes", + "description": "Get an user defined localizedAttributes", + "operationId": "getlocalizedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "localizedAttributes is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalizedAttributesRuleView" + } + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.index(\"INDEX_NAME\").GetLocalizedAttributes()" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').getLocalizedAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"INDEX_NAME\").getLocalizedAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->getLocalizedAttributes();" + }, + { + "lang": "Python", + "source": "client.index('INDEX_NAME').get_localized_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').localized_attributes" + }, + { + "lang": "Rust", + "source": "let localized_attributes: Option> = client\n .index(\"books\")\n .get_localized_attributes()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update localizedAttributes", + "description": "Update an index's user defined localizedAttributes", + "operationId": "putlocalizedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalizedAttributesRuleView" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.index(\"INDEX_NAME\").UpdateLocalizedAttributes([]*LocalizedAttributes{\n { AttributePatterns: [\"*_ja\"], Locales: [\"jpn\"] },\n})" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').updateLocalizedAttributes([\n { attributePatterns: ['*_ja'], locales: ['jpn'] },\n])" + }, + { + "lang": "Java", + "source": "LocalizedAttribute attribute = new LocalizedAttribute();\nattribute.setAttributePatterns(new String[] {\"jpn\"});\nattribute.setLocales(new String[] {\"*_ja\"});\n\nclient.index(\"INDEX_NAME\").updateLocalizedAttributesSettings(\n new LocalizedAttributes[] {attribute}\n);" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->updateLocalizedAttributes([\n 'locales' => ['jpn'],\n 'attributePatterns' => ['*_ja']\n]);" + }, + { + "lang": "Python", + "source": "client.index('INDEX_NAME').update_localized_attributes([\n {'attribute_patterns': ['*_ja'], 'locales': ['jpn']}\n])" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').update_localized_attributes([\n { attribute_patterns: ['*_ja'], locales: ['jpn'] },\n])" + }, + { + "lang": "Rust", + "source": "let localized_attributes = vec![LocalizedAttributes {\n locales: vec![\"jpn\".to_string()],\n attribute_patterns: vec![\"*_ja\".to_string()],\n}];\nlet task: TaskInfo = client\n .index(\"books\")\n .set_localized_attributes(&localizced_attributes)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\"locales\": [\"jpn\"], \"attributePatterns\": [\"*_ja\"]}\n ]'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset localizedAttributes", + "description": "Reset an index's localizedAttributes to its default value", + "operationId": "deletelocalizedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalizedAttributesRuleView" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.index(\"INDEX_NAME\").ResetLocalizedAttributes()" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').resetLocalizedAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"INDEX_NAME\").resetLocalizedAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->resetLocalizedAttributes();" + }, + { + "lang": "Python", + "source": "client.index('INDEX_NAME').reset_localized_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').reset_localized_attributes" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_localized_attributes()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" + } + ] + } + }, + "/indexes/{indexUid}/settings/non-separator-tokens": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get nonSeparatorTokens", + "description": "Get an user defined nonSeparatorTokens", + "operationId": "getnonSeparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "nonSeparatorTokens is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetNonSeparatorTokensAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").GetNonSeparatorTokens()" + }, + { + "lang": "JS", + "source": "client.index('books').getNonSeparatorTokens()" + }, + { + "lang": "Java", + "source": "client.index(\"articles\").getNonSeparatorTokensSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('articles')->getNonSeparatorTokens();" + }, + { + "lang": "Python", + "source": "client.index('articles').get_non_separator_tokens()" + }, + { + "lang": "Ruby", + "source": "client.index('articles').non_separator_tokens" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('articles')\n .get_non_separator_tokens()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").getNonSeparatorTokens { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update nonSeparatorTokens", + "description": "Update an index's user defined nonSeparatorTokens", + "operationId": "putnonSeparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateNonSeparatorTokensAsync(new[] { \"@\", \"#\" });" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").UpdateNonSeparatorTokens([]string{\n \"@\",\n \"#\",\n})" + }, + { + "lang": "JS", + "source": "client.index('books').updateNonSeparatorTokens(['@', '#'])" + }, + { + "lang": "Java", + "source": "String[] newSeparatorTokens = { \"@\", \"#\" };\nclient.index(\"articles\").updateNonSeparatorTokensSettings(newSeparatorTokens);" + }, + { + "lang": "PHP", + "source": "$client->index('articles')->updateNonSeparatorTokens(['@', '#']);" + }, + { + "lang": "Python", + "source": "client.index('articles').update_non_separator_tokens([\"@\", \"#\"])" + }, + { + "lang": "Ruby", + "source": "client.index('articles').update_non_separator_tokens(['@', '#'])" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('articles')\n .set_non_separator_tokens(&vec!['@'.to_string(), '#'.to_string()])\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").updateNonSeparatorTokens([\"@\", \"#\"]) { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"@\", \"#\"]'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset nonSeparatorTokens", + "description": "Reset an index's nonSeparatorTokens to its default value", + "operationId": "deletenonSeparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetNonSeparatorTokensAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").ResetNonSeparatorTokens()" + }, + { + "lang": "JS", + "source": "client.index('books').resetNonSeparatorTokens()" + }, + { + "lang": "Java", + "source": "client.index(\"articles\").resetNonSeparatorTokensSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('articles')->resetNonSeparatorTokens();" + }, + { + "lang": "Python", + "source": "client.index('articles').reset_non_separator_tokens()" + }, + { + "lang": "Ruby", + "source": "client.index('articles').reset_non_separator_tokens" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('articles')\n .reset_non_separator_tokens()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").resetNonSeparatorTokens { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" + } + ] + } + }, + "/indexes/{indexUid}/settings/pagination": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get pagination", + "description": "Get an user defined pagination", + "operationId": "getpagination", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "pagination is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationSettings" + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetPaginationAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getPagination();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetPagination()" + }, + { + "lang": "JS", + "source": "client.index('books').getPagination()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").getPaginationSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->getPagination();" + }, + { + "lang": "Python", + "source": "client.index('books').get_pagination_settings()" + }, + { + "lang": "Ruby", + "source": "index('books').pagination" + }, + { + "lang": "Rust", + "source": "let pagination: PaginationSetting = client\n .index(\"books\")\n .get_pagination()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/pagination'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset pagination", + "description": "Reset an index's pagination to its default value", + "operationId": "deletepagination", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetPaginationAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetPagination();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetPagination()" + }, + { + "lang": "JS", + "source": "client.index('books').resetPagination()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").resetPaginationSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->resetPagination();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_pagination_settings()" + }, + { + "lang": "Ruby", + "source": "index('books').reset_pagination" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_pagination()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/pagination'" + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update pagination", + "description": "Update an index's user defined pagination", + "operationId": "patchpagination", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var pagination = new Pagination {\n MaxTotalHits = 20\n};\nawait client.Index(\"movies\").UpdatePaginationAsync(pagination);" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdatePagination(&meilisearch.Pagination{\n MaxTotalHits: 100,\n})" + }, + { + "lang": "JS", + "source": "client.index('books').updateSettings({ pagination: { maxTotalHits: 100 }})" + }, + { + "lang": "Java", + "source": "Pagination newPagination = new Pagination();\nnewPagination.setMaxTotalHits(100);\nclient.index(\"books\").updatePaginationSettings(newPagination);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateSettings([\n 'pagination' => [\n 'maxTotalHits' => 100\n ]\n]);" + }, + { + "lang": "Python", + "source": "client.index('books').update_pagination_settings({'maxTotalHits': 100})" + }, + { + "lang": "Ruby", + "source": "index('books').update_pagination({ max_total_hits: 100 })" + }, + { + "lang": "Rust", + "source": "let pagination = PaginationSetting {max_total_hits:100};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_pagination(pagination)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/pagination' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxTotalHits\": 100\n }'" + } + ] + } + }, + "/indexes/{indexUid}/settings/prefix-search": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get prefixSearch", + "description": "Get an user defined prefixSearch", + "operationId": "getprefixSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "prefixSearch is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrefixSearchSettings" + }, + "example": "indexingTime" + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.Index(\"books\").GetPrefixSearch()" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').getPrefixSearch();" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->getPrefixSearch();" + }, + { + "lang": "Python", + "source": "client.index('books').get_prefix_search()" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_UID').prefix_search" + }, + { + "lang": "Rust", + "source": "let prefix_search: PrefixSearchSettings = client\n .index(INDEX_UID)\n .get_prefix_search()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update prefixSearch", + "description": "Update an index's user defined prefixSearch", + "operationId": "putprefixSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrefixSearchSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.Index(\"books\").UpdatePrefixSearch(\"disabled\")" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').updatePrefixSearch('disabled');" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->updatePrefixSearch('disabled');" + }, + { + "lang": "Python", + "source": "client.index('books').update_prefix_search(PrefixSearch.DISABLED)" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_UID').update_prefix_search('disabled')" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_prefix_search(PrefixSearchSettings::Disabled)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"disabled\"'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset prefixSearch", + "description": "Reset an index's prefixSearch to its default value", + "operationId": "deleteprefixSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrefixSearchSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.Index(\"books\").ResetPrefixSearch()" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').resetPrefixSearch();" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->resetPrefixSearch();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_prefix_search()" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_UID').reset_prefix_search" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_prefix_search()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" + } + ] + } + }, + "/indexes/{indexUid}/settings/proximity-precision": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get proximityPrecision", + "description": "Get an user defined proximityPrecision", + "operationId": "getproximityPrecision", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "proximityPrecision is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProximityPrecisionView" + }, + "example": "byWord" + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").GetProximityPrecisionAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetProximityPrecision()" + }, + { + "lang": "JS", + "source": "client.index('books').getProximityPrecision()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").getProximityPrecisionSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->getProximityPrecision();" + }, + { + "lang": "Python", + "source": "client.index('books').get_proximity_precision()" + }, + { + "lang": "Ruby", + "source": "client.index('books').proximity_precision" + }, + { + "lang": "Rust", + "source": "let proximity_precision: String = client\n .index(\"books\")\n .get_proximity_precision()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let precisionValue = try await self.client.index(\"books\").getProximityPrecision()" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update proximityPrecision", + "description": "Update an index's user defined proximityPrecision", + "operationId": "putproximityPrecision", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProximityPrecisionView" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").UpdateProximityPrecisionAsync(\"byAttribute\");" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateProximityPrecision(ByAttribute)" + }, + { + "lang": "JS", + "source": "client.index('books').updateProximityPrecision('byAttribute')" + }, + { + "lang": "Java", + "source": "client.index(\"books\").updateProximityPrecisionSettings(\"byAttribute\");" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateProximityPrecision('byAttribute');" + }, + { + "lang": "Python", + "source": "client.index('books').update_proximity_precision(ProximityPrecision.BY_ATTRIBUTE)" + }, + { + "lang": "Ruby", + "source": "client.index('books').update_proximity_precision('byAttribute')" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .set_proximity_precision(\"byAttribute\".to_string())\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let task = try await self.client.index(\"books\").updateProximityPrecision(.byWord)" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/proximity-precision' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"byAttribute\"'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset proximityPrecision", + "description": "Reset an index's proximityPrecision to its default value", + "operationId": "deleteproximityPrecision", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProximityPrecisionView" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").ResetProximityPrecisionAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetProximityPrecision()" + }, + { + "lang": "JS", + "source": "client.index('books').resetProximityPrecision()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").resetProximityPrecisionSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->resetProximityPrecision();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_proximity_precision()" + }, + { + "lang": "Ruby", + "source": "client.index('books').reset_proximity_precision" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_proximity_precision()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let task = try await self.client.index(\"books\").resetProximityPrecision()" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" + } + ] + } + }, + "/indexes/{indexUid}/settings/ranking-rules": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get rankingRules", + "description": "Get an user defined rankingRules", + "operationId": "getrankingRules", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "rankingRules is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RankingRuleView" + } + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetRankingRulesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getRankingRules();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetRankingRules()" + }, + { + "lang": "JS", + "source": "client.index('movies').getRankingRules()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getRankingRulesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getRankingRules();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_ranking_rules()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').ranking_rules" + }, + { + "lang": "Rust", + "source": "let ranking_rules: Vec = client\n .index(\"movies\")\n .get_ranking_rules()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getRankingRules { (result) in\n switch result {\n case .success(let rankingRules):\n print(rankingRules)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update rankingRules", + "description": "Update an index's user defined rankingRules", + "operationId": "putrankingRules", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RankingRuleView" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateRankingRulesAsync(new[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});" + }, + { + "lang": "Go", + "source": "rankingRules := []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\",\n}\nclient.Index(\"movies\").UpdateRankingRules(&rankingRules)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateRankingRules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setRankingRules(new String[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});\nclient.index(\"movies\").updateSettings(settings);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateRankingRules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_ranking_rules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_ranking_rules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" + }, + { + "lang": "Rust", + "source": "let ranking_rules = [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\",\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_ranking_rules(&ranking_rules)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let rankingRules: [String] = [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n]\nclient.index(\"movies\").updateRankingRules(rankingRules) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n ]'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset rankingRules", + "description": "Reset an index's rankingRules to its default value", + "operationId": "deleterankingRules", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RankingRuleView" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetRankingRulesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetRankingRules();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetRankingRules()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetRankingRules()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetRankingRulesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetRankingRules();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_ranking_rules()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_ranking_rules" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_ranking_rules()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").resetRankingRules { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" + } + ] + } + }, + "/indexes/{indexUid}/settings/search-cutoff-ms": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get searchCutoffMs", + "description": "Get an user defined searchCutoffMs", + "operationId": "getsearchCutoffMs", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "searchCutoffMs is returned", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + }, + "example": 0 + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var searchCutoff = await client.Index(\"movies\").GetSearchCutoffMsAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetSearchCutoffMs()" + }, + { + "lang": "JS", + "source": "client.index('movies').getSearchCutoffMs()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getSearchCutoffMsSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getSearchCutoffMs();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_search_cutoff_ms()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search_cutoff_ms" + }, + { + "lang": "Rust", + "source": "let search_cutoff_ms: String = client\n .index(\"movies\")\n .get_search_cutoff_ms()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let precisionValue = try await self.client.index(\"books\").getSearchCutoffMs()" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update searchCutoffMs", + "description": "Update an index's user defined searchCutoffMs", + "operationId": "putsearchCutoffMs", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSearchCutoffMsAsync(150);" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateSearchCutoffMs(150)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateSearchCutoffMs(150)" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateSearchCutoffMsSettings(150);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateSearchCutoffMs(150);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_search_cutoff_ms(150)" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_search_cutoff_ms(150)" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .set_search_cutoff_ms(Some(150))\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let task = try await self.client.index(\"books\").updateSearchCutoffMs(150)" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '150'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset searchCutoffMs", + "description": "Reset an index's searchCutoffMs to its default value", + "operationId": "deletesearchCutoffMs", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSearchCutoffMsAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetSearchCutoffMs()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetSearchCutoffMs()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetSearchCutoffMsSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetSearchCutoffMs();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_search_cutoff_ms()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_search_cutoff_ms" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_search_cutoff_ms()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let task = try await self.client.index(\"books\").resetSearchCutoffMs()" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" + } + ] + } + }, + "/indexes/{indexUid}/settings/searchable-attributes": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get searchableAttributes", + "description": "Get an user defined searchableAttributes", + "operationId": "getsearchableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "searchableAttributes is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetSearchableAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getSearchableAttributes();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetSearchableAttributes()" + }, + { + "lang": "JS", + "source": "client.index('movies').getSearchableAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getSearchableAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getSearchableAttributes();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_searchable_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').searchable_attributes" + }, + { + "lang": "Rust", + "source": "let searchable_attributes: Vec = client\n .index(\"movies\")\n .get_searchable_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getSearchableAttributes { (result) in\n switch result {\n case .success(let searchableAttributes):\n print(searchableAttributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update searchableAttributes", + "description": "Update an index's user defined searchableAttributes", + "operationId": "putsearchableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSearchableAttributesAsync(new[] {\"title\", \"overview\", \"genres\"});" + }, + { + "lang": "Go", + "source": "searchableAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n}\nclient.Index(\"movies\").UpdateSearchableAttributes(&searchableAttributes)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n])" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateSearchableAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\"\n});" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" + }, + { + "lang": "Rust", + "source": "let searchable_attributes = [\n \"title\",\n \"overview\",\n \"genres\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_searchable_attributes(&searchable_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let searchableAttributes: [String] = [\"title\", \"overview\", \"genres\"]\nclient.index(\"movies\").updateSearchableAttributes(searchableAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\"\n ]'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset searchableAttributes", + "description": "Reset an index's searchableAttributes to its default value", + "operationId": "deletesearchableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSearchableAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetSearchableAttributes();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetSearchableAttributes()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetSearchableAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetSearchableAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetSearchableAttributes();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_searchable_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_searchable_attributes" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_searchable_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").resetSearchableAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" + } + ] + } + }, + "/indexes/{indexUid}/settings/separator-tokens": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get separatorTokens", + "description": "Get an user defined separatorTokens", + "operationId": "getseparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "separatorTokens is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetSeparatorTokensAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").GetSeparatorTokens()" + }, + { + "lang": "JS", + "source": "client.index('books').getSeparatorTokens()" + }, + { + "lang": "Java", + "source": "client.index(\"articles\").getSeparatorTokensSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('articles')->getSeparatorTokens();" + }, + { + "lang": "Python", + "source": "client.index('articles').get_separator_tokens()" + }, + { + "lang": "Ruby", + "source": "client.index('articles').separator_tokens" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('articles')\n .get_separator_tokens()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").getSeparatorTokens { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update separatorTokens", + "description": "Update an index's user defined separatorTokens", + "operationId": "putseparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSeparatorTokensAsync(new[] { \"|\", \"…\" });" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").UpdateSeparatorTokens([]string{\n \"|\",\n \"…\",\n})" + }, + { + "lang": "JS", + "source": "client.index('books').updateSeparatorTokens(['|', '…'])" + }, + { + "lang": "Java", + "source": "String[] newSeparatorTokens = { \"|\", \"…\" };\nclient.index(\"articles\").updateSeparatorTokensSettings(newSeparatorTokens);" + }, + { + "lang": "PHP", + "source": "$client->index('articles')->updateSeparatorTokens(['|', '…']);" + }, + { + "lang": "Python", + "source": "client.index('articles').update_separator_tokens([\"|\", \"…\"])" + }, + { + "lang": "Ruby", + "source": "client.index('articles').update_separator_tokens(['|', '…'])" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('articles')\n .set_separator_tokens(&vec!['|'.to_string(), '…'.to_string()])\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").updateSeparatorTokens([\"|\", \"…\"]) { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"|\", \"…\"]'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset separatorTokens", + "description": "Reset an index's separatorTokens to its default value", + "operationId": "deleteseparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSeparatorTokensAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").ResetSeparatorTokens()" + }, + { + "lang": "JS", + "source": "client.index('books').resetSeparatorTokens()" + }, + { + "lang": "Java", + "source": "client.index(\"articles\").resetSeparatorTokensSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('articles')->resetSeparatorTokens();" + }, + { + "lang": "Python", + "source": "client.index('articles').reset_separator_tokens()" + }, + { + "lang": "Ruby", + "source": "client.index('articles').reset_separator_tokens" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('articles')\n .reset_separator_tokens()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").resetSeparatorTokens { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" + } + ] + } + }, + "/indexes/{indexUid}/settings/sortable-attributes": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get sortableAttributes", + "description": "Get an user defined sortableAttributes", + "operationId": "getsortableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "sortableAttributes is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").GetSortableAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('books').getSortableAttributes();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetSortableAttributes()" + }, + { + "lang": "JS", + "source": "client.index('books').getSortableAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").getSortableAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->getSortableAttributes();" + }, + { + "lang": "Python", + "source": "client.index('books').get_sortable_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('books').sortable_attributes" + }, + { + "lang": "Rust", + "source": "let sortable_attributes: Vec = client\n .index(\"books\")\n .get_sortable_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").getSortableAttributes { (result: Result, Swift.Error>) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update sortableAttributes", + "description": "Update an index's user defined sortableAttributes", + "operationId": "putsortableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").UpdateSortableAttributesAsync(new [] { \"price\", \"author\" });" + }, + { + "lang": "Go", + "source": "sortableAttributes := []string{\n \"price\",\n \"author\",\n}\nclient.Index(\"books\").UpdateSortableAttributes(&sortableAttributes)" + }, + { + "lang": "JS", + "source": "client.index('books')\n .updateSortableAttributes([\n 'price',\n 'author'\n ])" + }, + { + "lang": "Java", + "source": "client.index(\"books\").updateSortableAttributesSettings(new String[] {\"price\", \"author\"});" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateSortableAttributes([\n 'price',\n 'author'\n]);" + }, + { + "lang": "Python", + "source": "client.index('books').update_sortable_attributes([\n 'price',\n 'author'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('books').update_sortable_attributes([\n 'price',\n 'author'\n])" + }, + { + "lang": "Rust", + "source": "let sortable_attributes = [\n \"price\",\n \"author\"\n];\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_sortable_attributes(&sortable_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").updateSortableAttributes([\"price\", \"author\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"price\",\n \"author\"\n ]'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset sortableAttributes", + "description": "Reset an index's sortableAttributes to its default value", + "operationId": "deletesortableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").ResetSortableAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('books').resetSortableAttributes();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetSortableAttributes()" + }, + { + "lang": "JS", + "source": "client.index('books').resetSortableAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").resetSortableAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->resetSortableAttributes();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_sortable_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('books').reset_sortable_attributes" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_sortable_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").resetSortableAttributes() { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" + } + ] + } + }, + "/indexes/{indexUid}/settings/stop-words": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get stopWords", + "description": "Get an user defined stopWords", + "operationId": "getstopWords", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "stopWords is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetStopWordsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getStopWords();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetStopWords()" + }, + { + "lang": "JS", + "source": "client.index('movies').getStopWords()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getStopWordsSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getStopWords();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_stop_words()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').stop_words" + }, + { + "lang": "Rust", + "source": "let stop_words: Vec = client\n .index(\"movies\")\n .get_stop_words()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getStopWords { (result) in\n switch result {\n case .success(let stopWords):\n print(stopWords)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update stopWords", + "description": "Update an index's user defined stopWords", + "operationId": "putstopWords", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateStopWordsAsync(new[] {\"of\", \"the\", \"to\"});" + }, + { + "lang": "Dart", + "source": "await client.index('movies').updateStopWords(['of', 'the', 'to']);" + }, + { + "lang": "Go", + "source": "stopWords := []string{\"of\", \"the\", \"to\"}\nclient.Index(\"movies\").UpdateStopWords(&stopWords)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateStopWords(['of', 'the', 'to'])" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateStopWordsSettings(new String[] {\"of\", \"the\", \"to\"});" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateStopWords(['the', 'of', 'to']);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_stop_words(['of', 'the', 'to'])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_stop_words(['of', 'the', 'to'])" + }, + { + "lang": "Rust", + "source": "let stop_words = [\"of\", \"the\", \"to\"];\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_stop_words(&stop_words)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let stopWords: [String] = [\"of\", \"the\", \"to\"]\nclient.index(\"movies\").updateStopWords(stopWords) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/stop-words' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"the\",\n \"of\",\n \"to\"\n ]'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset stopWords", + "description": "Reset an index's stopWords to its default value", + "operationId": "deletestopWords", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetStopWordsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetStopWords();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetStopWords()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetStopWords()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetStopWordsSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetStopWords();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_stop_words()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_stop_words" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_stop_words()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").resetStopWords { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" + } + ] + } + }, + "/indexes/{indexUid}/settings/synonyms": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get synonyms", + "description": "Get an user defined synonyms", + "operationId": "getsynonyms", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "synonyms is returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + } + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetSynonymsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getSynonyms();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetSynonyms()" + }, + { + "lang": "JS", + "source": "client.index('movies').getSynonyms()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getSynonymsSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getSynonyms();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_synonyms()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').synonyms" + }, + { + "lang": "Rust", + "source": "let synonyms: HashMap> = client\n .index(\"movies\")\n .get_synonyms()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getSynonyms { (result) in\n switch result {\n case .success(let synonyms):\n print(synonyms)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update synonyms", + "description": "Update an index's user defined synonyms", + "operationId": "putsynonyms", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var synonyms = new Dictionary>\n{\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\", \"xmen\" } },\n { \"wow\", new string[] { \"world of warcraft\" } }\n};\nawait client.Index(\"movies\").UpdateSynonymsAsync(synonyms);" + }, + { + "lang": "Go", + "source": "synonyms := map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\", \"xmen\"},\n \"wow\": []string{\"world of warcraft\"},\n}\nclient.Index(\"movies\").UpdateSynonyms(&synonyms)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateSynonyms({\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine', 'xmen'],\n wow: ['world of warcraft']\n})" + }, + { + "lang": "Java", + "source": "HashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nclient.index(\"movies\").updateSynonymsSettings(synonyms);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateSynonyms([\n 'wolverine' => ['xmen', 'logan'],\n 'logan' => ['wolverine', 'xmen'],\n 'wow' => ['world of warcraft']\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_synonyms({\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine', 'xmen'],\n 'wow': ['world of warcraft']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_synonyms({\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine', 'xmen'],\n wow: ['world of warcraft']\n})" + }, + { + "lang": "Rust", + "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"wolverine\"), vec![String::from(\"xmen\"), String::from(\"logan\")]);\nsynonyms.insert(String::from(\"logan\"), vec![String::from(\"xmen\"), String::from(\"wolverine\")]);\nsynonyms.insert(String::from(\"wow\"), vec![String::from(\"world of warcraft\")]);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_synonyms(&synonyms)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let synonyms: [String: [String]] = [\n \"wolverine\": [\"xmen\", \"logan\"],\n \"logan\": [\"wolverine\", \"xmen\"],\n \"wow\": [\"world of warcraft\"]\n]\nclient.index(\"movies\").updateSynonyms(synonyms) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/synonyms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\n \"wolverine\",\n \"xmen\"\n ],\n \"wow\": [\"world of warcraft\"]\n }'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset synonyms", + "description": "Reset an index's synonyms to its default value", + "operationId": "deletesynonyms", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSynonymsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetSynonyms();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetSynonyms()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetSynonyms()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetSynonymsSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetSynonyms();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_synonyms()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_synonyms" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_synonyms()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").resetSynonyms { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" + } + ] + } + }, + "/indexes/{indexUid}/settings/typo-tolerance": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get typoTolerance", + "description": "Get an user defined typoTolerance", + "operationId": "gettypoTolerance", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "typoTolerance is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TypoSettings" + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Dart", + "source": "await client.index('books').getTypoTolerance();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetTypoTolerance()" + }, + { + "lang": "JS", + "source": "client.index('books').getTypoTolerance()" + }, + { + "lang": "PHP", + "source": "$client->index('books')->getTypoTolerance();" + }, + { + "lang": "Python", + "source": "client.index('books').get_typo_tolerance()" + }, + { + "lang": "Ruby", + "source": "index('books').typo_tolerance" + }, + { + "lang": "Rust", + "source": "let typo_tolerance: TypoToleranceSettings = client\n .index(\"books\")\n .get_typo_tolerance()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset typoTolerance", + "description": "Reset an index's typoTolerance to its default value", + "operationId": "deletetypoTolerance", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TypoSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").ResetTypoToleranceAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('books').resetTypoTolerance();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetTypoTolerance()" + }, + { + "lang": "JS", + "source": "client.index('books').resetTypoTolerance()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").resetTypoToleranceSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->resetTypoTolerance();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_typo_tolerance()" + }, + { + "lang": "Ruby", + "source": "index('books').reset_typo_tolerance" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_typo_tolerance()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update typoTolerance", + "description": "Update an index's user defined typoTolerance", + "operationId": "patchtypoTolerance", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TypoSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var typoTolerance = new TypoTolerance {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeTypos = new TypoTolerance.TypoSize {\n OneTypo = 4,\n TwoTypos = 10\n }\n};\n\nawait client.Index(\"books\").UpdateTypoToleranceAsync(typoTolerance);" + }, + { + "lang": "Dart", + "source": "final toUpdate = TypoTolerance(\n minWordSizeForTypos: MinWordSizeForTypos(\n oneTypo: 4,\n twoTypos: 10,\n ),\n disableOnAttributes: ['title'],\n);\nawait client.index('books').updateTypoTolerance(toUpdate);" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 4,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n})" + }, + { + "lang": "JS", + "source": "client.index('books').updateTypoTolerance({\n minWordSizeForTypos: {\n oneTypo: 4,\n twoTypos: 10\n },\n disableOnAttributes: [\n 'title'\n ]\n})" + }, + { + "lang": "Java", + "source": "TypoTolerance typoTolerance = new TypoTolerance();\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 4);\n put(\"twoTypos\", 10);\n }\n };\n\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\ntypoTolerance.setDisableOnAttributes(new String[] {\"title\"});\n\nclient.index(\"books\").updateTypoToleranceSettings(typoTolerance);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateTypoTolerance([\n 'minWordSizeForTypos' => [\n 'oneTypo' => 4,\n 'twoTypos' => 10\n ],\n 'disableOnAttributes' => [\n 'title'\n ]\n]);" + }, + { + "lang": "Python", + "source": "client.index('books').update_typo_tolerance({\n 'minWordSizeForTypos': {\n 'oneTypo': 4,\n 'twoTypos': 10\n },\n 'disableOnAttributes': [\n 'title'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "index('books').update_typo_tolerance({\n min_word_size_for_typos: {\n one_typo: 4,\n two_typos: 10\n },\n disable_on_attributes: ['title']\n})" + }, + { + "lang": "Rust", + "source": "let typo_tolerance = TypoToleranceSettings {\n enabled: Some(false),\n disable_on_attributes: None,\n disable_on_words: None,\n min_word_size_for_typos: None,\n};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"minWordSizeForTypos\": {\n \"oneTypo\": 4,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n }'" + } + ] + } + }, + "/indexes/{indexUid}/settings/vector-store": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get vectorStore", + "description": "Get an user defined vectorStore", + "operationId": "getvectorStore", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "vectorStore is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VectorStoreBackend" + }, + "example": "stable" + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store'" + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset vectorStore", + "description": "Reset an index's vectorStore to its default value", + "operationId": "deletevectorStore", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VectorStoreBackend" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store'" + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update vectorStore", + "description": "Update an index's user defined vectorStore", + "operationId": "patchvectorStore", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VectorStoreBackend" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"experimental\"'" + } + ] + } + }, + "/indexes/{indexUid}/similar": { + "get": { + "tags": [ + "Similar documents" + ], + "summary": "Get similar documents with GET", + "description": "Retrieve documents similar to a specific search result.", + "operationId": "similar_get", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "id", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "offset", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "default": 20, + "minimum": 0 + } + }, + { + "name": "attributes_to_retrieve", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "retrieve_vectors", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "show_ranking_score", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "show_ranking_score_details", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "ranking_score_threshold", + "in": "query", + "required": false, + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "embedder", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimilarResult" + }, + "example": { + "hits": [ + { + "id": 2770, + "title": "American Pie 2", + "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", + "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", + "release_date": 997405200 + }, + { + "id": 190859, + "title": "American Sniper", + "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", + "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", + "release_date": 1418256000 + } + ], + "offset": 0, + "limit": 2, + "estimatedTotalHits": 976, + "processingTimeMs": 35, + "query": "american " + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/similar?id=TARGET_DOCUMENT_ID&embedder=EMBEDDER_NAME'" + } + ] + }, + "post": { + "tags": [ + "Similar documents" + ], + "summary": "Get similar documents with POST", + "description": "Retrieve documents similar to a specific search result.", + "operationId": "similar_post", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimilarQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimilarResult" + }, + "example": { + "hits": [ + { + "id": 2770, + "title": "American Pie 2", + "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", + "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", + "release_date": 997405200 + }, + { + "id": 190859, + "title": "American Sniper", + "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", + "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", + "release_date": 1418256000 + } + ], + "offset": 0, + "limit": 2, + "estimatedTotalHits": 976, + "processingTimeMs": 35, + "query": "american " + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "resp := new(meilisearch.SimilarDocumentResult)\nclient.Index(\"INDEX_NAME\").SearchSimilarDocuments(&meilisearch.SimilarDocumentQuery{\n Id: \"TARGET_DOCUMENT_ID\",\n Embedder: \"default\",\n}, resp)" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').searchSimilarDocuments({ id: 'TARGET_DOCUMENT_ID', embedder: 'default' })" + }, + { + "lang": "PHP", + "source": "$similarQuery = new SimilarDocumentsQuery('TARGET_DOCUMENT_ID', 'default');\n$client->index('INDEX_NAME')->searchSimilarDocuments($similarQuery);" + }, + { + "lang": "Python", + "source": "client.index(\"INDEX_NAME\").get_similar_documents({\"id\": \"TARGET_DOCUMENT_ID\", \"embedder\": \"default\"})" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').search_similar_documents('TARGET_DOCUMENT_ID', embedder: 'default')" + }, + { + "lang": "Rust", + "source": "let results = index\n .similar_search(\"TARGET_DOCUMENT_ID\", \"EMBEDDER_NAME\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/similar' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"id\": TARGET_DOCUMENT_ID,\n \"embedder\": \"EMBEDDER_NAME\"\n }'" + } + ] + } + }, + "/indexes/{indexUid}/stats": { + "get": { + "tags": [ + "Stats" + ], + "summary": "Get stats of index", + "description": "Get the stats of an index.", + "operationId": "get_index_stats", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "The stats of the index", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IndexStats" + }, + "example": { + "numberOfDocuments": 10, + "rawDocumentDbSize": 10, + "avgDocumentSize": 10, + "numberOfEmbeddings": 10, + "numberOfEmbeddedDocuments": 10, + "isIndexing": true, + "fieldDistribution": { + "genre": 10, + "author": 9 + } + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "stats.get", + "stats.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetStatsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getStats();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetStats()" + }, + { + "lang": "JS", + "source": "client.index('movies').getStats()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getStats();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->stats();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_stats()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').stats" + }, + { + "lang": "Rust", + "source": "let stats: IndexStats = client\n .index(\"movies\")\n .get_stats()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").stats { (result) in\n switch result {\n case .success(let stats):\n print(stats)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/stats'" + } + ] + } + }, + "/indexes{indexUid}/compact": { + "post": { + "tags": [ + "Compact an index" + ], + "summary": "Compact an index", + "operationId": "compact", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "202": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentDeletion", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ] + } + }, + "/keys": { + "get": { + "tags": [ + "Keys" + ], + "summary": "Get API Keys", + "description": "List all API Keys", + "operationId": "list_api_keys", + "parameters": [ + { + "name": "offset", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "default": 20, + "minimum": 0 + } + } + ], + "responses": { + "202": { + "description": "List of keys", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationView_KeyView" + }, + "example": { + "results": [ + { + "uid": "01b4bc42-eb33-4041-b481-254d00cce834", + "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", + "name": "An API Key", + "description": null, + "actions": [ + "documents.add" + ], + "indexes": [ + "movies" + ], + "expiresAt": "2022-11-12T10:00:00Z", + "createdAt": "2021-11-12T10:00:00Z", + "updatedAt": "2021-11-12T10:00:00Z" + } + ], + "limit": 20, + "offset": 0, + "total": 1 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "keys.get", + "keys.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "ResourceResults keyResult = await client.GetKeysAsync(new KeysQuery { Limit = 3 });" + }, + { + "lang": "Dart", + "source": "await client.getKeys(params: KeysQuery(limit: 3));" + }, + { + "lang": "Go", + "source": "client.GetKeys(&meilisearch.KeysQuery{\n Limit: 3\n});" + }, + { + "lang": "JS", + "source": "client.getKeys({ limit: 3 })" + }, + { + "lang": "Java", + "source": "KeysQuery query = new KeysQuery().setLimit(3);\nclient.getKeys(query);" + }, + { + "lang": "PHP", + "source": "$client->getKeys((new KeysQuery())->setLimit(3));" + }, + { + "lang": "Python", + "source": "client.get_keys({'limit': 3})" + }, + { + "lang": "Ruby", + "source": "client.keys(limit: 3)" + }, + { + "lang": "Rust", + "source": "let mut query = KeysQuery::new()\n .with_limit(3)\n .execute(&client)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.getKeys(params: KeysQuery(limit: 3)) { result in\n switch result {\n case .success(let keys):\n print(keys)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys?limit=3' \\\n -H 'Authorization: Bearer MASTER_KEY'" + } + ] + }, + "post": { + "tags": [ + "Keys" + ], + "summary": "Create an API Key", + "description": "Create an API Key.", + "operationId": "create_api_key", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateApiKey" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Key has been created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeyView" + }, + "example": { + "uid": "01b4bc42-eb33-4041-b481-254d00cce834", + "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", + "name": "Indexing Products API key", + "description": null, + "actions": [ + "documents.add" + ], + "indexes": [ + "products" + ], + "expiresAt": "2021-11-13T00:00:00Z", + "createdAt": "2021-11-12T10:00:00Z", + "updatedAt": "2021-11-12T10:00:00Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "keys.create", + "keys.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "Key keyOptions = new Key\n{\n Description = \"Add documents: Products API key\",\n Actions = new KeyAction[] { KeyAction.DocumentsAdd },\n Indexes = new string[] { \"products\" },\n ExpiresAt = DateTime.Parse(\"2042-04-02T00:42:42Z\")\n};\nKey createdKey = await this.client.CreateKeyAsync(keyOptions);" + }, + { + "lang": "Go", + "source": "client.CreateKey(&meilisearch.Key{\n Description: \"Add documents: Products API key\",\n Actions: []string{\"documents.add\"},\n Indexes: []string{\"products\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" + }, + { + "lang": "JS", + "source": "client.createKey({\n description: 'Add documents: Products API key',\n actions: ['documents.add'],\n indexes: ['products'],\n expiresAt: '2021-11-13T00:00:00Z'\n})" + }, + { + "lang": "Java", + "source": "SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\nDate dateParsed = format.parse(\"2042-04-02T00:42:42Z\");\n\nKey keyInfo = new Key();\n\nkeyInfo.setDescription(\"Add documents: Products API key\");\nkeyInfo.setActions(new String[] {\"documents.add\"});\nkeyInfo.setIndexes(new String[] {\"products\"});\nkeyInfo.setExpiresAt(dateParsed);\n\nclient.createKey(keyInfo);" + }, + { + "lang": "PHP", + "source": "$client->createKey([\n 'description' => 'Add documents: Products API key',\n 'actions' => ['documents.add'],\n 'indexes' => ['products'],\n 'expiresAt' => '2042-04-02T00:42:42Z',\n]);" + }, + { + "lang": "Python", + "source": "client.create_key(options={\n 'description': 'Add documents: Products API key',\n 'actions': ['documents.add'],\n 'indexes': ['products'],\n 'expiresAt': '2042-04-02T00:42:42Z'\n})" + }, + { + "lang": "Ruby", + "source": "client.create_key(\n description: 'Add documents: Products API key',\n actions: ['documents.add'],\n indexes: ['products'],\n expires_at: '2042-04-02T00:42:42Z'\n)" + }, + { + "lang": "Rust", + "source": "let mut key_options = KeyBuilder::new();\nkey_options\n .with_name(\"Add documents: Products API key\")\n .with_action(Action::DocumentsAdd)\n .with_expires_at(time::macros::datetime!(2042 - 04 - 02 00:42:42 UTC))\n .with_index(\"products\");\nlet new_key = client\n .create_key(key_options)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let keyParams = KeyParams(\n description: \"Add documents: Products API key\",\n actions: [\"documents.add\"],\n indexes: [\"products\"],\n expiresAt: \"2042-04-02T00:42:42Z\"\n)\nclient.createKey(keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/keys' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"description\": \"Add documents: Products API key\",\n \"actions\": [\"documents.add\"],\n \"indexes\": [\"products\"],\n \"expiresAt\": \"2042-04-02T00:42:42Z\"\n }'" + } + ] + } + }, + "/keys/{uidOrKey}": { + "get": { + "tags": [ + "Keys" + ], + "summary": "Get an API Key", + "description": "Get an API key from its `uid` or its `key` field.", + "operationId": "get_api_key", + "parameters": [ + { + "name": "uidOrKey", + "in": "path", + "description": "The `uid` or `key` field of an existing API key", + "required": true, + "schema": { + "type": "string", + "format": "password" + }, + "example": "7b198a7f-52a0-4188-8762-9ad93cd608b2" + } + ], + "responses": { + "200": { + "description": "The key is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeyView" + }, + "example": { + "uid": "01b4bc42-eb33-4041-b481-254d00cce834", + "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", + "name": "An API Key", + "description": null, + "actions": [ + "documents.add" + ], + "indexes": [ + "movies" + ], + "expiresAt": "2022-11-12T10:00:00Z", + "createdAt": "2021-11-12T10:00:00Z", + "updatedAt": "2021-11-12T10:00:00Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "keys.get", + "keys.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "Key key = await client.GetKeyAsync(\"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4\");" + }, + { + "lang": "Dart", + "source": "await client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" + }, + { + "lang": "Go", + "source": "client.GetKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + }, + { + "lang": "JS", + "source": "client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + }, + { + "lang": "Java", + "source": "client.getKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\");" + }, + { + "lang": "PHP", + "source": "$client->getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" + }, + { + "lang": "Python", + "source": "client.get_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + }, + { + "lang": "Ruby", + "source": "client.key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + }, + { + "lang": "Rust", + "source": "let key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.getKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" + } + ] + }, + "delete": { + "tags": [ + "Keys" + ], + "summary": "Delete a key", + "description": "Delete the specified API key.", + "operationId": "delete_api_key", + "parameters": [ + { + "name": "uidOrKey", + "in": "path", + "description": "The `uid` or `key` field of an existing API key", + "required": true, + "schema": { + "type": "string", + "format": "password" + }, + "example": "7b198a7f-52a0-4188-8762-9ad93cd608b2" + } + ], + "responses": { + "204": { + "description": "The key have been removed" + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "keys.delete", + "keys.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "client.DeleteKeyAsync(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + }, + { + "lang": "Dart", + "source": "await client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" + }, + { + "lang": "Go", + "source": "client.DeleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + }, + { + "lang": "JS", + "source": "client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + }, + { + "lang": "Java", + "source": "client.deleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + }, + { + "lang": "PHP", + "source": "$client->deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" + }, + { + "lang": "Python", + "source": "client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + }, + { + "lang": "Ruby", + "source": "client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + }, + { + "lang": "Rust", + "source": "let key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();\nclient\n .delete_key(&key)\n .await?;" + }, + { + "lang": "Swift", + "source": "client.deleteKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success:\n print(\"success\")\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" + } + ] + }, + "patch": { + "tags": [ + "Keys" + ], + "summary": "Update a Key", + "description": "Update the name and description of an API key.\nUpdates to keys are partial. This means you should provide only the fields you intend to update, as any fields not present in the payload will remain unchanged.", + "operationId": "patch_api_key", + "parameters": [ + { + "name": "uidOrKey", + "in": "path", + "description": "The `uid` or `key` field of an existing API key", + "required": true, + "schema": { + "type": "string", + "format": "password" + }, + "example": "7b198a7f-52a0-4188-8762-9ad93cd608b2" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchApiKey" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "The key have been updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeyView" + }, + "example": { + "uid": "01b4bc42-eb33-4041-b481-254d00cce834", + "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", + "name": "An API Key", + "description": null, + "actions": [ + "documents.add" + ], + "indexes": [ + "movies" + ], + "expiresAt": "2022-11-12T10:00:00Z", + "createdAt": "2021-11-12T10:00:00Z", + "updatedAt": "2021-11-12T10:00:00Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "keys.update", + "keys.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.UpdateKeyAsync(\n \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\",\n description: \"Manage documents: Products/Reviews API key\",\n name: \"Products/Reviews API key\"\n)" + }, + { + "lang": "Go", + "source": "client.UpdateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", &meilisearch.Key{\n Description: \"Manage documents: Products/Reviews API key\",\n Actions: []string{\"documents.add\", \"document.delete\"},\n Indexes: []string{\"products\", \"reviews\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" + }, + { + "lang": "JS", + "source": "client.updateKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d', {\n name: 'Products/Reviews API key',\n description: 'Manage documents: Products/Reviews API key',\n})" + }, + { + "lang": "Java", + "source": "KeyUpdate keyChanges = new KeyUpdate();\nkeyChanges.setName(\"Products/Reviews API key\");\nkeyChanges.setDescription(\"Manage documents: Products/Reviews API key\");\n\nclient.updateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", keyChanges);" + }, + { + "lang": "PHP", + "source": "$client->updateKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n [\n 'name' => 'Products/Reviews API key',\n 'description' => 'Manage documents: Products/Reviews API key'\n ]);" + }, + { + "lang": "Python", + "source": "client.update_key(key_or_uid='6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n options={\n 'name': 'Products/Reviews API key',\n 'description': 'Manage documents: Products/Reviews API key'\n})" + }, + { + "lang": "Ruby", + "source": "client.update_key(\n '6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n {\n description: 'Manage documents: Products/Reviews API key',\n name: 'Products/Reviews API key'\n }\n)" + }, + { + "lang": "Rust", + "source": "let mut key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();\nkey\n .with_description(\"Manage documents: Products/Reviews API key\".to_string())\n .with_name(\"Products/Reviews API key\".to_string())\n .update(&client)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let keyParams = KeyUpdateParams(\n description: \"Manage documents: Products/Reviews API key\",\n name: \"Products/Reviews API key\"\n)\n\nclient.updateKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", keyParams: keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"name\": \"Products/Reviews API key\",\n \"description\": \"Manage documents: Products/Reviews API key\"\n }'" + } + ] + } + }, + "/logs/stderr": { + "post": { + "tags": [ + "Logs" + ], + "summary": "Update target of the console logs", + "description": "This route lets you specify at runtime the level of the console logs outputted on stderr.", + "operationId": "update_stderr_target", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateStderrLogs" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "The console logs have been updated" + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "metrics.get", + "metrics.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X POST MEILISEARCH_URL/logs/stderr \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"target\": \"milli=trace,index_scheduler=info,actix_web=off\"\n }'" + } + ] + } + }, + "/logs/stream": { + "post": { + "tags": [ + "Logs" + ], + "summary": "Retrieve logs", + "description": "Stream logs over HTTP. The format of the logs depends on the configuration specified in the payload.\nThe logs are sent as multi-part, and the stream never stops, so make sure your clients correctly handle that.\nTo make the server stop sending you logs, you can call the `DELETE /logs/stream` route.\n\nThere can only be one listener at a timeand an error will be returned if you call this route while it's being used by another client.", + "operationId": "get_logs", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetLogs" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Logs are being returned", + "content": { + "application/json": { + "schema": { + "type": "string" + }, + "example": "\n2024-10-08T13:35:02.643750Z WARN HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: tracing_actix_web::middleware: Error encountered while processing the incoming HTTP request: ResponseError { code: 400, message: \"Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625\", error_code: \"feature_not_enabled\", error_type: \"invalid_request\", error_link: \"https://docs.meilisearch.com/errors#feature_not_enabled\" }\n2024-10-08T13:35:02.644191Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: meilisearch: close time.busy=1.66ms time.idle=658µs\n2024-10-08T13:35:18.564152Z INFO HTTP request{method=PATCH host=\"localhost:7700\" route=/experimental-features query_parameters= user_agent=curl/8.6.0 status_code=200}: meilisearch: close time.busy=1.17ms time.idle=127µs\n2024-10-08T13:35:23.094987Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=200}: meilisearch: close time.busy=2.12ms time.idle=595µs\n" + } + } + }, + "400": { + "description": "The route is already being used", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The `/logs/stream` route is currently in use by someone else.", + "code": "bad_request", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#bad_request" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "metrics.get", + "metrics.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X POST MEILISEARCH_URL/logs/stream \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"mode\": \"human\",\n \"target\": \"index_scheduler=trace\"\n }'" + } + ] + }, + "delete": { + "tags": [ + "Logs" + ], + "summary": "Stop retrieving logs", + "description": "Call this route to make the engine stops sending logs through the `POST /logs/stream` route.", + "operationId": "cancel_logs", + "responses": { + "204": { + "description": "Logs are being returned" + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "metrics.get", + "metrics.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X DELETE MEILISEARCH_URL/logs/stream\n}'" + } + ] + } + }, + "/metrics": { + "get": { + "tags": [ + "Stats" + ], + "summary": "Get prometheus metrics", + "description": "Retrieve metrics on the engine. See https://www.meilisearch.com/docs/learn/experimental/metrics\nCurrently, [the feature is experimental](https://www.meilisearch.com/docs/learn/experimental/overview)\nwhich means it must be enabled.", + "operationId": "get_metrics", + "responses": { + "200": { + "description": "The metrics of the instance", + "content": { + "text/plain": { + "schema": { + "type": "string" + }, + "example": "\n# HELP meilisearch_db_size_bytes Meilisearch DB Size In Bytes\n# TYPE meilisearch_db_size_bytes gauge\nmeilisearch_db_size_bytes 1130496\n# HELP meilisearch_batch_running_progress_trace The currently running progress trace\n# TYPE meilisearch_batch_running_progress_trace gauge\nmeilisearch_batch_running_progress_trace{batch_uid=\"0\",step_name=\"document\"} 0.710618582519409\nmeilisearch_batch_running_progress_trace{batch_uid=\"0\",step_name=\"extracting word proximity\"} 0.2222222222222222\nmeilisearch_batch_running_progress_trace{batch_uid=\"0\",step_name=\"indexing\"} 0.6666666666666666\nmeilisearch_batch_running_progress_trace{batch_uid=\"0\",step_name=\"processing tasks\"} 0\n# HELP meilisearch_http_requests_total Meilisearch HTTP requests total\n# TYPE meilisearch_http_requests_total counter\nmeilisearch_http_requests_total{method=\"GET\",path=\"/metrics\",status=\"400\"} 1\nmeilisearch_http_requests_total{method=\"PATCH\",path=\"/experimental-features\",status=\"200\"} 1\n# HELP meilisearch_http_response_time_seconds Meilisearch HTTP response times\n# TYPE meilisearch_http_response_time_seconds histogram\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.005\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.01\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.025\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.05\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.075\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.25\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.75\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"2.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"7.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"10\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"+Inf\"} 0\nmeilisearch_http_response_time_seconds_sum{method=\"GET\",path=\"/metrics\"} 0\nmeilisearch_http_response_time_seconds_count{method=\"GET\",path=\"/metrics\"} 0\n# HELP meilisearch_last_finished_batches_progress_trace_ms The last few batches progress trace in milliseconds\n# TYPE meilisearch_last_finished_batches_progress_trace_ms gauge\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks\"} 19360\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks > computing document changes\"} 368\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks > computing document changes > preparing payloads\"} 367\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks > computing document changes > preparing payloads > payload\"} 367\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks > indexing\"} 18970\n# HELP meilisearch_index_count Meilisearch Index Count\n# TYPE meilisearch_index_count gauge\nmeilisearch_index_count 1\n# HELP meilisearch_index_docs_count Meilisearch Index Docs Count\n# TYPE meilisearch_index_docs_count gauge\nmeilisearch_index_docs_count{index=\"mieli\"} 2\n# HELP meilisearch_is_indexing Meilisearch Is Indexing\n# TYPE meilisearch_is_indexing gauge\nmeilisearch_is_indexing 0\n# HELP meilisearch_last_update Meilisearch Last Update\n# TYPE meilisearch_last_update gauge\nmeilisearch_last_update 1726675964\n# HELP meilisearch_nb_tasks Meilisearch Number of tasks\n# TYPE meilisearch_nb_tasks gauge\nmeilisearch_nb_tasks{kind=\"indexes\",value=\"mieli\"} 39\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"canceled\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"enqueued\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"failed\"} 4\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"processing\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"succeeded\"} 35\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentAdditionOrUpdate\"} 9\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentDeletion\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentEdition\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"dumpCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexDeletion\"} 8\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexSwap\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexUpdate\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"settingsUpdate\"} 22\nmeilisearch_nb_tasks{kind=\"types\",value=\"snapshotCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskCancelation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskDeletion\"} 0\n# HELP meilisearch_used_db_size_bytes Meilisearch Used DB Size In Bytes\n# TYPE meilisearch_used_db_size_bytes gauge\nmeilisearch_used_db_size_bytes 409600\n" + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "metrics.get", + "metrics.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/metrics'" + } + ] + } + }, + "/multi-search": { + "post": { + "tags": [ + "Multi-search" + ], + "summary": "Perform a multi-search", + "description": "Bundle multiple search queries in a single API request. Use this endpoint to search through multiple indexes at once.", + "operationId": "multi_search_with_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FederatedSearch" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Federated multi-search", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FederatedSearchResult" + }, + "example": { + "hits": [ + { + "id": 42, + "title": "Batman returns", + "overview": "The overview of batman returns", + "_federation": { + "indexUid": "movies", + "queriesPosition": 0 + } + }, + { + "comicsId": "batman-killing-joke", + "description": "This comic is really awesome", + "title": "Batman: the killing joke", + "_federation": { + "indexUid": "comics", + "queriesPosition": 1 + } + } + ], + "processingTimeMs": 0, + "limit": 20, + "offset": 0, + "estimatedTotalHits": 2, + "semanticHitCount": 0 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.MultiSearchAsync(new MultiSearchQuery()\n{\n Queries = new System.Collections.Generic.List()\n {\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"booh\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"nemo\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movie_ratings\",\n Q = \"us\",\n },\n }\n});" + }, + { + "lang": "Go", + "source": "client.MultiSearch(&MultiSearchRequest{\n Queries: []SearchRequest{\n {\n IndexUID: \"movies\",\n Query: \"pooh\",\n Limit: 5,\n },\n {\n IndexUID: \"movies\",\n Query: \"nemo\",\n Limit: 5,\n },\n {\n IndexUID: \"movie_ratings\",\n Query: \"us\",\n },\n },\n})" + }, + { + "lang": "JS", + "source": "client.multiSearch({ queries: [\n {\n indexUid: 'movies',\n q: 'pooh',\n limit: 5,\n },\n {\n indexUid: 'movies',\n q: 'nemo',\n limit: 5,\n },\n {\n indexUid: 'movie_ratings',\n q: 'us',\n },\n]})" + }, + { + "lang": "Java", + "source": "MultiSearchRequest multiSearchRequest = new MultiSearchRequest();\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"pooh\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"nemo\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movie_ratings\").setQuery(\"us\"));\n\nclient.multiSearch(multiSearchRequest);" + }, + { + "lang": "PHP", + "source": "$client->multiSearch([\n (new SearchQuery())\n ->setIndexUid('movies')\n ->setQuery('pooh')\n ->setLimit(5),\n (new SearchQuery())\n ->setIndexUid('movies')\n ->setQuery('nemo')\n ->setLimit(5),\n (new SearchQuery())\n ->setIndexUid('movie_ratings')\n ->setQuery('us')\n ]);" + }, + { + "lang": "Python", + "source": "client.multi_search(\n [\n {'indexUid': 'movies', 'q': 'pooh', 'limit': 5},\n {'indexUid': 'movies', 'q': 'nemo', 'limit': 5},\n {'indexUid': 'movie_ratings', 'q': 'us'}\n ]\n)" + }, + { + "lang": "Ruby", + "source": "client.multi_search([\n { index_uid: 'books', q: 'prince' },\n { index_uid: 'movies', q: 'pooh', limit: 5 }\n { index_uid: 'movies', q: 'nemo', limit: 5 }\n { index_uid: 'movie_ratings', q: 'us' }\n])" + }, + { + "lang": "Rust", + "source": "let movie = client.index(\"movie\");\nlet movie_ratings = client.index(\"movie_ratings\");\n\nlet search_query_1 = SearchQuery::new(&movie)\n .with_query(\"pooh\")\n .with_limit(5)\n .build();\nlet search_query_2 = SearchQuery::new(&movie)\n .with_query(\"nemo\")\n .with_limit(5)\n .build();\nlet search_query_3 = SearchQuery::new(&movie_ratings)\n .with_query(\"us\")\n .build();\n\nlet response = client\n .multi_search()\n .with_search_query(search_query_1)\n .with_search_query(search_query_2)\n .with_search_query(search_query_3)\n .execute::()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/multi-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"queries\": [\n {\n \"indexUid\": \"movies\",\n \"q\": \"pooh\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movies\",\n \"q\": \"nemo\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movie_ratings\",\n \"q\": \"us\"\n }\n ]\n }'" + } + ] + } + }, + "/network": { + "get": { + "tags": [ + "Network" + ], + "summary": "Get network topology", + "description": "Get a list of all Meilisearch instances currently known to this instance.", + "operationId": "get_network", + "responses": { + "200": { + "description": "Known nodes are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Network" + }, + "example": { + "self": "ms-0", + "remotes": { + "ms-0": { + "url": "http://localhost:7700", + "searchApiKey": null, + "writeApiKey": null + }, + "ms-1": { + "url": "http://localhost:7701", + "searchApiKey": "foo", + "writeApiKey": "bar" + }, + "ms-2": { + "url": "http://localhost:7702", + "searchApiKey": "bar", + "writeApiKey": "foo" + } + } + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "network.get", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/network'" + } + ] + }, + "patch": { + "tags": [ + "Network" + ], + "summary": "Configure Network", + "description": "Add or remove nodes from network.", + "operationId": "patch_network", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Network" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "New network state is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Network" + }, + "example": { + "self": "ms-0", + "remotes": { + "ms-0": { + "url": "http://localhost:7700", + "searchApiKey": null, + "writeApiKey": null + }, + "ms-1": { + "url": "http://localhost:7701", + "searchApiKey": "foo", + "writeApiKey": "bar" + }, + "ms-2": { + "url": "http://localhost:7702", + "searchApiKey": "bar", + "writeApiKey": "foo" + } + } + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "network.update", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/network' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"self\": \"ms-00\",\n \"remotes\": {\n \"ms-00\": {\n \"url\": \"http://INSTANCE_URL\",\n \"searchApiKey\": \"INSTANCE_API_KEY\"\n },\n \"ms-01\": {\n \"url\": \"http://ANOTHER_INSTANCE_URL\",\n \"searchApiKey\": \"ANOTHER_INSTANCE_API_KEY\"\n }\n }\n }'" + } + ] + } + }, + "/snapshots": { + "post": { + "tags": [ + "Snapshots" + ], + "summary": "Create a snapshot", + "description": "Triggers a snapshot creation process. Once the process is complete, a snapshot is created in the snapshot directory. If the snapshot directory does not exist yet, it will be created.", + "operationId": "create_snapshot", + "responses": { + "202": { + "description": "Snapshot is being created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 0, + "indexUid": null, + "status": "enqueued", + "type": "snapshotCreation", + "enqueuedAt": "2021-01-01T09:39:00.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "snapshots.create", + "snapshots.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.CreateSnapshotAsync();" + }, + { + "lang": "Go", + "source": "client.CreateSnapshot()" + }, + { + "lang": "JS", + "source": "client.createSnapshot()" + }, + { + "lang": "Java", + "source": "client.createSnapshot();" + }, + { + "lang": "PHP", + "source": "$client->createSnapshot();" + }, + { + "lang": "Python", + "source": "client.create_snapshot()" + }, + { + "lang": "Ruby", + "source": "client.create_snapshot" + }, + { + "lang": "Rust", + "source": "client\n .create_snapshot()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let task = try await self.client.createSnapshot()" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/snapshots'" + } + ] + } + }, + "/stats": { + "get": { + "tags": [ + "Stats" + ], + "summary": "Get stats of all indexes.", + "description": "Get stats of all indexes.", + "operationId": "get_stats", + "responses": { + "200": { + "description": "The stats of the instance", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Stats" + }, + "example": { + "databaseSize": 567, + "usedDatabaseSize": 456, + "lastUpdate": "2019-11-20T09:40:33.711324Z", + "indexes": { + "movies": { + "numberOfDocuments": 10, + "rawDocumentDbSize": 100, + "maxDocumentSize": 16, + "avgDocumentSize": 10, + "isIndexing": true, + "fieldDistribution": { + "genre": 10, + "author": 9 + } + } + } + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "stats.get", + "stats.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.GetStatsAsync();" + }, + { + "lang": "Dart", + "source": "await client.getStats();" + }, + { + "lang": "Go", + "source": "client.GetStats()" + }, + { + "lang": "JS", + "source": "client.getStats()" + }, + { + "lang": "Java", + "source": "client.getStats();" + }, + { + "lang": "PHP", + "source": "$client->stats();" + }, + { + "lang": "Python", + "source": "client.get_all_stats()" + }, + { + "lang": "Ruby", + "source": "client.stats" + }, + { + "lang": "Rust", + "source": "let stats: ClientStats = client\n .get_stats()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.allStats { (result) in\n switch result {\n case .success(let stats):\n print(stats)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/stats'" + } + ] + } + }, + "/swap-indexes": { + "post": { + "tags": [ + "Indexes" + ], + "summary": "Swap indexes", + "description": "Swap the documents, settings, and task history of two or more indexes. You can only swap indexes in pairs. However, a single request can swap as many index pairs as you wish.\nSwapping indexes is an atomic transaction: either all indexes are successfully swapped, or none are.\nSwapping indexA and indexB will also replace every mention of indexA by indexB and vice-versa in the task history. enqueued tasks are left unmodified.", + "operationId": "swap_indexes", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SwapIndexesPayload" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 3, + "indexUid": null, + "status": "enqueued", + "type": "indexSwap", + "enqueuedAt": "2021-08-12T10:00:00.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.SwapIndexesAsync(new List { new IndexSwap(\"indexA\", \"indexB\"), new IndexSwap(\"indexX\", \"indexY\") } });" + }, + { + "lang": "Go", + "source": "client.SwapIndexes([]SwapIndexesParams{\n {Indexes: []string{\"indexA\", \"indexB\"}},\n {Indexes: []string{\"indexX\", \"indexY\"}},\n})" + }, + { + "lang": "JS", + "source": "client.swapIndexes([\n { 'indexes': ['indexA', 'indexB'] },\n { 'indexes': ['indexX', 'indexY'] }\n])" + }, + { + "lang": "Java", + "source": "SwapIndexesParams[] params =\n new SwapIndexesParams[] {\n new SwapIndexesParams().setIndexes(new String[] {\"indexA\", \"indexB\"}),\n new SwapIndexesParams().setIndexes(new String[] {\"indexX\", \"indexY\"})\n };\nTaskInfo task = client.swapIndexes(params);" + }, + { + "lang": "PHP", + "source": "$client->swapIndexes([['indexA', 'indexB'], ['indexX', 'indexY']]);" + }, + { + "lang": "Python", + "source": "client.swap_indexes([{'indexes': ['indexA', 'indexB']}, {'indexes': ['indexX', 'indexY']}])" + }, + { + "lang": "Ruby", + "source": "client.swap_indexes(['indexA', 'indexB'], ['indexX', 'indexY'])" + }, + { + "lang": "Rust", + "source": "client.swap_indexes([\n &SwapIndexes {\n indexes: (\n \"indexA\".to_string(),\n \"indexB\".to_string(),\n ),\n }, &SwapIndexes {\n indexes: (\n \"indexX\".to_string(),\n \"indexY\".to_string(),\n ),\n}])" + }, + { + "lang": "Swift", + "source": "let task = try await self.client.swapIndexes([\n (\"indexA\", \"indexB\"),\n (\"indexX\", \"indexY\")\n])" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/swap-indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"indexes\": [\n \"indexA\",\n \"indexB\"\n ]\n },\n {\n \"indexes\": [\n \"indexX\",\n \"indexY\"\n ]\n }\n ]'" + } + ] + } + }, + "/tasks": { + "get": { + "tags": [ + "Tasks" + ], + "summary": "Get all tasks", + "description": "Get all [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)", + "operationId": "get_tasks", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "Maximum number of results to return.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "default": 20, + "minimum": 0 + }, + "example": 12 + }, + { + "name": "from", + "in": "query", + "description": "Fetch the next set of results from the given uid.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "example": 12421 + }, + { + "name": "reverse", + "in": "query", + "description": "The order you want to retrieve the objects.", + "required": false, + "schema": { + "type": "boolean" + }, + "example": true + }, + { + "name": "batchUids", + "in": "query", + "description": "Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "example": 12421 + }, + { + "name": "uids", + "in": "query", + "description": "Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598, + "*" + ] + }, + { + "name": "canceledBy", + "in": "query", + "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 374, + "*" + ] + }, + { + "name": "types", + "in": "query", + "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "documentAdditionOrUpdate", + "*" + ] + }, + { + "name": "statuses", + "in": "query", + "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Status" + } + }, + "example": [ + "succeeded", + "failed", + "canceled", + "enqueued", + "processing", + "*" + ] + }, + { + "name": "indexUids", + "in": "query", + "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "movies", + "theater", + "*" + ] + }, + { + "name": "afterEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + } + ], + "responses": { + "200": { + "description": "Get all tasks", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AllTasks" + }, + "example": { + "results": [ + { + "uid": 144, + "indexUid": "mieli", + "status": "succeeded", + "type": "settingsUpdate", + "canceledBy": null, + "details": { + "settings": { + "filterableAttributes": [ + "play_count" + ] + } + }, + "error": null, + "duration": "PT0.009330S", + "enqueuedAt": "2024-08-08T09:01:13.348471Z", + "startedAt": "2024-08-08T09:01:13.349442Z", + "finishedAt": "2024-08-08T09:01:13.358772Z" + } + ], + "total": 1, + "limit": 1, + "from": 144, + "next": null + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.get", + "tasks.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Dart", + "source": "await client.getTasks();" + }, + { + "lang": "Go", + "source": "client.GetTasks(nil);" + }, + { + "lang": "JS", + "source": "client.tasks.getTasks()" + }, + { + "lang": "Java", + "source": "client.getTasks();" + }, + { + "lang": "PHP", + "source": "$client->getTasks();" + }, + { + "lang": "Python", + "source": "client.get_tasks()" + }, + { + "lang": "Ruby", + "source": "client.tasks" + }, + { + "lang": "Rust", + "source": "let tasks: TasksResults = client\n .get_tasks()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.getTasks { (result) in\n switch result {\n case .success(let tasks):\n print(tasks)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks'" + } + ] + }, + "delete": { + "tags": [ + "Tasks" + ], + "summary": "Delete tasks", + "description": "Delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) on filter", + "operationId": "delete_tasks", + "parameters": [ + { + "name": "uids", + "in": "query", + "description": "Permits to filter tasks by their uid. By default, when the `uids` query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598, + "*" + ] + }, + { + "name": "batchUids", + "in": "query", + "description": "Lets you filter tasks by their `batchUid`.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598, + "*" + ] + }, + { + "name": "canceledBy", + "in": "query", + "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 374, + "*" + ] + }, + { + "name": "types", + "in": "query", + "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Kind" + } + }, + "example": [ + "documentDeletion", + "*" + ] + }, + { + "name": "statuses", + "in": "query", + "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Status" + } + }, + "example": [ + "succeeded", + "failed", + "canceled", + "*" + ] + }, + { + "name": "indexUids", + "in": "query", + "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "movies", + "theater", + "*" + ] + }, + { + "name": "afterEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + } + ], + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "taskDeletion", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "400": { + "description": "A filter is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Query parameters to filter the tasks to delete are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.", + "code": "missing_task_filters", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#missing_task_filters" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "The task uid does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Task :taskUid not found.", + "code": "task_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors/#task_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.delete", + "tasks.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.DeleteTasksAsync(new DeleteTasksQuery { Uids = new List { 1, 2 } });" + }, + { + "lang": "Dart", + "source": "await client.deleteTasks(params: DeleteTasksQuery(uids: [1, 2]));" + }, + { + "lang": "Go", + "source": "client.DeleteTaks(&meilisearch.DeleteTasksQuery{\n UIDS: []int64{1, 2},\n});" + }, + { + "lang": "JS", + "source": "client.tasks.deleteTasks({ uids: [1, 2] })" + }, + { + "lang": "Java", + "source": "DeleteTasksQuery query = new DeleteTasksQuery().setUids(new int[] {1, 2})\nclient.deleteTasks(query);" + }, + { + "lang": "PHP", + "source": "$client->deleteTasks((new DeleteTasksQuery())->setUids([1, 2]));" + }, + { + "lang": "Python", + "source": "client.delete_tasks({'uids': ['1', '2']})" + }, + { + "lang": "Ruby", + "source": "client.delete_tasks(uids: [1, 2])" + }, + { + "lang": "Rust", + "source": "let mut query = tasks::TasksDeleteQuery::new(&client);\nquery.with_uids([1, 2]);\n\nlet res = client.delete_tasks_with(&query).await.unwrap();" + }, + { + "lang": "Swift", + "source": "client.deleteTasks(filter: DeleteTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/tasks?uids=1,2'" + } + ] + } + }, + "/tasks/cancel": { + "post": { + "tags": [ + "Tasks" + ], + "summary": "Cancel tasks", + "description": "Cancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", + "operationId": "cancel_tasks", + "parameters": [ + { + "name": "uids", + "in": "query", + "description": "Permits to filter tasks by their uid. By default, when the `uids` query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598, + "*" + ] + }, + { + "name": "batchUids", + "in": "query", + "description": "Lets you filter tasks by their `batchUid`.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598, + "*" + ] + }, + { + "name": "canceledBy", + "in": "query", + "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 374, + "*" + ] + }, + { + "name": "types", + "in": "query", + "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Kind" + } + }, + "example": [ + "documentDeletion", + "*" + ] + }, + { + "name": "statuses", + "in": "query", + "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Status" + } + }, + "example": [ + "succeeded", + "failed", + "canceled", + "*" + ] + }, + { + "name": "indexUids", + "in": "query", + "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "movies", + "theater", + "*" + ] + }, + { + "name": "afterEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "afterFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + }, + { + "name": "beforeFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": [ + "2024-08-08T16:37:09.971Z", + "*" + ] + } + ], + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "taskCancelation", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "400": { + "description": "A filter is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Query parameters to filter the tasks to cancel are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.", + "code": "missing_task_filters", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#missing_task_filters" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "The task uid does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Task :taskUid not found.", + "code": "task_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors/#task_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.cancel", + "tasks.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.CancelTasksAsync(new CancelTasksQuery { Uids = new List { 1, 2 } });" + }, + { + "lang": "Dart", + "source": "await client.cancelTasks(params: CancelTasksQuery(uids: [1, 2]));" + }, + { + "lang": "Go", + "source": "client.CancelTasks(&meilisearch.CancelTasksQuery{\n UIDS: []int64{1, 2},\n});" + }, + { + "lang": "JS", + "source": "client.tasks.cancelTasks({ uids: [1, 2] })" + }, + { + "lang": "Java", + "source": "CancelTasksQuery query = new CancelTasksQuery().setUids(new int[] {1, 2})\nclient.cancelTasks(query);" + }, + { + "lang": "PHP", + "source": "$client->cancelTasks((new CancelTasksQuery())->setUids([1, 2]));" + }, + { + "lang": "Python", + "source": "client.cancel_tasks({'uids': ['1', '2']})" + }, + { + "lang": "Ruby", + "source": "client.cancel_tasks(uids: [1, 2])" + }, + { + "lang": "Rust", + "source": "let mut query = tasks::TasksCancelQuery::new(&client);\nquery.with_uids([1, 2]);\n\nlet res = client.cancel_task_with(&query).await.unwrap();" + }, + { + "lang": "Swift", + "source": "client.cancelTasks(filter: CancelTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/tasks/cancel?uids=1,2'" + } + ] + } + }, + "/tasks/{taskUid}": { + "get": { + "tags": [ + "Tasks" + ], + "summary": "Get a task", + "description": "Get a [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", + "operationId": "get_task", + "parameters": [ + { + "name": "taskUid", + "in": "path", + "description": "The task identifier", + "required": true, + "schema": { + "type": "string", + "format": "u-int32" + }, + "example": 0 + } + ], + "responses": { + "200": { + "description": "Task successfully retrieved", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskView" + }, + "example": { + "uid": 1, + "indexUid": "movies", + "status": "succeeded", + "type": "documentAdditionOrUpdate", + "canceledBy": null, + "details": { + "receivedDocuments": 79000, + "indexedDocuments": 79000 + }, + "error": null, + "duration": "PT1S", + "enqueuedAt": "2021-01-01T09:39:00.000000Z", + "startedAt": "2021-01-01T09:39:01.000000Z", + "finishedAt": "2021-01-01T09:39:02.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "The task uid does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Task :taskUid not found.", + "code": "task_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors/#task_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.get", + "tasks.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "ResourceResults taskResult = await client.GetTasksAsync(new TasksQuery { Limit = 2, From = 10 });" + }, + { + "lang": "C#", + "source": "ResourceResults taskResult = await client.GetTasksAsync(new TasksQuery { Limit = 2, From = 8 });" + }, + { + "lang": "Dart", + "source": "await client.getTask(1);" + }, + { + "lang": "Dart", + "source": "await client.getTasks(params: TasksQuery(limit: 2, from: 10));" + }, + { + "lang": "Dart", + "source": "await client.getTasks(params: TasksQuery(limit: 2, from: 8));" + }, + { + "lang": "Go", + "source": "client.GetTask(1);" + }, + { + "lang": "Go", + "source": "client.GetTasks(&meilisearch.TasksQuery{\n Limit: 2,\n From: 10,\n});" + }, + { + "lang": "Go", + "source": "client.GetTasks(&meilisearch.TasksQuery{\n Limit: 2,\n From: 8,\n});" + }, + { + "lang": "JS", + "source": "client.tasks.getTask(1)" + }, + { + "lang": "JS", + "source": "client.tasks.getTasks({ limit: 2, from: 10 })" + }, + { + "lang": "JS", + "source": "client.tasks.getTasks({ limit: 2, from: 8 })" + }, + { + "lang": "Java", + "source": "client.getTask(1);" + }, + { + "lang": "Java", + "source": "TasksQuery query = new TasksQuery()\n .setLimit(2)\n .setFrom(10);\n\nclient.index(\"movies\").getTasks(query);" + }, + { + "lang": "Java", + "source": "TasksQuery query = new TasksQuery()\n .setLimit(2)\n .setFrom(8);\n\nclient.index(\"movies\").getTasks(query);" + }, + { + "lang": "PHP", + "source": "$client->getTask(1);" + }, + { + "lang": "PHP", + "source": "$taskQuery = (new TasksQuery())->setLimit(2)->setFrom(10));\n$client->getTasks($taskQuery);" + }, + { + "lang": "PHP", + "source": "$taskQuery = (new TasksQuery())->setLimit(2)->setFrom(8));\n$client->getTasks($taskQuery);" + }, + { + "lang": "Python", + "source": "client.get_task(1)" + }, + { + "lang": "Python", + "source": "client.get_tasks({\n 'limit': 2,\n 'from': 10\n})" + }, + { + "lang": "Python", + "source": "client.get_tasks({\n 'limit': 2,\n 'from': 8\n})" + }, + { + "lang": "Ruby", + "source": "client.task(1)" + }, + { + "lang": "Ruby", + "source": "client.tasks(limit: 2, from: 10)" + }, + { + "lang": "Ruby", + "source": "client.tasks(limit: 2, from: 8)" + }, + { + "lang": "Rust", + "source": "let task: Task = client\n .get_task(1)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let mut query = TasksSearchQuery::new(&client)\n .with_limit(2)\n .with_from(10)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let mut query = TasksSearchQuery::new(&client)\n .with_limit(2)\n .from(8)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.getTask(taskUid: 1) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" + }, + { + "lang": "Swift", + "source": "client.getTasks(params: TasksQuery(limit: 2, from: 10)) { result in\n switch result {\n case .success(let taskResult):\n print(taskResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.getTasks(params: TasksQuery(limit: 2, from: 8)) { result in\n switch result {\n case .success(let taskResult):\n print(taskResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks/1'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks?limit=2&from=10" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks?limit=2&from=8" + } + ] + } + }, + "/version": { + "get": { + "tags": [ + "Version" + ], + "summary": "Get version", + "description": "Current version of Meilisearch.", + "operationId": "get_version", + "responses": { + "200": { + "description": "Instance is healthy", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionResponse" + }, + "example": { + "commitSha": "b46889b5f0f2f8b91438a08a358ba8f05fc09fc1", + "commitDate": "2021-07-08", + "pkgVersion": "0.23.0" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "version", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.GetVersionAsync();" + }, + { + "lang": "C#", + "source": "await client.Index(\"jackets\").UpdateDistinctAttributeAsync(\"product_id\");" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSearchableAttributesAsync(new[]\n{\n \"title\",\n \"overview\",\n \"genres\"\n});" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateDisplayedAttributesAsync(new[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" + }, + { + "lang": "C#", + "source": "SearchQuery filters = new SearchQuery() { Filter = \"release_date > \\\"795484800\\\"\" };\nvar movies = await client.Index(\"movie_ratings\").SearchAsync(\"Avengers\", filters);" + }, + { + "lang": "C#", + "source": "SearchQuery filters = new SearchQuery() { Filter = \"release_date > 795484800 AND (director =\n\\\"Tim Burton\\\" OR director = \\\"Christopher Nolan\\\")\" };\nvar movies = await client.Index(\"movie_ratings\").SearchAsync(\"Batman\", filters);" + }, + { + "lang": "C#", + "source": "SearchQuery filters = new SearchQuery() { Filter = \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\" };\nvar movies = await client.Index(\"movie_ratings\").SearchAsync(\"Planet of the Apes\", filters);" + }, + { + "lang": "C#", + "source": "var filters = new SearchQuery() { Filter = \"rating.users >= 90\" };\nvar movies = await client.Index(\"movie_ratings\").SearchAsync(\"thriller\", filters);" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").SearchAsync(\"shifu\");" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n Offset = 1\n};\nvar result = await client.Index(\"movies\").SearchAsync(\"shifu\", sq);\nif(result is SearchResult pagedResults)\n{\n}" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n Limit = 2\n};\nvar result = await client.Index(\"movies\").SearchAsync(\"shifu\", sq);\nif(result is SearchResult pagedResults)\n{\n}" + }, + { + "lang": "C#", + "source": "var result = await client.Index(\"movies\").SearchAsync(\"\", new SearchQuery { HitsPerPage = 15 });\nif(result is PaginatedSearchResult pagedResults)\n{\n}" + }, + { + "lang": "C#", + "source": "var result = await client.Index(\"movies\").SearchAsync(\"\", new SearchQuery { Page = 2 });\nif(result is PaginatedSearchResult pagedResults)\n{\n}" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n AttributesToRetrieve = new[] {\"overview\", \"title\"}\n};\nawait client.Index(\"movies\").SearchAsync(\"shifu\", sq);" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n AttributesToCrop = new[] {\"overview\"},\n CropLength = 5\n};\nawait client.Index(\"movies\").SearchAsync(\"shifu\", sq);" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n AttributesToCrop = new[] {\"overview\"},\n CropMarker = \"[...]\"\n};\nawait client.Index(\"movies\").SearchAsync(\"shifu\", sq);" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n AttributesToHighlight = new[] {\"overview\"}\n};\nawait client.Index(\"movies\").SearchAsync(\"winter feast\", sq);" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n AttributesToHighlight = new[] {\"overview\"},\n HighlightPreTag = \"\",\n HighlightPostTag = \"\"\n};\nawait client.Index(\"movies\").SearchAsync(\"winter feast\", sq);" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").SearchAsync(\n \"winter feast\",\n new SearchQuery\n {\n ShowMatchesPosition = True,\n });" + }, + { + "lang": "C#", + "source": "// Make sure to add this using to your code\nusing System.IO;\n\nvar jsonDocuments = await File.ReadAllTextAsync(\"movies.json\");\nawait client.Index(\"movies\").AddDocumentsJsonAsync(jsonDocuments);" + }, + { + "lang": "C#", + "source": "// In the command line:\n// dotnet add package Meilisearch\n\n// In your .cs file:\nusing System.IO;\nusing System.Text.Json;\nusing Meilisearch;\nusing System.Threading.Tasks;\nusing System.Collections.Generic;\n\nnamespace Meilisearch_demo\n{\n public class Movie\n {\n public string Id { get; set; }\n public string Title { get; set; }\n public string Poster { get; set; }\n public string Overview { get; set; }\n public IEnumerable Genres { get; set; }\n }\n\n internal class Program\n {\n static async Task Main(string[] args)\n {\n MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"aSampleMasterKey\");\n var options = new JsonSerializerOptions\n {\n PropertyNameCaseInsensitive = true\n };\n\n string jsonString = await File.ReadAllTextAsync(\"movies.json\");\n var movies = JsonSerializer.Deserialize>(jsonString, options);\n\n var index = client.Index(\"movies\");\n await index.AddDocumentsAsync(movies);\n }\n }\n}" + }, + { + "lang": "C#", + "source": "TaskInfo task = await client.GetTaskAsync(0);" + }, + { + "lang": "C#", + "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nvar index = client.Index(\"movies\");\n\nvar movies = await index.SearchAsync(\"botman\");\nforeach (var movie in movies.Hits)\n{\n Console.WriteLine(movie.Title);\n}" + }, + { + "lang": "C#", + "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nvar options = new JsonSerializerOptions\n{\n PropertyNameCaseInsensitive = true\n};\n\nstring jsonString = await File.ReadAllTextAsync(\"meteorites.json\");\nvar meteorites = JsonSerializer.Deserialize>(jsonString, options);\n\nvar index = client.Index(\"meteorites\");\nawait index.AddDocumentsAsync(meteorites);" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateRankingRulesAsync(new string[] {\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\"\n});" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateDisplayedAttributesAsync(new string[] {\n \"title\",\n \"overview\",\n \"poster\"\n});" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSearchableAttributesAsync(new string[] {\n \"title\"\n});" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateStopWordsAsync(new string[] {\n \"the\"\n});" + }, + { + "lang": "C#", + "source": "var newSynonyms = new Dictionary>\n{\n { \"winnie\", new string[] { \"piglet\" } },\n { \"piglet\", new string[] { \"winnie\" } },\n};\nawait client.Index(\"movies\").UpdateSynonymsAsync(newSynonyms);" + }, + { + "lang": "C#", + "source": "SearchQuery filter = new SearchQuery() { Filter = \"mass < 200\" };\nawait client.Index(\"meteorites\").SearchAsync(\"\", filter);" + }, + { + "lang": "C#", + "source": "SearchQuery filter = new SearchQuery() { Filter = \"_geoRadius(46.9480, 7.4474, 210000)\" };\nawait client.Index(\"meteorites\").SearchAsync(\"\", filter);" + }, + { + "lang": "C#", + "source": "SearchQuery sort = new SearchQuery() { Sort = new string[] { \"_geoPoint(48.8583701,2.2922926):asc\" }};\nawait client.Index(\"meteorites\").SearchAsync(\"\", sort);" + }, + { + "lang": "C#", + "source": "SearchQuery searchQuery = new SearchQuery() {\n Sort = new string[] { \"mass:asc\" },\n Filter = \"mass < 200\",\n};\nawait client.Index(\"meteorites\").SearchAsync(\"\", searchQuery);" + }, + { + "lang": "C#", + "source": "var newSettings = new Settings\n{\n FilterableAttributes = new string[] { \"mass\", \"_geo\" },\n SortableAttributes = new string[] { \"mass\", \"_geo\" },\n};\nawait client.Index(\"meteorites\").UpdateSettingsAsync(newSettings);" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n Filter = \"(genre = 'Horror' AND genre = 'Mystery') OR director = 'Jordan Peele'\"\n};\nawait client.Index(\"movies\").SearchAsync(\"thriller\", sq);" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").SearchAsync(\"\\\"african american\\\" horror\");" + }, + { + "lang": "C#", + "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nvar keys = await client.GetKeysAsync();" + }, + { + "lang": "C#", + "source": "await client.Index(\"books\").UpdateSortableAttributesAsync(new [] { \"price\", \"author\" });" + }, + { + "lang": "C#", + "source": "await client.Index(\"books\").UpdateRankingRulesAsync(new[]\n{\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\"\n});" + }, + { + "lang": "C#", + "source": "SearchQuery sort = new SearchQuery() { Sort = new string[] { \"rating.users:asc\" }};\nawait client.Index(\"books\").SearchAsync(\"science fiction\", sort);" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n Sort = new[] { \"price:asc\" },\n};\nawait client.Index(\"books\").SearchAsync(\"science fiction\", sq);" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n Sort = new[] { \"author:desc\" },\n};\nawait client.Index(\"books\").SearchAsync(\"butler\", sq);" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n Sort = new[] { \"price:asc\" },\n};\nawait client.Index(\"books\").SearchAsync(\"science fiction\", sq);" + }, + { + "lang": "C#", + "source": "List attributes = new() { \"_geo\" };\nTaskInfo result = await client.Index(\"movies\").UpdateFilterableAttributesAsync(attributes);" + }, + { + "lang": "C#", + "source": "SearchQuery filters = new SearchQuery() { Filter = \"_geoRadius(45.472735, 9.184019, 2000)\" };\nvar restaurants = await client.Index(\"restaurants\").SearchAsync(\"\", filters);" + }, + { + "lang": "C#", + "source": "SearchQuery filters = new SearchQuery()\n{\n Filter = new string[] { \"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\" }\n};\n\nvar restaurants = await client.Index(\"restaurants\").SearchAsync(\"restaurants\", filters);" + }, + { + "lang": "C#", + "source": "SearchQuery filters = new SearchQuery()\n{\n Filter = \"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\"\n};\nvar restaurants = await client.Index(\"restaurants\").SearchAsync(\"restaurants\", filters);" + }, + { + "lang": "C#", + "source": "List attributes = new() { \"_geo\" };\nTaskInfo result = await client.Index(\"restaurants\").UpdateSortableAttributesAsync(attributes);" + }, + { + "lang": "C#", + "source": "SearchQuery filters = new SearchQuery()\n{\n Sort = new string[] { \"_geoPoint(48.8561446,2.2978204):asc\" }\n};\n\nvar restaurants = await client.Index(\"restaurants\").SearchAsync(\"\", filters);" + }, + { + "lang": "C#", + "source": "SearchQuery filters = new SearchQuery()\n{\n Sort = new string[] {\n \"_geoPoint(48.8561446,2.2978204):asc\",\n \"rating:desc\"\n }\n};\n\nvar restaurants = await client.Index(\"restaurants\").SearchAsync(\"restaurants\", filters);" + }, + { + "lang": "C#", + "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"apiKey\");\nvar searchResult = await client.Index(\"patient_medical_records\").SearchAsync();" + }, + { + "lang": "C#", + "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nawait client.UpdateKeyAsync(\"74c9c733-3368-4738-bbe5-1d18a5fecb37\", description: \"Default Search API Key\");" + }, + { + "lang": "C#", + "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nKey keyOptions = new Key\n{\n Description = \"Search patient records key\",\n Actions = new string[] { \"search\" },\n Indexes = new string[] { \"patient_medical_records\" },\n ExpiresAt = DateTime.Parse(\"2023-01-01T00:00:00Z\")\n};\nKey createdKey = await this.client.CreateKeyAsync(keyOptions);" + }, + { + "lang": "C#", + "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nResourceResults keyResult = await client.GetKeysAsync();\nvar keys = keyResult.Result;" + }, + { + "lang": "C#", + "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nclient.DeleteKeyAsync(\"ac5cd97d-5a4b-4226-a868-2d0eb6d197ab\")" + }, + { + "lang": "C#", + "source": "TaskInfo task = await client.CreateIndexAsync(\"books\", \"reference_number\");" + }, + { + "lang": "C#", + "source": "await index.AddDocumentsAsync(\n new[] {\n new Book {\n ReferenceNumber = 287947,\n Title = \"Diary of a Wimpy Kid\",\n Author = \"Jeff Kinney\",\n Genres = new string[] { \"comedy\", \"humor\" },\n Price = 5.00\n }\n },\n \"reference_number\");" + }, + { + "lang": "C#", + "source": "TaskInfo task = await client.UpdateIndexAsync(\"books\", \"title\");" + }, + { + "lang": "C#", + "source": "var typoTolerance = new TypoTolerance {\n Enabled = false\n};\nawait client.Index(\"movies\").UpdateTypoToleranceAsync(typoTolerance);" + }, + { + "lang": "C#", + "source": "var typoTolerance = new TypoTolerance {\n DisableOnAttributes = new string[] { \"title\" }\n};\nawait client.Index(\"movies\").UpdateTypoToleranceAsync(typoTolerance);" + }, + { + "lang": "C#", + "source": "var typoTolerance = new TypoTolerance {\n DisableOnWords = new string[] { \"shrek\" }\n};\nawait client.Index(\"movies\").UpdateTypoToleranceAsync(typoTolerance);" + }, + { + "lang": "C#", + "source": "var typoTolerance = new TypoTolerance {\n MinWordSizeTypos = new TypoTolerance.TypoSize {\n OneTypo = 4,\n TwoTypos = 10\n }\n};\n\nawait client.Index(\"movies\").UpdateTypoToleranceAsync(typoTolerance);" + }, + { + "lang": "C#", + "source": "var typoTolerance = new TypoTolerance {\n MinWordSizeTypos = new TypoTolerance.TypoSize {\n OneTypo = 4\n }\n};\n\nawait client.Index(\"movies\").UpdateTypoToleranceAsync(typoTolerance);" + }, + { + "lang": "C#", + "source": "var synonyms = new Dictionary>\n{\n { \"great\", new string[] { \"fantastic\" } },\n { \"fantastic\", new string[] { \"great\" } }\n};\nawait client.Index(\"movies\").UpdateSynonymsAsync(synonyms);" + }, + { + "lang": "C#", + "source": "var faceting = new Faceting\n{\n MaxValuesPerFacet = 2,\n SortFacetValuesBy = new Dictionary\n {\n [\"*\"] = SortFacetValuesByType.Count\n }\n};\nawait client.Index(\"movies\").UpdateFacetingAsync(faceting);" + }, + { + "lang": "C#", + "source": "var pagination = new Pagination {\n MaxTotalHits = 500\n};\nawait client.Index(\"movies\").UpdatePaginationAsync(pagination);" + }, + { + "lang": "C#", + "source": "SearchQuery params = new SearchQuery() { MatchingStrategy = \"last\" };\nawait client.Index(\"movies\").SearchAsync(\"big fat liar\", params);" + }, + { + "lang": "C#", + "source": "SearchQuery params = new SearchQuery() { MatchingStrategy = \"all\" };\nawait client.Index(\"movies\").SearchAsync(\"big fat liar\", params);" + }, + { + "lang": "C#", + "source": "string jsonString = await File.ReadAllTextAsync(\"games.json\");\nvar games = JsonSerializer.Deserialize>(jsonString, options);\nvar index = client.Index(\"games\");\nawait index.AddDocumentsAsync(games);" + }, + { + "lang": "C#", + "source": "await client.Index(\"games\").UpdateFilterableAttributesAsync(new string[] { \"release_timestamp\" });" + }, + { + "lang": "C#", + "source": "var filters = new SearchQuery() { Filter = \"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\" };\nvar games = await client.Index(\"games\").SearchAsync(\"\", filters);" + }, + { + "lang": "C#", + "source": "await client.Index(\"games\").UpdateSortableAttributesAsync(new string[] { \"release_timestamp\" });" + }, + { + "lang": "C#", + "source": "SearchQuery sort = new SearchQuery() { Sort = new string[] { \"release_timestamp:desc\" }};\nawait client.Index(\"games\").SearchAsync(\"\", sort);" + }, + { + "lang": "C#", + "source": "await client.GetTasksAsync(new TasksQuery { Statuses = new List { TaskInfoStatus.Failed, TaskInfoStatus.Canceled } });" + }, + { + "lang": "C#", + "source": "var query = new TasksQuery { IndexUids = new List { \"movies\" }, Types = new List { TaskInfo.DocumentAdditionOrUpdate, TaskInfo.DocumentDeletion }, Statuses = new List { TaskInfoStatus.Processing } };\n\nawait client.GetTasksAsync(query);" + }, + { + "lang": "C#", + "source": "List attributes = new() { \"genres\", \"rating\", \"language\" };\nTaskInfo result = await client.Index(\"movie_ratings\").UpdateFilterableAttributesAsync(attributes);" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n Facets = new string[] { \"genres\", \"rating\", \"language\" }\n};\nawait client.Index(\"books\").SearchAsync(\"classic\", sq);" + }, + { + "lang": "C#", + "source": "var sq = new SearchQuery\n{\n Facets = new string[] { \"genres\", \"rating\" }\n};\nawait client.Index(\"movie_ratings\").SearchAsync(\"Batman\", sq);" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateFilterableAttributesAsync(new [] { \"director\", \"genres\" });" + }, + { + "lang": "C#", + "source": "var newFaceting = new Faceting\n{\n SortFacetValuesBy = new Dictionary\n {\n [\"genres\"] = SortFacetValuesByType.Count\n }\n};\nawait client.Index(\"books\").UpdateFacetingAsync(newFaceting);" + }, + { + "lang": "C#", + "source": "var query = new SearchFacetsQuery()\n{\n FacetQuery = \"c\",\n ExhaustiveFacetCount: true\n};\nawait client.Index(\"books\").FacetSearchAsync(\"genres\", query);" + }, + { + "lang": "C#", + "source": "var params = new SearchQuery()\n{\n ShowRankingScore = true\n};\nawait client.Index(\"movies\").SearchAsync(\"dragon\", params);" + }, + { + "lang": "C#", + "source": "var params = new SearchQuery()\n{\n ShowRankingScoreDetails = true\n};\nawait client.Index(\"movies\").SearchAsync(\"dragon\", params);" + }, + { + "lang": "C#", + "source": "var searchQuery = new SearchQuery\n{\n AttributesToSearchOn = new[] { \"overview\" }\n};\nawait client.Index(\"movies\").SearchAsync(\"adventure\", searchQuery);" + }, + { + "lang": "C#", + "source": "var params = new SearchQuery()\n{\n Distinct = \"ATTRIBUTE_A\"\n};\nawait client.Index(\"INDEX_NAME\").SearchAsync(\"QUERY TERMS\", params);" + }, + { + "lang": "C#", + "source": "List attributes = new() { \"product_id\", \"sku\", \"url\" };\nTaskInfo result = await client.Index(\"products\").UpdateFilterableAttributesAsync(attributes);" + }, + { + "lang": "C#", + "source": "var params = new SearchQuery()\n{\n Distinct = \"sku\"\n};\nawait client.Index(\"products\").SearchAsync(\"white shirt\", params);" + }, + { + "lang": "Dart", + "source": "await client.getVersion();" + }, + { + "lang": "Dart", + "source": "await client.index('jackets').updateDistinctAttribute('product_id');" + }, + { + "lang": "Dart", + "source": "await client.index('movies').search('shifu');" + }, + { + "lang": "Dart", + "source": "await client.index('movies').search('shifu', SearchQuery(offset: 1));" + }, + { + "lang": "Dart", + "source": "await client.index('movies').search('shifu', SearchQuery(limit: 2));" + }, + { + "lang": "Dart", + "source": "await client.getTask(0);" + }, + { + "lang": "Dart", + "source": "await client.index('movies').search('botman');" + }, + { + "lang": "Dart", + "source": "await client.index('movies').updateStopWords(['the']);" + }, + { + "lang": "Dart", + "source": "await client.index('movies').search('\"african american\" horror');" + }, + { + "lang": "Dart", + "source": "var client = MeiliSearchClient('http://localhost:7700', 'masterKey');\nawait client.getKeys();" + }, + { + "lang": "Dart", + "source": "await client.index('books').updateSortableAttributes(['author', 'price']);" + }, + { + "lang": "Dart", + "source": "await client.index('restaurants').updateFilterableAttributes(['_geo']);" + }, + { + "lang": "Dart", + "source": "await client.index('restaurants').updateSortableAttributes(['_geo']);" + }, + { + "lang": "Dart", + "source": "var client = MeiliSearchClient('http://localhost:7700', 'apiKey');\nawait client.index('patient_medical_records').search('');" + }, + { + "lang": "Dart", + "source": "var client = MeiliSearchClient('http://localhost:7700', 'masterKey');\nawait client.createKey(\n description: 'Search patient records key',\n actions: ['search'],\n indexes: ['patient_medical_records'],\n expiresAt: DateTime(2023, 01, 01),\n);" + }, + { + "lang": "Dart", + "source": "var client = MeiliSearchClient('http://localhost:7700', 'masterKey');\nawait client.getKeys();" + }, + { + "lang": "Dart", + "source": "var client = MeiliSearchClient('http://localhost:7700', 'masterKey');\nawait client.deleteKey('ac5cd97d-5a4b-4226-a868-2d0eb6d197ab');" + }, + { + "lang": "Dart", + "source": "await client.createIndex('books', primaryKey: 'reference_number');" + }, + { + "lang": "Dart", + "source": "await client.index('movies').addDocuments([\n {\n 'reference_number': 287947,\n 'title': 'Diary of a Wimpy Kid',\n 'author': 'Jeff Kinney',\n 'genres': ['comedy', 'humor'],\n 'price': 5.00\n }\n], primaryKey: 'reference_number');" + }, + { + "lang": "Dart", + "source": "await client.updateIndex('books', 'title');" + }, + { + "lang": "Dart", + "source": "final toUpdate = TypoTolerance(enabled: false);\nawait client.index('movies').updateTypoTolerance(toUpdate);" + }, + { + "lang": "Dart", + "source": "final toUpdate = TypoTolerance(\n disableOnAttributes: ['title'],\n);\nawait client.index('movies').updateTypoTolerance(toUpdate);" + }, + { + "lang": "Dart", + "source": "final toUpdate = TypoTolerance(\n disableOnWords: ['shrek'],\n);\nawait client.index('movies').updateTypoTolerance(toUpdate);" + }, + { + "lang": "Dart", + "source": "final toUpdate = TypoTolerance(\n minWordSizeForTypos: MinWordSizeForTypos(\n oneTypo: 4,\n twoTypos: 10,\n ),\n);\nawait client.index('movies').updateTypoTolerance(toUpdate);" + }, + { + "lang": "Dart", + "source": "final toUpdate = TypoTolerance(\n minWordSizeForTypos: MinWordSizeForTypos(oneTypo: 4),\n);\nawait client.index('movies').updateTypoTolerance(toUpdate);" + }, + { + "lang": "Dart", + "source": "await client.index('movies').updateFilterableAttributes([\n 'director',\n 'genres',\n]);" + }, + { + "lang": "Go", + "source": "client.GetVersion()" + }, + { + "lang": "Go", + "source": "client.Index(\"jackets\").UpdateDistinctAttribute(\"product_id\")" + }, + { + "lang": "Go", + "source": "searchableAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n}\nclient.Index(\"movies\").UpdateSearchableAttributes(&searchableAttributes)" + }, + { + "lang": "Go", + "source": "displayedAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n}\nclient.Index(\"movies\").UpdateDisplayedAttributes(&displayedAttributes)" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movie_ratings\").Search(\"Avengers\", &meilisearch.SearchRequest{\n Filter: \"release_date > \\\"795484800\\\"\",\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movie_ratings\").Search(\"Batman\", &meilisearch.SearchRequest{\n Filter: \"release_date > 795484800 AND (director = \\\"Tim Burton\\\" OR director = \\\"Christopher Nolan\\\")\",\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movie_ratings\").Search(\"Planet of the Apes\", &meilisearch.SearchRequest{\n Filter: \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\",\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movie_ratings\").Search(\"thriller\", &meilisearch.SearchRequest{\n Filter: \"rating.users >= 90\",\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{\n Offset: 1,\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{\n Limit: 2,\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").Search(\"\", &meilisearch.SearchRequest{\n HitsPerPage: 15,\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").Search(\"\", &meilisearch.SearchRequest{\n Page: 2,\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{\n AttributesToRetrieve: []string{\"overview\", \"title\"},\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{\n AttributesToCrop: []string{\"overview\"},\n CropLength: 5,\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{\n AttributesToCrop: []string{\"overview\"},\n CropMarker: \"[…]\",\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"winter feast\", &meilisearch.SearchRequest{\n AttributesToHighlight: []string{\"overview\"},\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"winter feast\", &meilisearch.SearchRequest{\n AttributesToHighlight: []string{\"overview\"},\n HighlightPreTag: \"\",\n HighlightPostTag: \"\",\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"winter feast\", &meilisearch.SearchRequest{\n ShowMatchesPosition: true,\n})" + }, + { + "lang": "Go", + "source": "import (\n \"encoding/json\"\n \"os\"\n)\n\nfile, _ := os.ReadFile(\"movies.json\")\n\nvar movies interface{}\njson.Unmarshal([]byte(file), &movies)\n\nclient.Index(\"movies\").AddDocuments(&movies, nil)" + }, + { + "lang": "Go", + "source": "// In the command line:\n// go get -u github.com/meilisearch/meilisearch-go\n\n// In your .go file:\npackage main\n\nimport (\n \"os\"\n \"encoding/json\"\n \"io\"\n\n \"github.com/meilisearch/meilisearch-go\"\n)\n\nfunc main() {\n client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\n\n jsonFile, _ := os.Open(\"movies.json\")\n defer jsonFile.Close()\n\n byteValue, _ := io.ReadAll(jsonFile)\n var movies []map[string]interface{}\n json.Unmarshal(byteValue, &movies)\n\n _, err := client.Index(\"movies\").AddDocuments(movies, nil)\n if err != nil {\n panic(err)\n }\n}" + }, + { + "lang": "Go", + "source": "client.GetTask(0)" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").Search(\"botman\", &meilisearch.SearchRequest{})" + }, + { + "lang": "Go", + "source": "client := meilisearch.New(\"http://localhost:7700\")\n\njsonFile, _ := os.Open(\"meteorites.json\")\ndefer jsonFile.Close()\n\nbyteValue, _ := io.ReadAll(jsonFile)\nvar meteorites []map[string]interface{}\njson.Unmarshal(byteValue, &meteorites)\n\nclient.Index(\"meteorites\").AddDocuments(meteorites, nil)" + }, + { + "lang": "Go", + "source": "rankingRules := []string{\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\",\n}\nclient.Index(\"movies\").UpdateRankingRules(&rankingRules)" + }, + { + "lang": "Go", + "source": "displayedAttributes := []string{\n \"title\",\n \"overview\",\n \"poster\",\n}\nclient.Index(\"movies\").UpdateDisplayedAttributes(&displayedAttributes)" + }, + { + "lang": "Go", + "source": "searchableAttributes := []string{\n \"title\",\n}\nclient.Index(\"movies\").UpdateSearchableAttributes(&searchableAttributes)" + }, + { + "lang": "Go", + "source": "stopWords := []string{\"the\"}\nclient.Index(\"movies\").UpdateStopWords(&stopWords)" + }, + { + "lang": "Go", + "source": "synonyms := map[string][]string{\n \"winnie\": []string{\"piglet\"},\n \"piglet\": []string{\"winnie\"},\n}\nclient.Index(\"movies\").UpdateSynonyms(&synonyms)" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"meteorites\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"mass < 200\",\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"meteorites\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"_geoRadius(46.9480, 7.4474, 210000)\",\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"meteorites\").Search(\"\", &meilisearch.SearchRequest{\n Sort: []string{\n \"_geoPoint(48.8583701,2.2922926):asc\",\n },\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"meteorites\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"mass < 200\",\n Sort: []string{\n \"mass:asc\",\n },\n})" + }, + { + "lang": "Go", + "source": "settings := meilisearch.Settings{\n FilterableAttributes: []string{\n \"mass\",\n \"_geo\",\n },\n SortableAttributes: []string{\n \"mass\",\n \"_geo\",\n },\n}\nclient.Index(\"meteorites\").UpdateSettings(&settings)" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"thriller\", &meilisearch.SearchRequest{\n Filter: [][]string{\n []string{\"genres = Horror\", \"genres = Mystery\"},\n []string{\"director = \\\"Jordan Peele\\\"\"},\n },\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"\\\"african american\\\" horror\", &meilisearch.SearchRequest{})" + }, + { + "lang": "Go", + "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\nclient.GetKeys(nil);" + }, + { + "lang": "Go", + "source": "sortableAttributes := []string{\n \"author\",\n \"price\",\n}\nclient.Index(\"books\").UpdateSortableAttributes(&sortableAttributes)" + }, + { + "lang": "Go", + "source": "rankingRules := []string{\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\",\n}\nclient.Index(\"books\").UpdateRankingRules(&rankingRules)" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"books\").Search(\"science fiction\", &meilisearch.SearchRequest{\n Sort: []string{\n \"rating.users:asc\",\n },\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"books\").Search(\"science fiction\", &meilisearch.SearchRequest{\n Sort: []string{\n \"price:asc\",\n },\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"books\").Search(\"butler\", &meilisearch.SearchRequest{\n Sort: []string{\n \"author:desc\",\n },\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"books\").Search(\"science fiction\", &meilisearch.SearchRequest{\n Sort: []string{\n \"price:asc\",\n },\n})" + }, + { + "lang": "Go", + "source": "filterableAttributes := []interface{}{\n \"_geo\",\n}\nclient.Index(\"restaurants\").UpdateFilterableAttributes(&filterableAttributes)" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"restaurants\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"_geoRadius(45.472735, 9.184019, 2000)\",\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"restaurants\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\",\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"restaurants\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\",\n})" + }, + { + "lang": "Go", + "source": "sortableAttributes := []string{\n \"_geo\",\n}\nclient.Index(\"restaurants\").UpdateSortableAttributes(&sortableAttributes)" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"restaurants\").Search(\"\", &meilisearch.SearchRequest{\n Sort: []string{\n \"_geoPoint(48.8561446,2.2978204):asc\",\n },\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"restaurants\").Search(\"\", &meilisearch.SearchRequest{\n Sort: []string{\n \"_geoPoint(48.8561446,2.2978204):asc\",\n \"rating:desc\",\n },\n})" + }, + { + "lang": "Go", + "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\nclient.Index(\"patient_medical_records\").Search();" + }, + { + "lang": "Go", + "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\n\nclient.UpdateKey(\"74c9c733-3368-4738-bbe5-1d18a5fecb37\", &meilisearch.Key{\n Indexes: []string{\"doctors\"},\n})" + }, + { + "lang": "Go", + "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\n\nclient.CreateKey(&meilisearch.Key{\n Description: \"Search patient records key\",\n Actions: []string{\"search\"},\n Indexes: []string{\"patient_medical_records\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" + }, + { + "lang": "Go", + "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\nclient.GetKeys(nil);" + }, + { + "lang": "Go", + "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\nclient.DeleteKey(\"74c9c733-3368-4738-bbe5-1d18a5fecb37\");" + }, + { + "lang": "Go", + "source": "client.CreateIndex(&meilisearch.IndexConfig{\n Uid: \"books\",\n PrimaryKey: \"reference_number\",\n})" + }, + { + "lang": "Go", + "source": "documents := []map[string]interface{}{\n {\n \"reference_number\": 287947,\n \"title\": \"Diary of a Wimpy Kid\",\n \"author\": \"Jeff Kinney\",\n \"genres\": []string{\"comedy\", \"humor\"},\n \"price\": 5.00,\n },\n}\nrefrenceNumber := \"reference_number\"\nclient.Index(\"books\").AddDocuments(documents, &refrenceNumber)" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateIndex(&meilisearch.UpdateIndexRequestParams{\n PrimaryKey: \"title\",\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n Enabled: false,\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n DisableOnAttributes: []string{\"title\"},\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n DisableOnWords: []string{\"shrek\"},\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 4,\n TwoTypos: 10,\n },\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n DisableOnNumbers: true\n})" + }, + { + "lang": "Go", + "source": "client.index(\"movies\").UpdateTypoTolerance({\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 4,\n },\n})" + }, + { + "lang": "Go", + "source": "synonyms := map[string][]string{\n \"great\": []string{\"fantastic\"},\n \"fantastic\": []string{\"great\"},\n}\nclient.Index(\"movies\").UpdateSynonyms(&synonyms)" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateFaceting(&meilisearch.Faceting{\n MaxValuesPerFacet: 2,\n SortFacetValuesBy: {\n \"*\": SortFacetTypeCount,\n }\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdatePagination(&meilisearch.Pagination{\n MaxTotalHits: 500,\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"big fat liar\", &meilisearch.SearchRequest{\n MatchingStrategy: Last,\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"big fat liar\", &meilisearch.SearchRequest{\n MatchingStrategy: All,\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").Search(\"white shirt\", &meilisearch.SearchRequest{\n MatchingStrategy: Frequency,\n})" + }, + { + "lang": "Go", + "source": "jsonFile, _ := os.Open(\"games.json\")\ndefer jsonFile.Close()\n\nbyteValue, _ := io.ReadAll(jsonFile)\nvar games []map[string]interface{}\njson.Unmarshal(byteValue, &games)\n\nclient.Index(\"games\").AddDocuments(games, nil)" + }, + { + "lang": "Go", + "source": "filterableAttributes := []interface{}{\"release_timestamp\"}\nclient.Index(\"games\").UpdateFilterableAttributes(&filterableAttributes)" + }, + { + "lang": "Go", + "source": "client.Index(\"games\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\",\n})" + }, + { + "lang": "Go", + "source": "sortableAttributes := []string{\"release_timestamp\",\"author\"}\nclient.Index(\"games\").UpdateSortableAttributes(&sortableAttributes)" + }, + { + "lang": "Go", + "source": "client.Index(\"games\").Search(\"\", &meilisearch.SearchRequest{\n Sort: []string{\n \"release_timestamp:desc\",\n },\n})" + }, + { + "lang": "Go", + "source": "client.GetTasks(&meilisearch.TasksQuery{\n Statuses: []meilisearch.TaskStatus{\n meilisearch.TaskStatusFailed,\n meilisearch.TaskStatusCanceled,\n },\n})" + }, + { + "lang": "Go", + "source": "client.GetTasks(&meilisearch.TasksQuery{\n IndexUIDS: []string{\"movie\"},\n Types: []meilisearch.TaskType{\n meilisearch.TaskTypeDocumentAdditionOrUpdate,\n meilisearch.TaskTypeDocumentDeletion,\n },\n Statuses: []meilisearch.TaskStatus{\n meilisearch.TaskStatusProcessing,\n },\n})" + }, + { + "lang": "Go", + "source": "filterableAttributes := []interface{}{\n \"genres\",\n \"rating\",\n \"language\",\n}\nclient.Index(\"movie_ratings\").UpdateFilterableAttributes(&filterableAttributes)" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"books\").Search(\"classic\", &meilisearch.SearchRequest{\n Facets: []string{\n \"genres\",\n \"rating\",\n \"language\",\n },\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"movie_ratings\").Search(\"Batman\", &meilisearch.SearchRequest{\n Facets: []string{\n \"genres\",\n \"rating\",\n },\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").UpdateFilterableAttributes(&[]interface{}{\n \"director\",\n \"genres\",\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateFaceting(&meilisearch.Faceting{\n SortFacetValuesBy: {\n \"genres\": SortFacetTypeCount,\n }\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").FacetSearch(&meilisearch.FacetSearchRequest{\n FacetQuery: \"c\",\n FacetName: \"genres\",\n ExhaustiveFacetCount: true\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"dragon\", &meilisearch.SearchRequest{\n showRankingScore: true,\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"dragon\", &meilisearch.SearchRequest{\n showRankingScoreDetails: true,\n})" + }, + { + "lang": "Go", + "source": "resp, err := client.Index(\"movies\").Search(\"adventure\", &meilisearch.SearchRequest{\n AttributesToSearchOn: []string{\"overview\"},\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"INDEX_NAME\").Search(\"QUERY TERMS\", &meilisearch.SearchRequest{\n Distinct: \"ATTRIBUTE_A\",\n})" + }, + { + "lang": "Go", + "source": "filterableAttributes := []interface{}{\n \"product_id\",\n \"sku\",\n \"url\",\n}\nclient.Index(\"products\").UpdateFilterableAttributes(&filterableAttributes)" + }, + { + "lang": "Go", + "source": "client.Index(\"products\").Search(\"white shirt\", &meilisearch.SearchRequest{\n Distinct: \"sku\",\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"INDEX_NAME\").Search(\"badman\", &meilisearch.SearchRequest{\n RankingScoreThreshold: 0.2,\n})" + }, + { + "lang": "Go", + "source": "client.index(\"INDEX_NAME\").Search(\"QUERY TEXT IN JAPANESE\", &meilisearch.SearchRequest{\n Locales: []string{\"jpn\"}\n})" + }, + { + "lang": "Go", + "source": "client.Index(\"INDEX_NAME\").Search(\"\", &meilisearch.SearchRequest{\n Hybrid: &meilisearch.SearchRequestHybrid{\n Embedder: \"EMBEDDER_NAME\",\n },\n Media: map[string]any{\n \"FIELD_A\": \"VALUE_A\",\n \"FIELD_B\": map[string]any{\n \"FIELD_C\": \"VALUE_B\",\n \"FIELD_D\": \"VALUE_C\",\n },\n },\n});" + }, + { + "lang": "JS", + "source": "client.getVersion()" + }, + { + "lang": "JS", + "source": "client.index('jackets').updateDistinctAttribute('product_id')" + }, + { + "lang": "JS", + "source": "client.index('movies').updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres',\n ]\n)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date',\n ]\n)" + }, + { + "lang": "JS", + "source": "client.index('movie_ratings').search('Avengers', {\n filter: 'release_date > 795484800'\n})" + }, + { + "lang": "JS", + "source": "client.index('movie_ratings').search('Batman', {\n filter: 'release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")'\n})" + }, + { + "lang": "JS", + "source": "client.index('movie_ratings').search('Planet of the Apes', {\n filter: \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\"\n})" + }, + { + "lang": "JS", + "source": "client.index('movie_ratings').search('thriller', {\n filter: 'rating.users >= 90'\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('shifu')" + }, + { + "lang": "JS", + "source": "client.index('movies').search('shifu', {\n offset: 1\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('shifu', {\n limit: 2\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('', {\n hitsPerPage: 15\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('', {\n page: 2\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('shifu', {\n attributesToRetrieve: ['overview', 'title']\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('shifu', {\n attributesToCrop: ['overview'],\n cropLength: 5\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('shifu', {\n attributesToCrop: ['overview'],\n cropMarker: '[…]'\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('winter feast', {\n attributesToHighlight: ['overview']\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('winter feast', {\n attributesToHighlight: ['overview'],\n highlightPreTag: '',\n highlightPostTag: ''\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('winter feast', {\n showMatchesPosition: true\n})" + }, + { + "lang": "JS", + "source": "const movies = require('./movies.json')\nclient.index('movies').addDocuments(movies).then((res) => console.log(res))" + }, + { + "lang": "JS", + "source": "// With npm:\n// npm install meilisearch\n\n// Or with yarn:\n// yarn add meilisearch\n\n// In your .js file:\n// With the `require` syntax:\nconst { MeiliSearch } = require('meilisearch')\nconst movies = require('./movies.json')\n// With the `import` syntax:\nimport { MeiliSearch } from 'meilisearch'\nimport movies from './movies.json'\n\nconst client = new MeiliSearch({\n host: 'http://localhost:7700',\n apiKey: 'aSampleMasterKey'\n})\nclient.index('movies').addDocuments(movies)\n .then((res) => console.log(res))" + }, + { + "lang": "JS", + "source": "client.tasks.getTask(0)" + }, + { + "lang": "JS", + "source": "client.index('movies').search('botman').then((res) => console.log(res))" + }, + { + "lang": "JS", + "source": "const meteorites = require('./meteorites.json')\n\nclient.index('meteorites').addDocuments(meteorites)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateRankingRules([\n 'exactness',\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'release_date:asc',\n 'rank:desc'\n])" + }, + { + "lang": "JS", + "source": "client.index('movies').updateDisplayedAttributes([\n 'title',\n 'overview',\n 'poster'\n])" + }, + { + "lang": "JS", + "source": "client.index('movies').updateSearchableAttributes([\n 'title'\n])" + }, + { + "lang": "JS", + "source": "client.index('movies').updateStopWords(['the'])" + }, + { + "lang": "JS", + "source": "client.index('movies').updateSynonyms({\n winnie: ['piglet'],\n piglet: ['winnie']\n})" + }, + { + "lang": "JS", + "source": "client.index('meteorites').search('', { filter: 'mass < 200' })" + }, + { + "lang": "JS", + "source": "client.index('meteorites').search('', { filter: '_geoRadius(46.9480, 7.4474, 210000)' })" + }, + { + "lang": "JS", + "source": "client.index('meteorites').search('', { sort: ['_geoPoint(48.8583701, 2.2922926):asc'] })" + }, + { + "lang": "JS", + "source": "client.index('meteorites').search('', {\n sort: ['mass:asc'],\n filter: 'mass < 200'\n})" + }, + { + "lang": "JS", + "source": "client.index('meteorites').updateSettings({\n filterableAttributes: ['mass', '_geo'],\n sortableAttributes: ['mass', '_geo']\n})" + }, + { + "lang": "JS", + "source": "client.index('movies')\n .search('thriller', {\n filter: [['genres = Horror', 'genres = Mystery'], 'director = \"Jordan Peele\"']\n })" + }, + { + "lang": "JS", + "source": "client.index('movies')\n .search('\"african american\" horror')" + }, + { + "lang": "JS", + "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'masterKey' })\nclient.getKeys()" + }, + { + "lang": "JS", + "source": "client.index('books').updateSortableAttributes([\n 'author',\n 'price'\n ])" + }, + { + "lang": "JS", + "source": "client.index('books').updateRankingRules([\n 'words',\n 'sort',\n 'typo',\n 'proximity',\n 'attribute',\n 'exactness'\n])" + }, + { + "lang": "JS", + "source": "client.index('books').search('science fiction', {\n 'sort': ['rating.users:asc'],\n})" + }, + { + "lang": "JS", + "source": "client.index('books').search('science fiction', {\n sort: ['price:asc'],\n})" + }, + { + "lang": "JS", + "source": "client.index('books').search('butler', {\n sort: ['author:desc'],\n})" + }, + { + "lang": "JS", + "source": "client.index('books').search('science fiction', {\n sort: ['price:asc'],\n})" + }, + { + "lang": "JS", + "source": "client.index('restaurants')\n.updateFilterableAttributes([\n '_geo'\n])" + }, + { + "lang": "JS", + "source": "client.index('restaurants').search('', {\n filter: ['_geoRadius(45.472735, 9.184019, 2000)'],\n})" + }, + { + "lang": "JS", + "source": "client.index('restaurants').search('', {\n filter: ['_geoRadius(45.472735, 9.184019, 2000) AND type = pizza'],\n})" + }, + { + "lang": "JS", + "source": "client.index('restaurants').search('', {\n filter: ['_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])'],\n})" + }, + { + "lang": "JS", + "source": "client.index('restaurants').updateSortableAttributes([\n '_geo'\n])" + }, + { + "lang": "JS", + "source": "client.index('restaurants').search('', {\n sort: ['_geoPoint(48.8561446, 2.2978204):asc'],\n})" + }, + { + "lang": "JS", + "source": "client.index('restaurants').search('', {\n sort: ['_geoPoint(48.8561446, 2.2978204):asc', 'rating:desc'],\n})" + }, + { + "lang": "JS", + "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'apiKey' })\nclient.index('patient_medical_records').search()" + }, + { + "lang": "JS", + "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'masterKey' })\nclient.updateKey('74c9c733-3368-4738-bbe5-1d18a5fecb37', {\n description: 'Default Search API Key'\n})" + }, + { + "lang": "JS", + "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'masterKey' })\nclient.createKey({\n description: 'Search patient records key',\n actions: ['search'],\n indexes: ['patient_medical_records'],\n expiresAt: '2023-01-01T00:00:00Z'\n})" + }, + { + "lang": "JS", + "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'masterKey' })\nclient.getKeys()" + }, + { + "lang": "JS", + "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'masterKey' })\nclient.deleteKey('ac5cd97d-5a4b-4226-a868-2d0eb6d197ab')" + }, + { + "lang": "JS", + "source": "client.createIndex('books', { primaryKey: 'reference_number' })" + }, + { + "lang": "JS", + "source": "client.index('books').addDocuments([\n {\n reference_number: 287947,\n title: 'Diary of a Wimpy Kid',\n author: 'Jeff Kinney',\n genres: ['comedy','humor'],\n price: 5.00\n }\n], { primaryKey: 'reference_number' })" + }, + { + "lang": "JS", + "source": "client.updateIndex('books', {\n primaryKey: 'title'\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').updateTypoTolerance({\n enabled: false\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').updateTypoTolerance({\n disableOnAttributes: ['title']\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').updateTypoTolerance({\n disableOnWords: ['shrek']\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').updateTypoTolerance({\n minWordSizeForTypos: {\n oneTypo: 4,\n twoTypos: 10\n }\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').updateTypoTolerance({\n disableOnNumbers: true\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').updateTypoTolerance({\n minWordSizeForTypos: {\n oneTypo: 4\n }\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').updateSynonyms({\n 'great': ['fantastic'],\n 'fantastic': ['great']\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').updateFaceting({\n maxValuesPerFacet: 2,\n sortFacetValuesBy: {\n '*': 'count'\n }\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').updatePagination({ maxTotalHits: 500 })" + }, + { + "lang": "JS", + "source": "client.index('movies').search('big fat liar', {\n matchingStrategy: 'last'\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('big fat liar', {\n matchingStrategy: 'all'\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('white shirt', {\n matchingStrategy: 'frequency'\n})" + }, + { + "lang": "JS", + "source": "const games = require('./games.json')\nclient.index('games').addDocuments(games).then((res) => console.log(res))" + }, + { + "lang": "JS", + "source": "client.index('games').updateFilterableAttributes(['release_timestamp'])" + }, + { + "lang": "JS", + "source": "client.index('games').search('', {\n filter: 'release_timestamp >= 1514761200 AND release_timestamp < 1672527600'\n})" + }, + { + "lang": "JS", + "source": "client.index('games').updateSortableAttributes(['release_timestamp'])" + }, + { + "lang": "JS", + "source": "client.index('games').search('', {\n sort: ['release_timestamp:desc'],\n})" + }, + { + "lang": "JS", + "source": "client.tasks.getTasks({ statuses: ['failed', 'canceled'] })" + }, + { + "lang": "JS", + "source": "client.tasks.getTasks({\n indexUids: ['movies'],\n types: ['documentAdditionOrUpdate','documentDeletion'],\n statuses: ['processing']\n})" + }, + { + "lang": "JS", + "source": "client.multiSearch({\n federation: {},\n queries: [\n {\n indexUid: 'movies',\n q: 'batman',\n },\n {\n indexUid: 'comics',\n q: 'batman',\n },\n ]\n})" + }, + { + "lang": "JS", + "source": "client.index('movie_ratings').updateFilterableAttributes(['genres', 'rating', 'language'])" + }, + { + "lang": "JS", + "source": "client.index('books').search('classic', { facets: ['genres', 'rating', 'language'] })" + }, + { + "lang": "JS", + "source": "client.index('movie_ratings').search('Batman', { facets: ['genres', 'rating'] })" + }, + { + "lang": "JS", + "source": "client.index('movies')\n .updateFilterableAttributes([\n 'director',\n 'genres'\n ])" + }, + { + "lang": "JS", + "source": "client.index('books').updateFaceting({\n sortFacetValuesBy: {\n genres: 'count'\n }\n})" + }, + { + "lang": "JS", + "source": "client.index('books').searchForFacetValues({\n facetQuery: 'c',\n facetName: 'genres'\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('dragon', {\n showRankingScore: true\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('dragon', { showRankingScoreDetails: true })" + }, + { + "lang": "JS", + "source": "client.index('movies').search('adventure', {\n attributesToSearchOn: ['overview']\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('-escape')" + }, + { + "lang": "JS", + "source": "client.index('movies').search('-\"escape\"')" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').search('QUERY TERMS', { distinct: 'ATTRIBUTE_A' })" + }, + { + "lang": "JS", + "source": "client.index('products').updateFilterableAttributes(['product_id', 'sku', 'url'])" + }, + { + "lang": "JS", + "source": "client.index('products').search('white shirt', { distinct: 'sku' })" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').search('badman', { rankingScoreThreshold: 0.2 })" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').search('QUERY TEXT IN JAPANESE', { locales: ['jpn'] })" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').search('kitchen utensils', {\n hybrid: {\n semanticRatio: 0.9,\n embedder: 'EMBEDDER_NAME'\n }\n})" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').search('kitchen utensils', {\n retrieveVectors: true,\n hybrid: {\n embedder: 'EMBEDDER_NAME'\n }\n})" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').search('a futuristic movie', {\n hybrid: {\n embedder: 'EMBEDDER_NAME'\n },\n media: {\n textAndPoster: {\n text: 'a futuristic movie',\n image: {\n mime: 'image/jpeg',\n data: 'base64EncodedImageData'\n }\n }\n }\n})" + }, + { + "lang": "Java", + "source": "client.getVersion();" + }, + { + "lang": "Java", + "source": "client.index(\"jackets\").updateDistinctAttributeSettings(\"product_id\");" + }, + { + "lang": "Java", + "source": "String[] attributes = {\"title\", \"overview\", \"genres\"}\nclient.index(\"movies\").updateSearchableAttributesSettings(attributes);" + }, + { + "lang": "Java", + "source": "String[] attributes = {\"title\", \"overview\", \"genres\", \"release_date\"}\nclient.index(\"movies\").updateDisplayedAttributesSettings(attributes);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"Avengers\").filter(new String[] {\"release_date > \\\"795484800\\\"\"}).build();\nclient.index(\"movie_ratings\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"Batman\").filter(new String[] {\"release_date > 795484800 AND (director = \\\"Tim Burton\\\" OR director = \\\"Christopher Nolan\\\")\"}).build();\nclient.index(\"movie_ratings\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"Planet of the Apes\").filter(new String[] {\"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\"}).build();\nclient.index(\"movie_ratings\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"thriller\").filter(new String[] {\"rating.users >= 90\"}).build();\nclient.index(\"movie_ratings\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").search(\"shifu\");" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"shifu\").offset(1).build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"shifu\").limit(2).build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").hitsPerPage(15).build();\nSearchResultPaginated searchResult = client.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").page(15).build();\nSearchResultPaginated searchResult = client.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"a\").attributesToRetrieve(new String[] {\"overview\", \"title\"}).build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest =\n SearchRequest.builder()\n .q(\"shifu\")\n .attributesToCrop(new String[] {\"overview\"})\n .cropLength(5)\n .build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest =\n SearchRequest.builder()\n .q(\"shifu\")\n .attributesToCrop(new String[] {\"overview\"})\n .cropMarker(\"[…]\")\n .build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest =\n new SearchRequest(\"winter feast\").setAttributesToHighlight(new String[] {\"overview\"});\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest =\n SearchRequest.builder()\n .q(\"winter feast\")\n .attributesToHighlight(new String[] {\"overview\"})\n .highlightPreTag(\"\")\n .highlightPostTag(\"\")\n .build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"winter feast\").showMatchesPosition(true).build();\nSearchResultPaginated searchResult = client.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "import com.meilisearch.sdk;\nimport org.json.JSONArray;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\nPath fileName = Path.of(\"movies.json\");\nString moviesJson = Files.readString(fileName);\nClient client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\nIndex index = client.index(\"movies\");\nindex.addDocuments(moviesJson);" + }, + { + "lang": "Java", + "source": "// For Maven:\n// Add the following code to the `` section of your project:\n//\n// \n// com.meilisearch.sdk\n// meilisearch-java\n// 0.17.1\n// pom\n// \n\n// For Gradle\n// Add the following line to the `dependencies` section of your `build.gradle`:\n//\n// implementation 'com.meilisearch.sdk:meilisearch-java:0.17.1'\n\n// In your .java file:\nimport com.meilisearch.sdk;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\nPath fileName = Path.of(\"movies.json\");\nString moviesJson = Files.readString(fileName);\nClient client = new Client(new Config(\"http://localhost:7700\", \"aSampleMasterKey\"));\nIndex index = client.index(\"movies\");\nindex.addDocuments(moviesJson);" + }, + { + "lang": "Java", + "source": "client.getTask(0);" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").search(\"botman\");" + }, + { + "lang": "Java", + "source": "import com.meilisearch.sdk;\nimport org.json.JSONArray;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\nPath fileName = Path.of(\"meteorites.json\");\nString meteoritesJson = Files.readString(fileName);\nClient client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\n\nclient.index(\"meteorites\").addDocuments(meteoritesJson);" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setRankingRules(new String[]\n{\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\"\n});\nclient.index(\"movies\").updateSettings(settings);" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setDisplayedAttributes(new String[]\n{\n \"title\",\n \"overview\",\n \"poster\"\n});\nclient.index(\"movies\").updateSettings(settings);" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setSearchableAttributes(new String[]\n{\n \"title\"\n});" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setStopWords(new String[]\n{\n \"the\"\n});\nclient.index(\"movies\").updateSettings(settings);" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nHashMap synonyms = new HashMap();\nsynonyms.put(\"winnie\", new String[] {\"piglet\"});\nsynonyms.put(\"piglet\", new String[] {\"winnie\"});\nsettings.setSynonyms(synonyms);\nclient.index(\"movies\").updateSettings(settings);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"mass < 200\"}).build();\nclient.index(\"meteorites\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"_geoRadius(46.9480, 7.4474, 210000)\"}).build();\nclient.index(\"meteorites\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").sort(new String[] {\"_geoPoint(48.8583701,2.2922926):asc\"}).build();\nclient.index(\"meteorites\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"mass < 200\"}).sort(new String[] {\"mass:asc\"}).build();\nclient.index(\"meteorites\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setFilterableAttributes(new String[] {\"mass\", \"_geo\"});\nsettings.setSortableAttributes(new String[] {\"mass\", \"_geo\"});\nclient.index(\"meteorites\").updateSettings(settings);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest =\n SearchRequest.builder().q(\"thriller\").filterArray(new String[][] {\n new String[] {\"genres = Horror\", \"genres = Mystery\"},\n new String[] {\"director = \\\"Jordan Peele\\\"\"}}).build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").search(\"\\\"african american\\\" horror\");" + }, + { + "lang": "Java", + "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\nclient.getKeys();" + }, + { + "lang": "Java", + "source": "client.index(\"books\").updateSortableAttributesSettings(new String[] {\"price\", \"author\"});" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setRankingRules(new String[]\n{\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\"\n});\nclient.index(\"books\").updateSettings(settings);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"science fiction\").sort(new String[] {\"rating.users:asc\"}).build();\nclient.index(\"books\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"science fiction\").sort(new String[] {\"price:asc\"}).build();\nclient.index(\"books\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"butler\").sort(new String[] {\"author:desc\"}).build();\nclient.index(\"books\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"science fiction\").sort(new String[] {\"price:asc\"}).build();\nclient.index(\"search_parameter_guide_sort_1\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setFilterableAttributes(new String[] {\"_geo\"});\nclient.index(\"restaurants\").updateSettings(settings);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"_geoRadius(45.472735, 9.184019, 2000)\"}).build();\nclient.index(\"restaurants\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\"}).build();\nclient.index(\"restaurants\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q()(\"\").filter(new String[] {\n \"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\"\n }).build();\nclient.index(\"restaurants\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "client.index(\"restaurants\").updateSortableAttributesSettings(new String[] {\"_geo\"});" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").sort(new String[] {\"_geoPoint(48.8561446,2.2978204):asc\"}).build();\nclient.index(\"restaurants\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q()(\"\").sort(new String[] {\n \"_geoPoint(48.8561446,2.2978204):asc\",\n \"rating:desc\",\n }).build();\nclient.index(\"restaurants\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"apiKey\"));\nclient.index(\"patient_medical_records\").search();" + }, + { + "lang": "Java", + "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\nclient.updateKey(\"74c9c733-3368-4738-bbe5-1d18a5fecb37\", new KeyUpdate().setDescription(\"Default Search API Key\"));" + }, + { + "lang": "Java", + "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\n\nSimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\nDate dateParsed = format.parse(\"2023-01-01T00:00:00Z\");\n\nKey keyInfo = new Key();\n\nkeyInfo.setDescription(\"Search patient records key\");\nkeyInfo.setActions(new String[] {\"search\"});\nkeyInfo.setIndexes(new String[] {\"patient_medical_records\"});\nkeyInfo.setExpiresAt(dateParsed);\n\nclient.createKey(keyInfo);" + }, + { + "lang": "Java", + "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\nclient.getKeys();" + }, + { + "lang": "Java", + "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\nclient.deleteKey(\"c5cd97d-5a4b-4226-a868-2d0eb6d197ab\");" + }, + { + "lang": "Java", + "source": "client.createIndex(\"books\", \"reference_number\");" + }, + { + "lang": "Java", + "source": "client.index(\"books\").addDocuments(\"[{\"\n + \"\\\"reference_number\\\": 2879,\"\n + \"\\\"title\\\": \\\"Diary of a Wimpy Kid\\\",\"\n + \"\\\"author\\\": \\\"Jeff Kinney\\\",\"\n + \"\\\"genres\\\": [\\\"comedy\\\", \\\"humor\\\"],\"\n + \"\\\"price\\\": 5.00\"\n + \"}]\"\n, \"reference_number\");" + }, + { + "lang": "Java", + "source": "client.updateIndex(\"books\", \"title\");" + }, + { + "lang": "Java", + "source": "TypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setEnabled(false);\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" + }, + { + "lang": "Java", + "source": "TypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setDisableOnAttributes(new String[] {\"title\"});\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" + }, + { + "lang": "Java", + "source": "TypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setDisableOnWords(new String[] {\"shrek\"});\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" + }, + { + "lang": "Java", + "source": "TypoTolerance typoTolerance = new TypoTolerance();\n HashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 4);\n put(\"twoTypos\", 10);\n }\n };\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" + }, + { + "lang": "Java", + "source": "TypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setDisableOnNumbers(true);\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" + }, + { + "lang": "Java", + "source": "HashMap minWordSizeTypos =\nnew HashMap() {\n {\n put(\"oneTypo\", 4);\n }\n};\n\nTypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\n\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" + }, + { + "lang": "Java", + "source": "HashMap synonyms = new HashMap();\nsynonyms.put(\"great\", new String[] {\"fantastic\"});\nsynonyms.put(\"fantastic\", new String[] {\"great\"});\n\nclient.index(\"movies\").updateSynonymsSettings(synonyms);" + }, + { + "lang": "Java", + "source": "Faceting newFaceting = new Faceting();\nnewFaceting.setMaxValuesPerFacet(2);\nHashMap facetSortValues = new HashMap<>();\nfacetSortValues.put(\"*\", FacetSortValue.COUNT);\nnewFaceting.setSortFacetValuesBy(facetSortValues);\nclient.index(\"movies\").updateFacetingSettings(newFaceting);" + }, + { + "lang": "Java", + "source": "Pagination newPagination = new Pagination();\nnewPagination.setMaxTotalHits(500);\nclient.index(\"movies\").updatePaginationSettings(newPagination);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"big fat liar\").matchingStrategy(MatchingStrategy.LAST).build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"big fat liar\").matchingStrategy(MatchingStrategy.ALL).build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"white shirt\").matchingStrategy(MatchingStrategy.FREQUENCY).build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "import com.meilisearch.sdk;\nimport org.json.JSONArray;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\nPath fileName = Path.of(\"games.json\");\nString gamesJson = Files.readString(fileName);\nIndex index = client.index(\"games\");\nindex.addDocuments(gamesJson);" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateFilterableAttributesSettings(new String[] { \"release_timestamp\" });" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\"}).build();\nclient.index(\"games\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setSortableAttributes(new String[] {\"release_timestamp\"});\nclient.index(\"games\").updateSettings(settings);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").sort(new String[] {\"release_timestamp:desc\"}).build();\nclient.index(\"games\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "TasksQuery query = new TasksQuery().setStatuses(new String[] {\"failed\", \"canceled\"});\nclient.getTasks(query);" + }, + { + "lang": "Java", + "source": "TasksQuery query =\n new TasksQuery()\n .setStatuses(new String[] {\"processing\"})\n .setTypes(new String[] {\"documentAdditionOrUpdate\", \"documentDeletion\"})\n .setIndexUids(new String[] {\"movies\"});\n\nclient.getTasks(query);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"classic\").facets(new String[]\n{\n \"genres\",\n \"rating\",\n \"language\"\n}).build();\nclient.index(\"books\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"Batman\").facets(new String[]\n{\n \"genres\",\n \"rating\"\n}).build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateFilterableAttributesSettings(new String[]\n{\n \"genres\",\n \"director\"\n});" + }, + { + "lang": "Java", + "source": "Faceting newFaceting = new Faceting();\nHashMap facetSortValues = new HashMap<>();\nfacetSortValues.put(\"genres\", FacetSortValue.COUNT);\nnewFaceting.setSortFacetValuesBy(facetSortValues);\nclient.index(\"books\").updateFacetingSettings(newFaceting);" + }, + { + "lang": "Java", + "source": "FacetSearchRequest fsr = FacetSearchRequest.builder().facetName(\"genres\").facetQuery(\"c\").build();\nclient.index(\"books\").facetSearch(fsr);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"dragon\").showRankingScore(true).build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"dragon\").showRankingScoreDetails(true).build();\nclient.index(\"movies\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"adventure\").attributesToSearchOn(new String[] {\"overview\"});\nclient.index(\"movies\").searchRequest(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"QUERY TERMS\").distinct(\"ATTRIBUTE_A\").build();\nclient.index(\"INDEX_NAME\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setFilterableAttributes(new String[] {\"product_id\", \"SKU\", \"url\"});\nclient.index(\"products\").updateSettings(settings);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"white shirt\").distinct(\"sku\").build();\nclient.index(\"products\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"badman\").rankingScoreThreshold(0.2).build();\nclient.index(\"INDEX_NAME\").search(searchRequest);" + }, + { + "lang": "Java", + "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"QUERY TEXT IN JAPANESE\").locales(new String[]{\"jpn\"}).build();\nclient.index(\"INDEX_NAME\").search(searchRequest);" + }, + { + "lang": "PHP", + "source": "$client->version();" + }, + { + "lang": "PHP", + "source": "$client->index('jackets')->updateDistinctAttribute('product_id');" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movie_ratings')->search('Avengers', [\n 'filter' => 'release_date > 795484800'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movie_ratings')->search('Batman', [\n 'filter' => 'release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movie_ratings')->search('Planet of the Apes', [\n 'filter' => 'release_date > 1577884550 AND (NOT director = \"Tim Burton\")'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movie_ratings')->search('thriller', [\n 'filter' => 'rating.users >= 90'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('shifu');" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('shifu', ['offset' => 1]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('shifu', ['limit' => 2]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('', ['hitsPerPage' => 15]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('', ['page' => 2]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('shifu', [\n 'attributesToRetrieve' => ['overview', 'title']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('shifu', [\n 'attributesToCrop' => ['overview'],\n 'cropLength' => 5\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('shifu', [\n 'attributesToCrop' => ['overview'],\n 'cropMarker' => '[…]'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('winter feast', [\n 'attributesToHighlight' => ['overview']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('winter feast', [\n 'attributesToHighlight' => ['overview'],\n 'highlightPreTag' => '',\n 'highlightPostTag' => ''\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('winter feast', [\n 'attributesToHighlight' => ['overview'],\n 'showMatchesPosition' => true\n]);" + }, + { + "lang": "PHP", + "source": "$moviesJson = file_get_contents('movies.json');\n$movies = json_decode($moviesJson);\n\n$client->index('movies')->addDocuments($movies);" + }, + { + "lang": "PHP", + "source": "/**\n * Using `meilisearch-php` with the Guzzle HTTP client, in the command line:\n * composer require meilisearch/meilisearch-php \\\n * guzzlehttp/guzzle \\\n * http-interop/http-factory-guzzle:^1.0\n */\n\n/**\n * In your PHP file:\n */\nindex('movies')->addDocuments($movies);" + }, + { + "lang": "PHP", + "source": "$client->getTask(0);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('botman');" + }, + { + "lang": "PHP", + "source": "$client = new Client('http://localhost:7700');\n\n$meteorites_json = file_get_contents('meteorites.json');\n$meteorites = json_decode($meteorites_json);\n\n$client->index('meteorites')->addDocuments($meteorites);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateRankingRules([\n 'exactness',\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'release_date:asc',\n 'rank:desc'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateDisplayedAttributes([\n 'title',\n 'overview',\n 'poster'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateSearchableAttributes(['title']);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateStopWords(['the']);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateSynonyms([\n 'winnie' => ['piglet'],\n 'piglet' => ['winnie']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('meteorites')->search('', [\n 'filter' => 'mass < 200'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('meteorites')->search('', [\n 'filter' => '_geoRadius(46.9480, 7.4474, 210000)'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('meteorites')->search('', [\n 'sort' => ['_geoPoint(48.8583701,2.2922926):asc']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('meteorites')->search('', [\n 'filter' => 'mass < 200',\n 'sort' => ['mass:asc']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('meteorites')->updateSettings([\n 'filterableAttributes' => [\n 'mass',\n '_geo'\n ],\n 'sortableAttributes' => [\n 'mass',\n '_geo'\n ]\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('thriller', [\n 'filter' => [['genres = Horror', 'genres = Mystery'], 'director = \"Jordan Peele\"']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('\"african american\" horror');" + }, + { + "lang": "PHP", + "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->getKeys();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateSortableAttributes([\n 'author',\n 'price'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateRankingRules([\n 'words',\n 'sort',\n 'typo',\n 'proximity',\n 'attribute',\n 'exactness'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->search('science fiction', ['sort' => ['rating.users:asc']]);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->search('science fiction', ['sort' => ['price:asc']]);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->search('butler', ['sort' => ['author:desc']]);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->search('science fiction', ['sort' => ['price:asc']]);" + }, + { + "lang": "PHP", + "source": "$client->index('restaurants')->updateFilterableAttributes([\n '_geo'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('restaurants')->search('', [\n 'filter' => '_geoRadius(45.472735, 9.184019, 2000)'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('restaurants')->search('', [\n 'filter' => '_geoRadius(45.472735, 9.184019, 2000) AND type = pizza'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('restaurants')->search('', [\n 'filter' => '_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('restaurants')->updateSortableAttributes([\n '_geo'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('restaurants')->search('', [\n 'sort' => ['_geoPoint(48.8561446,2.2978204):asc']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('restaurants')->search('', [\n 'sort' => ['_geoPoint(48.8561446,2.2978204):asc', 'rating:desc']\n]);" + }, + { + "lang": "PHP", + "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->index('patient_medical_records')->search();" + }, + { + "lang": "PHP", + "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->updateKey('74c9c733-3368-4738-bbe5-1d18a5fecb37',\n ['description' => 'Default Search API Key']\n);" + }, + { + "lang": "PHP", + "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->createKey([\n 'description' => 'Search patient records key',\n 'actions' => ['search'],\n 'indexes' => ['patient_medical_records'],\n 'expiresAt' => '2023-01-01T00:00:00Z',\n]);" + }, + { + "lang": "PHP", + "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->getKeys();" + }, + { + "lang": "PHP", + "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->deleteKey('ac5cd97d-5a4b-4226-a868-2d0eb6d197ab');" + }, + { + "lang": "PHP", + "source": "$client->createIndex('books', ['primaryKey' => 'reference_number']);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->addDocuments([\n [\n 'reference_number' => 287947,\n 'title' => 'Diary of a Wimpy Kid',\n 'author' => 'Jeff Kinney',\n 'genres' => ['comedy', 'humor'],\n 'price' => 5.00\n ]\n], 'reference_number');" + }, + { + "lang": "PHP", + "source": "$client->updateIndex('books', ['primaryKey' => 'title']);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateTypoTolerance([\n 'enabled' => false\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateTypoTolerance([\n 'disableOnAttributes' => ['title']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateTypoTolerance([\n 'disableOnWords' => ['shrek']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateTypoTolerance([\n 'minWordSizeForTypos' => [\n 'oneTypo' => 4,\n 'twoTypos' => 10\n ]\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateTypoTolerance([\n 'disableOnNumbers' => true\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateTypoTolerance([\n 'minWordSizeForTypos' => [\n 'oneTypo' => 4\n ]\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateSynonyms([\n 'great' => ['fantastic'],\n 'fantastic' => ['great'],\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')\n ->updateFaceting([\n 'maxValuesPerFacet' => 2,\n 'sortFacetValuesBy' => ['*' => 'count']\n ]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updatePagination(['maxTotalHits' => 500]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('big fat liar', ['matchingStrategy' => 'last']);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('big fat liar', ['matchingStrategy' => 'all']);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('white shirt', ['matchingStrategy' => 'frequency']);" + }, + { + "lang": "PHP", + "source": "$gamesJson = file_get_contents('games.json');\n$games = json_decode($gamesJson);\n\n$client->index('games')->addDocuments($games);" + }, + { + "lang": "PHP", + "source": "$client->index('games')->updateFilterableAttributes(['release_timestamp']);" + }, + { + "lang": "PHP", + "source": "$client->index('games')->search('', [\n 'filter' => ['release_timestamp >= 1514761200 AND release_timestamp < 1672527600']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('games')->updateSortableAttributes(['release_timestamp']);" + }, + { + "lang": "PHP", + "source": "$client->index('games')->search('', ['sort' => ['release_timestamp:desc']]);" + }, + { + "lang": "PHP", + "source": "$client->getTasks((new TasksQuery())->setStatuses(['failed', 'canceled']));" + }, + { + "lang": "PHP", + "source": "$client->getTasks(\n (new TasksQuery())\n ->setStatuses(['processing'])\n ->setUids(['movies'])\n ->setTypes(['documentAdditionOrUpdate', 'documentDeletion'])\n);" + }, + { + "lang": "PHP", + "source": "$client->multiSearch([\n (new SearchQuery())\n ->setIndexUid('movies'))\n ->setQuery('batman'),\n (new SearchQuery())\n ->setIndexUid('comics')\n ->setQuery('batman'),\n ],\n (new MultiSearchFederation())\n);" + }, + { + "lang": "PHP", + "source": "$client->index('movie_ratings')->updateFilterableAttributes(['genres', 'rating', 'language']);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->search('classic', [\n 'facets' => ['genres', 'rating', 'language']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movie_ratings')->search('Batman', [\n 'facets' => ['genres', 'rating']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateFilterableAttributes(['director', 'genres']);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateFaceting(['sortFacetValuesBy' => ['genres' => 'count']]);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->facetSearch(\n (new FacetSearchQuery())\n ->setFacetQuery('c')\n ->setFacetName('genres')\n);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('dragon', [\n 'showRankingScore' => true\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('dragon', [\n 'showRankingScoreDetails' => true\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('adventure', [\n 'attributesToSearchOn' => ['overview']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('-escape');" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('-\"escape\"');" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->search('QUERY TERMS', [\n 'distinct' => 'ATTRIBUTE_A'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('products')->updateFilterableAttributes(['product_id', 'sku', 'url']);" + }, + { + "lang": "PHP", + "source": "$client->index('products')->search('white shirt', [\n 'distinct' => 'sku'\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->search('badman', [\n 'rankingScoreThreshold' => 0.2\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->search('QUERY TEXT IN JAPANESE', [\n 'locales' => ['jpn']\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->search('kitchen utensils', [\n 'hybrid' => [\n 'semanticRatio' => 0.9,\n 'embedder' => 'EMBEDDER_NAME'\n ]\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->search('kitchen utensils', [\n 'retrieveVectors' => true,\n 'hybrid' => [\n 'embedder': 'EMBEDDER_NAME'\n ]\n]);" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->search('a futuristic movie', [\n 'hybrid' => [\n 'embedder' => 'EMBEDDER_NAME'\n ],\n 'media' => [\n 'textAndPoster' => [\n 'text' => 'a futuristic movie',\n 'image' => [\n 'mime' => 'image/jpeg',\n 'data' => 'base64EncodedImageData'\n ]\n ]\n ]\n]);" + }, + { + "lang": "Python", + "source": "client.get_version()" + }, + { + "lang": "Python", + "source": "client.index('jackets').update_distinct_attribute('product_id')" + }, + { + "lang": "Python", + "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" + }, + { + "lang": "Python", + "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" + }, + { + "lang": "Python", + "source": "client.index('movie_ratings').search('Avengers', {\n 'filter': 'release_date > 795484800'\n})" + }, + { + "lang": "Python", + "source": "client.index('movie_ratings').search('Batman', {\n 'filter': 'release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")'\n})" + }, + { + "lang": "Python", + "source": "client.index('movie_ratings').search('Planet of the Apes', {\n 'filter': 'release_date > 1577884550 AND (NOT director = \"Tim Burton\"))'\n})" + }, + { + "lang": "Python", + "source": "client.index('movie_ratings').search('thriller', {\n 'filter': 'rating.users >= 90'\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('shifu')" + }, + { + "lang": "Python", + "source": "client.index('movies').search('shifu', {\n 'offset': 1\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('shifu', {\n 'limit': 2\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('', {'hitsPerPage': 15})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('', {'page': 2})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('shifu', {\n 'attributesToRetrieve': ['overview', 'title']\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('shifu', {\n 'attributesToCrop': ['overview'],\n 'cropLength': 5\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('shifu', {\n 'attributesToCrop': ['overview'],\n 'cropMarker': '[…]'\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('winter feast', {\n 'attributesToHighlight': ['overview']\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('winter feast', {\n 'attributesToHighlight': ['overview'],\n 'highlightPreTag': '',\n 'highlightPostTag': ''\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('winter feast', {\n 'showMatchesPosition': True\n})" + }, + { + "lang": "Python", + "source": "import json\n\njson_file = open('movies.json', encoding='utf-8')\nmovies = json.load(json_file)\nclient.index('movies').add_documents(movies)" + }, + { + "lang": "Python", + "source": "# In the command line:\n# pip3 install meilisearch\n\n# In your .py file:\nimport meilisearch\nimport json\n\nclient = meilisearch.Client('http://localhost:7700', 'aSampleMasterKey')\n\njson_file = open('movies.json', encoding='utf-8')\nmovies = json.load(json_file)\nclient.index('movies').add_documents(movies)" + }, + { + "lang": "Python", + "source": "client.get_task(0)" + }, + { + "lang": "Python", + "source": "client.index('movies').search('botman')" + }, + { + "lang": "Python", + "source": "import json\n\njson_file = open('meteorites.json', encoding='utf-8')\nmeteorites = json.load(json_file)\nclient.index('meteorites').add_documents(meteorites)" + }, + { + "lang": "Python", + "source": "client.index('movies').update_ranking_rules([\n 'exactness',\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'release_date:asc',\n 'rank:desc'\n])" + }, + { + "lang": "Python", + "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'poster'\n])" + }, + { + "lang": "Python", + "source": "client.index('movies').update_searchable_attributes([\n 'title'\n])" + }, + { + "lang": "Python", + "source": "client.index('movies').update_stop_words(['the'])" + }, + { + "lang": "Python", + "source": "client.index('movies').update_synonyms({\n 'winnie': ['piglet'],\n 'piglet': ['winnie']\n})" + }, + { + "lang": "Python", + "source": "client.index('meteorites').search('', {\n 'filter': 'mass < 200'\n})" + }, + { + "lang": "Python", + "source": "client.index('meteorites').search('', {\n 'filter': '_geoRadius(46.9480, 7.4474, 210000)'\n})" + }, + { + "lang": "Python", + "source": "client.index('meteorites').search('', {\n 'sort': ['_geoPoint(48.8583701,2.2922926):asc']\n})" + }, + { + "lang": "Python", + "source": "client.index('meteorites').search('', {\n 'filter': 'mass < 200',\n 'sort': ['mass:asc']\n})" + }, + { + "lang": "Python", + "source": "client.index('meteorites').update_settings({\n 'filterableAttributes': [\n 'mass',\n '_geo'\n ],\n 'sortableAttributes': [\n 'mass',\n '_geo'\n ]\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('thriller', {\n 'filter': [['genres = Horror', 'genres = Mystery'], 'director = \"Jordan Peele\"']\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('\"african american\" horror')" + }, + { + "lang": "Python", + "source": "client = Client('http://localhost:7700', 'masterKey')\nclient.get_keys()" + }, + { + "lang": "Python", + "source": "client.index('books').update_sortable_attributes([\n 'author',\n 'price'\n])" + }, + { + "lang": "Python", + "source": "client.index('books').update_ranking_rules([\n 'words',\n 'sort',\n 'typo',\n 'proximity',\n 'attribute',\n 'exactness'\n])" + }, + { + "lang": "Python", + "source": "client.index('books').search('science fiction', {\n 'sort': ['rating.users:asc']\n})" + }, + { + "lang": "Python", + "source": "client.index('books').search('science fiction', {\n 'sort': ['price:asc']\n})" + }, + { + "lang": "Python", + "source": "client.index('books').search('butler', {\n 'sort': ['author:desc']\n})" + }, + { + "lang": "Python", + "source": "client.index('books').search('science fiction', {\n 'sort': ['price:asc']\n})" + }, + { + "lang": "Python", + "source": "client.index('restaurants').update_filterable_attributes([\n '_geo'\n])" + }, + { + "lang": "Python", + "source": "client.index('restaurants').search('', {\n 'filter': '_geoRadius(45.472735, 9.184019, 2000)'\n})" + }, + { + "lang": "Python", + "source": "client.index('restaurants').search('', {\n 'filter': '_geoRadius(45.472735, 9.184019, 2000) AND type = pizza'\n})" + }, + { + "lang": "Python", + "source": "client.index('restaurants').search('Batman', {\n 'filter': '_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])'\n})" + }, + { + "lang": "Python", + "source": "client.index('restaurants').update_sortable_attributes([\n '_geo'\n])" + }, + { + "lang": "Python", + "source": "client.index('restaurants').search('', {\n 'sort': ['_geoPoint(48.8561446,2.2978204):asc']\n})" + }, + { + "lang": "Python", + "source": "client.index('restaurants').search('', {\n 'sort': ['_geoPoint(48.8561446,2.2978204):asc', 'rating:desc']\n})" + }, + { + "lang": "Python", + "source": "client = Client('http://localhost:7700', 'apiKey')\nclient.index('patient_medical_records').search()" + }, + { + "lang": "Python", + "source": "client = Client('http://localhost:7700', 'masterKey')\nclient.update_key(key_or_uid='74c9c733-3368-4738-bbe5-1d18a5fecb37', options={\n 'description': 'Default Search API Key'\n})" + }, + { + "lang": "Python", + "source": "client = Client('http://localhost:7700', 'masterKey')\n client.create_key(options={\n 'description': 'Search patient records key',\n 'actions': ['search'],\n 'indexes': ['patient_medical_records'],\n 'expiresAt': '2023-01-01T00:00:00Z'\n})" + }, + { + "lang": "Python", + "source": "client = Client('http://localhost:7700', 'masterKey')\nclient.get_keys()" + }, + { + "lang": "Python", + "source": "client = Client('http://localhost:7700', 'masterKey')\nclient.delete_key('ac5cd97d-5a4b-4226-a868-2d0eb6d197ab')" + }, + { + "lang": "Python", + "source": "client.create_index('books', {'primaryKey': 'reference_number'})" + }, + { + "lang": "Python", + "source": "client.index('books').add_documents([{\n 'reference_number': 287947,\n 'title': 'Diary of a Wimpy Kid',\n 'author': 'Jeff Kinney',\n 'genres': ['comedy', 'humor'],\n 'price': 5.00\n}], 'reference_number')" + }, + { + "lang": "Python", + "source": "client.index('books').update(primary_key='title')" + }, + { + "lang": "Python", + "source": "client.index('movies').update_typo_tolerance({\n 'enabled': False\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').update_typo_tolerance({\n 'disableOnAttributes': ['title']\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').update_typo_tolerance({\n 'disableOnWords': ['shrek']\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').update_typo_tolerance({\n 'minWordSizeForTypos': {\n 'oneTypo': 4,\n 'twoTypos': 10\n }\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').update_typo_tolerance({\n 'disableOnNumbers': True\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').update_typo_tolerance({\n 'minWordSizeForTypos': {\n 'oneTypo': 4\n }\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').update_synonyms({\n 'great': ['fantastic'],\n 'fantastic': ['great']\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').update_faceting_settings({\n 'maxValuesPerFacet': 2,\n 'sortFacetValuesBy': {\n '*': 'count'\n }\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').update_pagination_settings({'maxTotalHits': 500})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('big fat liar', {\n 'matchingStrategy': 'last'\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('big fat liar', {\n 'matchingStrategy': 'all'\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('big fat liar', {\n 'matchingStrategy': 'frequency'\n})" + }, + { + "lang": "Python", + "source": "import json\n\njson_file = open('./games.json', encoding='utf-8')\ngames = json.load(json_file)\nclient.index('games').add_documents(games)" + }, + { + "lang": "Python", + "source": "client.index('games').update_filterable_attributes(['release_timestamp'])" + }, + { + "lang": "Python", + "source": "client.index('games').search('', {\n 'filter': 'release_timestamp >= 1514761200 AND release_timestamp < 1672527600'\n})" + }, + { + "lang": "Python", + "source": "client.index('games').update_sortable_attributes(['release_timestamp'])" + }, + { + "lang": "Python", + "source": "client.index('games').search('', {\n 'sort': ['release_timestamp:desc']\n})" + }, + { + "lang": "Python", + "source": "client.get_tasks({'statuses': ['failed', 'canceled']})" + }, + { + "lang": "Python", + "source": "client.get_tasks(\n {\n 'indexUids': 'movies',\n 'types': ['documentAdditionOrUpdate', 'documentDeletion'],\n 'statuses': ['processing'],\n }\n)" + }, + { + "lang": "Python", + "source": "client.multi_search(\n [{\"indexUid\": \"movies\", \"q\": \"batman\"}, {\"indexUid\": \"comics\", \"q\": \"batman\"}],\n {}\n)" + }, + { + "lang": "Python", + "source": "client.index('movie_ratings').update_filterable_attributes([\n 'genres',\n 'director',\n 'language'\n])" + }, + { + "lang": "Python", + "source": "client.index('books').search('classic', {\n 'facets': ['genres', 'rating', 'language']\n})" + }, + { + "lang": "Python", + "source": "client.index('movie_ratings').search('Batman', {\n 'facets': ['genres', 'rating']\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').update_filterable_attributes([\n 'director',\n 'genres',\n])" + }, + { + "lang": "Python", + "source": "client.index('books').update_faceting_settings({ 'sortFacetValuesBy': { 'genres': 'count' } })" + }, + { + "lang": "Python", + "source": "client.index('books').facet_search('genres', 'c')" + }, + { + "lang": "Python", + "source": "client.index('movies').search('dragon', {\n 'showRankingScore': True\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('dragon', {\n 'showRankingScoreDetails': True\n})" + }, + { + "lang": "Python", + "source": "client.index('movies').search('adventure', {\n 'attributesToSearchOn': ['overview']\n})" + }, + { + "lang": "Python", + "source": "client.index('INDEX_NAME').search('QUERY_TERMS', { distinct: 'ATTRIBUTE_A' })" + }, + { + "lang": "Python", + "source": "client.index('products').update_filterable_attributes(['product_id', 'sku', 'url'])" + }, + { + "lang": "Python", + "source": "client.index('products').search('white shirt', { distinct: 'sku' })" + }, + { + "lang": "Python", + "source": "client.index('INDEX_NAME').search('badman', { 'rankingScoreThreshold': 0.2 })" + }, + { + "lang": "Python", + "source": "client.index('INDEX_NAME').search('進撃の巨人', { 'locales': ['jpn'] })" + }, + { + "lang": "Ruby", + "source": "client.version" + }, + { + "lang": "Ruby", + "source": "client.index('jackets').update_distinct_attribute('product_id')" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_settings({\n displayed_attributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movie_ratings').search('Avengers', { filter: 'release_date > 795484800' })" + }, + { + "lang": "Ruby", + "source": "client.index('movie_ratings').search('Batman', {\n filter: 'release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")'\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movie_ratings').search('Planet of the Apes', {\n filter: \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\"\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies_ratings').search('thriller', {\n filter: 'rating.users >= 90'\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('shifu')" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('shifu', {\n offset: 1\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('shifu', {\n limit: 2\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('', hits_per_page: 15)" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('', page: 2)" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('shifu', {\n attributes_to_retrieve: ['overview', 'title']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('shifu', {\n attributes_to_crop: ['overview'],\n crop_length: 5\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('shifu', {\n attributes_to_crop: ['overview'],\n crop_marker: '[…]'\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('winter feast', {\n attributes_to_highlight: ['overview']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('winter feast', {\n attributes_to_highlight: ['overview'],\n highlight_pre_tag: '',\n highlight_post_tag: ''\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('winter feast', {\n show_matches_position: true\n})" + }, + { + "lang": "Ruby", + "source": "require 'json'\n\nmovies_json = File.read('movies.json')\nmovies = JSON.parse(movies_json)\nclient.index('movies').add_documents(movies)" + }, + { + "lang": "Ruby", + "source": "# In the command line:\n# bundle add meilisearch\n\n# In your .rb file:\nrequire 'json'\nrequire 'meilisearch'\n\nclient = MeiliSearch::Client.new('http://localhost:7700', 'aSampleMasterKey')\n\nmovies_json = File.read('movies.json')\nmovies = JSON.parse(movies_json)\n\nclient.index('movies').add_documents(movies)" + }, + { + "lang": "Ruby", + "source": "client.task(0)" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('botman')" + }, + { + "lang": "Ruby", + "source": "file = File.read('meteorites.json')\njson = JSON.parse(file)\n\nclient.index('meteorites').add_documents(json)" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_ranking_rules([\n 'exactness',\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'release_date:asc',\n 'rank:desc'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'poster'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_searchable_attributes([\n 'title'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_stop_words(['the'])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_synonyms({\n winnie: ['piglet'],\n piglet: ['winnie']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('meteorites').search('', { filter: 'mass < 200' })" + }, + { + "lang": "Ruby", + "source": "client.index('meteorites').search('', { filter: '_geoRadius(46.9480, 7.4474, 210000)' })" + }, + { + "lang": "Ruby", + "source": "client.index('meteorites').search('', { sort: ['_geoPoint(48.8583701, 2.2922926):asc'] })" + }, + { + "lang": "Ruby", + "source": "client.index('meteorites').search('', {\n sort: ['mass:asc'],\n filter: 'mass < 200'\n})" + }, + { + "lang": "Ruby", + "source": "client.index('meteorites').update_settings({\n filterable_attributes: ['mass', '_geo'],\n sortable_attributes: ['mass', '_geo']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('thriller', {\n filter: [['genres = Horror', 'genres = Mystery'], 'director = \"Jordan Peele\"']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('\"african american\" horror')" + }, + { + "lang": "Ruby", + "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'masterKey')\nclient.keys" + }, + { + "lang": "Ruby", + "source": "client.index('books').update_sortable_attributes(['author', 'price'])" + }, + { + "lang": "Ruby", + "source": "client.index('books').update_ranking_rules([\n 'words',\n 'sort',\n 'typo',\n 'proximity',\n 'attribute',\n 'exactness'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('books').search('science fiction', { sort: ['rating.users:asc'] })" + }, + { + "lang": "Ruby", + "source": "client.index('books').search('science fiction', { sort: ['price:asc'] })" + }, + { + "lang": "Ruby", + "source": "client.index('books').search('butler', { sort: ['author:desc'] })" + }, + { + "lang": "Ruby", + "source": "client.index('books').search('science fiction', { sort: ['price:asc'] })" + }, + { + "lang": "Ruby", + "source": "client.index('restaurants').update_filterable_attributes(['_geo'])" + }, + { + "lang": "Ruby", + "source": "client.index('restaurants').search('', { filter: '_geoRadius(45.472735, 9.184019, 2000)' })" + }, + { + "lang": "Ruby", + "source": "client.index('restaurants').search('', { filter: '_geoRadius(45.472735, 9.184019, 2000) AND type = pizza' })" + }, + { + "lang": "Ruby", + "source": "client.index('restaurants').search('', { filter: ['_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])'] })" + }, + { + "lang": "Ruby", + "source": "client.index('restaurants').update_sortable_attributes(['_geo'])" + }, + { + "lang": "Ruby", + "source": "client.index('restaurants').search('', { sort: ['_geoPoint(48.8561446, 2.2978204):asc'] })" + }, + { + "lang": "Ruby", + "source": "client.index('restaurants').search('', { sort: ['_geoPoint(48.8561446, 2.2978204):asc', 'rating:desc'] })" + }, + { + "lang": "Ruby", + "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'apiKey')\nclient.index('patient_medical_records').search" + }, + { + "lang": "Ruby", + "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'masterKey')\nclient.update_key('74c9c733-3368-4738-bbe5-1d18a5fecb37', description: 'Default Search API Key')" + }, + { + "lang": "Ruby", + "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'masterKey')\nclient.create_key(\n description: 'Search patient records key',\n actions: ['search'],\n indexes: ['patient_medical_records'],\n expires_at: '2023-01-01T00:00:00Z'\n)" + }, + { + "lang": "Ruby", + "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'masterKey')\nclient.keys" + }, + { + "lang": "Ruby", + "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'masterKey')\nclient.delete_key('ac5cd97d-5a4b-4226-a868-2d0eb6d197ab')" + }, + { + "lang": "Ruby", + "source": "client.create_index('books', primary_key: 'reference_number')" + }, + { + "lang": "Ruby", + "source": "client.index('books').add_documents([\n {\n reference_number: 287947,\n title: 'Diary of a Wimpy Kid',\n author: 'Jeff Kinney',\n genres: ['comedy', 'humor'],\n price: 5.00\n }\n], 'reference_number')" + }, + { + "lang": "Ruby", + "source": "client.index('books').update(primary_key: 'title')" + }, + { + "lang": "Ruby", + "source": "index('books').update_typo_tolerance({ enabled: false })" + }, + { + "lang": "Ruby", + "source": "index('books').update_typo_tolerance({ disable_on_attributes: ['title'] })" + }, + { + "lang": "Ruby", + "source": "index('books').update_typo_tolerance({ disable_on_words: ['shrek'] })" + }, + { + "lang": "Ruby", + "source": "index('books').update_typo_tolerance({\n min_word_size_for_typos: {\n one_typo: 4,\n two_typos: 10\n }\n})" + }, + { + "lang": "Ruby", + "source": "index('books').update_typo_tolerance({ disable_on_numbers: true })" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_typo_tolerance({ min_word_size_for_typos: { one_typo: 4 } })" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_synonyms({\n great: ['fantastic'],\n fantastic: ['great']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_faceting({\n max_values_per_facet: 2,\n sort_facet_values_by: {\n genres: 'count'\n }\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_pagination(max_total_hits: 500)" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('big fat liar', {\n matching_strategy: 'last'\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('big fat liar', {\n matching_strategy: 'all'\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('white shirt', {\n matching_strategy: 'frequency'\n})" + }, + { + "lang": "Ruby", + "source": "require 'json'\n\ngames = JSON.parse(File.read('games.json'))\nclient.index('games').add_documents(games)" + }, + { + "lang": "Ruby", + "source": "client.index('games').update_filterable_attributes(['release_timestamp'])" + }, + { + "lang": "Ruby", + "source": "client.index('games').search('', {\n filter: 'release_timestamp >= 1514761200 AND release_timestamp < 1672527600'\n})" + }, + { + "lang": "Ruby", + "source": "client.index('games').update_sortable_attributes(['release_timestamp'])" + }, + { + "lang": "Ruby", + "source": "client.index('games').search('', sort: ['release_timestamp:desc'])" + }, + { + "lang": "Ruby", + "source": "client.get_tasks(statuses: ['failed', 'canceled'])" + }, + { + "lang": "Ruby", + "source": "client.get_tasks(index_uids: ['movies'], types: ['documentAdditionOrUpdate', 'documentDeletion'], statuses: ['processing'])" + }, + { + "lang": "Ruby", + "source": "client.multi_search(\n queries: [{ index_uid: 'movies', q: 'batman' }, { index_uid: 'comics', q: 'batman' }],\n federation: {}\n)" + }, + { + "lang": "Ruby", + "source": "client.index('movie_ratings').update_filterable_attributes(['genres', 'rating', 'language'])" + }, + { + "lang": "Ruby", + "source": "client.index('books').search('classic', {\n facets: ['genres', 'rating', 'language']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movie_ratings').search('Batman', {\n facets: ['genres', 'rating']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_filterable_attributes([\n 'director',\n 'genres'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('books').update_faceting(\n sort_facet_values_by: {\n genres: 'count'\n }\n)" + }, + { + "lang": "Ruby", + "source": "client.index('books').facet_search('genres', 'c')" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('dragon', {\n show_ranking_score: true\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('dragon', {\n show_ranking_score_details: true\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('adventure', {\n attributes_to_search_on: ['overview']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').search('QUERY TERMS', {\n distinct: 'ATTRIBUTE_A'\n})" + }, + { + "lang": "Ruby", + "source": "client.index('products').update_filterable_attributes([\n 'product_id',\n 'sku',\n 'url'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('products').search('white shirt', {\n distinct: 'sku'\n})" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').search('badman', {\n rankingScoreThreshold: 0.2\n})" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').search('進撃の巨人', { locales: ['jpn'] })" + }, + { + "lang": "Rust", + "source": "let version: Version = client\n .get_version()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"jackets\")\n .set_distinct_attribute(\"product_id\")\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let searchable_attributes = [\n \"title\",\n \"overview\",\n \"genres\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_searchable_attributes(&searchable_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let displayed_attributes = [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_displayed_attributes(&displayed_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movie_ratings\")\n .search()\n .with_query(\"Avengers\")\n .with_filter(\"release_date > 795484800\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movie_ratings\")\n .search()\n .with_query(\"Batman\")\n .with_filter(r#\"release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")\"#)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movie_ratings\")\n .search()\n .with_query(\"Planet of the Apes\")\n .with_filter(r#\"release_date > 1577884550 AND (NOT director = \"Tim Burton\")\"#)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movie_rating\")\n .search()\n .with_query(\"thriller\")\n .with_filter(\"rating.users >= 90\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .with_offset(1)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .with_limit(2)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "client.index(\"movies\").search().with_hits_per_page(15).execute().await?;" + }, + { + "lang": "Rust", + "source": "client.index(\"movies\").search().with_page(2).execute().await?;" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .with_attributes_to_retrieve(Selectors::Some(&[\"overview\", \"title\"]))\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .with_attributes_to_crop(Selectors::Some(&[(\"overview\", None)]))\n .with_crop_length(5)\n .execute()\n .await\n .unwrap();\n\n// Get the formatted results\nlet formatted_results: Vec<&Movie> = results\n .hits\n .iter()\n .map(|r| r.formatted_result.as_ref().unwrap())\n .collect();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .with_attributes_to_crop(Selectors::Some(&[(\"overview\", None)]))\n .with_crop_marker(\"[…]\")\n .execute()\n .await\n .unwrap();\n\n// Get the formatted results\nlet formatted_results: Vec<&Movie> = results\n .hits\n .iter()\n .map(|r| r.formatted_result.as_ref().unwrap())\n .collect();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"winter feast\")\n .with_attributes_to_highlight(Selectors::Some(&[\"overview\"]))\n .execute()\n .await\n .unwrap();\n\n// Get the formatted results\nlet formatted_results: Vec<&Movie> = results\n .hits\n .iter()\n .map(|r| r.formatted_result.as_ref().unwrap())\n .collect();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"winter feast\")\n .with_attributes_to_highlight(Selectors::Some(&[\"overview\"]))\n .with_highlight_pre_tag(\"\")\n .with_highlight_post_tag(\"\")\n .execute()\n .await\n .unwrap();\n\n// Get the formatted results\nlet formatted_results: Vec<&Movie> = results\n .hits\n .iter()\n .map(|r| r.formatted_result.as_ref().unwrap())\n .collect();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"winter feast\")\n .with_show_matches_position(true)\n .execute()\n .await\n .unwrap();\n\n// Get the matches info\nlet matches_position: Vec<&HashMap>> = results\n .hits\n .iter()\n .map(|r| r.matches_position.as_ref().unwrap())\n .collect();" + }, + { + "lang": "Rust", + "source": "use meilisearch_sdk::{\n indexes::*,\n client::*,\n search::*,\n settings::*\n};\nuse serde::{Serialize, Deserialize};\nuse std::{io::prelude::*, fs::File};\nuse futures::executor::block_on;\n\nfn main() { block_on(async move {\n let client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\n\n // reading and parsing the file\n let mut file = File::open(\"movies.json\")\n .unwrap();\n let mut content = String::new();\n file\n .read_to_string(&mut content)\n .unwrap();\n let movies_docs: Vec = serde_json::from_str(&content)\n .unwrap();\n\n // adding documents\n client\n .index(\"movies\")\n .add_documents(&movies_docs, None)\n .await\n .unwrap();\n})}" + }, + { + "lang": "Rust", + "source": "// In your .toml file:\n [dependencies]\n meilisearch-sdk = \"0.31.0\"\n # futures: because we want to block on futures\n futures = \"0.3\"\n # serde: required if you are going to use documents\n serde = { version=\"1.0\", features = [\"derive\"] }\n # serde_json: required in some parts of this guide\n serde_json = \"1.0\"\n```\n\n// In your .rs file:\n// Documents in the Rust library are strongly typed\n#[derive(Serialize, Deserialize)]\nstruct Movie {\n id: i64,\n title: String,\n poster: String,\n overview: String,\n release_date: i64,\n genres: Vec\n}\n\n// You will often need this `Movie` struct in other parts of this documentation. (you will have to change it a bit sometimes)\n// You can also use schemaless values, by putting a `serde_json::Value` inside your own struct like this:\n#[derive(Serialize, Deserialize)]\nstruct Movie {\n id: i64,\n #[serde(flatten)]\n value: serde_json::Value,\n}\n\n// Then, add documents into the index:\nuse meilisearch_sdk::{\n indexes::*,\n client::*,\n search::*,\n settings::*\n};\nuse serde::{Serialize, Deserialize};\nuse std::{io::prelude::*, fs::File};\nuse futures::executor::block_on;\n\nfn main() { block_on(async move {\n let client = Client::new(\"http://localhost:7700\", Some(\"aSampleMasterKey\"));\n\n // Reading and parsing the file\n let mut file = File::open(\"movies.json\")\n .unwrap();\n let mut content = String::new();\n file\n .read_to_string(&mut content)\n .unwrap();\n let movies_docs: Vec = serde_json::from_str(&content)\n .unwrap();\n\n // Adding documents\n client\n .index(\"movies\")\n .add_documents(&movies_docs, None)\n .await\n .unwrap();\n})}" + }, + { + "lang": "Rust", + "source": "client\n .get_task(0)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "// You can build a `SearchQuery` and execute it later:\nlet query: SearchQuery = SearchQuery::new(&movies)\n .with_query(\"botman\")\n .build();\n\nlet results: SearchResults = client\n .index(\"movies\")\n .execute_query(&query)\n .await\n .unwrap();\n\n// You can build a `SearchQuery` and execute it directly:\nlet results: SearchResults = SearchQuery::new(&movies)\n .with_query(\"botman\")\n .execute()\n .await\n .unwrap();\n\n// You can search in an index directly:\nlet results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"botman\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "use serde::{Serialize, Deserialize};\nuse std::fs::File;\n\n#[derive(Serialize, Deserialize)]\nstruct Geo {\n lat: f64,\n lon: f64\n}\n\nstruct Meteorite {\n name: String,\n id: String,\n nametype: String,\n recclass: String,\n mass: i64,\n fall: String,\n _geo: Geo\n}\n\nlet mut file = File::open(\"meteorites.json\")?;\nlet meteorites: Vec = serde_json::from_reader(file)?;\n\nclient\n .index(\"meteorites\")\n .add_documents(&meteorites, None)\n .await?;" + }, + { + "lang": "Rust", + "source": "let ranking_rules = [\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\"\n];\n\nclient\n .index(\"movies\")\n .set_ranking_rules(&ranking_rules)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let displayed_attributes = [\n \"title\",\n \"overview\",\n \"poster\",\n];\n\nclient\n .index(\"movies\")\n .set_displayed_attributes(&displayed_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let searchable_attributes = [\n \"title\"\n];\n\nclient\n .index(\"movies\")\n .set_searchable_attributes(&searchable_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let stop_words = [\"the\"];\nclient\n .index(\"movies\")\n .set_stop_words(&stop_words)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"winnie\"), vec![String::from(\"piglet\")]);\nsynonyms.insert(String::from(\"piglet\"), vec![String::from(\"winnie\")]);\n\nclient\n .index(\"movies\")\n .set_synonyms(&synonyms)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"meteorites\")\n .search()\n .with_filter(\"mass < 200\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"meteorites\")\n .search()\n .with_filter(\"_geoRadius(46.9480, 7.4474, 210000)\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"meteorites\")\n .search()\n .with_sort(&[\"_geoPoint(48.8583701, 2.2922926):asc\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"meteorites\")\n .search()\n .with_filter(\"mass < 200\")\n .with_sort(&[\"mass:asc\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let settings = Settings::new()\n .with_filterable_attributes([\n \"mass\",\n \"_geo\"\n ])\n .with_sortable_attributes([\n \"mass\",\n \"_geo\"\n ])\nlet task: TaskInfo = client\n .index(\"meteorites\")\n .set_settings(&settings)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"thriller\")\n .with_filter(\"(genres = Horror AND genres = Mystery) OR director = \\\"Jordan Peele\\\"\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"\\\"african american\\\" horror\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let sortable_attributes = [\n \"author\",\n \"price\"\n];\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_sortable_attributes(&sortable_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let ranking_rules = [\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\"\n];\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_ranking_rules(&ranking_rules)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"books\")\n .search()\n .with_query(\"science fiction\")\n .with_sort(&[\"rating.users:asc\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"books\")\n .search()\n .with_query(\"science fiction\")\n .with_sort(&[\"price:asc\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"books\")\n .search()\n .with_query(\"butler\")\n .with_sort(&[\"author:desc\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"books\")\n .search()\n .with_query(\"science fiction\")\n .with_sort(&[\"price:asc\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"restaurants\")\n .set_filterable_attributes(&[\"_geo\"])\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"restaurants\")\n .search()\n .with_filter(\"_geoRadius(45.472735, 9.184019, 2000)\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"restaurants\")\n .search()\n .with_filter(\"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"restaurants\")\n .search()\n .with_filter(\"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"restaurants\")\n .set_sortable_attributes(&[\"_geo\"])\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"restaurants\")\n .search()\n .with_sort(&[\"_geoPoint(48.8561446, 2.2978204):asc\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"restaurants\")\n .search()\n .with_sort(&[\"_geoPoint(48.8561446, 2.2978204):asc\", \"rating:desc\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"MASTER_KEY\"));\nclient\n .get_keys()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"DEFAULT_ADMIN_API_KEY\"));\nlet task = client\n .create_index(\"medical_records\", Some(\"id\"))\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"DEFAULT_SEARCH_API_KEY\"));\nlet index = client.index(\"medical_records\");\nindex\n .search()\n .with_query(\"appointments\")\n .execute::()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet result = client.index(\"patient_medical_records\")\n .search()\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet mut key = client\n .get_key(\"74c9c733-3368-4738-bbe5-1d18a5fecb37\")\n .await\n .unwrap();\nkey\n .with_description(\"Default Search API key\".to_string())\n .update(&client);" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet mut key_options = KeyBuilder::new();\nkey_options\n .with_name(\"Search patient records key\")\n .with_action(Action::Search)\n .with_expires_at(time::macros::datetime!(2023 - 01 - 01 00:00:00 UTC))\n .with_index(\"patient_medical_records\");\nlet new_key = client\n .create_key(key_options)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet keys = client\n .get_keys()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet key = client\n .get_key(\"ac5cd97d-5a4b-4226-a868-2d0eb6d197ab\")\n .await\n .unwrap();\nclient\n .delete_key(&key)\n .await?;" + }, + { + "lang": "Rust", + "source": "client\n .create_index(\"books\", Some(\"reference_number\"))\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "#[derive(Serialize, Deserialize)]\nstruct Book {\n reference_number: String,\n title: String,\n author: String,\n genres: Vec,\n price: f64\n}\n\nlet task: TaskInfo = client\n .index(\"books\")\n .add_documents(&[\n Book {\n reference_number: \"287947\".to_string(),\n title: \"Diary of a Wimpy Kid\".to_string(),\n author: \"Jeff Kinney\".to_string(),\n genres: vec![\"comedy\".to_string(),\"humor\".to_string()],\n price: 5.00\n }\n ], Some(\"reference_number\"))\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let task = IndexUpdater::new(\"books\", &client)\n .with_primary_key(\"title\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let typo_tolerance = TypoToleranceSettings {\n enabled: Some(false),\n disable_on_attributes: None,\n disable_on_words: None,\n min_word_size_for_typos: None,\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(5),\n two_typos: Some(12)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![\"title\".to_string()]),\n disable_on_words: None,\n min_word_size_for_typos: None,\n};\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(5),\n two_typos: Some(12)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: None,\n disable_on_words: Some(vec![\"shrek\".to_string()]),\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(4),\n two_typos: Some(12)\n};\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![]),\n disable_on_words: Some(vec![\"title\".to_string()]),\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "// Deactivate typo tolerance on numbers and other high entropy words\nlet typo_tolerance = TypoToleranceSettings {\n disable_on_numbers: Some(true),\n ..Default::default()\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(5),\n two_typos: Some(4)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![]),\n disable_on_words: Some(vec![\"title\".to_string()]),\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"great\"), vec![String::from(\"fantastic\")]);\nsynonyms.insert(String::from(\"fantastic\"), vec![String::from(\"great\")]);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_synonyms(&synonyms)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let mut facet_sort_setting = BTreeMap::new();\nfacet_sort_setting.insert(\"*\".to_string(), FacetSortValue::Count);\nlet mut faceting = FacetingSettings {\n max_values_per_facet: 2,\n sort_facet_values_by: Some(facet_sort_setting),\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_faceting(&faceting)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let pagination = PaginationSetting {max_total_hits:500};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_pagination(pagination)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n.index(\"movies\")\n.search()\n.with_query(\"big fat liar\")\n.with_matching_strategy(MatchingStrategies::LAST)\n.execute()\n.await\n.unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n.index(\"movies\")\n.search()\n.with_query(\"big fat liar\")\n.with_matching_strategy(MatchingStrategies::ALL)\n.execute()\n.await\n.unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n.index(\"movies\")\n.search()\n.with_query(\"white shirt\")\n.with_matching_strategy(MatchingStrategies::FREQUENCY)\n.execute()\n.await\n.unwrap();" + }, + { + "lang": "Rust", + "source": "let mut file = File::open(\"games.json\")\n .unwrap();\nlet mut content = String::new();\nfile\n .read_to_string(&mut content)\n .unwrap();\nlet docs: Vec = serde_json::from_str(&content)\n .unwrap();\n\nclient\n .index(\"games\")\n .add_documents(&docs, None)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let settings = Settings::new()\n .with_filterable_attributes([\"release_timestamp\"]);\n\nlet task: TaskInfo = client\n .index(\"games\")\n .set_settings(&settings)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"games\")\n .search()\n .with_filter(\"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let settings = Settings::new()\n .with_sortable_attributes([\"release_timestamp\"]);\n\nlet task: TaskInfo = client\n .index(\"games\")\n .set_settings(&settings)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"games\")\n .search()\n .with_sort([\"release_timestamp:desc\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let mut query = TasksQuery::new(&client);\nlet tasks = query\n .with_statuses([\"failed\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let mut query = TasksQuery::new(&client);\nlet tasks = query\n .with_statuses([\"failed\", \"canceled\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let mut query = TasksQuery::new(&client);\nlet tasks = query\n .with_index_uids([\"movies\"])\n .with_types([\"documentAdditionOrUpdate\",\"documentDeletion\"])\n .with_statuses([\"processing\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movie_ratings\")\n .set_filterable_attributes(&[\"genres\", \"rating\", \"language\"])\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let books = client.index(\"books\");\n\nlet results: SearchResults = SearchQuery::new(&books)\n .with_query(\"classic\")\n .with_facets(Selectors::Some(&[\"genres\", \"rating\", \"language\"]))\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let books = client.index(\"movie_ratings\");\nlet results: SearchResults = SearchQuery::new(&books)\n .with_query(\"Batman\")\n .with_facets(Selectors::Some(&[\"genres\", \"rating\"))\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .set_filterable_attributes([\"director\", \"genres\"])\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let mut facet_sort_setting = BTreeMap::new();\nfacet_sort_setting.insert(\"genres\".to_string(), FacetSortValue::Count);\nlet faceting = FacetingSettings {\n max_values_per_facet: 100,\n sort_facet_values_by: Some(facet_sort_setting),\n};\n\nlet res = client.index(\"books\")\n .set_faceting(&faceting)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let res = client.index(\"books\")\n .facet_search(\"genres\")\n .with_facet_query(\"c\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"dragon\")\n .with_show_ranking_score(true)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"dragon\")\n .with_show_ranking_score_details(true)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"adventure\")\n .with_attributes_to_search_on(&[\"overview\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let searchable_attributes: Vec = index\n .get_searchable_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let task = index\n .set_searchable_attributes([\"title\", \"overview\"])\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let task_status = index.get_task(&task).await.unwrap();" + }, + { + "lang": "Rust", + "source": "let results = index.search()\n .with_query(\"-escape\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results = index.search()\n .with_query(\"-\\\"escape room\\\"\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let res = client\n .index(\"INDEX_NAME\")\n .search()\n .with_query(\"QUERY TERMS\")\n .with_distinct(\"ATTRIBUTE_A\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"products\")\n .settings()\n .set_filterable_attributes([\"product_id\", \"sku\", \"url\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let res = client\n .index(\"products\")\n .search()\n .with_query(\"white shirt\")\n .with_distinct(\"sku\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let res = client\n .index(\"INDEX_NAME\")\n .search()\n .with_query(\"badman\")\n .with_ranking_score_threshold(0.2)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let res = client\n .index(\"books\")\n .search()\n .with_query(\"進撃の巨人\")\n .with_locales(&[\"jpn\"])\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results = index\n .search()\n .with_query(\"kitchen utensils\")\n .with_hybrid(\"EMBEDDER_NAME\", 0.9)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results = index\n .search()\n .with_vector(&[0.0, 1.0, 2.0])\n .with_hybrid(\"EMBEDDER_NAME\", 1.0)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results = index\n .search()\n .with_query(\"kitchen utensils\")\n .with_retrieve_vectors(true)\n .with_hybrid(\"EMBEDDER_NAME\", 0.5)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let embedders = HashMap::from([(\n String::from(\"movies-text\"),\n Embedder {\n source: EmbedderSource::OpenAi,\n api_key: Some(String::from(\"OPENAI_API_KEY\")),\n model: Some(String::from(\"text-embedding-3-small\")),\n document_template: Some(String::from(\"A movie titled '{{doc.title}}' released in {{ doc.release_date }}. The movie genres are: {{doc.genres}}. The story is about: {{doc.overview|truncatewords: 20}}\")),\n ..Embedder::default()\n }\n)]);\nmovies.set_embedders(&embedders)\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results = movies.search()\n .with_query(\"batman\")\n .with_hybrid(\"EMBEDDER_NAME\", 0.5)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "let results = movies.similar_search(\"192\", \"EMBEDDER_NAME\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Rust", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_A' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"uid\": \"INDEX_B\" }'" + }, + { + "lang": "Rust", + "source": "let results = index\n .search()\n .with_hybrid(\"EMBEDDER_NAME\", 0.5)\n .with_media(json!({\n \"FIELD_A\": \"VALUE_A\",\n \"FIELD_B\": {\n \"FIELD_C\": \"VALUE_B\",\n \"FIELD_D\": \"VALUE_C\"\n }\n }))\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.version { (result) in\n switch result {\n case .success(let version):\n print(version)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.index(\"jackets\").updateDistinctAttribute(\"product_id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchableAttributes: [String] = [\n \"title\",\n \"overview\",\n \"genres\"\n]\nclient.index(\"movies\").updateSearchableAttributes(searchableAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let displayedAttributes: [String] = [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n]\nclient.index(\"movies\").updateDisplayedAttributes(displayedAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"Avengers\",\n filter: \"release_date > 795484800\"\n)\nclient.index(\"movie_ratings\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"Batman\",\n filter: \"release_date > 795484800 AND (director = \\\"Tim Burton\\\" OR director = \\\"Christopher Nolan\\\"\")\nclient.index(\"movie_ratings\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"Planet of the Apes\",\n filter: \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\"))\nclient.index(\"movie_ratings\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"thriller\",\n filter: \"rating.users >= 90\"\n)\nclient.index(\"movie_ratings\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").search(SearchParameters(query: \"shifu\")) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"shifu\",\n offset: 1)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"shifu\",\n limit: 2)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(query: \"\", hitsPerPage: 15)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(query: \"\", page: 15)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"shifu\",\n attributesToRetrieve: [\"overview\", \"title\"])\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"shifu\",\n attributesToCrop: [\"overview\"],\n cropLength: 5)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"shifu\",\n attributesToCrop: [\"overview\"],\n cropMarker: \"[…]\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"winter feast\",\n attributesToHighlight: [\"overview\"])\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"winter feast\",\n attributesToHighlight: [\"overview\"],\n highlightPreTag: \"\",\n highlightPostTag: \"\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"winter feast\",\n showMatchesPosition: true)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let path = Bundle.main.url(forResource: \"movies\", withExtension: \"json\")!\nlet documents: Data = try Data(contentsOf: path)\n\nclient.index(\"movies\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "// Add this to your `Package.swift`\ndependencies: [\n .package(url: \"https://github.com/meilisearch/meilisearch-swift.git\", from: \"0.17.0\")\n]\n\n// In your .swift file:\nlet path = Bundle.main.url(forResource: \"movies\", withExtension: \"json\")!\nlet documents: Data = try Data(contentsOf: path)\nlet client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"aSampleMasterKey\")\n\nclient.index(\"movies\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.getTask(taskUid: 0) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").search(SearchParameters(query: \"botman\")) { (result) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let file = \"meteorites.json\"\nlet path = URL(fileURLWithPath: file)\nlet documents: Data = try Data(contentsOf: path)\n\nclient.index(\"meteorites\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let rankingRules: [String] = [\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\"\n]\nclient.index(\"movies\").updateRankingRules(rankingRules) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let displayedAttributes: [String] = [\"title\", \"overview\", \"poster\"]\nclient.index(\"movies\").updateDisplayedAttributes(displayedAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" + }, + { + "lang": "Swift", + "source": "let searchableAttributes: [String] = [\"title\"]\nclient.index(\"movies\").updateSearchableAttributes(searchableAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let stopWords: [String] = [\"the\"]\nclient.index(\"movies\").updateStopWords(stopWords) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let synonyms: [String: [String]] = [\n \"winnie\": [\"piglet\"],\n \"piglet\": [\"winnie\"]\n]\n client.index(\"movies\").updateSynonyms(synonyms) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"\",\n filter: \"mass < 200\"\n )\n client.index(\"meteorites\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n }" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"\",\n filter: \"_geoRadius(46.9480, 7.4474, 210000)\"\n)\nclient.index(\"meteorites\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"\",\n sort: [\"_geoPoint(48.8583701, 2.2922926):asc\"]\n)\nclient.index(\"meteorites\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"\",\n filter: \"mass < 200\",\n sort: [\"mass:asc\"]\n)\nclient.index(\"meteorites\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let settings = Setting(\n filterableAttributes: [\"mass\", \"_geo\"],\n sortableAttributes: [\"mass\", \"_geo\"]\n)\nclient.index(\"meteorites\").updateSettings(settings) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"thriller\",\n filter: [\n [\n \"genres = Horror\",\n \"genres = Mystery\"\n ],\n \"director = \\\"Jordan Peele\\\"\"\n ])\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"\\\"african american\\\" horror\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"masterKey\")\nclient.getKeys { result in\n switch result {\n case .success(let keys):\n print(keys)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").updateSortableAttributes([\"price\", \"author\"]) { (result: Result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let rankingRules: [String] = [\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\"\n]\nclient.index(\"books\").updateRankingRules(rankingRules) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"science fiction\",\n sort: [\"rating.users:asc\"]\n)\nclient.index(\"books\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"science fiction\",\n sort: [\"price:asc\"]\n)\nclient.index(\"books\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"butler\",\n sort: [\"author:desc\"]\n)\nclient.index(\"books\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"science fiction\",\n sort: [\"price:asc\"]\n)\nclient.index(\"books\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.index(\"restaurants\").updateFilterableAttributes([\"_geo\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n filter: \"_geoRadius(45.472735, 9.184019, 2000)\"\n)\nclient.index(\"restaurants\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n filter: \"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\"\n)\nclient.index(\"restaurants\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n filter: \"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\"\n)\nclient.index(\"restaurants\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.index(\"restaurants\").updateSortableAttributes([\"_geo\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"\",\n sort: [\"_geoPoint(48.8561446, 2.2978204):asc\"]\n)\nclient.index(\"restaurants\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"\",\n sort: [\"_geoPoint(48.8561446, 2.2978204):asc\", \"rating:desc\"]\n)\nclient.index(\"restaurants\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"apiKey\")\nclient.index(\"patient_medical_records\")\n .search(SearchParameters(query: \"\")) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"masterKey\")\nlet keyParams = KeyUpdateParams(description: \"Default Search API Key\")\n\nclient.updateKey(key: \"74c9c733-3368-4738-bbe5-1d18a5fecb37\", keyParams: keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"masterKey\")\n\nlet keyParams = KeyParams(\n description: \"Search patient records key\",\n actions: [\"search\"],\n indexes: [\"patient_medical_records\"],\n expiresAt: \"2023-01-01T00:00:00Z\"\n)\nclient.createKey(keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"masterKey\")\n\nclient.getKeys() { result in\n switch result {\n case .success(let keys):\n print(keys)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"masterKey\")\n\nclient.deleteKey(keyOrUid: \"ac5cd97d-5a4b-4226-a868-2d0eb6d197ab\") { result in\n switch result {\n case .success:\n print(\"success\")\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.createIndex(uid: \"books\", primaryKey: \"reference_number\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let documents: Data = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Diary of a Wimpy Kid\",\n \"author\": \"Jeff Kinney\",\n \"genres\": [\"comedy\", \"humor\"],\n \"price\": 5\n }\n]\n\"\"\".data(using: .utf8)!\n\nclient.index(\"books\").addDocuments(documents: documents, primaryKey: \"reference_number\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.updateIndex(uid: \"movies\", primaryKey: \"title\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let synonyms: [String: [String]] = [\n \"great\": [\"fantastic\"],\n \"fantastic\": [\"great\"]\n]\n\nclient.index(\"movies\").updateSynonyms(synonyms) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").updateFaceting({ maxValuesPerFacet: 2 })" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").updatePagination({ maxTotalHits: 500 })" + }, + { + "lang": "Swift", + "source": "let path = Bundle.main.url(forResource: \"games\", withExtension: \"json\")!\nlet documents: Data = try Data(contentsOf: path)\n\nclient.index(\"games\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.index(\"games\").updateFilterableAttributes([\"release_timestamp\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"\",\n filter: \"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\"\n)\nclient.index(\"games\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.index(\"games\").updateSortableAttributes([\"release_timestamp\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(\n query: \"\",\n sort: [\"release_timestamp:desc\"],\n)\n\nclient.index(\"games\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.getTasks(params: TasksQuery(statuses: [.failed, .canceled])) { result in\n switch result {\n case .success(let taskResult):\n print(taskResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.getTasks(params: TasksQuery(indexUids: \"movies\", types: [\"documentAdditionOrUpdate\", \"documentDeletion\"], statuses: [\"processing\"])) { result in\n switch result {\n case .success(let taskResult):\n print(taskResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").updateFilterableAttributes([\"genre\", \"director\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(query: \"dragon\", showRankingScore: true)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult.rankingScore)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(query: \"dragon\", showRankingScoreDetails: true)\nlet movies: Searchable = try await client.index(\"movies\").search(searchParameters)" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(query: \"adventure\", attributesToSearchOn: [\"overview\"])\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/version'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/jackets/settings/distinct-attribute' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"product_id\"'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movie_ratings/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"Avengers\",\n \"filter\": \"release_date > 795484800\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movie_ratings/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"Batman\",\n \"filter\": \"release_date > 795484800 AND (director = \\\"Tim Burton\\\" OR director = \\\"Christopher Nolan\\\")\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movie_ratings/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"Planet of the Apes\",\n \"filter\": \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\"\n }' \\" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movie_ratings/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"thriller\",\n \"filter\": \"rating.users >= 90\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"shifu\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"shifu\",\n \"offset\": 1\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"shifu\",\n \"limit\": 2\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"\",\n \"hitsPerPage\": 15\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"\",\n \"page\": 2\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"shifu\",\n \"attributesToRetrieve\": [\n \"overview\",\n \"title\"\n ]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"shifu\",\n \"attributesToCrop\": [\"overview\"],\n \"cropLength\": 5\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"shifu\",\n \"cropMarker\": \"[…]\",\n \"attributesToCrop\": [\"overview\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"winter feast\",\n \"attributesToHighlight\": [\"overview\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"winter feast\",\n \"attributesToHighlight\": [\"overview\"],\n \"highlightPreTag\": \"\",\n \"highlightPostTag\": \"\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"winter feast\",\n \"showMatchesPosition\": true\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents'\\\n -H 'Content-Type: application/json' \\\n --data-binary @movies.json" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents?primaryKey=id' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer aSampleMasterKey' \\\n --data-binary @movies.json" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks/0' \\\n -H 'Authorization: Bearer aSampleMasterKey'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer aSampleMasterKey' \\\n --data-binary '{ \"q\": \"botman\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/meteorites/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary @meteorites.json" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"poster\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"title\"]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/stop-words' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"the\"]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/synonyms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"winnie\": [\"piglet\"],\n \"piglet\": [\"winnie\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/meteorites/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"filter\": \"mass < 200\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/meteorites/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"filter\": \"_geoRadius(46.9480, 7.4474, 210000)\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/meteorites/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"sort\": [\"_geoPoint(48.8583701,2.2922926):asc\"] }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/meteorites/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"mass < 200\",\n \"sort\": [\"mass:asc\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/meteorites/settings' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filterableAttributes\": [\n \"mass\",\n \"_geo\"\n ],\n \"sortableAttributes\": [\n \"mass\",\n \"_geo\"\n ]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"thriller\",\n \"filter\": [\n [\n \"genres = Horror\",\n \"genres = Mystery\"\n ],\n \"director = \\\"Jordan Peele\\\"\"\n ]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n--data-binary '{ \"q\": \"\\\"african american\\\" horror\" }'" + }, + { + "lang": "cURL", + "source": "# replace the MASTER_KEY placeholder with your master key\ncurl \\\n -X GET 'MEILISEARCH_URL/keys' \\\n -H 'Authorization: Bearer MASTER_KEY'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"author\",\n \"price\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/ranking-rules' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"science fiction\",\n \"sort\": [\"rating.users:asc\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"science fiction\",\n \"sort\": [\"price:asc\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"butler\",\n \"sort\": [\"author:desc\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"science fiction\",\n \"sort\": [\"price:asc\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/restaurants/settings/filterable-attributes' \\\n -H 'Content-type:application/json' \\\n --data-binary '[\"_geo\"]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"filter\": \"_geoRadius(45.472735, 9.184019, 2000)\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"filter\": \"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"filter\": \"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"filter\": \"_geoPolygon([45.494181, 9.214024], [45.449484, 9.179175], [45.449486, 9.179177])\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/restaurants/settings/sortable-attributes' \\\n -H 'Content-type:application/json' \\\n --data-binary '[\"_geo\"]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"sort\": [\"_geoPoint(48.8561446,2.2978204):asc\"] }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{\n \"sort\": [\n \"_geoPoint(48.8561446,2.2978204):asc\",\n \"rating:desc\"\n ]\n }'" + }, + { + "lang": "cURL", + "source": "curl -X GET 'MEILISEARCH_URL/keys' \\\n-H 'Authorization: Bearer MASTER_KEY'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_ADMIN_API_KEY' \\\n --data-binary '{\n \"uid\": \"medical_records\",\n \"primaryKey\": \"id\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/medical_records/search' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{ \"q\": \"appointments\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/patient_medical_records/search' \\\n -H 'Authorization: Bearer API_KEY'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/keys/74c9c733-3368-4738-bbe5-1d18a5fecb37' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"description\": \"Default Search API Key\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/keys' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n --data-binary '{\n \"description\": \"Search patient records key\",\n \"actions\": [\"search\"],\n \"indexes\": [\"patient_medical_records\"],\n \"expiresAt\": \"2023-01-01T00:00:00Z\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys' \\\n -H 'Authorization: Bearer MASTER_KEY'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/keys/ac5cd97d-5a4b-4226-a868-2d0eb6d197ab' \\\n -H 'Authorization: Bearer MASTER_KEY'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"uid\": \"books\",\n \"primaryKey\": \"reference_number\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/documents?primaryKey=reference_number' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"reference_number\": 287947,\n \"title\": \"Diary of a Wimpy Kid\",\n \"author\": \"Jeff Kinney\",\n \"genres\": [\n \"comedy\",\n \"humor\"\n ],\n \"price\": 5.00\n }\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"primaryKey\": \"title\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/patient_medical_records/search' \\\n -H 'Authorization: Bearer TENANT_TOKEN'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"enabled\": false }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"disableOnAttributes\": [\"title\"] }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"disableOnWords\": [\n \"shrek\"\n ]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"minWordSizeForTypos\": {\n \"oneTypo\": 4,\n \"twoTypos\": 10\n }\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"disableOnNumbers\": true\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'http:///version' \\\n -H 'Authorization: Bearer API_KEY'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'http:///version' \\\n -H 'X-Meili-API-Key: API_KEY'" + }, + { + "lang": "cURL", + "source": "# whenever you see {index_uid}, replace it with your index's unique id\ncurl \\\n -X GET 'http:///indexes/{index_uid}/settings/displayed-attributes' \\\n -H 'X-Meili-API-Key: API_KEY'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'http:///indexes/{index_uid}/settings/displayed-attributes' \\\n -H 'X-Meili-API-Key: API_KEY'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'http:///dumps' \\\n -H 'Authorization: Bearer API_KEY'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"minWordSizeForTypos\": { \"oneTypo\": 4 }\n}'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/synonyms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"great\": [\"fantastic\"], \"fantastic\": [\"great\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/faceting' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxValuesPerFacet\": 2,\n \"sortFacetValuesBy\": {\n \"*\": \"count\"\n }\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/pagination' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxTotalHits\": 500\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"big fat liar\",\n \"matchingStrategy\": \"last\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"big fat liar\",\n \"matchingStrategy\": \"all\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"white shirt\",\n \"matchingStrategy\": \"frequency\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -x POST 'MEILISEARCH_URL/indexes/games/documents' \\\n -h 'content-type: application/json' \\\n --data-binary @games.json" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/games/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"release_timestamp\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/games/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"\",\n \"filter\": \"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/games/settings/sortable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"release_timestamp\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/games/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"\",\n \"sort\": [\"release_timestamp:desc\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks?statuses=failed'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks?statuses=failed,canceled'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks?indexUids=movies&types=documentAdditionOrUpdate,documentDeletion&statuses=processing'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/multi-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"federation\": {},\n \"queries\": [\n {\n \"indexUid\": \"movies\",\n \"q\": \"batman\"\n },\n {\n \"indexUid\": \"comics\",\n \"q\": \"batman\"\n }\n ]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"genres\", \"rating\", \"language\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"classic\",\n \"facets\": [\n \"genres\", \"rating\", \"language\"\n ]\n}'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movie_ratings/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"Batman\",\n \"facets\": [\"genres\", \"rating\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movie_ratings/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"genres\",\n \"director\",\n \"release_date\",\n \"ratings\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/faceting' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"sortFacetValuesBy\": {\n \"genres\": \"count\"\n }\n}'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"facetQuery\": \"c\",\n \"facetName\": \"genres\"\n}'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"dragon\",\n \"showRankingScore\": true\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"dragon\",\n \"showRankingScoreDetails\": true\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"adventure\",\n \"attributesToSearchOn\": [\"overview\"]\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/searchable-attributes'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks/TASK_UID'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"-escape\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"-\\\"escape room\\\"\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'https://PROJECT_URL/events' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"eventType\": \"click\",\n \"eventName\": \"Search Result Clicked\",\n \"indexUid\": \"products\",\n \"userId\": \"SEARCH_USER_ID\",\n \"queryUid\": \"019a01b7-a1c2-7782-a410-bb1274c81393\",\n \"objectId\": \"0\",\n \"objectName\": \"DOCUMENT_DESCRIPTION\",\n \"position\": 0\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'https://PROJECT_URL/events' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"eventType\": \"conversion\",\n \"eventName\": \"Product Added To Cart\",\n \"indexUid\": \"products\",\n \"userId\": \"SEARCH_USER_ID\",\n \"objectId\": \"0\",\n \"objectName\": \"DOCUMENT_DESCRIPTION\",\n \"position\": 0\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n -H 'X-MS-USER-ID: MEILISEARCH_USER_ID' \\\n --data-binary '{}'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'https://PROJECT_URL/events' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n -H 'X-MS-USER-ID: SEARCH_USER_ID' \\\n --data-binary '{\n \"eventType\": \"click\",\n \"eventName\": \"Search Result Clicked\",\n \"indexUid\": \"products\",\n \"objectId\": \"0\",\n \"position\": 0\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'https://PROJECT_URL/events' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"eventType\": \"click\",\n \"userId\": \"SEARCH_USER_ID\",\n \"eventName\": \"Search Result Clicked\",\n \"indexUid\": \"products\",\n \"objectId\": \"0\",\n \"position\": 0\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"QUERY TERMS\",\n \"distinct\": \"ATTRIBUTE_A\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/products/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"product_id\",\n \"sku\",\n \"url\"\n ]'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/products/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"white shirt\",\n \"distinct\": \"sku\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n-X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n-H 'Content-Type: application/json' \\\n--data-binary '{\n \"q\": \"badman\",\n \"rankingScoreThreshold\": 0.2\n}'" + }, + { + "lang": "cURL", + "source": "curl \\\n-X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n-H 'Content-Type: application/json' \\\n--data-binary '{\n \"q\": \"QUERY TEXT IN JAPANESE\",\n \"locales\": [\"jpn\"]\n}'" + }, + { + "lang": "cURL", + "source": "curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'content-type: application/json' \\\n --data-binary '{\n \"q\": \"kitchen utensils\",\n \"hybrid\": {\n \"semanticRatio\": 0.9,\n \"embedder\": \"EMBEDDER_NAME\"\n }\n }'" + }, + { + "lang": "cURL", + "source": "curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'content-type: application/json' \\\n --data-binary '{\n \"vector\": [0, 1, 2],\n \"hybrid\": {\n \"embedder\": \"EMBEDDER_NAME\"\n }\n }'" + }, + { + "lang": "cURL", + "source": "curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'content-type: application/json' \\\n --data-binary '{\n \"q\": \"kitchen utensils\",\n \"retrieveVectors\": true,\n \"hybrid\": {\n \"embedder\": \"EMBEDDER_NAME\"\n }\n }'" + }, + { + "lang": "cURL", + "source": "curl -X PATCH 'MEILISEARCH_URL/indexes/movies/settings'\n -H 'Content-Type: application/json'\n -H 'Authorization: Bearer MEILISEARCH_API_KEY'\n --data-binary '{\n \"embedders\": {\n \"movies-text\": {\n \"source\": \"openAi\",\n \"apiKey\": \"OPENAI_API_KEY\",\n \"model\": \"text-embedding-3-small\",\n \"documentTemplate\": \"A movie titled '{{doc.title}}' released in {{ doc.release_date }}. The movie genres are: {{doc.genres}}. The story is about: {{doc.overview|truncatewords: 20}}\"\n }\n }\n }'" + }, + { + "lang": "cURL", + "source": "curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'content-type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"q\": \"batman\",\n \"hybrid\": {\n \"embedder\": \"EMBEDDER_NAME\"\n }\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/similar' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"id\": 192,\n \"embedder\": \"EMBEDDER_NAME\"\n }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_A' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"uid\": \"INDEX_B\" }'" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/multi-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"federation\": {},\n \"queries\": [\n {\n \"indexUid\": \"movies\",\n \"q\": \"batman\",\n \"federationOptions\": {\n \"remote\": \"ms-00\"\n }\n },\n {\n \"indexUid\": \"movies\",\n \"q\": \"batman\",\n \"federationOptions\": {\n \"remote\": \"ms-01\"\n }\n }\n ]" + }, + { + "lang": "cURL", + "source": "curl \\\n-X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n-H 'Content-Type: application/json' \\\n--data-binary '{\n \"hybrid\": {\n \"embedder\": \"EMBEDDER_NAME\"\n },\n \"media\": {\n \"FIELD_A\": \"VALUE_A\",\n \"FIELD_B\" : {\n \"FIELD_C\": \"VALUE_B\"\n \"FIELD_D\": \"VALUE_C\"\n }\n }\n}'" + } + ] + } + }, + "/webhooks": { + "get": { + "tags": [ + "Webhooks" + ], + "operationId": "get_webhooks", + "responses": { + "200": { + "description": "Webhooks are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookResults" + }, + "example": { + "results": [ + { + "uuid": "550e8400-e29b-41d4-a716-446655440000", + "url": "https://your.site/on-tasks-completed", + "headers": { + "Authorization": "Bearer a-secret-token" + }, + "isEditable": true + }, + { + "uuid": "550e8400-e29b-41d4-a716-446655440001", + "url": "https://another.site/on-tasks-completed", + "isEditable": true + } + ] + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "webhooks.get", + "webhooks.*", + "*.get", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.ListWebhooks();" + }, + { + "lang": "JS", + "source": "client.getWebhooks()" + }, + { + "lang": "Python", + "source": "client.get_webhooks()" + }, + { + "lang": "Rust", + "source": "let webhooks = client.get_webhooks().await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks'" + } + ] + }, + "post": { + "tags": [ + "Webhooks" + ], + "operationId": "post_webhook", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookSettings" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Webhook created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" + }, + "example": { + "uuid": "550e8400-e29b-41d4-a716-446655440000", + "url": "https://your.site/on-tasks-completed", + "headers": { + "Authorization": "Bearer a-secret-token" + }, + "isEditable": true + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "webhooks.create", + "webhooks.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.AddWebhook(&meilisearch.AddWebhookRequest{\n URL: \"WEBHOOK_TARGET_URL\",\n Headers: map[string]string{\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n },\n});" + }, + { + "lang": "JS", + "source": "client.createWebhook({\n url: 'WEBHOOK_TARGET_URL',\n headers: {\n authorization: 'SECURITY_KEY',\n referer: 'https://example.com'\n }\n})" + }, + { + "lang": "Python", + "source": "client.create_webhook({\n 'url': 'https://example.com/webhook',\n 'headers': {\"Authorization\":\"\", \"X-Custom-Header\":\"test\"},\n})" + }, + { + "lang": "Rust", + "source": "let mut payload = meilisearch_sdk::webhooks::WebhookCreate::new(\"WEBHOOK_TARGET_URL\");\npayload\n .insert_header(\"authorization\", \"SECURITY_KEY\")\n .insert_header(\"referer\", \"https://example.com\");\nlet webhook = client.create_webhook(&payload).await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/webhooks' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"WEBHOOK_TARGET_URL\",\n \"headers\": {\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n }\n }'" + } + ] + } + }, + "/webhooks/{uuid}": { + "get": { + "tags": [ + "Webhooks" + ], + "operationId": "get_webhook", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "The universally unique identifier of the webhook", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Webhook found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" + }, + "example": { + "uuid": "550e8400-e29b-41d4-a716-446655440000", + "url": "https://your.site/on-tasks-completed", + "headers": { + "Authorization": "Bearer a-secret" + }, + "isEditable": true + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + }, + "404": { + "description": "Webhook not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "webhooks.get", + "webhooks.*", + "*.get", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Webhooks" + ], + "operationId": "delete_webhook", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "The universally unique identifier of the webhook", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "Webhook deleted successfully" + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + }, + "404": { + "description": "Webhook not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "webhooks.delete", + "webhooks.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Webhooks" + ], + "operationId": "patch_webhook", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "The universally unique identifier of the webhook", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Webhook updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" + }, + "example": { + "uuid": "550e8400-e29b-41d4-a716-446655440000", + "url": "https://your.site/on-tasks-completed", + "headers": { + "Authorization": "Bearer a-secret-token" + }, + "isEditable": true + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "webhooks.update", + "webhooks.*", + "*" + ] + } + ] + } + } + }, + "components": { + "schemas": { + "Action": { + "type": "string", + "enum": [ + "*", + "search", + "documents.*", + "documents.add", + "documents.get", + "documents.delete", + "indexes.*", + "indexes.create", + "indexes.get", + "indexes.update", + "indexes.delete", + "indexes.swap", + "tasks.*", + "tasks.cancel", + "tasks.delete", + "tasks.get", + "settings.*", + "settings.get", + "settings.update", + "stats.*", + "stats.get", + "metrics.*", + "metrics.get", + "dumps.*", + "dumps.create", + "snapshots.*", + "snapshots.create", + "version", + "keys.create", + "keys.get", + "keys.update", + "keys.delete", + "experimental.get", + "experimental.update", + "export", + "network.get", + "network.update", + "chatCompletions", + "chats.*", + "chats.get", + "chats.delete", + "chatsSettings.*", + "chatsSettings.get", + "chatsSettings.update", + "*.get", + "webhooks.get", + "webhooks.update", + "webhooks.delete", + "webhooks.create", + "webhooks.*", + "indexes.compact" + ] + }, + "AllBatches": { + "type": "object", + "required": [ + "results", + "total", + "limit" + ], + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BatchView" + } + }, + "total": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + }, + "limit": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "from": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "minimum": 0 + }, + "next": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "minimum": 0 + } + } + }, + "AllTasks": { + "type": "object", + "required": [ + "results", + "total", + "limit" + ], + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskView" + }, + "description": "The list of tasks that matched the filter." + }, + "total": { + "type": "integer", + "format": "u-int64", + "description": "Total number of browsable results using offset/limit parameters for the given resource.", + "minimum": 0 + }, + "limit": { + "type": "integer", + "format": "u-int32", + "description": "Limit given for the query. If limit is not provided as a query parameter, this parameter displays the default limit value.", + "minimum": 0 + }, + "from": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "description": "The first task uid returned.", + "minimum": 0 + }, + "next": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "description": "Represents the value to send in from to fetch the next slice of the results. The first item for the next slice starts at this exact number. When the returned value is null, it means that all the data have been browsed in the given order.", + "minimum": 0 + } + } + }, + "AttributePatterns": { + "type": "object", + "required": [ + "patterns" + ], + "properties": { + "patterns": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "title", + "overview_*", + "release_date" + ] + } + } + }, + "BTreeMap": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "object", + "required": [ + "start", + "length" + ], + "properties": { + "start": { + "type": "integer", + "minimum": 0 + }, + "length": { + "type": "integer", + "minimum": 0 + }, + "indices": { + "type": [ + "array", + "null" + ], + "items": { + "type": "integer", + "minimum": 0 + } + } + } + } + }, + "propertyNames": { + "type": "string" + } + }, + "BatchStats": { + "type": "object", + "required": [ + "totalNbTasks", + "status", + "types", + "indexUids" + ], + "properties": { + "totalNbTasks": { + "$ref": "#/components/schemas/u32" + }, + "status": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "propertyNames": { + "type": "string", + "description": "The status of a task.", + "enum": [ + "enqueued", + "processing", + "succeeded", + "failed", + "canceled" + ], + "example": "processing" + } + }, + "types": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "propertyNames": { + "type": "string", + "description": "The type of the task.", + "enum": [ + "documentAdditionOrUpdate", + "documentEdition", + "documentDeletion", + "settingsUpdate", + "indexCreation", + "indexDeletion", + "indexUpdate", + "indexSwap", + "taskCancelation", + "taskDeletion", + "dumpCreation", + "snapshotCreation", + "export", + "upgradeDatabase", + "indexCompaction" + ], + "example": [ + "documentAdditionOrUpdate", + "documentEdition", + "documentDeletion", + "settingsUpdate", + "indexCreation", + "indexDeletion", + "indexUpdate", + "indexSwap", + "taskCancelation", + "taskDeletion", + "dumpCreation", + "snapshotCreation", + "export", + "upgradeDatabase", + "indexCompaction" + ] + } + }, + "indexUids": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "propertyNames": { + "type": "string" + } + }, + "progressTrace": { + "type": "object", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "writeChannelCongestion": { + "type": [ + "object", + "null" + ], + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "internalDatabaseSizes": { + "type": "object", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + } + } + }, + "BatchStatsView": { + "allOf": [ + { + "$ref": "#/components/schemas/BatchStats" + }, + { + "type": "object", + "properties": { + "embedderRequests": { + "$ref": "#/components/schemas/EmbedderStatsView" + } + } + } + ] + }, + "BatchView": { + "type": "object", + "required": [ + "uid", + "details", + "stats" + ], + "properties": { + "uid": { + "$ref": "#/components/schemas/u32" + }, + "progress": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ProgressView" + } + ] + }, + "details": { + "$ref": "#/components/schemas/DetailsView" + }, + "stats": { + "$ref": "#/components/schemas/BatchStatsView" + }, + "duration": { + "type": [ + "string", + "null" + ] + }, + "startedAt": { + "type": "string", + "format": "date-time" + }, + "finishedAt": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "batchStrategy": { + "type": "string" + } + } + }, + "BrowseQuery": { + "type": "object", + "required": [ + "offset", + "limit", + "retrieveVectors" + ], + "properties": { + "offset": { + "type": "integer", + "example": 150, + "minimum": 0 + }, + "limit": { + "type": "integer", + "default": 20, + "example": 1, + "minimum": 0 + }, + "fields": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "example": [ + "title, description" + ] + }, + "retrieveVectors": { + "type": "boolean", + "example": true + }, + "ids": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "example": [ + "cody", + "finn", + "brandy", + "gambit" + ] + }, + "filter": {}, + "sort": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "example": [ + "title:asc", + "rating:desc" + ] + } + } + }, + "ChatSearchParams": { + "type": "object", + "properties": { + "hybrid": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/HybridQuery" + } + ] + }, + "limit": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "sort": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "distinct": { + "type": [ + "string", + "null" + ] + }, + "matchingStrategy": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/MatchingStrategy" + } + ] + }, + "attributesToSearchOn": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "rankingScoreThreshold": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/RankingScoreThreshold" + } + ] + } + }, + "additionalProperties": false + }, + "ChatSettings": { + "type": "object", + "properties": { + "description": { + "type": [ + "string", + "null" + ] + }, + "documentTemplate": { + "type": [ + "string", + "null" + ], + "description": "A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text." + }, + "documentTemplateMaxBytes": { + "type": [ + "integer", + "null" + ], + "description": "Rendered texts are truncated to this size. Defaults to 400.", + "minimum": 0 + }, + "searchParameters": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ChatSearchParams", + "description": "The search parameters to use for the LLM." + } + ] + } + }, + "additionalProperties": false + }, + "Code": { + "type": "string", + "enum": [ + "api_key_already_exists", + "api_key_not_found", + "bad_parameter", + "bad_request", + "database_size_limit_reached", + "document_not_found", + "dump_already_processing", + "dump_not_found", + "dump_process_failed", + "duplicate_index_found", + "immutable_api_key_actions", + "immutable_api_key_created_at", + "immutable_api_key_expires_at", + "immutable_api_key_indexes", + "immutable_api_key_key", + "immutable_api_key_uid", + "immutable_api_key_updated_at", + "immutable_index_created_at", + "immutable_index_updated_at", + "index_already_exists", + "index_creation_failed", + "index_not_found", + "index_primary_key_already_exists", + "index_primary_key_multiple_candidates_found", + "index_primary_key_no_candidate_found", + "internal", + "invalid_api_key", + "invalid_api_key_actions", + "invalid_api_key_description", + "invalid_api_key_expires_at", + "invalid_api_key_indexes", + "invalid_api_key_limit", + "invalid_api_key_name", + "invalid_api_key_offset", + "invalid_api_key_uid", + "invalid_content_type", + "invalid_document_csv_delimiter", + "invalid_document_fields", + "invalid_document_retrieve_vectors", + "missing_document_filter", + "missing_document_edition_function", + "inconsistent_document_change_headers", + "invalid_document_filter", + "invalid_document_sort", + "invalid_document_geo_field", + "invalid_document_geojson_field", + "invalid_header_value", + "invalid_vector_dimensions", + "invalid_vectors_type", + "invalid_document_id", + "invalid_document_ids", + "invalid_document_limit", + "invalid_document_offset", + "invalid_search_embedder", + "invalid_similar_embedder", + "invalid_search_hybrid_query", + "invalid_index_limit", + "invalid_index_offset", + "invalid_index_primary_key", + "invalid_index_custom_metadata", + "invalid_index_uid", + "invalid_multi_search_facets", + "invalid_multi_search_facets_by_index", + "invalid_multi_search_facet_order", + "invalid_multi_search_query_personalization", + "invalid_multi_search_federated", + "invalid_multi_search_federation_options", + "invalid_multi_search_max_values_per_facet", + "invalid_multi_search_merge_facets", + "invalid_multi_search_query_facets", + "invalid_multi_search_query_pagination", + "invalid_multi_search_query_ranking_rules", + "invalid_multi_search_query_position", + "invalid_multi_search_remote", + "invalid_multi_search_weight", + "invalid_network_remotes", + "invalid_network_self", + "invalid_network_sharding", + "invalid_network_search_api_key", + "invalid_network_write_api_key", + "invalid_network_url", + "invalid_search_attributes_to_search_on", + "invalid_search_attributes_to_crop", + "invalid_search_attributes_to_highlight", + "invalid_similar_attributes_to_retrieve", + "invalid_similar_retrieve_vectors", + "invalid_search_attributes_to_retrieve", + "invalid_search_ranking_score_threshold", + "invalid_similar_ranking_score_threshold", + "invalid_search_retrieve_vectors", + "invalid_search_crop_length", + "invalid_search_crop_marker", + "invalid_search_facets", + "invalid_search_semantic_ratio", + "invalid_search_locales", + "invalid_facet_search_exhaustive_facet_count", + "invalid_facet_search_facet_name", + "invalid_similar_id", + "invalid_search_filter", + "invalid_similar_filter", + "invalid_search_highlight_post_tag", + "invalid_search_highlight_pre_tag", + "invalid_search_hits_per_page", + "invalid_similar_limit", + "invalid_search_limit", + "invalid_search_matching_strategy", + "invalid_similar_offset", + "invalid_search_offset", + "invalid_search_page", + "invalid_search_q", + "invalid_facet_search_query", + "invalid_facet_search_name", + "facet_search_disabled", + "invalid_search_vector", + "invalid_search_media", + "invalid_search_show_matches_position", + "invalid_search_show_ranking_score", + "invalid_similar_show_ranking_score", + "invalid_search_show_ranking_score_details", + "invalid_similar_show_ranking_score_details", + "invalid_search_sort", + "invalid_search_distinct", + "invalid_search_personalize", + "invalid_search_personalize_user_context", + "invalid_search_media_and_vector", + "invalid_settings_displayed_attributes", + "invalid_settings_distinct_attribute", + "invalid_settings_proximity_precision", + "invalid_settings_facet_search", + "invalid_settings_prefix_search", + "invalid_settings_faceting", + "invalid_settings_filterable_attributes", + "invalid_settings_pagination", + "invalid_settings_search_cutoff_ms", + "invalid_settings_embedders", + "invalid_settings_ranking_rules", + "invalid_settings_searchable_attributes", + "invalid_settings_sortable_attributes", + "invalid_settings_stop_words", + "invalid_settings_non_separator_tokens", + "invalid_settings_separator_tokens", + "invalid_settings_dictionary", + "invalid_settings_synonyms", + "invalid_settings_typo_tolerance", + "invalid_settings_localized_attributes", + "invalid_state", + "invalid_store_file", + "invalid_swap_duplicate_index_found", + "invalid_swap_indexes", + "invalid_swap_rename", + "invalid_task_after_enqueued_at", + "invalid_task_after_finished_at", + "invalid_task_after_started_at", + "invalid_task_before_enqueued_at", + "invalid_task_before_finished_at", + "invalid_task_before_started_at", + "invalid_task_canceled_by", + "invalid_task_from", + "invalid_task_limit", + "invalid_task_reverse", + "invalid_task_statuses", + "invalid_task_types", + "invalid_task_uids", + "invalid_batch_uids", + "io_error", + "feature_not_enabled", + "malformed_payload", + "max_fields_limit_exceeded", + "missing_api_key_actions", + "missing_api_key_expires_at", + "missing_api_key_indexes", + "missing_authorization_header", + "missing_content_type", + "missing_document_id", + "missing_facet_search_facet_name", + "missing_index_uid", + "missing_master_key", + "missing_network_url", + "missing_payload", + "missing_search_hybrid", + "missing_swap_indexes", + "missing_task_filters", + "no_space_left_on_device", + "payload_too_large", + "remote_bad_response", + "remote_bad_request", + "remote_could_not_send_request", + "remote_invalid_api_key", + "remote_remote_error", + "remote_timeout", + "too_many_search_requests", + "task_not_found", + "task_file_not_found", + "batch_not_found", + "too_many_open_files", + "too_many_vectors", + "unretrievable_document", + "unretrievable_error_code", + "unsupported_media_type", + "invalid_s3_snapshot_request", + "invalid_s3_snapshot_parameters", + "s3_snapshot_server_error", + "vector_embedding_error", + "not_found_similar_id", + "invalid_document_edition_context", + "invalid_document_edition_function_filter", + "edit_documents_by_function_error", + "invalid_settings_index_chat", + "invalid_settings_vector_store", + "invalid_export_url", + "invalid_export_api_key", + "invalid_export_payload_size", + "invalid_export_indexes_patterns", + "invalid_export_index_filter", + "invalid_export_index_override_settings", + "unimplemented_external_function_calling", + "unimplemented_non_streaming_chat_completions", + "unimplemented_multi_choice_chat_completions", + "chat_not_found", + "invalid_chat_setting_document_template", + "invalid_chat_completion_org_id", + "invalid_chat_completion_project_id", + "invalid_chat_completion_api_version", + "invalid_chat_completion_deployment_id", + "invalid_chat_completion_source", + "invalid_chat_completion_base_api", + "invalid_chat_completion_api_key", + "invalid_chat_completion_prompts", + "invalid_chat_completion_system_prompt", + "invalid_chat_completion_search_description_prompt", + "invalid_chat_completion_search_query_param_prompt", + "invalid_chat_completion_search_filter_param_prompt", + "invalid_chat_completion_search_index_uid_param_prompt", + "invalid_chat_completion_pre_query_prompt", + "requires_enterprise_edition", + "invalid_webhooks", + "invalid_webhook_url", + "invalid_webhook_headers", + "immutable_webhook", + "invalid_webhook_uuid", + "webhook_not_found", + "immutable_webhook_uuid", + "immutable_webhook_is_editable" + ] + }, + "ComputedFacets": { + "type": "object", + "required": [ + "distribution", + "stats" + ], + "properties": { + "distribution": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + }, + "propertyNames": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + } + }, + "stats": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FacetStats" + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "CreateApiKey": { + "type": "object", + "required": [ + "uid", + "actions", + "indexes" + ], + "properties": { + "description": { + "type": [ + "string", + "null" + ], + "description": "A description for the key. `null` if empty.", + "example": null + }, + "name": { + "type": [ + "string", + "null" + ], + "description": "A human-readable name for the key. `null` if empty.", + "example": "Indexing Products API key" + }, + "uid": { + "type": "string", + "format": "uuid", + "description": "A uuid v4 to identify the API Key. If not specified, it's generated by Meilisearch.", + "example": null + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Action" + }, + "description": "A list of actions permitted for the key. `[\"*\"]` for all actions. The `*` character can be used as a wildcard when located at the last position. e.g. `documents.*` to authorize access on all documents endpoints.", + "example": [ + "documents.add" + ] + }, + "indexes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of accessible indexes permitted for the key. `[\"*\"]` for all indexes. The `*` character can be used as a wildcard when located at the last position. e.g. `products_*` to allow access to all indexes whose names start with `products_`.", + "example": [ + "products" + ] + }, + "expiresAt": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "Represent the expiration date and time as RFC 3339 format. `null` equals to no expiration time." + } + } + }, + "DetailsExportIndexSettings": { + "allOf": [ + { + "$ref": "#/components/schemas/ExportIndexSettings" + }, + { + "type": "object", + "properties": { + "matchedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "minimum": 0 + } + } + } + ] + }, + "DetailsView": { + "allOf": [ + { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/Settings_Unchecked", + "description": "[Learn more about the settings in this guide](https://www.meilisearch.com/docs/reference/api/settings)." + } + ] + }, + { + "type": "object", + "properties": { + "receivedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of documents received for documentAdditionOrUpdate task.", + "minimum": 0 + }, + "indexedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of documents finally indexed for documentAdditionOrUpdate task or a documentAdditionOrUpdate batch of tasks.", + "minimum": 0 + }, + "editedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of documents edited for editDocumentByFunction task.", + "minimum": 0 + }, + "primaryKey": { + "type": [ + "string", + "null" + ], + "description": "Value for the primaryKey field encountered if any for indexCreation or indexUpdate task." + }, + "providedIds": { + "type": [ + "integer", + "null" + ], + "description": "Number of provided document ids for the documentDeletion task.", + "minimum": 0 + }, + "deletedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of documents finally deleted for documentDeletion and indexDeletion tasks.", + "minimum": 0 + }, + "matchedTasks": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of tasks that match the request for taskCancelation or taskDeletion tasks.", + "minimum": 0 + }, + "canceledTasks": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of tasks canceled for taskCancelation.", + "minimum": 0 + }, + "deletedTasks": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of tasks deleted for taskDeletion.", + "minimum": 0 + }, + "originalFilter": { + "type": [ + "string", + "null" + ], + "description": "Original filter query for taskCancelation or taskDeletion tasks." + }, + "dumpUid": { + "type": [ + "string", + "null" + ], + "description": "Identifier generated for the dump for dumpCreation task." + }, + "context": { + "type": [ + "object", + "null" + ] + }, + "function": { + "type": [ + "string", + "null" + ] + }, + "swaps": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/IndexSwap" + } + }, + "upgradeFrom": { + "type": [ + "string", + "null" + ] + }, + "upgradeTo": { + "type": [ + "string", + "null" + ] + }, + "url": { + "type": [ + "string", + "null" + ] + }, + "apiKey": { + "type": [ + "string", + "null" + ] + }, + "payloadSize": { + "type": [ + "string", + "null" + ] + }, + "indexes": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/DetailsExportIndexSettings" + }, + "propertyNames": { + "type": "string" + } + }, + "oldIndexUid": { + "type": [ + "string", + "null" + ] + }, + "newIndexUid": { + "type": [ + "string", + "null" + ] + }, + "preCompactionSize": { + "type": [ + "string", + "null" + ] + }, + "postCompactionSize": { + "type": [ + "string", + "null" + ] + } + } + } + ] + }, + "DistributionShift": { + "type": "object", + "description": "Describes the mean and sigma of distribution of embedding similarity in the embedding space.\n\nThe intended use is to make the similarity score more comparable to the regular ranking score.\nThis allows to correct effects where results are too \"packed\" around a certain value.", + "required": [ + "current_mean", + "current_sigma" + ], + "properties": { + "current_mean": { + "type": "number", + "format": "float", + "description": "Value where the results are \"packed\".\n\nSimilarity scores are translated so that they are packed around 0.5 instead" + }, + "current_sigma": { + "type": "number", + "format": "float", + "description": "standard deviation of a similarity score.\n\nSet below 0.4 to make the results less packed around the mean, and above 0.4 to make them more packed." + } + } + }, + "DocumentDeletionByFilter": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": {} + } + }, + "DocumentEditionByFunction": { + "type": "object", + "required": [ + "function" + ], + "properties": { + "filter": { + "description": "A string containing a RHAI function." + }, + "context": { + "description": "A string containing a filter expression." + }, + "function": { + "type": "string", + "description": "An object with data Meilisearch should make available for the editing function." + } + } + }, + "EmbedderSource": { + "type": "string", + "enum": [ + "openAi", + "huggingFace", + "ollama", + "userProvided", + "rest", + "composite" + ] + }, + "EmbedderStatsView": { + "type": "object", + "required": [ + "total", + "failed" + ], + "properties": { + "total": { + "type": "integer", + "minimum": 0 + }, + "failed": { + "type": "integer", + "minimum": 0 + }, + "lastError": { + "type": [ + "string", + "null" + ] + } + } + }, + "ErrorType": { + "type": "string", + "enum": [ + "internal", + "invalid_request", + "auth", + "system" + ] + }, + "Export": { + "type": "object", + "properties": { + "url": { + "type": [ + "string", + "null" + ], + "example": "https://ms-1234.heaven.meilisearch.com" + }, + "apiKey": { + "type": [ + "string", + "null" + ], + "example": "1234abcd" + }, + "payloadSize": { + "type": [ + "string", + "null" + ], + "example": "24MiB" + }, + "indexes": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/ExportIndexSettings" + }, + "propertyNames": { + "type": "string" + }, + "example": { + "*": { + "filter": null + } + } + } + } + }, + "ExportIndexSettings": { + "type": "object", + "properties": { + "filter": { + "type": [ + "string", + "null" + ], + "example": "genres = action" + }, + "overrideSettings": { + "type": [ + "boolean", + "null" + ], + "example": true + } + } + }, + "FacetSearchQuery": { + "type": "object", + "required": [ + "facet_name", + "matching_strategy" + ], + "properties": { + "facet_query": { + "type": [ + "string", + "null" + ] + }, + "facet_name": { + "type": "string" + }, + "q": { + "type": [ + "string", + "null" + ] + }, + "vector": { + "type": [ + "array", + "null" + ], + "items": { + "type": "number", + "format": "float" + } + }, + "media": {}, + "hybrid": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/HybridQuery" + } + ] + }, + "filter": {}, + "matching_strategy": { + "$ref": "#/components/schemas/MatchingStrategy" + }, + "attributes_to_search_on": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "ranking_score_threshold": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/RankingScoreThreshold" + } + ] + }, + "locales": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/Locale" + } + }, + "exhaustive_facet_count": { + "type": [ + "boolean", + "null" + ] + } + } + }, + "FacetStats": { + "type": "object", + "required": [ + "min", + "max" + ], + "properties": { + "min": { + "type": "number", + "format": "double" + }, + "max": { + "type": "number", + "format": "double" + } + } + }, + "FacetValuesSort": { + "type": "string", + "enum": [ + "alpha", + "count" + ] + }, + "FacetingSettings": { + "type": "object", + "properties": { + "maxValuesPerFacet": { + "type": [ + "integer", + "null" + ], + "example": 10, + "minimum": 0 + }, + "sortFacetValuesBy": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/FacetValuesSort" + }, + "propertyNames": { + "type": "string" + }, + "example": { + "genre": "count" + } + } + }, + "additionalProperties": false + }, + "FederatedFacets": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ComputedFacets" + }, + "propertyNames": { + "type": "string" + } + }, + "FederatedSearch": { + "type": "object", + "required": [ + "queries" + ], + "properties": { + "queries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchQueryWithIndex" + } + }, + "federation": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/Federation" + } + ] + } + } + }, + "FederatedSearchResult": { + "allOf": [ + { + "$ref": "#/components/schemas/HitsInfo" + }, + { + "type": "object", + "required": [ + "hits", + "processingTimeMs" + ], + "properties": { + "hits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchHit" + } + }, + "processingTimeMs": { + "type": "integer", + "minimum": 0 + }, + "queryVectors": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/Vec" + }, + "propertyNames": { + "type": "integer", + "minimum": 0 + } + }, + "semanticHitCount": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "minimum": 0 + }, + "facetDistribution": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + }, + "propertyNames": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + } + }, + "facetStats": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/FacetStats" + }, + "propertyNames": { + "type": "string" + } + }, + "facetsByIndex": { + "$ref": "#/components/schemas/FederatedFacets" + }, + "requestUid": { + "type": [ + "string", + "null" + ], + "format": "uuid" + }, + "metadata": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/SearchMetadata" + } + }, + "remoteErrors": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/ResponseError" + }, + "propertyNames": { + "type": "string" + } + } + } + } + ] + }, + "Federation": { + "type": "object", + "required": [ + "limit", + "offset", + "facetsByIndex" + ], + "properties": { + "limit": { + "type": "integer", + "minimum": 0 + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "facetsByIndex": { + "type": "object", + "additionalProperties": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string", + "description": "An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long", + "example": "movies" + } + }, + "mergeFacets": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/MergeFacets" + } + ] + } + } + }, + "FederationOptions": { + "type": "object", + "required": [ + "weight" + ], + "properties": { + "weight": { + "type": "number", + "format": "double" + }, + "remote": { + "type": [ + "string", + "null" + ] + }, + "queryPosition": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + } + } + }, + "FilterFeatures": { + "type": "object", + "properties": { + "equality": { + "type": "boolean" + }, + "comparison": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "FilterableAttributesFeatures": { + "type": "object", + "properties": { + "facetSearch": { + "type": "boolean" + }, + "filter": { + "$ref": "#/components/schemas/FilterFeatures" + } + }, + "additionalProperties": false + }, + "FilterableAttributesPatterns": { + "type": "object", + "required": [ + "attributePatterns" + ], + "properties": { + "attributePatterns": { + "$ref": "#/components/schemas/AttributePatterns" + }, + "features": { + "$ref": "#/components/schemas/FilterableAttributesFeatures" + } + }, + "additionalProperties": false + }, + "FilterableAttributesRule": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/FilterableAttributesPatterns" + } + ] + }, + "GetLogs": { + "type": "object", + "required": [ + "target", + "mode", + "profileMemory" + ], + "properties": { + "target": { + "type": "string", + "description": "Lets you specify which parts of the code you want to inspect and is formatted like that: code_part=log_level,code_part=log_level\n- If the `code_part` is missing, then the `log_level` will be applied to everything.\n- If the `log_level` is missing, then the `code_part` will be selected in `info` log level.", + "default": "info", + "example": "milli=trace,index_scheduler,actix_web=off" + }, + "mode": { + "oneOf": [ + { + "$ref": "#/components/schemas/LogMode", + "description": "Lets you customize the format of the logs." + } + ], + "default": "Human" + }, + "profileMemory": { + "type": "boolean", + "description": "A boolean to indicate if you want to profile the memory as well. This is only useful while using the `profile` mode.\nBe cautious, though; it slows down the engine a lot.", + "default": false + } + } + }, + "HealthResponse": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/HealthStatus", + "description": "The status of the instance." + } + } + }, + "HealthStatus": { + "type": "string", + "enum": [ + "available" + ] + }, + "HitsInfo": { + "oneOf": [ + { + "type": "object", + "required": [ + "hitsPerPage", + "page", + "totalPages", + "totalHits" + ], + "properties": { + "hitsPerPage": { + "type": "integer", + "minimum": 0 + }, + "page": { + "type": "integer", + "minimum": 0 + }, + "totalPages": { + "type": "integer", + "minimum": 0 + }, + "totalHits": { + "type": "integer", + "minimum": 0 + } + } + }, + { + "type": "object", + "required": [ + "limit", + "offset", + "estimatedTotalHits" + ], + "properties": { + "limit": { + "type": "integer", + "minimum": 0 + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "estimatedTotalHits": { + "type": "integer", + "minimum": 0 + } + } + } + ] + }, + "HybridQuery": { + "type": "object", + "required": [ + "embedder" + ], + "properties": { + "semanticRatio": { + "type": "number", + "format": "float" + }, + "embedder": { + "type": "string" + } + } + }, + "IndexCreateRequest": { + "type": "object", + "required": [ + "uid" + ], + "properties": { + "uid": { + "$ref": "#/components/schemas/IndexUid", + "description": "The name of the index" + }, + "primaryKey": { + "type": [ + "string", + "null" + ], + "description": "The primary key of the index", + "example": "id" + } + } + }, + "IndexStats": { + "type": "object", + "description": "Stats of an `Index`, as known to the `stats` route.", + "required": [ + "numberOfDocuments", + "rawDocumentDbSize", + "avgDocumentSize", + "isIndexing", + "fieldDistribution" + ], + "properties": { + "numberOfDocuments": { + "type": "integer", + "format": "u-int64", + "description": "Number of documents in the index", + "minimum": 0 + }, + "rawDocumentDbSize": { + "type": "integer", + "format": "u-int64", + "description": "Size of the documents database, in bytes.", + "minimum": 0 + }, + "avgDocumentSize": { + "type": "integer", + "format": "u-int64", + "description": "Average size of a document in the documents database.", + "minimum": 0 + }, + "isIndexing": { + "type": "boolean", + "description": "Whether or not the index is currently ingesting document" + }, + "numberOfEmbeddings": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of embeddings in the index", + "minimum": 0 + }, + "numberOfEmbeddedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of embedded documents in the index", + "minimum": 0 + }, + "fieldDistribution": { + "type": "object", + "description": "Association of every field name with the number of times it occurs in the documents.", + "additionalProperties": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "IndexSwap": { + "type": "object", + "required": [ + "indexes" + ], + "properties": { + "indexes": { + "type": "array", + "items": false, + "prefixItems": [ + { + "type": "string" + }, + { + "type": "string" + } + ] + }, + "rename": { + "type": "boolean" + } + } + }, + "IndexUid": { + "type": "string", + "description": "An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long", + "example": "movies" + }, + "IndexView": { + "type": "object", + "required": [ + "uid", + "createdAt", + "updatedAt" + ], + "properties": { + "uid": { + "type": "string", + "description": "Unique identifier for the index" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "An `RFC 3339` format for date/time/duration." + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "An `RFC 3339` format for date/time/duration." + }, + "primaryKey": { + "type": [ + "string", + "null" + ], + "description": "Custom primaryKey for documents" + } + } + }, + "KeyView": { + "type": "object", + "required": [ + "key", + "uid", + "actions", + "indexes", + "createdAt", + "updatedAt" + ], + "properties": { + "name": { + "type": [ + "string", + "null" + ], + "description": "The name of the API Key if any" + }, + "description": { + "type": [ + "string", + "null" + ], + "description": "The description of the API Key if any" + }, + "key": { + "type": "string", + "description": "The actual API Key you can send to Meilisearch" + }, + "uid": { + "type": "string", + "format": "uuid", + "description": "The `Uuid` specified while creating the key or autogenerated by Meilisearch." + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Action" + }, + "description": "The actions accessible with this key." + }, + "indexes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The indexes accessible with this key." + }, + "expiresAt": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "The expiration date of the key. Once this timestamp is exceeded the key is not deleted but cannot be used anymore." + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The date of creation of this API Key.", + "readOnly": true + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "The date of the last update made on this key.", + "readOnly": true + } + } + }, + "Kind": { + "type": "string", + "description": "The type of the task.", + "enum": [ + "documentAdditionOrUpdate", + "documentEdition", + "documentDeletion", + "settingsUpdate", + "indexCreation", + "indexDeletion", + "indexUpdate", + "indexSwap", + "taskCancelation", + "taskDeletion", + "dumpCreation", + "snapshotCreation", + "export", + "upgradeDatabase", + "indexCompaction" + ], + "example": [ + "documentAdditionOrUpdate", + "documentEdition", + "documentDeletion", + "settingsUpdate", + "indexCreation", + "indexDeletion", + "indexUpdate", + "indexSwap", + "taskCancelation", + "taskDeletion", + "dumpCreation", + "snapshotCreation", + "export", + "upgradeDatabase", + "indexCompaction" + ] + }, + "Locale": { + "type": "string", + "enum": [ + "af", + "ak", + "am", + "ar", + "az", + "be", + "bn", + "bg", + "ca", + "cs", + "da", + "de", + "el", + "en", + "eo", + "et", + "fi", + "fr", + "gu", + "he", + "hi", + "hr", + "hu", + "hy", + "id", + "it", + "jv", + "ja", + "kn", + "ka", + "km", + "ko", + "la", + "lv", + "lt", + "ml", + "mr", + "mk", + "my", + "ne", + "nl", + "nb", + "or", + "pa", + "fa", + "pl", + "pt", + "ro", + "ru", + "si", + "sk", + "sl", + "sn", + "es", + "sr", + "sv", + "ta", + "te", + "tl", + "th", + "tk", + "tr", + "uk", + "ur", + "uz", + "vi", + "yi", + "zh", + "zu", + "afr", + "aka", + "amh", + "ara", + "aze", + "bel", + "ben", + "bul", + "cat", + "ces", + "dan", + "deu", + "ell", + "eng", + "epo", + "est", + "fin", + "fra", + "guj", + "heb", + "hin", + "hrv", + "hun", + "hye", + "ind", + "ita", + "jav", + "jpn", + "kan", + "kat", + "khm", + "kor", + "lat", + "lav", + "lit", + "mal", + "mar", + "mkd", + "mya", + "nep", + "nld", + "nob", + "ori", + "pan", + "pes", + "pol", + "por", + "ron", + "rus", + "sin", + "slk", + "slv", + "sna", + "spa", + "srp", + "swe", + "tam", + "tel", + "tgl", + "tha", + "tuk", + "tur", + "ukr", + "urd", + "uzb", + "vie", + "yid", + "zho", + "zul", + "cmn" + ] + }, + "LocalizedAttributesRuleView": { + "type": "object", + "required": [ + "attributePatterns", + "locales" + ], + "properties": { + "attributePatterns": { + "$ref": "#/components/schemas/AttributePatterns" + }, + "locales": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Locale" + } + } + } + }, + "LogMode": { + "type": "string", + "enum": [ + "human", + "json", + "profile" + ] + }, + "MatchingStrategy": { + "type": "string", + "description": "This is unfortunately a duplication of the struct in .\nThe reason why it is duplicated is because milli cannot depend on meilisearch. It would be cyclic imports.", + "enum": [ + "last", + "all", + "frequency" + ] + }, + "MergeFacets": { + "type": "object", + "properties": { + "maxValuesPerFacet": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + } + } + }, + "MinWordSizeTyposSetting": { + "type": "object", + "properties": { + "oneTypo": { + "type": [ + "integer", + "null" + ], + "format": "u-int8", + "example": 5, + "minimum": 0 + }, + "twoTypos": { + "type": [ + "integer", + "null" + ], + "format": "u-int8", + "example": 9, + "minimum": 0 + } + }, + "additionalProperties": false + }, + "Network": { + "type": "object", + "properties": { + "remotes": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/Remote" + }, + "propertyNames": { + "type": "string" + }, + "example": "http://localhost:7700" + }, + "self": { + "type": [ + "string", + "null" + ], + "example": "ms-00" + }, + "sharding": { + "type": [ + "boolean", + "null" + ], + "example": true + } + } + }, + "Origin": { + "type": "object", + "required": [ + "remoteName", + "taskUid" + ], + "properties": { + "remoteName": { + "type": "string" + }, + "taskUid": { + "type": "integer", + "minimum": 0 + } + } + }, + "OverridePooling": { + "type": "string", + "enum": [ + "useModel", + "forceCls", + "forceMean" + ] + }, + "PaginationSettings": { + "type": "object", + "properties": { + "maxTotalHits": { + "type": [ + "integer", + "null" + ], + "example": 250, + "minimum": 0 + } + }, + "additionalProperties": false + }, + "PaginationView_IndexView": { + "type": "object", + "required": [ + "results", + "offset", + "limit", + "total" + ], + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "createdAt", + "updatedAt" + ], + "properties": { + "uid": { + "type": "string", + "description": "Unique identifier for the index" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "An `RFC 3339` format for date/time/duration." + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "An `RFC 3339` format for date/time/duration." + }, + "primaryKey": { + "type": [ + "string", + "null" + ], + "description": "Custom primaryKey for documents" + } + } + } + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 0 + }, + "total": { + "type": "integer", + "minimum": 0 + } + } + }, + "PaginationView_KeyView": { + "type": "object", + "required": [ + "results", + "offset", + "limit", + "total" + ], + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "uid", + "actions", + "indexes", + "createdAt", + "updatedAt" + ], + "properties": { + "name": { + "type": [ + "string", + "null" + ], + "description": "The name of the API Key if any" + }, + "description": { + "type": [ + "string", + "null" + ], + "description": "The description of the API Key if any" + }, + "key": { + "type": "string", + "description": "The actual API Key you can send to Meilisearch" + }, + "uid": { + "type": "string", + "format": "uuid", + "description": "The `Uuid` specified while creating the key or autogenerated by Meilisearch." + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Action" + }, + "description": "The actions accessible with this key." + }, + "indexes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The indexes accessible with this key." + }, + "expiresAt": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "The expiration date of the key. Once this timestamp is exceeded the key is not deleted but cannot be used anymore." + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The date of creation of this API Key.", + "readOnly": true + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "The date of the last update made on this key.", + "readOnly": true + } + } + } + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 0 + }, + "total": { + "type": "integer", + "minimum": 0 + } + } + }, + "PaginationView_Value": { + "type": "object", + "required": [ + "results", + "offset", + "limit", + "total" + ], + "properties": { + "results": { + "type": "array", + "items": {} + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 0 + }, + "total": { + "type": "integer", + "minimum": 0 + } + } + }, + "PatchApiKey": { + "type": "object", + "properties": { + "description": { + "type": [ + "string", + "null" + ], + "example": "This key is used to update documents in the products index" + }, + "name": { + "type": [ + "string", + "null" + ], + "example": "Indexing Products API key" + } + } + }, + "Personalize": { + "type": "object", + "required": [ + "user_context" + ], + "properties": { + "user_context": { + "type": "string" + } + } + }, + "PrefixSearchSettings": { + "type": "string", + "enum": [ + "indexingTime", + "disabled" + ] + }, + "ProgressStepView": { + "type": "object", + "required": [ + "currentStep", + "finished", + "total" + ], + "properties": { + "currentStep": { + "type": "string" + }, + "finished": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "total": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + } + }, + "ProgressView": { + "type": "object", + "required": [ + "steps", + "percentage" + ], + "properties": { + "steps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProgressStepView" + } + }, + "percentage": { + "type": "number", + "format": "float" + } + } + }, + "ProximityPrecisionView": { + "type": "string", + "enum": [ + "byWord", + "byAttribute" + ] + }, + "RankingRuleView": { + "oneOf": [ + { + "type": "string", + "description": "Sorted by decreasing number of matched query terms.\nQuery words at the front of an attribute is considered better than if it was at the back.", + "enum": [ + "Words" + ] + }, + { + "type": "string", + "description": "Sorted by increasing number of typos.", + "enum": [ + "Typo" + ] + }, + { + "type": "string", + "description": "Sorted by increasing distance between matched query terms.", + "enum": [ + "Proximity" + ] + }, + { + "type": "string", + "description": "Documents with quey words contained in more important\nattributes are considered better.", + "enum": [ + "Attribute" + ] + }, + { + "type": "string", + "description": "Dynamically sort at query time the documents. None, one or multiple Asc/Desc sortable\nattributes can be used in place of this criterion at query time.", + "enum": [ + "Sort" + ] + }, + { + "type": "string", + "description": "Sorted by the similarity of the matched words with the query words.", + "enum": [ + "Exactness" + ] + }, + { + "type": "object", + "description": "Sorted by the increasing value of the field specified.", + "required": [ + "Asc" + ], + "properties": { + "Asc": { + "type": "string", + "description": "Sorted by the increasing value of the field specified." + } + } + }, + { + "type": "object", + "description": "Sorted by the decreasing value of the field specified.", + "required": [ + "Desc" + ], + "properties": { + "Desc": { + "type": "string", + "description": "Sorted by the decreasing value of the field specified." + } + } + } + ] + }, + "RankingScoreThreshold": { + "type": "number", + "format": "double" + }, + "Remote": { + "type": "object", + "properties": { + "url": { + "type": [ + "string", + "null" + ], + "example": { + "ms-0": { + "url": "http://localhost:7700", + "searchApiKey": null, + "writeApiKey": null + }, + "ms-1": { + "url": "http://localhost:7701", + "searchApiKey": "foo", + "writeApiKey": "bar" + }, + "ms-2": { + "url": "http://localhost:7702", + "searchApiKey": "bar", + "writeApiKey": "foo" + } + } + }, + "searchApiKey": { + "type": [ + "string", + "null" + ], + "example": "XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU" + }, + "writeApiKey": { + "type": [ + "string", + "null" + ], + "example": "XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU" + } + } + }, + "RemoteTask": { + "type": "object", + "properties": { + "taskUid": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/u32" + } + ] + }, + "error": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ResponseError" + } + ] + } + } + }, + "ResponseError": { + "type": "object", + "required": [ + "message", + "code", + "type", + "link" + ], + "properties": { + "message": { + "type": "string", + "description": "The error message." + }, + "code": { + "$ref": "#/components/schemas/Code", + "description": "The error code." + }, + "type": { + "$ref": "#/components/schemas/ErrorType", + "description": "The error type." + }, + "link": { + "type": "string", + "description": "A link to the documentation about this specific error." + } + } + }, + "RuntimeTogglableFeatures": { + "type": "object", + "properties": { + "metrics": { + "type": [ + "boolean", + "null" + ] + }, + "logsRoute": { + "type": [ + "boolean", + "null" + ] + }, + "editDocumentsByFunction": { + "type": [ + "boolean", + "null" + ] + }, + "containsFilter": { + "type": [ + "boolean", + "null" + ] + }, + "network": { + "type": [ + "boolean", + "null" + ] + }, + "getTaskDocumentsRoute": { + "type": [ + "boolean", + "null" + ] + }, + "compositeEmbedders": { + "type": [ + "boolean", + "null" + ] + }, + "chatCompletions": { + "type": [ + "boolean", + "null" + ] + }, + "multimodal": { + "type": [ + "boolean", + "null" + ] + }, + "vectorStoreSetting": { + "type": [ + "boolean", + "null" + ] + } + } + }, + "SearchHit": { + "type": "object", + "properties": { + "_formatted": { + "type": "object", + "additionalProperties": true + }, + "_matchesPosition": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/BTreeMap" + } + ] + }, + "_rankingScore": { + "type": [ + "number", + "null" + ], + "format": "double" + }, + "_rankingScoreDetails": { + "type": [ + "object", + "null" + ], + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + } + }, + "additionalProperties": {} + }, + "SearchMetadata": { + "type": "object", + "required": [ + "queryUid", + "indexUid" + ], + "properties": { + "queryUid": { + "type": "string", + "format": "uuid" + }, + "indexUid": { + "type": "string" + }, + "primaryKey": { + "type": [ + "string", + "null" + ] + }, + "remote": { + "type": [ + "string", + "null" + ] + } + } + }, + "SearchQuery": { + "type": "object", + "required": [ + "offset", + "limit", + "retrieve_vectors", + "crop_length", + "show_matches_position", + "show_ranking_score", + "show_ranking_score_details", + "highlight_pre_tag", + "highlight_post_tag", + "crop_marker", + "matching_strategy" + ], + "properties": { + "q": { + "type": [ + "string", + "null" + ] + }, + "vector": { + "type": [ + "array", + "null" + ], + "items": { + "type": "number", + "format": "float" + } + }, + "media": {}, + "hybrid": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/HybridQuery" + } + ] + }, + "offset": { + "type": "integer", + "default": 0, + "minimum": 0 + }, + "limit": { + "type": "integer", + "default": 20, + "minimum": 0 + }, + "page": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "hits_per_page": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "attributes_to_retrieve": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "retrieve_vectors": { + "type": "boolean" + }, + "attributes_to_crop": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "crop_length": { + "type": "integer", + "default": 10, + "minimum": 0 + }, + "attributes_to_highlight": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "show_matches_position": { + "type": "boolean" + }, + "show_ranking_score": { + "type": "boolean" + }, + "show_ranking_score_details": { + "type": "boolean" + }, + "filter": {}, + "sort": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "distinct": { + "type": [ + "string", + "null" + ] + }, + "facets": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "highlight_pre_tag": { + "type": "string", + "default": "" + }, + "highlight_post_tag": { + "type": "string", + "default": "" + }, + "crop_marker": { + "type": "string", + "default": "…" + }, + "matching_strategy": { + "$ref": "#/components/schemas/MatchingStrategy" + }, + "attributes_to_search_on": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "ranking_score_threshold": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/RankingScoreThreshold" + } + ] + }, + "locales": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/Locale" + } + }, + "personalize": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/Personalize" + } + ] + } + } + }, + "SearchQueryWithIndex": { + "type": "object", + "description": "A `SearchQuery` + an index UID and optional FederationOptions.", + "required": [ + "indexUid", + "retrieveVectors", + "cropLength", + "showRankingScore", + "showRankingScoreDetails", + "showMatchesPosition", + "highlightPreTag", + "highlightPostTag", + "cropMarker", + "matchingStrategy" + ], + "properties": { + "indexUid": { + "$ref": "#/components/schemas/IndexUid" + }, + "q": { + "type": [ + "string", + "null" + ] + }, + "vector": { + "type": [ + "array", + "null" + ], + "items": { + "type": "number", + "format": "float" + } + }, + "media": {}, + "hybrid": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/HybridQuery" + } + ] + }, + "offset": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "limit": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "page": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "hitsPerPage": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "attributesToRetrieve": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "retrieveVectors": { + "type": "boolean" + }, + "attributesToCrop": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "cropLength": { + "type": "integer", + "minimum": 0 + }, + "attributesToHighlight": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "showRankingScore": { + "type": "boolean" + }, + "showRankingScoreDetails": { + "type": "boolean" + }, + "showMatchesPosition": { + "type": "boolean" + }, + "filter": {}, + "sort": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "distinct": { + "type": [ + "string", + "null" + ] + }, + "facets": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "highlightPreTag": { + "type": "string" + }, + "highlightPostTag": { + "type": "string" + }, + "cropMarker": { + "type": "string" + }, + "matchingStrategy": { + "$ref": "#/components/schemas/MatchingStrategy" + }, + "attributesToSearchOn": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "rankingScoreThreshold": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/RankingScoreThreshold" + } + ] + }, + "locales": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/Locale" + } + }, + "federationOptions": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/FederationOptions" + } + ] + } + } + }, + "SearchResult": { + "allOf": [ + { + "$ref": "#/components/schemas/HitsInfo" + }, + { + "type": "object", + "required": [ + "hits", + "query", + "processingTimeMs" + ], + "properties": { + "hits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchHit" + } + }, + "query": { + "type": "string" + }, + "queryVector": { + "type": [ + "array", + "null" + ], + "items": { + "type": "number", + "format": "float" + } + }, + "processingTimeMs": { + "type": "integer", + "minimum": 0 + }, + "facetDistribution": { + "type": [ + "object", + "null" + ], + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "facetStats": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/FacetStats" + }, + "propertyNames": { + "type": "string" + } + }, + "requestUid": { + "type": [ + "string", + "null" + ], + "format": "uuid" + }, + "metadata": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SearchMetadata" + } + ] + }, + "semanticHitCount": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "minimum": 0 + } + } + } + ] + }, + "SearchResultWithIndex": { + "allOf": [ + { + "$ref": "#/components/schemas/SearchResult" + }, + { + "type": "object", + "required": [ + "indexUid" + ], + "properties": { + "indexUid": { + "type": "string" + } + } + } + ] + }, + "SearchResults": { + "type": "object", + "required": [ + "results" + ], + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchResultWithIndex" + } + } + } + }, + "SettingEmbeddingSettings": { + "type": "object", + "description": "\"Technical\" type that is required due to utoipa.\n\nWe did not find a way to implement [`utoipa::ToSchema`] for the [`Setting`] enum,\nbut most types can use the `value_type` macro parameter to workaround that issue.\n\nHowever that type is used in the settings route, including through the macro that auto-generate\nall the settings route, so we can't remap the `value_type`.", + "properties": { + "inner": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "source": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/EmbedderSource", + "description": "The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`" + } + ] + }, + "model": { + "type": [ + "string", + "null" + ], + "description": "The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`" + }, + "revision": { + "type": [ + "string", + "null" + ], + "description": "The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`" + }, + "pooling": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/OverridePooling", + "description": "The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior." + } + ] + }, + "apiKey": { + "type": [ + "string", + "null" + ], + "description": "The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings" + }, + "dimensions": { + "type": [ + "string", + "null" + ], + "description": "The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text." + }, + "binaryQuantized": { + "type": [ + "boolean", + "null" + ], + "description": "Whether to binary quantize the embeddings of this embedder.\n\nBinary quantized embeddings are smaller than regular embeddings, which improves\ndisk usage and retrieval speed, at the cost of relevancy.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🏗️ When set to `true`, embeddings are not regenerated, but they are binary quantized, which takes time.\n\n# Defaults\n\n- Defaults to `false`\n\n# Note\n\nAs binary quantization is a destructive operation, it is not possible to disable again this setting after\nfirst enabling it. If you are unsure of whether the performance-relevancy tradeoff is right for you,\nwe recommend to use this parameter on a test index first." + }, + "documentTemplate": { + "type": [ + "boolean", + "null" + ], + "description": "A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text." + }, + "documentTemplateMaxBytes": { + "type": [ + "integer", + "null" + ], + "description": "Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400", + "minimum": 0 + }, + "url": { + "type": [ + "string", + "null" + ], + "description": "URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated" + }, + "indexingFragments": { + "type": [ + "object", + "null" + ], + "description": "Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "searchFragments": { + "type": [ + "object", + "null" + ], + "description": "Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "request": { + "description": "Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" + }, + "response": { + "description": "Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" + }, + "headers": { + "type": [ + "object", + "null" + ], + "description": "Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "additionalProperties": { + "type": "string" + }, + "propertyNames": { + "type": "string" + } + }, + "searchEmbedder": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SubEmbeddingSettings" + } + ] + }, + "indexingEmbedder": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SubEmbeddingSettings" + } + ] + }, + "distribution": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/DistributionShift", + "description": "Affine transformation applied to the semantic score to make it more comparable to the ranking score.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings" + } + ] + } + }, + "additionalProperties": false + } + ] + } + } + }, + "Settings_Checked": { + "type": "object", + "description": "Holds all the settings for an index. `T` can either be `Checked` if they represents settings\nwhose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a\ncall to `check` will return a `Settings` from a `Settings`.", + "properties": { + "displayedAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Fields displayed in the returned documents.", + "example": [ + "id", + "title", + "description", + "url" + ] + }, + "searchableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Fields in which to search for matching query words sorted by order of importance.", + "example": [ + "title", + "description" + ] + }, + "filterableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/FilterableAttributesRule" + }, + "description": "Attributes to use for faceting and filtering. See [Filtering and Faceted Search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).", + "example": [ + "release_date", + "genre" + ] + }, + "sortableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Attributes to use when sorting search results.", + "example": [ + "release_date" + ] + }, + "rankingRules": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of ranking rules sorted by order of importance. The order is customizable.\n[A list of ordered built-in ranking rules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).", + "example": [ + "words", + "typo", + "proximity", + "attribute", + "exactness" + ] + }, + "stopWords": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of words ignored when present in search queries.", + "example": [ + "the", + "a", + "them", + "their" + ] + }, + "nonSeparatorTokens": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of characters not delimiting where one term begins and ends.", + "example": [ + " ", + "\n" + ] + }, + "separatorTokens": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of characters delimiting where one term begins and ends.", + "example": [ + "S" + ] + }, + "dictionary": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of strings Meilisearch should parse as a single term.", + "example": [ + "iPhone pro" + ] + }, + "synonyms": { + "type": [ + "object", + "null" + ], + "description": "List of associated words treated similarly. A word associated to an array of word as synonyms.", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + }, + "example": { + "he": [ + "she", + "they", + "them" + ], + "phone": [ + "iPhone", + "android" + ] + } + }, + "distinctAttribute": { + "type": [ + "string", + "null" + ], + "description": "Search returns documents with distinct (different) values of the given field.", + "example": "sku" + }, + "proximityPrecision": { + "type": [ + "string", + "null" + ], + "description": "Precision level when calculating the proximity ranking rule.", + "example": "byAttribute" + }, + "typoTolerance": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/TypoSettings", + "description": "Customize typo tolerance feature." + } + ] + }, + "faceting": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/FacetingSettings", + "description": "Faceting settings." + } + ] + }, + "pagination": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/PaginationSettings", + "description": "Pagination settings." + } + ] + }, + "embedders": { + "type": [ + "object", + "null" + ], + "description": "Embedder required for performing semantic search queries.", + "additionalProperties": { + "$ref": "#/components/schemas/SettingEmbeddingSettings" + }, + "propertyNames": { + "type": "string" + } + }, + "searchCutoffMs": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Maximum duration of a search query.", + "example": 50, + "minimum": 0 + }, + "localizedAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/LocalizedAttributesRuleView" + }, + "example": 50 + }, + "facetSearch": { + "type": [ + "boolean", + "null" + ], + "example": true + }, + "prefixSearch": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/PrefixSearchSettings" + } + ] + }, + "chat": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ChatSettings", + "description": "Customize the chat prompting." + } + ] + }, + "vectorStore": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/VectorStoreBackend" + } + ] + } + }, + "additionalProperties": false + }, + "Settings_Unchecked": { + "type": "object", + "description": "Holds all the settings for an index. `T` can either be `Checked` if they represents settings\nwhose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a\ncall to `check` will return a `Settings` from a `Settings`.", + "properties": { + "displayedAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Fields displayed in the returned documents.", + "example": [ + "id", + "title", + "description", + "url" + ] + }, + "searchableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Fields in which to search for matching query words sorted by order of importance.", + "example": [ + "title", + "description" + ] + }, + "filterableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/FilterableAttributesRule" + }, + "description": "Attributes to use for faceting and filtering. See [Filtering and Faceted Search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).", + "example": [ + "release_date", + "genre" + ] + }, + "sortableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Attributes to use when sorting search results.", + "example": [ + "release_date" + ] + }, + "rankingRules": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of ranking rules sorted by order of importance. The order is customizable.\n[A list of ordered built-in ranking rules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).", + "example": [ + "words", + "typo", + "proximity", + "attribute", + "exactness" + ] + }, + "stopWords": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of words ignored when present in search queries.", + "example": [ + "the", + "a", + "them", + "their" + ] + }, + "nonSeparatorTokens": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of characters not delimiting where one term begins and ends.", + "example": [ + " ", + "\n" + ] + }, + "separatorTokens": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of characters delimiting where one term begins and ends.", + "example": [ + "S" + ] + }, + "dictionary": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of strings Meilisearch should parse as a single term.", + "example": [ + "iPhone pro" + ] + }, + "synonyms": { + "type": [ + "object", + "null" + ], + "description": "List of associated words treated similarly. A word associated to an array of word as synonyms.", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + }, + "example": { + "he": [ + "she", + "they", + "them" + ], + "phone": [ + "iPhone", + "android" + ] + } + }, + "distinctAttribute": { + "type": [ + "string", + "null" + ], + "description": "Search returns documents with distinct (different) values of the given field.", + "example": "sku" + }, + "proximityPrecision": { + "type": [ + "string", + "null" + ], + "description": "Precision level when calculating the proximity ranking rule.", + "example": "byAttribute" + }, + "typoTolerance": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/TypoSettings", + "description": "Customize typo tolerance feature." + } + ] + }, + "faceting": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/FacetingSettings", + "description": "Faceting settings." + } + ] + }, + "pagination": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/PaginationSettings", + "description": "Pagination settings." + } + ] + }, + "embedders": { + "type": [ + "object", + "null" + ], + "description": "Embedder required for performing semantic search queries.", + "additionalProperties": { + "$ref": "#/components/schemas/SettingEmbeddingSettings" + }, + "propertyNames": { + "type": "string" + } + }, + "searchCutoffMs": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Maximum duration of a search query.", + "example": 50, + "minimum": 0 + }, + "localizedAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/LocalizedAttributesRuleView" + }, + "example": 50 + }, + "facetSearch": { + "type": [ + "boolean", + "null" + ], + "example": true + }, + "prefixSearch": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/PrefixSearchSettings" + } + ] + }, + "chat": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ChatSettings", + "description": "Customize the chat prompting." + } + ] + }, + "vectorStore": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/VectorStoreBackend" + } + ] + } + }, + "additionalProperties": false + }, + "SimilarQuery": { + "type": "object", + "required": [ + "id", + "offset", + "limit", + "embedder", + "retrieve_vectors", + "show_ranking_score", + "show_ranking_score_details", + "ranking_score_threshold" + ], + "properties": { + "id": { + "type": "string" + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 0 + }, + "filter": {}, + "embedder": { + "type": "string" + }, + "attributes_to_retrieve": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "retrieve_vectors": { + "type": "boolean" + }, + "show_ranking_score": { + "type": "boolean" + }, + "show_ranking_score_details": { + "type": "boolean" + }, + "ranking_score_threshold": { + "type": "number", + "format": "double" + } + } + }, + "SimilarResult": { + "allOf": [ + { + "$ref": "#/components/schemas/HitsInfo" + }, + { + "type": "object", + "required": [ + "hits", + "id", + "processingTimeMs" + ], + "properties": { + "hits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchHit" + } + }, + "id": { + "type": "string" + }, + "processingTimeMs": { + "type": "integer", + "minimum": 0 + } + } + } + ] + }, + "Stats": { + "type": "object", + "required": [ + "databaseSize", + "usedDatabaseSize", + "indexes" + ], + "properties": { + "databaseSize": { + "type": "integer", + "format": "u-int64", + "description": "The disk space used by the database, in bytes.", + "minimum": 0 + }, + "usedDatabaseSize": { + "type": "integer", + "format": "u-int64", + "description": "The size of the database, in bytes.", + "minimum": 0 + }, + "lastUpdate": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "The date of the last update in the RFC 3339 formats. Can be `null` if no update has ever been processed." + }, + "indexes": { + "type": "object", + "description": "The stats of every individual index your API key lets you access.", + "additionalProperties": { + "$ref": "#/components/schemas/IndexStats" + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "Status": { + "type": "string", + "description": "The status of a task.", + "enum": [ + "enqueued", + "processing", + "succeeded", + "failed", + "canceled" + ], + "example": "processing" + }, + "SubEmbeddingSettings": { + "type": "object", + "properties": { + "source": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/EmbedderSource", + "description": "The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`" + } + ] + }, + "model": { + "type": [ + "string", + "null" + ], + "description": "The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`" + }, + "revision": { + "type": [ + "string", + "null" + ], + "description": "The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`" + }, + "pooling": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/OverridePooling", + "description": "The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior." + } + ] + }, + "apiKey": { + "type": [ + "string", + "null" + ], + "description": "The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings" + }, + "dimensions": { + "type": [ + "string", + "null" + ], + "description": "The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text." + }, + "documentTemplate": { + "type": [ + "boolean", + "null" + ], + "description": "A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text." + }, + "documentTemplateMaxBytes": { + "type": [ + "integer", + "null" + ], + "description": "Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400", + "minimum": 0 + }, + "url": { + "type": [ + "string", + "null" + ], + "description": "URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated" + }, + "indexingFragments": { + "type": [ + "object", + "null" + ], + "description": "Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "searchFragments": { + "type": [ + "object", + "null" + ], + "description": "Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "request": { + "description": "Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" + }, + "response": { + "description": "Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" + }, + "headers": { + "type": [ + "object", + "null" + ], + "description": "Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "additionalProperties": { + "type": "string" + }, + "propertyNames": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "SummarizedTaskView": { + "type": "object", + "required": [ + "taskUid", + "status", + "type", + "enqueuedAt" + ], + "properties": { + "taskUid": { + "type": "integer", + "format": "u-int32", + "description": "The task unique identifier.", + "minimum": 0 + }, + "indexUid": { + "type": [ + "string", + "null" + ], + "description": "The index affected by this task. May be `null` if the task is not linked to any index." + }, + "status": { + "$ref": "#/components/schemas/Status", + "description": "The status of the task." + }, + "type": { + "$ref": "#/components/schemas/Kind", + "description": "The type of the task." + }, + "enqueuedAt": { + "type": "string", + "format": "date-time", + "description": "The date on which the task was enqueued." + }, + "customMetadata": { + "type": [ + "string", + "null" + ] + } + } + }, + "SwapIndexesPayload": { + "type": "object", + "required": [ + "indexes", + "rename" + ], + "properties": { + "indexes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IndexUid" + }, + "description": "Array of the two indexUids to be swapped" + }, + "rename": { + "type": "boolean", + "description": "If set to true, instead of swapping the left and right indexes it'll change the name of the first index to the second" + } + } + }, + "TaskNetwork": { + "oneOf": [ + { + "type": "object", + "required": [ + "origin" + ], + "properties": { + "origin": { + "$ref": "#/components/schemas/Origin" + } + } + }, + { + "type": "object", + "required": [ + "remote_tasks" + ], + "properties": { + "remote_tasks": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/RemoteTask" + }, + "propertyNames": { + "type": "string" + } + } + } + } + ] + }, + "TaskView": { + "type": "object", + "required": [ + "uid", + "status", + "type", + "enqueuedAt" + ], + "properties": { + "uid": { + "type": "integer", + "format": "u-int32", + "description": "The unique sequential identifier of the task.", + "example": 4312, + "minimum": 0 + }, + "batchUid": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "description": "The unique identifier of the index where this task is operated.", + "example": "movies", + "minimum": 0 + }, + "indexUid": { + "type": [ + "string", + "null" + ] + }, + "status": { + "$ref": "#/components/schemas/Status" + }, + "type": { + "$ref": "#/components/schemas/Kind", + "description": "The type of the task." + }, + "canceledBy": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "description": "The uid of the task that performed the taskCancelation if the task has been canceled.", + "example": 4326, + "minimum": 0 + }, + "details": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/DetailsView" + } + ] + }, + "error": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ResponseError" + } + ] + }, + "duration": { + "type": [ + "string", + "null" + ], + "description": "Total elasped time the engine was in processing state expressed as a `ISO-8601` duration format.", + "example": null + }, + "enqueuedAt": { + "type": "string", + "description": "An `RFC 3339` format for date/time/duration.", + "example": "2024-08-08_14:12:09.393Z" + }, + "startedAt": { + "type": "string", + "description": "An `RFC 3339` format for date/time/duration.", + "example": "2024-08-08_14:12:09.393Z" + }, + "finishedAt": { + "type": "string", + "description": "An `RFC 3339` format for date/time/duration.", + "example": "2024-08-08_14:12:09.393Z" + }, + "network": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/TaskNetwork" + } + ] + }, + "customMetadata": { + "type": [ + "string", + "null" + ] + } + } + }, + "TypoSettings": { + "type": "object", + "properties": { + "enabled": { + "type": [ + "boolean", + "null" + ], + "example": true + }, + "minWordSizeForTypos": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/MinWordSizeTyposSetting" + } + ] + }, + "disableOnWords": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "example": [ + "iPhone", + "phone" + ], + "uniqueItems": true + }, + "disableOnAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "example": [ + "uuid", + "url" + ], + "uniqueItems": true + }, + "disableOnNumbers": { + "type": [ + "boolean", + "null" + ], + "example": true + } + }, + "additionalProperties": false + }, + "Unchecked": { + "default": null + }, + "UpdateIndexRequest": { + "type": "object", + "properties": { + "primaryKey": { + "type": [ + "string", + "null" + ], + "description": "The new primary key of the index" + }, + "uid": { + "type": [ + "string", + "null" + ], + "description": "The new uid of the index (for renaming)" + } + } + }, + "UpdateStderrLogs": { + "type": "object", + "required": [ + "target" + ], + "properties": { + "target": { + "type": "string", + "description": "Lets you specify which parts of the code you want to inspect and is formatted like that: code_part=log_level,code_part=log_level\n- If the `code_part` is missing, then the `log_level` will be applied to everything.\n- If the `log_level` is missing, then the `code_part` will be selected in `info` log level.", + "default": "info", + "example": "milli=trace,index_scheduler,actix_web=off" + } + } + }, + "Vec": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "VectorStoreBackend": { + "type": "string", + "enum": [ + "stable", + "experimental" + ] + }, + "VersionResponse": { + "type": "object", + "required": [ + "commitSha", + "commitDate", + "pkgVersion" + ], + "properties": { + "commitSha": { + "type": "string", + "description": "The commit used to compile this build of Meilisearch." + }, + "commitDate": { + "type": "string", + "description": "The date of this build." + }, + "pkgVersion": { + "type": "string", + "description": "The version of Meilisearch." + } + } + }, + "WebhookResults": { + "type": "object", + "required": [ + "results" + ], + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" + } + } + } + }, + "WebhookSettings": { + "type": "object", + "properties": { + "url": { + "type": [ + "string", + "null" + ], + "example": "https://your.site/on-tasks-completed" + }, + "headers": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "type": "string" + }, + "propertyNames": { + "type": "string" + }, + "example": { + "Authorization": "Bearer a-secret-token" + } + } + } + }, + "WebhookWithMetadataRedactedAuthorization": { + "allOf": [ + { + "$ref": "#/components/schemas/WebhookSettings" + }, + { + "type": "object", + "required": [ + "uuid", + "isEditable" + ], + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "isEditable": { + "type": "boolean" + } + } + } + ] + }, + "u32": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "securitySchemes": { + "Bearer": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "Uuidv4, string or JWT", + "description": "An API key is a token that you provide when making API calls. Include the token in a header parameter called `Authorization`.\nExample: `Authorization: Bearer 8fece4405662dd830e4cb265e7e047aab2e79672a760a12712d2a263c9003509`" + } + } + }, + "tags": [ + { + "name": "Stats", + "description": "Stats gives extended information and metrics about indexes and the Meilisearch database." + }, + { + "name": "Tasks", + "description": "The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html).", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/tasks", + "description": null + } + }, + { + "name": "Batches", + "description": "The /batches route gives information about the progress of batches of asynchronous operations.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/batches", + "description": null + } + }, + { + "name": "Indexes", + "description": "An index is an entity that gathers a set of [documents](https://www.meilisearch.com/docs/learn/getting_started/documents) with its own [settings](https://www.meilisearch.com/docs/reference/api/settings). Learn more about indexes.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/indexes", + "description": null + } + }, + { + "name": "Documents", + "description": "Documents are objects composed of fields that can store any type of data. Each field contains an attribute and its associated value. Documents are stored inside [indexes](https://www.meilisearch.com/docs/learn/getting_started/indexes).", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/learn/getting_started/documents", + "description": null + } + }, + { + "name": "Facet Search", + "description": "The `/facet-search` route allows you to search for facet values. Facet search supports prefix search and typo tolerance. The returned hits are sorted lexicographically in ascending order. You can configure how facets are sorted using the sortFacetValuesBy property of the faceting index settings.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/facet_search", + "description": null + } + }, + { + "name": "Similar documents", + "description": "The /similar route uses AI-powered search to return a number of documents similar to a target document.\n\nMeilisearch exposes two routes for retrieving similar documents: POST and GET. In the majority of cases, POST will offer better performance and ease of use.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/similar", + "description": null + } + }, + { + "name": "Settings", + "description": "Use the /settings route to customize search settings for a given index. You can either modify all index settings at once using the update settings endpoint, or use a child route to configure a single setting.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/settings", + "description": null + } + }, + { + "name": "Compact an index", + "description": "The /compact route uses compacts the database to reorganize and make it smaller and more efficient.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/compact", + "description": null + } + }, + { + "name": "Search", + "description": "Meilisearch exposes two routes to perform searches:\n\n- A POST route: this is the preferred route when using API authentication, as it allows [preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) caching and better performance.\n- A GET route: the usage of this route is discouraged, unless you have good reason to do otherwise (specific caching abilities for example)", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/search", + "description": null + } + }, + { + "name": "Snapshots", + "description": "The snapshots route allows the creation of database snapshots. Snapshots are .snapshot files that can be used to launch Meilisearch.\nCreating a snapshot is also referred to as exporting it, whereas launching Meilisearch with a snapshot is referred to as importing it.\nDuring a snapshot export, all indexes of the current instance are exported—together with their documents and settings—and saved as a single .snapshot file.\nDuring a snapshot import, all indexes contained in the indicated .snapshot file are imported along with their associated documents and settings.\nSnapshot imports are performed at launch using an option.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/snapshots", + "description": null + } + }, + { + "name": "Dumps", + "description": "The `dumps` route allows the creation of database dumps.\nDumps are `.dump` files that can be used to launch Meilisearch. Dumps are compatible between Meilisearch versions.\nCreating a dump is also referred to as exporting it, whereas launching Meilisearch with a dump is referred to as importing it.\nDuring a [dump export](https://www.meilisearch.com/docs/reference/api/dump#create-a-dump), all indexes of the current instance are\nexported—together with their documents and settings—and saved as a single `.dump` file. During a dump import,\nall indexes contained in the indicated `.dump` file are imported along with their associated documents and settings.\nAny existing index with the same uid as an index in the dump file will be overwritten.\nDump imports are [performed at launch](https://www.meilisearch.com/docs/learn/advanced/dumps#importing-a-dump) using an option.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/dump", + "description": null + } + }, + { + "name": "Keys", + "description": "Manage API `keys` for a Meilisearch instance. Each key has a given set of permissions.\nYou must have the master key or the default admin key to access the keys route. More information about the keys and their rights.\nAccessing any route under `/keys` without having set a master key will result in an error.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/keys", + "description": null + } + }, + { + "name": "Logs", + "description": "Everything about retrieving or customizing logs.\nCurrently [experimental](https://www.meilisearch.com/docs/learn/experimental/overview).", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/learn/experimental/log_customization", + "description": null + } + }, + { + "name": "Multi-search", + "description": "The `/multi-search` route allows you to perform multiple search queries on one or more indexes by bundling them into a single HTTP request. Multi-search is also known as federated search.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/multi_search", + "description": null + } + }, + { + "name": "Experimental features", + "description": "The `/experimental-features` route allows you to activate or deactivate some of Meilisearch's experimental features.\n\nThis route is **synchronous**. This means that no task object will be returned, and any activated or deactivated features will be made available or unavailable immediately.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/experimental_features", + "description": null + } + }, + { + "name": "Export", + "description": "The `/export` route allows you to trigger an export process to a remote Meilisearch instance.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/export", + "description": null + } + }, + { + "name": "Network", + "description": "The `/network` route allows you to describe the topology of a network of Meilisearch instances.\n\nThis route is **synchronous**. This means that no task object will be returned, and any change to the network will be made available immediately.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/network", + "description": null + } + }, + { + "name": "Webhooks", + "description": "The `/webhooks` route allows you to register endpoints to be called once tasks are processed.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/webhooks", + "description": null + } + } + ] +} \ No newline at end of file diff --git a/openapi-curqui.json b/openapi-curqui.json index e60b3ed86..afa29a9a1 100644 --- a/openapi-curqui.json +++ b/openapi-curqui.json @@ -23299,4 +23299,4 @@ } } ] -} \ No newline at end of file +} From 9d064b338dba4da6993ae25651ea51ead70faf46 Mon Sep 17 00:00:00 2001 From: curquiza Date: Mon, 22 Dec 2025 10:15:07 +0100 Subject: [PATCH 07/45] Remove example in docs.json --- docs.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs.json b/docs.json index 5978ca063..b0c1996e5 100644 --- a/docs.json +++ b/docs.json @@ -148,11 +148,6 @@ "api": { "playground": { "display": "simple" - }, - "examples": { - "languages": ["curl", "javascript", "php", "python", "java", "ruby", "go", "csharp", "rust", "dart", "swift"], - "defaults": "required", - "prefill": true } }, "navigation": { From 5fecc154d1644b76cbd0d24a748ec81e743c84a3 Mon Sep 17 00:00:00 2001 From: curquiza Date: Mon, 22 Dec 2025 10:15:22 +0100 Subject: [PATCH 08/45] Add the newly and corrected open api file --- openapi-curqui.json | 4712 ++++--------------------------------------- 1 file changed, 398 insertions(+), 4314 deletions(-) diff --git a/openapi-curqui.json b/openapi-curqui.json index afa29a9a1..bbf23fa8a 100644 --- a/openapi-curqui.json +++ b/openapi-curqui.json @@ -11,7 +11,7 @@ "name": "MIT", "identifier": "MIT" }, - "version": "1.28.2" + "version": "1.30.0" }, "servers": [ { @@ -92,8 +92,7 @@ "example": [ 231, 423, - 598, - "*" + 598 ] }, { @@ -110,8 +109,7 @@ } }, "example": [ - 374, - "*" + 374 ] }, { @@ -126,8 +124,7 @@ } }, "example": [ - "documentAdditionOrUpdate", - "*" + "documentAdditionOrUpdate" ] }, { @@ -146,8 +143,7 @@ "failed", "canceled", "enqueued", - "processing", - "*" + "processing" ] }, { @@ -163,8 +159,7 @@ }, "example": [ "movies", - "theater", - "*" + "theater" ] }, { @@ -175,10 +170,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" }, { "name": "beforeEnqueuedAt", @@ -188,10 +180,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" }, { "name": "afterStartedAt", @@ -201,10 +190,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" }, { "name": "beforeStartedAt", @@ -214,10 +200,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" }, { "name": "afterFinishedAt", @@ -227,10 +210,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" }, { "name": "beforeFinishedAt", @@ -240,10 +220,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" } ], "responses": { @@ -378,10 +355,7 @@ }, "example": { "uid": 1, - "details": { - "receivedDocuments": 1, - "indexedDocuments": 1 - }, + "details": {}, "progress": null, "stats": { "totalNbTasks": 1, @@ -427,6 +401,36 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.GetBatch(BATCH_UID);" + }, + { + "lang": "JS", + "source": "client.batches.getBatch(BATCH_UID);" + }, + { + "lang": "PHP", + "source": "$client->getBatch(BATCH_UID);" + }, + { + "lang": "Python", + "source": "client.get_batch(BATCH_UID)" + }, + { + "lang": "Ruby", + "source": "client.batch(BATCH_UID)" + }, + { + "lang": "Rust", + "source": "let uid: u32 = 42;\nlet batch: meilisearch_sdk::batches::Batch = client\n .get_batch(uid)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches/BATCH_UID'" + } ] } }, @@ -450,7 +454,7 @@ "taskUid": 0, "indexUid": null, "status": "enqueued", - "type": "DumpCreation", + "type": "dumpCreation", "enqueuedAt": "2021-01-01T09:39:00.000000Z" } } @@ -687,6 +691,8 @@ "tags": [ "Export" ], + "summary": "Export to a remote Meilisearch", + "description": "Triggers an export process to a remote Meilisearch instance. This allows you to send\ndocuments and settings from the current instance to another Meilisearch server.", "operationId": "export", "responses": { "202": { @@ -1248,7 +1254,7 @@ }, { "lang": "Dart", - "source": "await client.index('movies').delete();" + "source": "await client.index('movies').delete();\nt_one_document_1: \"await client.index('movies').getDocument(25684,\\n fields: ['id', 'title', 'poster', 'release_date']);\"" }, { "lang": "Go", @@ -1415,6 +1421,7 @@ "Compact an index" ], "summary": "Compact an index", + "description": "Triggers a compaction process on the specified index. Compaction reorganizes the index database to make it smaller and more efficient.", "operationId": "compact", "parameters": [ { @@ -1676,7 +1683,7 @@ "source": "client.index('movies').get_documents({\n 'limit':2, 'filter': 'genres=action',\n 'sort': ['rating:desc', 'release_date:asc'] # list format\n})" }, { - "lang": "ruby", + "lang": "Ruby", "source": "client.index('movies').get_documents(limit: 2, filter: 'genres = action')" }, { @@ -1740,6 +1747,16 @@ "type": "string" }, "example": "custom" + }, + { + "name": "skipCreation", + "in": "query", + "description": "Only update documents if they already exist.", + "required": false, + "schema": { + "type": "boolean" + }, + "example": true } ], "requestBody": { @@ -1884,6 +1901,16 @@ "type": "string" }, "example": "custom" + }, + { + "name": "skipCreation", + "in": "query", + "description": "Only update documents if they already exist.", + "required": false, + "schema": { + "type": "boolean" + }, + "example": true } ], "requestBody": { @@ -1945,7 +1972,7 @@ }, { "lang": "Dart", - "source": "await client.index('movies').addDocuments([\n {\n 'id': 287947,\n 'title': 'Shazam',\n 'poster':\n 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview':\n 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n }\n]);" + "source": "await client.index('movies').addDocuments([\n {\n 'id': 287947,\n 'title': 'Shazam',\n 'poster':\n 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview':\n 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n }\n]);\nd_or_update_documents_1: \"await client.index('movies').updateDocuments([\\n {\\n 'id': 287947,\\n 'title': 'Shazam ⚡️',\\n 'genres': 'comedy',\\n }\\n]);\"" }, { "lang": "Go", @@ -3385,7 +3412,7 @@ "x-codeSamples": [ { "lang": "C#", - "source": "await client.Index(\"movies\").SearchAsync(\"American ninja\");" + "source": "await client.Index(\"movies\").SearchAsync(\"American ninja\");\nt_task_1: |\nTaskInfo task = await client.GetTaskAsync(1);\nt_all_tasks_1: |\nResourceResults taskResult = await client.GetTasksAsync();" }, { "lang": "Dart", @@ -3495,7 +3522,7 @@ }, { "lang": "Dart", - "source": "await client.index('movies').getSettings();" + "source": "await client.index('movies').getSettings();\ndate_settings_1: \"await client.index('movies').updateSettings(\\n IndexSettings(\\n rankingRules: [\\n 'words',\\n 'typo',\\n 'proximity',\\n 'attribute',\\n 'sort',\\n 'exactness',\\n 'release_date:desc',\\n 'rank:desc'\\n ],\\n distinctAttribute: 'movie_id',\\n searchableAttributes: ['title', 'overview', 'genres'],\\n displayedAttributes: [\\n 'title',\\n 'overview',\\n 'genres',\\n 'release_date'\\n ],\\n stopWords: ['the', 'a', 'an'],\\n sortableAttributes: ['title', 'release_date'],\\n synonyms: {\\n 'wolverine': ['xmen', 'logan'],\\n 'logan': ['wolverine'],\\n },\\n ),\\n );\"" }, { "lang": "Go", @@ -4384,7 +4411,7 @@ }, { "lang": "Dart", - "source": "await client.index('movies').getDisplayedAttributes();" + "source": "await client.index('movies').getDisplayedAttributes();\ndate_displayed_attributes_1: \"await client.index('movies').updateDisplayedAttributes([\\n 'title',\\n 'overview',\\n 'genres',\\n 'release_date',\\n]);\"" }, { "lang": "Go", @@ -5652,7 +5679,7 @@ }, { "lang": "Dart", - "source": "await client.index('movies').getFaceting();" + "source": "await client.index('movies').getFaceting();\ndate_faceting_settings_1: \"await client.index('books').updateFaceting(Faceting(\\n maxValuesPerFacet: 2,\\n sortFacetValuesBy: {\\n '*': FacetingSortTypes.alpha,\\n 'genres': FacetingSortTypes.count\\n }));\"" }, { "lang": "Go", @@ -5985,7 +6012,7 @@ }, { "lang": "Dart", - "source": "await client.index('movies').getFilterableAttributes();" + "source": "await client.index('movies').getFilterableAttributes();\ndate_filterable_attributes_1: \"await client\\n .index('movies')\\n .updateFilterableAttributes(['genres', 'director']);\"" }, { "lang": "Go", @@ -6998,7 +7025,7 @@ }, { "lang": "Dart", - "source": "await client.index('movies').getPagination();" + "source": "await client.index('movies').getPagination();\ndate_pagination_settings_1: \"await client\\n .index('books')\\n .updatePagination(Pagination(maxTotalHits: 100));\"" }, { "lang": "Go", @@ -7963,7 +7990,7 @@ }, { "lang": "Dart", - "source": "await client.index('movies').getRankingRules();" + "source": "await client.index('movies').getRankingRules();\ndate_ranking_rules_1: \"await client.index('movies').updateRankingRules([\\n 'words',\\n 'typo',\\n 'proximity',\\n 'attribute',\\n 'sort',\\n 'exactness',\\n 'release_date:asc',\\n 'rank:desc',\\n]);\"" }, { "lang": "Go", @@ -8654,7 +8681,7 @@ }, { "lang": "Dart", - "source": "await client.index('movies').getSearchableAttributes();" + "source": "await client.index('movies').getSearchableAttributes();\ndate_searchable_attributes_1: \"await client\\n .index('movies')\\n .updateSearchableAttributes(['title', 'overview', 'genres']);\"" }, { "lang": "Go", @@ -9352,7 +9379,7 @@ }, { "lang": "Dart", - "source": "await client.index('books').getSortableAttributes();" + "source": "await client.index('books').getSortableAttributes();\ndate_sortable_attributes_1: \"await client.index('books').updateSortableAttributes(['price', 'author']);\"" }, { "lang": "Go", @@ -9596,7 +9623,7 @@ }, { "lang": "Dart", - "source": "await client.index('books').resetSortableAttributes();" + "source": "await client.index('books').resetSortableAttributes();\narch_parameter_guide_sort_1: \"await client\\n .index('books')\\n .search('science fiction', SearchQuery(sort: ['price:asc']));\"" }, { "lang": "Go", @@ -10069,7 +10096,7 @@ }, { "lang": "Dart", - "source": "await client.index('movies').getSynonyms();" + "source": "await client.index('movies').getSynonyms();\ndate_synonyms_1: \"await client.index('movies').updateSynonyms({\\n 'wolverine': ['xmen', 'logan'],\\n 'logan': ['wolverine', 'xmen'],\\n 'wow': ['world of warcraft'],\\n});\"" }, { "lang": "Go", @@ -11049,11 +11076,11 @@ "release_date": 1418256000 } ], + "id": "143", "offset": 0, "limit": 2, "estimatedTotalHits": 976, - "processingTimeMs": 35, - "query": "american " + "processingTimeMs": 35 } } } @@ -11160,11 +11187,11 @@ "release_date": 1418256000 } ], + "id": "143", "offset": 0, "limit": 2, "estimatedTotalHits": 976, - "processingTimeMs": 35, - "query": "american " + "processingTimeMs": 35 } } } @@ -11375,70 +11402,6 @@ ] } }, - "/indexes{indexUid}/compact": { - "post": { - "tags": [ - "Compact an index" - ], - "summary": "Compact an index", - "operationId": "compact", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "202": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentDeletion", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ] - } - }, "/keys": { "get": { "tags": [ @@ -11535,7 +11498,7 @@ }, { "lang": "Dart", - "source": "await client.getKeys(params: KeysQuery(limit: 3));" + "source": "await client.getKeys(params: KeysQuery(limit: 3));\neate_a_key_1: \"await client.createKey(\\n description: 'Add documents: Products API key',\\n actions: ['documents.add'],\\n indexes: ['products'],\\n expiresAt: DateTime(2042, 04, 02));\"\ndate_a_key_1: \"await client.updateKey(\\n '6062abda-a5aa-4414-ac91-ecd7944c0f8d',\\n description: 'Manage documents: Products\\/Reviews API key',\\n name: 'Products\\/Reviews API key',\\n);\"" }, { "lang": "Go", @@ -11893,7 +11856,7 @@ }, { "lang": "Rust", - "source": "let key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();\nclient\n .delete_key(&key)\n .await?;" + "source": "let key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();\nclient\n .delete_key(&key)\n .await?;\nthorization_header_1:\nlet client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet keys = client\n.get_keys()\n.await\n.unwrap();" }, { "lang": "Swift", @@ -12361,7 +12324,7 @@ }, { "lang": "Java", - "source": "MultiSearchRequest multiSearchRequest = new MultiSearchRequest();\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"pooh\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"nemo\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movie_ratings\").setQuery(\"us\"));\n\nclient.multiSearch(multiSearchRequest);" + "source": "MultiSearchRequest multiSearchRequest = new MultiSearchRequest();\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"pooh\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"nemo\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movie_ratings\").setQuery(\"us\"));\n\nclient.multiSearch(multiSearchRequest);\nt_similar_post_1:\nSimilarDocumentRequest query = new SimilarDocumentRequest()\n .setId(\"143\")\n .setEmbedder(\"manual\");\nclient.index(\"movies\").searchSimilarDocuments(query)" }, { "lang": "PHP", @@ -12925,8 +12888,7 @@ "example": [ 231, 423, - 598, - "*" + 598 ] }, { @@ -12943,8 +12905,7 @@ } }, "example": [ - 374, - "*" + 374 ] }, { @@ -12959,8 +12920,7 @@ } }, "example": [ - "documentAdditionOrUpdate", - "*" + "documentAdditionOrUpdate" ] }, { @@ -12979,8 +12939,7 @@ "failed", "canceled", "enqueued", - "processing", - "*" + "processing" ] }, { @@ -12996,8 +12955,7 @@ }, "example": [ "movies", - "theater", - "*" + "theater" ] }, { @@ -13008,10 +12966,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" }, { "name": "beforeEnqueuedAt", @@ -13021,10 +12976,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" }, { "name": "afterStartedAt", @@ -13034,10 +12986,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" }, { "name": "beforeStartedAt", @@ -13047,10 +12996,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" }, { "name": "afterFinishedAt", @@ -13060,10 +13006,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" }, { "name": "beforeFinishedAt", @@ -13073,10 +13016,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" } ], "responses": { @@ -13093,15 +13033,9 @@ "uid": 144, "indexUid": "mieli", "status": "succeeded", - "type": "settingsUpdate", + "type": "indexCreation", "canceledBy": null, - "details": { - "settings": { - "filterableAttributes": [ - "play_count" - ] - } - }, + "details": null, "error": null, "duration": "PT0.009330S", "enqueuedAt": "2024-08-08T09:01:13.348471Z", @@ -13210,8 +13144,7 @@ "example": [ 231, 423, - 598, - "*" + 598 ] }, { @@ -13230,8 +13163,7 @@ "example": [ 231, 423, - 598, - "*" + 598 ] }, { @@ -13248,8 +13180,7 @@ } }, "example": [ - 374, - "*" + 374 ] }, { @@ -13264,8 +13195,7 @@ } }, "example": [ - "documentDeletion", - "*" + "documentDeletion" ] }, { @@ -13282,8 +13212,7 @@ "example": [ "succeeded", "failed", - "canceled", - "*" + "canceled" ] }, { @@ -13299,8 +13228,7 @@ }, "example": [ "movies", - "theater", - "*" + "theater" ] }, { @@ -13311,10 +13239,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" }, { "name": "beforeEnqueuedAt", @@ -13324,10 +13249,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" }, { "name": "afterStartedAt", @@ -13337,10 +13259,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" }, { "name": "beforeStartedAt", @@ -13350,10 +13269,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" }, { "name": "afterFinishedAt", @@ -13363,10 +13279,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" }, { "name": "beforeFinishedAt", @@ -13376,10 +13289,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" } ], "responses": { @@ -13531,8 +13441,7 @@ "example": [ 231, 423, - 598, - "*" + 598 ] }, { @@ -13551,8 +13460,7 @@ "example": [ 231, 423, - 598, - "*" + 598 ] }, { @@ -13569,8 +13477,7 @@ } }, "example": [ - 374, - "*" + 374 ] }, { @@ -13585,8 +13492,7 @@ } }, "example": [ - "documentDeletion", - "*" + "documentDeletion" ] }, { @@ -13603,8 +13509,7 @@ "example": [ "succeeded", "failed", - "canceled", - "*" + "canceled" ] }, { @@ -13620,8 +13525,7 @@ }, "example": [ "movies", - "theater", - "*" + "theater" ] }, { @@ -13632,10 +13536,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" }, { "name": "beforeEnqueuedAt", @@ -13645,10 +13546,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" }, { "name": "afterStartedAt", @@ -13658,10 +13556,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" }, { "name": "beforeStartedAt", @@ -13671,10 +13566,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" }, { "name": "afterFinishedAt", @@ -13684,10 +13576,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" }, { "name": "beforeFinishedAt", @@ -13697,10 +13586,7 @@ "schema": { "type": "string" }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] + "example": "2024-08-08T16:37:09.971Z" } ], "responses": { @@ -13845,7 +13731,7 @@ "type": "string", "format": "u-int32" }, - "example": 0 + "example": "0" } ], "responses": { @@ -13860,12 +13746,9 @@ "uid": 1, "indexUid": "movies", "status": "succeeded", - "type": "documentAdditionOrUpdate", + "type": "indexCreation", "canceledBy": null, - "details": { - "receivedDocuments": 79000, - "indexedDocuments": 79000 - }, + "details": null, "error": null, "duration": "PT1S", "enqueuedAt": "2021-01-01T09:39:00.000000Z", @@ -13918,133 +13801,45 @@ } ], "x-codeSamples": [ - { - "lang": "C#", - "source": "ResourceResults taskResult = await client.GetTasksAsync(new TasksQuery { Limit = 2, From = 10 });" - }, - { - "lang": "C#", - "source": "ResourceResults taskResult = await client.GetTasksAsync(new TasksQuery { Limit = 2, From = 8 });" - }, { "lang": "Dart", "source": "await client.getTask(1);" }, - { - "lang": "Dart", - "source": "await client.getTasks(params: TasksQuery(limit: 2, from: 10));" - }, - { - "lang": "Dart", - "source": "await client.getTasks(params: TasksQuery(limit: 2, from: 8));" - }, { "lang": "Go", "source": "client.GetTask(1);" }, - { - "lang": "Go", - "source": "client.GetTasks(&meilisearch.TasksQuery{\n Limit: 2,\n From: 10,\n});" - }, - { - "lang": "Go", - "source": "client.GetTasks(&meilisearch.TasksQuery{\n Limit: 2,\n From: 8,\n});" - }, { "lang": "JS", "source": "client.tasks.getTask(1)" }, - { - "lang": "JS", - "source": "client.tasks.getTasks({ limit: 2, from: 10 })" - }, - { - "lang": "JS", - "source": "client.tasks.getTasks({ limit: 2, from: 8 })" - }, { "lang": "Java", "source": "client.getTask(1);" }, - { - "lang": "Java", - "source": "TasksQuery query = new TasksQuery()\n .setLimit(2)\n .setFrom(10);\n\nclient.index(\"movies\").getTasks(query);" - }, - { - "lang": "Java", - "source": "TasksQuery query = new TasksQuery()\n .setLimit(2)\n .setFrom(8);\n\nclient.index(\"movies\").getTasks(query);" - }, { "lang": "PHP", "source": "$client->getTask(1);" }, - { - "lang": "PHP", - "source": "$taskQuery = (new TasksQuery())->setLimit(2)->setFrom(10));\n$client->getTasks($taskQuery);" - }, - { - "lang": "PHP", - "source": "$taskQuery = (new TasksQuery())->setLimit(2)->setFrom(8));\n$client->getTasks($taskQuery);" - }, { "lang": "Python", "source": "client.get_task(1)" }, - { - "lang": "Python", - "source": "client.get_tasks({\n 'limit': 2,\n 'from': 10\n})" - }, - { - "lang": "Python", - "source": "client.get_tasks({\n 'limit': 2,\n 'from': 8\n})" - }, { "lang": "Ruby", "source": "client.task(1)" }, { - "lang": "Ruby", - "source": "client.tasks(limit: 2, from: 10)" - }, - { - "lang": "Ruby", - "source": "client.tasks(limit: 2, from: 8)" - }, - { - "lang": "Rust", - "source": "let task: Task = client\n .get_task(1)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let mut query = TasksSearchQuery::new(&client)\n .with_limit(2)\n .with_from(10)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let mut query = TasksSearchQuery::new(&client)\n .with_limit(2)\n .from(8)\n .execute()\n .await\n .unwrap();" + "lang": "Rust", + "source": "let task: Task = client\n .get_task(1)\n .await\n .unwrap();" }, { "lang": "Swift", "source": "client.getTask(taskUid: 1) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" }, - { - "lang": "Swift", - "source": "client.getTasks(params: TasksQuery(limit: 2, from: 10)) { result in\n switch result {\n case .success(let taskResult):\n print(taskResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.getTasks(params: TasksQuery(limit: 2, from: 8)) { result in\n switch result {\n case .success(let taskResult):\n print(taskResult)\n case .failure(let error):\n print(error)\n }\n}" - }, { "lang": "cURL", "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks/1'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks?limit=2&from=10" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks?limit=2&from=8" } ] } @@ -14104,3896 +13899,44 @@ "source": "await client.GetVersionAsync();" }, { - "lang": "C#", - "source": "await client.Index(\"jackets\").UpdateDistinctAttributeAsync(\"product_id\");" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSearchableAttributesAsync(new[]\n{\n \"title\",\n \"overview\",\n \"genres\"\n});" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateDisplayedAttributesAsync(new[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" - }, - { - "lang": "C#", - "source": "SearchQuery filters = new SearchQuery() { Filter = \"release_date > \\\"795484800\\\"\" };\nvar movies = await client.Index(\"movie_ratings\").SearchAsync(\"Avengers\", filters);" - }, - { - "lang": "C#", - "source": "SearchQuery filters = new SearchQuery() { Filter = \"release_date > 795484800 AND (director =\n\\\"Tim Burton\\\" OR director = \\\"Christopher Nolan\\\")\" };\nvar movies = await client.Index(\"movie_ratings\").SearchAsync(\"Batman\", filters);" - }, - { - "lang": "C#", - "source": "SearchQuery filters = new SearchQuery() { Filter = \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\" };\nvar movies = await client.Index(\"movie_ratings\").SearchAsync(\"Planet of the Apes\", filters);" - }, - { - "lang": "C#", - "source": "var filters = new SearchQuery() { Filter = \"rating.users >= 90\" };\nvar movies = await client.Index(\"movie_ratings\").SearchAsync(\"thriller\", filters);" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").SearchAsync(\"shifu\");" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n Offset = 1\n};\nvar result = await client.Index(\"movies\").SearchAsync(\"shifu\", sq);\nif(result is SearchResult pagedResults)\n{\n}" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n Limit = 2\n};\nvar result = await client.Index(\"movies\").SearchAsync(\"shifu\", sq);\nif(result is SearchResult pagedResults)\n{\n}" - }, - { - "lang": "C#", - "source": "var result = await client.Index(\"movies\").SearchAsync(\"\", new SearchQuery { HitsPerPage = 15 });\nif(result is PaginatedSearchResult pagedResults)\n{\n}" - }, - { - "lang": "C#", - "source": "var result = await client.Index(\"movies\").SearchAsync(\"\", new SearchQuery { Page = 2 });\nif(result is PaginatedSearchResult pagedResults)\n{\n}" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n AttributesToRetrieve = new[] {\"overview\", \"title\"}\n};\nawait client.Index(\"movies\").SearchAsync(\"shifu\", sq);" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n AttributesToCrop = new[] {\"overview\"},\n CropLength = 5\n};\nawait client.Index(\"movies\").SearchAsync(\"shifu\", sq);" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n AttributesToCrop = new[] {\"overview\"},\n CropMarker = \"[...]\"\n};\nawait client.Index(\"movies\").SearchAsync(\"shifu\", sq);" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n AttributesToHighlight = new[] {\"overview\"}\n};\nawait client.Index(\"movies\").SearchAsync(\"winter feast\", sq);" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n AttributesToHighlight = new[] {\"overview\"},\n HighlightPreTag = \"\",\n HighlightPostTag = \"\"\n};\nawait client.Index(\"movies\").SearchAsync(\"winter feast\", sq);" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").SearchAsync(\n \"winter feast\",\n new SearchQuery\n {\n ShowMatchesPosition = True,\n });" - }, - { - "lang": "C#", - "source": "// Make sure to add this using to your code\nusing System.IO;\n\nvar jsonDocuments = await File.ReadAllTextAsync(\"movies.json\");\nawait client.Index(\"movies\").AddDocumentsJsonAsync(jsonDocuments);" - }, - { - "lang": "C#", - "source": "// In the command line:\n// dotnet add package Meilisearch\n\n// In your .cs file:\nusing System.IO;\nusing System.Text.Json;\nusing Meilisearch;\nusing System.Threading.Tasks;\nusing System.Collections.Generic;\n\nnamespace Meilisearch_demo\n{\n public class Movie\n {\n public string Id { get; set; }\n public string Title { get; set; }\n public string Poster { get; set; }\n public string Overview { get; set; }\n public IEnumerable Genres { get; set; }\n }\n\n internal class Program\n {\n static async Task Main(string[] args)\n {\n MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"aSampleMasterKey\");\n var options = new JsonSerializerOptions\n {\n PropertyNameCaseInsensitive = true\n };\n\n string jsonString = await File.ReadAllTextAsync(\"movies.json\");\n var movies = JsonSerializer.Deserialize>(jsonString, options);\n\n var index = client.Index(\"movies\");\n await index.AddDocumentsAsync(movies);\n }\n }\n}" - }, - { - "lang": "C#", - "source": "TaskInfo task = await client.GetTaskAsync(0);" - }, - { - "lang": "C#", - "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nvar index = client.Index(\"movies\");\n\nvar movies = await index.SearchAsync(\"botman\");\nforeach (var movie in movies.Hits)\n{\n Console.WriteLine(movie.Title);\n}" - }, - { - "lang": "C#", - "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nvar options = new JsonSerializerOptions\n{\n PropertyNameCaseInsensitive = true\n};\n\nstring jsonString = await File.ReadAllTextAsync(\"meteorites.json\");\nvar meteorites = JsonSerializer.Deserialize>(jsonString, options);\n\nvar index = client.Index(\"meteorites\");\nawait index.AddDocumentsAsync(meteorites);" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateRankingRulesAsync(new string[] {\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\"\n});" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateDisplayedAttributesAsync(new string[] {\n \"title\",\n \"overview\",\n \"poster\"\n});" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSearchableAttributesAsync(new string[] {\n \"title\"\n});" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateStopWordsAsync(new string[] {\n \"the\"\n});" - }, - { - "lang": "C#", - "source": "var newSynonyms = new Dictionary>\n{\n { \"winnie\", new string[] { \"piglet\" } },\n { \"piglet\", new string[] { \"winnie\" } },\n};\nawait client.Index(\"movies\").UpdateSynonymsAsync(newSynonyms);" - }, - { - "lang": "C#", - "source": "SearchQuery filter = new SearchQuery() { Filter = \"mass < 200\" };\nawait client.Index(\"meteorites\").SearchAsync(\"\", filter);" - }, - { - "lang": "C#", - "source": "SearchQuery filter = new SearchQuery() { Filter = \"_geoRadius(46.9480, 7.4474, 210000)\" };\nawait client.Index(\"meteorites\").SearchAsync(\"\", filter);" - }, - { - "lang": "C#", - "source": "SearchQuery sort = new SearchQuery() { Sort = new string[] { \"_geoPoint(48.8583701,2.2922926):asc\" }};\nawait client.Index(\"meteorites\").SearchAsync(\"\", sort);" - }, - { - "lang": "C#", - "source": "SearchQuery searchQuery = new SearchQuery() {\n Sort = new string[] { \"mass:asc\" },\n Filter = \"mass < 200\",\n};\nawait client.Index(\"meteorites\").SearchAsync(\"\", searchQuery);" - }, - { - "lang": "C#", - "source": "var newSettings = new Settings\n{\n FilterableAttributes = new string[] { \"mass\", \"_geo\" },\n SortableAttributes = new string[] { \"mass\", \"_geo\" },\n};\nawait client.Index(\"meteorites\").UpdateSettingsAsync(newSettings);" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n Filter = \"(genre = 'Horror' AND genre = 'Mystery') OR director = 'Jordan Peele'\"\n};\nawait client.Index(\"movies\").SearchAsync(\"thriller\", sq);" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").SearchAsync(\"\\\"african american\\\" horror\");" - }, - { - "lang": "C#", - "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nvar keys = await client.GetKeysAsync();" - }, - { - "lang": "C#", - "source": "await client.Index(\"books\").UpdateSortableAttributesAsync(new [] { \"price\", \"author\" });" - }, - { - "lang": "C#", - "source": "await client.Index(\"books\").UpdateRankingRulesAsync(new[]\n{\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\"\n});" - }, - { - "lang": "C#", - "source": "SearchQuery sort = new SearchQuery() { Sort = new string[] { \"rating.users:asc\" }};\nawait client.Index(\"books\").SearchAsync(\"science fiction\", sort);" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n Sort = new[] { \"price:asc\" },\n};\nawait client.Index(\"books\").SearchAsync(\"science fiction\", sq);" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n Sort = new[] { \"author:desc\" },\n};\nawait client.Index(\"books\").SearchAsync(\"butler\", sq);" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n Sort = new[] { \"price:asc\" },\n};\nawait client.Index(\"books\").SearchAsync(\"science fiction\", sq);" - }, - { - "lang": "C#", - "source": "List attributes = new() { \"_geo\" };\nTaskInfo result = await client.Index(\"movies\").UpdateFilterableAttributesAsync(attributes);" - }, - { - "lang": "C#", - "source": "SearchQuery filters = new SearchQuery() { Filter = \"_geoRadius(45.472735, 9.184019, 2000)\" };\nvar restaurants = await client.Index(\"restaurants\").SearchAsync(\"\", filters);" - }, - { - "lang": "C#", - "source": "SearchQuery filters = new SearchQuery()\n{\n Filter = new string[] { \"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\" }\n};\n\nvar restaurants = await client.Index(\"restaurants\").SearchAsync(\"restaurants\", filters);" - }, - { - "lang": "C#", - "source": "SearchQuery filters = new SearchQuery()\n{\n Filter = \"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\"\n};\nvar restaurants = await client.Index(\"restaurants\").SearchAsync(\"restaurants\", filters);" - }, - { - "lang": "C#", - "source": "List attributes = new() { \"_geo\" };\nTaskInfo result = await client.Index(\"restaurants\").UpdateSortableAttributesAsync(attributes);" - }, - { - "lang": "C#", - "source": "SearchQuery filters = new SearchQuery()\n{\n Sort = new string[] { \"_geoPoint(48.8561446,2.2978204):asc\" }\n};\n\nvar restaurants = await client.Index(\"restaurants\").SearchAsync(\"\", filters);" - }, - { - "lang": "C#", - "source": "SearchQuery filters = new SearchQuery()\n{\n Sort = new string[] {\n \"_geoPoint(48.8561446,2.2978204):asc\",\n \"rating:desc\"\n }\n};\n\nvar restaurants = await client.Index(\"restaurants\").SearchAsync(\"restaurants\", filters);" - }, - { - "lang": "C#", - "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"apiKey\");\nvar searchResult = await client.Index(\"patient_medical_records\").SearchAsync();" - }, - { - "lang": "C#", - "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nawait client.UpdateKeyAsync(\"74c9c733-3368-4738-bbe5-1d18a5fecb37\", description: \"Default Search API Key\");" - }, - { - "lang": "C#", - "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nKey keyOptions = new Key\n{\n Description = \"Search patient records key\",\n Actions = new string[] { \"search\" },\n Indexes = new string[] { \"patient_medical_records\" },\n ExpiresAt = DateTime.Parse(\"2023-01-01T00:00:00Z\")\n};\nKey createdKey = await this.client.CreateKeyAsync(keyOptions);" - }, - { - "lang": "C#", - "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nResourceResults keyResult = await client.GetKeysAsync();\nvar keys = keyResult.Result;" - }, - { - "lang": "C#", - "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nclient.DeleteKeyAsync(\"ac5cd97d-5a4b-4226-a868-2d0eb6d197ab\")" - }, - { - "lang": "C#", - "source": "TaskInfo task = await client.CreateIndexAsync(\"books\", \"reference_number\");" - }, - { - "lang": "C#", - "source": "await index.AddDocumentsAsync(\n new[] {\n new Book {\n ReferenceNumber = 287947,\n Title = \"Diary of a Wimpy Kid\",\n Author = \"Jeff Kinney\",\n Genres = new string[] { \"comedy\", \"humor\" },\n Price = 5.00\n }\n },\n \"reference_number\");" - }, - { - "lang": "C#", - "source": "TaskInfo task = await client.UpdateIndexAsync(\"books\", \"title\");" - }, - { - "lang": "C#", - "source": "var typoTolerance = new TypoTolerance {\n Enabled = false\n};\nawait client.Index(\"movies\").UpdateTypoToleranceAsync(typoTolerance);" - }, - { - "lang": "C#", - "source": "var typoTolerance = new TypoTolerance {\n DisableOnAttributes = new string[] { \"title\" }\n};\nawait client.Index(\"movies\").UpdateTypoToleranceAsync(typoTolerance);" - }, - { - "lang": "C#", - "source": "var typoTolerance = new TypoTolerance {\n DisableOnWords = new string[] { \"shrek\" }\n};\nawait client.Index(\"movies\").UpdateTypoToleranceAsync(typoTolerance);" - }, - { - "lang": "C#", - "source": "var typoTolerance = new TypoTolerance {\n MinWordSizeTypos = new TypoTolerance.TypoSize {\n OneTypo = 4,\n TwoTypos = 10\n }\n};\n\nawait client.Index(\"movies\").UpdateTypoToleranceAsync(typoTolerance);" - }, - { - "lang": "C#", - "source": "var typoTolerance = new TypoTolerance {\n MinWordSizeTypos = new TypoTolerance.TypoSize {\n OneTypo = 4\n }\n};\n\nawait client.Index(\"movies\").UpdateTypoToleranceAsync(typoTolerance);" - }, - { - "lang": "C#", - "source": "var synonyms = new Dictionary>\n{\n { \"great\", new string[] { \"fantastic\" } },\n { \"fantastic\", new string[] { \"great\" } }\n};\nawait client.Index(\"movies\").UpdateSynonymsAsync(synonyms);" - }, - { - "lang": "C#", - "source": "var faceting = new Faceting\n{\n MaxValuesPerFacet = 2,\n SortFacetValuesBy = new Dictionary\n {\n [\"*\"] = SortFacetValuesByType.Count\n }\n};\nawait client.Index(\"movies\").UpdateFacetingAsync(faceting);" - }, - { - "lang": "C#", - "source": "var pagination = new Pagination {\n MaxTotalHits = 500\n};\nawait client.Index(\"movies\").UpdatePaginationAsync(pagination);" - }, - { - "lang": "C#", - "source": "SearchQuery params = new SearchQuery() { MatchingStrategy = \"last\" };\nawait client.Index(\"movies\").SearchAsync(\"big fat liar\", params);" - }, - { - "lang": "C#", - "source": "SearchQuery params = new SearchQuery() { MatchingStrategy = \"all\" };\nawait client.Index(\"movies\").SearchAsync(\"big fat liar\", params);" - }, - { - "lang": "C#", - "source": "string jsonString = await File.ReadAllTextAsync(\"games.json\");\nvar games = JsonSerializer.Deserialize>(jsonString, options);\nvar index = client.Index(\"games\");\nawait index.AddDocumentsAsync(games);" - }, - { - "lang": "C#", - "source": "await client.Index(\"games\").UpdateFilterableAttributesAsync(new string[] { \"release_timestamp\" });" - }, - { - "lang": "C#", - "source": "var filters = new SearchQuery() { Filter = \"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\" };\nvar games = await client.Index(\"games\").SearchAsync(\"\", filters);" - }, - { - "lang": "C#", - "source": "await client.Index(\"games\").UpdateSortableAttributesAsync(new string[] { \"release_timestamp\" });" - }, - { - "lang": "C#", - "source": "SearchQuery sort = new SearchQuery() { Sort = new string[] { \"release_timestamp:desc\" }};\nawait client.Index(\"games\").SearchAsync(\"\", sort);" - }, - { - "lang": "C#", - "source": "await client.GetTasksAsync(new TasksQuery { Statuses = new List { TaskInfoStatus.Failed, TaskInfoStatus.Canceled } });" + "lang": "Dart", + "source": "await client.getVersion();" }, { - "lang": "C#", - "source": "var query = new TasksQuery { IndexUids = new List { \"movies\" }, Types = new List { TaskInfo.DocumentAdditionOrUpdate, TaskInfo.DocumentDeletion }, Statuses = new List { TaskInfoStatus.Processing } };\n\nawait client.GetTasksAsync(query);" + "lang": "Go", + "source": "client.GetVersion()" }, { - "lang": "C#", - "source": "List attributes = new() { \"genres\", \"rating\", \"language\" };\nTaskInfo result = await client.Index(\"movie_ratings\").UpdateFilterableAttributesAsync(attributes);" + "lang": "JS", + "source": "client.getVersion()" }, { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n Facets = new string[] { \"genres\", \"rating\", \"language\" }\n};\nawait client.Index(\"books\").SearchAsync(\"classic\", sq);" + "lang": "Java", + "source": "client.getVersion();" }, { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n Facets = new string[] { \"genres\", \"rating\" }\n};\nawait client.Index(\"movie_ratings\").SearchAsync(\"Batman\", sq);" + "lang": "PHP", + "source": "$client->version();" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateFilterableAttributesAsync(new [] { \"director\", \"genres\" });" - }, - { - "lang": "C#", - "source": "var newFaceting = new Faceting\n{\n SortFacetValuesBy = new Dictionary\n {\n [\"genres\"] = SortFacetValuesByType.Count\n }\n};\nawait client.Index(\"books\").UpdateFacetingAsync(newFaceting);" - }, - { - "lang": "C#", - "source": "var query = new SearchFacetsQuery()\n{\n FacetQuery = \"c\",\n ExhaustiveFacetCount: true\n};\nawait client.Index(\"books\").FacetSearchAsync(\"genres\", query);" - }, - { - "lang": "C#", - "source": "var params = new SearchQuery()\n{\n ShowRankingScore = true\n};\nawait client.Index(\"movies\").SearchAsync(\"dragon\", params);" - }, - { - "lang": "C#", - "source": "var params = new SearchQuery()\n{\n ShowRankingScoreDetails = true\n};\nawait client.Index(\"movies\").SearchAsync(\"dragon\", params);" - }, - { - "lang": "C#", - "source": "var searchQuery = new SearchQuery\n{\n AttributesToSearchOn = new[] { \"overview\" }\n};\nawait client.Index(\"movies\").SearchAsync(\"adventure\", searchQuery);" - }, - { - "lang": "C#", - "source": "var params = new SearchQuery()\n{\n Distinct = \"ATTRIBUTE_A\"\n};\nawait client.Index(\"INDEX_NAME\").SearchAsync(\"QUERY TERMS\", params);" - }, - { - "lang": "C#", - "source": "List attributes = new() { \"product_id\", \"sku\", \"url\" };\nTaskInfo result = await client.Index(\"products\").UpdateFilterableAttributesAsync(attributes);" - }, - { - "lang": "C#", - "source": "var params = new SearchQuery()\n{\n Distinct = \"sku\"\n};\nawait client.Index(\"products\").SearchAsync(\"white shirt\", params);" - }, - { - "lang": "Dart", - "source": "await client.getVersion();" - }, - { - "lang": "Dart", - "source": "await client.index('jackets').updateDistinctAttribute('product_id');" - }, - { - "lang": "Dart", - "source": "await client.index('movies').search('shifu');" - }, - { - "lang": "Dart", - "source": "await client.index('movies').search('shifu', SearchQuery(offset: 1));" - }, - { - "lang": "Dart", - "source": "await client.index('movies').search('shifu', SearchQuery(limit: 2));" - }, - { - "lang": "Dart", - "source": "await client.getTask(0);" - }, - { - "lang": "Dart", - "source": "await client.index('movies').search('botman');" - }, - { - "lang": "Dart", - "source": "await client.index('movies').updateStopWords(['the']);" - }, - { - "lang": "Dart", - "source": "await client.index('movies').search('\"african american\" horror');" - }, - { - "lang": "Dart", - "source": "var client = MeiliSearchClient('http://localhost:7700', 'masterKey');\nawait client.getKeys();" - }, - { - "lang": "Dart", - "source": "await client.index('books').updateSortableAttributes(['author', 'price']);" - }, - { - "lang": "Dart", - "source": "await client.index('restaurants').updateFilterableAttributes(['_geo']);" - }, - { - "lang": "Dart", - "source": "await client.index('restaurants').updateSortableAttributes(['_geo']);" - }, - { - "lang": "Dart", - "source": "var client = MeiliSearchClient('http://localhost:7700', 'apiKey');\nawait client.index('patient_medical_records').search('');" - }, - { - "lang": "Dart", - "source": "var client = MeiliSearchClient('http://localhost:7700', 'masterKey');\nawait client.createKey(\n description: 'Search patient records key',\n actions: ['search'],\n indexes: ['patient_medical_records'],\n expiresAt: DateTime(2023, 01, 01),\n);" - }, - { - "lang": "Dart", - "source": "var client = MeiliSearchClient('http://localhost:7700', 'masterKey');\nawait client.getKeys();" - }, - { - "lang": "Dart", - "source": "var client = MeiliSearchClient('http://localhost:7700', 'masterKey');\nawait client.deleteKey('ac5cd97d-5a4b-4226-a868-2d0eb6d197ab');" - }, - { - "lang": "Dart", - "source": "await client.createIndex('books', primaryKey: 'reference_number');" - }, - { - "lang": "Dart", - "source": "await client.index('movies').addDocuments([\n {\n 'reference_number': 287947,\n 'title': 'Diary of a Wimpy Kid',\n 'author': 'Jeff Kinney',\n 'genres': ['comedy', 'humor'],\n 'price': 5.00\n }\n], primaryKey: 'reference_number');" - }, - { - "lang": "Dart", - "source": "await client.updateIndex('books', 'title');" - }, - { - "lang": "Dart", - "source": "final toUpdate = TypoTolerance(enabled: false);\nawait client.index('movies').updateTypoTolerance(toUpdate);" - }, - { - "lang": "Dart", - "source": "final toUpdate = TypoTolerance(\n disableOnAttributes: ['title'],\n);\nawait client.index('movies').updateTypoTolerance(toUpdate);" - }, - { - "lang": "Dart", - "source": "final toUpdate = TypoTolerance(\n disableOnWords: ['shrek'],\n);\nawait client.index('movies').updateTypoTolerance(toUpdate);" - }, - { - "lang": "Dart", - "source": "final toUpdate = TypoTolerance(\n minWordSizeForTypos: MinWordSizeForTypos(\n oneTypo: 4,\n twoTypos: 10,\n ),\n);\nawait client.index('movies').updateTypoTolerance(toUpdate);" - }, - { - "lang": "Dart", - "source": "final toUpdate = TypoTolerance(\n minWordSizeForTypos: MinWordSizeForTypos(oneTypo: 4),\n);\nawait client.index('movies').updateTypoTolerance(toUpdate);" - }, - { - "lang": "Dart", - "source": "await client.index('movies').updateFilterableAttributes([\n 'director',\n 'genres',\n]);" - }, - { - "lang": "Go", - "source": "client.GetVersion()" - }, - { - "lang": "Go", - "source": "client.Index(\"jackets\").UpdateDistinctAttribute(\"product_id\")" - }, - { - "lang": "Go", - "source": "searchableAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n}\nclient.Index(\"movies\").UpdateSearchableAttributes(&searchableAttributes)" - }, - { - "lang": "Go", - "source": "displayedAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n}\nclient.Index(\"movies\").UpdateDisplayedAttributes(&displayedAttributes)" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movie_ratings\").Search(\"Avengers\", &meilisearch.SearchRequest{\n Filter: \"release_date > \\\"795484800\\\"\",\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movie_ratings\").Search(\"Batman\", &meilisearch.SearchRequest{\n Filter: \"release_date > 795484800 AND (director = \\\"Tim Burton\\\" OR director = \\\"Christopher Nolan\\\")\",\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movie_ratings\").Search(\"Planet of the Apes\", &meilisearch.SearchRequest{\n Filter: \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\",\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movie_ratings\").Search(\"thriller\", &meilisearch.SearchRequest{\n Filter: \"rating.users >= 90\",\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{\n Offset: 1,\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{\n Limit: 2,\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").Search(\"\", &meilisearch.SearchRequest{\n HitsPerPage: 15,\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").Search(\"\", &meilisearch.SearchRequest{\n Page: 2,\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{\n AttributesToRetrieve: []string{\"overview\", \"title\"},\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{\n AttributesToCrop: []string{\"overview\"},\n CropLength: 5,\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{\n AttributesToCrop: []string{\"overview\"},\n CropMarker: \"[…]\",\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"winter feast\", &meilisearch.SearchRequest{\n AttributesToHighlight: []string{\"overview\"},\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"winter feast\", &meilisearch.SearchRequest{\n AttributesToHighlight: []string{\"overview\"},\n HighlightPreTag: \"\",\n HighlightPostTag: \"\",\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"winter feast\", &meilisearch.SearchRequest{\n ShowMatchesPosition: true,\n})" - }, - { - "lang": "Go", - "source": "import (\n \"encoding/json\"\n \"os\"\n)\n\nfile, _ := os.ReadFile(\"movies.json\")\n\nvar movies interface{}\njson.Unmarshal([]byte(file), &movies)\n\nclient.Index(\"movies\").AddDocuments(&movies, nil)" - }, - { - "lang": "Go", - "source": "// In the command line:\n// go get -u github.com/meilisearch/meilisearch-go\n\n// In your .go file:\npackage main\n\nimport (\n \"os\"\n \"encoding/json\"\n \"io\"\n\n \"github.com/meilisearch/meilisearch-go\"\n)\n\nfunc main() {\n client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\n\n jsonFile, _ := os.Open(\"movies.json\")\n defer jsonFile.Close()\n\n byteValue, _ := io.ReadAll(jsonFile)\n var movies []map[string]interface{}\n json.Unmarshal(byteValue, &movies)\n\n _, err := client.Index(\"movies\").AddDocuments(movies, nil)\n if err != nil {\n panic(err)\n }\n}" - }, - { - "lang": "Go", - "source": "client.GetTask(0)" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").Search(\"botman\", &meilisearch.SearchRequest{})" - }, - { - "lang": "Go", - "source": "client := meilisearch.New(\"http://localhost:7700\")\n\njsonFile, _ := os.Open(\"meteorites.json\")\ndefer jsonFile.Close()\n\nbyteValue, _ := io.ReadAll(jsonFile)\nvar meteorites []map[string]interface{}\njson.Unmarshal(byteValue, &meteorites)\n\nclient.Index(\"meteorites\").AddDocuments(meteorites, nil)" - }, - { - "lang": "Go", - "source": "rankingRules := []string{\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\",\n}\nclient.Index(\"movies\").UpdateRankingRules(&rankingRules)" - }, - { - "lang": "Go", - "source": "displayedAttributes := []string{\n \"title\",\n \"overview\",\n \"poster\",\n}\nclient.Index(\"movies\").UpdateDisplayedAttributes(&displayedAttributes)" - }, - { - "lang": "Go", - "source": "searchableAttributes := []string{\n \"title\",\n}\nclient.Index(\"movies\").UpdateSearchableAttributes(&searchableAttributes)" - }, - { - "lang": "Go", - "source": "stopWords := []string{\"the\"}\nclient.Index(\"movies\").UpdateStopWords(&stopWords)" - }, - { - "lang": "Go", - "source": "synonyms := map[string][]string{\n \"winnie\": []string{\"piglet\"},\n \"piglet\": []string{\"winnie\"},\n}\nclient.Index(\"movies\").UpdateSynonyms(&synonyms)" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"meteorites\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"mass < 200\",\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"meteorites\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"_geoRadius(46.9480, 7.4474, 210000)\",\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"meteorites\").Search(\"\", &meilisearch.SearchRequest{\n Sort: []string{\n \"_geoPoint(48.8583701,2.2922926):asc\",\n },\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"meteorites\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"mass < 200\",\n Sort: []string{\n \"mass:asc\",\n },\n})" - }, - { - "lang": "Go", - "source": "settings := meilisearch.Settings{\n FilterableAttributes: []string{\n \"mass\",\n \"_geo\",\n },\n SortableAttributes: []string{\n \"mass\",\n \"_geo\",\n },\n}\nclient.Index(\"meteorites\").UpdateSettings(&settings)" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"thriller\", &meilisearch.SearchRequest{\n Filter: [][]string{\n []string{\"genres = Horror\", \"genres = Mystery\"},\n []string{\"director = \\\"Jordan Peele\\\"\"},\n },\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"\\\"african american\\\" horror\", &meilisearch.SearchRequest{})" - }, - { - "lang": "Go", - "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\nclient.GetKeys(nil);" - }, - { - "lang": "Go", - "source": "sortableAttributes := []string{\n \"author\",\n \"price\",\n}\nclient.Index(\"books\").UpdateSortableAttributes(&sortableAttributes)" - }, - { - "lang": "Go", - "source": "rankingRules := []string{\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\",\n}\nclient.Index(\"books\").UpdateRankingRules(&rankingRules)" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"books\").Search(\"science fiction\", &meilisearch.SearchRequest{\n Sort: []string{\n \"rating.users:asc\",\n },\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"books\").Search(\"science fiction\", &meilisearch.SearchRequest{\n Sort: []string{\n \"price:asc\",\n },\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"books\").Search(\"butler\", &meilisearch.SearchRequest{\n Sort: []string{\n \"author:desc\",\n },\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"books\").Search(\"science fiction\", &meilisearch.SearchRequest{\n Sort: []string{\n \"price:asc\",\n },\n})" - }, - { - "lang": "Go", - "source": "filterableAttributes := []interface{}{\n \"_geo\",\n}\nclient.Index(\"restaurants\").UpdateFilterableAttributes(&filterableAttributes)" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"restaurants\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"_geoRadius(45.472735, 9.184019, 2000)\",\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"restaurants\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\",\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"restaurants\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\",\n})" - }, - { - "lang": "Go", - "source": "sortableAttributes := []string{\n \"_geo\",\n}\nclient.Index(\"restaurants\").UpdateSortableAttributes(&sortableAttributes)" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"restaurants\").Search(\"\", &meilisearch.SearchRequest{\n Sort: []string{\n \"_geoPoint(48.8561446,2.2978204):asc\",\n },\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"restaurants\").Search(\"\", &meilisearch.SearchRequest{\n Sort: []string{\n \"_geoPoint(48.8561446,2.2978204):asc\",\n \"rating:desc\",\n },\n})" - }, - { - "lang": "Go", - "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\nclient.Index(\"patient_medical_records\").Search();" - }, - { - "lang": "Go", - "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\n\nclient.UpdateKey(\"74c9c733-3368-4738-bbe5-1d18a5fecb37\", &meilisearch.Key{\n Indexes: []string{\"doctors\"},\n})" - }, - { - "lang": "Go", - "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\n\nclient.CreateKey(&meilisearch.Key{\n Description: \"Search patient records key\",\n Actions: []string{\"search\"},\n Indexes: []string{\"patient_medical_records\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" - }, - { - "lang": "Go", - "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\nclient.GetKeys(nil);" - }, - { - "lang": "Go", - "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\nclient.DeleteKey(\"74c9c733-3368-4738-bbe5-1d18a5fecb37\");" - }, - { - "lang": "Go", - "source": "client.CreateIndex(&meilisearch.IndexConfig{\n Uid: \"books\",\n PrimaryKey: \"reference_number\",\n})" - }, - { - "lang": "Go", - "source": "documents := []map[string]interface{}{\n {\n \"reference_number\": 287947,\n \"title\": \"Diary of a Wimpy Kid\",\n \"author\": \"Jeff Kinney\",\n \"genres\": []string{\"comedy\", \"humor\"},\n \"price\": 5.00,\n },\n}\nrefrenceNumber := \"reference_number\"\nclient.Index(\"books\").AddDocuments(documents, &refrenceNumber)" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateIndex(&meilisearch.UpdateIndexRequestParams{\n PrimaryKey: \"title\",\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n Enabled: false,\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n DisableOnAttributes: []string{\"title\"},\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n DisableOnWords: []string{\"shrek\"},\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 4,\n TwoTypos: 10,\n },\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n DisableOnNumbers: true\n})" - }, - { - "lang": "Go", - "source": "client.index(\"movies\").UpdateTypoTolerance({\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 4,\n },\n})" - }, - { - "lang": "Go", - "source": "synonyms := map[string][]string{\n \"great\": []string{\"fantastic\"},\n \"fantastic\": []string{\"great\"},\n}\nclient.Index(\"movies\").UpdateSynonyms(&synonyms)" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateFaceting(&meilisearch.Faceting{\n MaxValuesPerFacet: 2,\n SortFacetValuesBy: {\n \"*\": SortFacetTypeCount,\n }\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdatePagination(&meilisearch.Pagination{\n MaxTotalHits: 500,\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"big fat liar\", &meilisearch.SearchRequest{\n MatchingStrategy: Last,\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"big fat liar\", &meilisearch.SearchRequest{\n MatchingStrategy: All,\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").Search(\"white shirt\", &meilisearch.SearchRequest{\n MatchingStrategy: Frequency,\n})" - }, - { - "lang": "Go", - "source": "jsonFile, _ := os.Open(\"games.json\")\ndefer jsonFile.Close()\n\nbyteValue, _ := io.ReadAll(jsonFile)\nvar games []map[string]interface{}\njson.Unmarshal(byteValue, &games)\n\nclient.Index(\"games\").AddDocuments(games, nil)" - }, - { - "lang": "Go", - "source": "filterableAttributes := []interface{}{\"release_timestamp\"}\nclient.Index(\"games\").UpdateFilterableAttributes(&filterableAttributes)" - }, - { - "lang": "Go", - "source": "client.Index(\"games\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\",\n})" - }, - { - "lang": "Go", - "source": "sortableAttributes := []string{\"release_timestamp\",\"author\"}\nclient.Index(\"games\").UpdateSortableAttributes(&sortableAttributes)" - }, - { - "lang": "Go", - "source": "client.Index(\"games\").Search(\"\", &meilisearch.SearchRequest{\n Sort: []string{\n \"release_timestamp:desc\",\n },\n})" - }, - { - "lang": "Go", - "source": "client.GetTasks(&meilisearch.TasksQuery{\n Statuses: []meilisearch.TaskStatus{\n meilisearch.TaskStatusFailed,\n meilisearch.TaskStatusCanceled,\n },\n})" - }, - { - "lang": "Go", - "source": "client.GetTasks(&meilisearch.TasksQuery{\n IndexUIDS: []string{\"movie\"},\n Types: []meilisearch.TaskType{\n meilisearch.TaskTypeDocumentAdditionOrUpdate,\n meilisearch.TaskTypeDocumentDeletion,\n },\n Statuses: []meilisearch.TaskStatus{\n meilisearch.TaskStatusProcessing,\n },\n})" - }, - { - "lang": "Go", - "source": "filterableAttributes := []interface{}{\n \"genres\",\n \"rating\",\n \"language\",\n}\nclient.Index(\"movie_ratings\").UpdateFilterableAttributes(&filterableAttributes)" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"books\").Search(\"classic\", &meilisearch.SearchRequest{\n Facets: []string{\n \"genres\",\n \"rating\",\n \"language\",\n },\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"movie_ratings\").Search(\"Batman\", &meilisearch.SearchRequest{\n Facets: []string{\n \"genres\",\n \"rating\",\n },\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").UpdateFilterableAttributes(&[]interface{}{\n \"director\",\n \"genres\",\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateFaceting(&meilisearch.Faceting{\n SortFacetValuesBy: {\n \"genres\": SortFacetTypeCount,\n }\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").FacetSearch(&meilisearch.FacetSearchRequest{\n FacetQuery: \"c\",\n FacetName: \"genres\",\n ExhaustiveFacetCount: true\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"dragon\", &meilisearch.SearchRequest{\n showRankingScore: true,\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"dragon\", &meilisearch.SearchRequest{\n showRankingScoreDetails: true,\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"adventure\", &meilisearch.SearchRequest{\n AttributesToSearchOn: []string{\"overview\"},\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"INDEX_NAME\").Search(\"QUERY TERMS\", &meilisearch.SearchRequest{\n Distinct: \"ATTRIBUTE_A\",\n})" - }, - { - "lang": "Go", - "source": "filterableAttributes := []interface{}{\n \"product_id\",\n \"sku\",\n \"url\",\n}\nclient.Index(\"products\").UpdateFilterableAttributes(&filterableAttributes)" - }, - { - "lang": "Go", - "source": "client.Index(\"products\").Search(\"white shirt\", &meilisearch.SearchRequest{\n Distinct: \"sku\",\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"INDEX_NAME\").Search(\"badman\", &meilisearch.SearchRequest{\n RankingScoreThreshold: 0.2,\n})" - }, - { - "lang": "Go", - "source": "client.index(\"INDEX_NAME\").Search(\"QUERY TEXT IN JAPANESE\", &meilisearch.SearchRequest{\n Locales: []string{\"jpn\"}\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"INDEX_NAME\").Search(\"\", &meilisearch.SearchRequest{\n Hybrid: &meilisearch.SearchRequestHybrid{\n Embedder: \"EMBEDDER_NAME\",\n },\n Media: map[string]any{\n \"FIELD_A\": \"VALUE_A\",\n \"FIELD_B\": map[string]any{\n \"FIELD_C\": \"VALUE_B\",\n \"FIELD_D\": \"VALUE_C\",\n },\n },\n});" - }, - { - "lang": "JS", - "source": "client.getVersion()" - }, - { - "lang": "JS", - "source": "client.index('jackets').updateDistinctAttribute('product_id')" - }, - { - "lang": "JS", - "source": "client.index('movies').updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres',\n ]\n)" - }, - { - "lang": "JS", - "source": "client.index('movies').updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date',\n ]\n)" - }, - { - "lang": "JS", - "source": "client.index('movie_ratings').search('Avengers', {\n filter: 'release_date > 795484800'\n})" - }, - { - "lang": "JS", - "source": "client.index('movie_ratings').search('Batman', {\n filter: 'release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")'\n})" - }, - { - "lang": "JS", - "source": "client.index('movie_ratings').search('Planet of the Apes', {\n filter: \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\"\n})" - }, - { - "lang": "JS", - "source": "client.index('movie_ratings').search('thriller', {\n filter: 'rating.users >= 90'\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('shifu')" - }, - { - "lang": "JS", - "source": "client.index('movies').search('shifu', {\n offset: 1\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('shifu', {\n limit: 2\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('', {\n hitsPerPage: 15\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('', {\n page: 2\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('shifu', {\n attributesToRetrieve: ['overview', 'title']\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('shifu', {\n attributesToCrop: ['overview'],\n cropLength: 5\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('shifu', {\n attributesToCrop: ['overview'],\n cropMarker: '[…]'\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('winter feast', {\n attributesToHighlight: ['overview']\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('winter feast', {\n attributesToHighlight: ['overview'],\n highlightPreTag: '',\n highlightPostTag: ''\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('winter feast', {\n showMatchesPosition: true\n})" - }, - { - "lang": "JS", - "source": "const movies = require('./movies.json')\nclient.index('movies').addDocuments(movies).then((res) => console.log(res))" - }, - { - "lang": "JS", - "source": "// With npm:\n// npm install meilisearch\n\n// Or with yarn:\n// yarn add meilisearch\n\n// In your .js file:\n// With the `require` syntax:\nconst { MeiliSearch } = require('meilisearch')\nconst movies = require('./movies.json')\n// With the `import` syntax:\nimport { MeiliSearch } from 'meilisearch'\nimport movies from './movies.json'\n\nconst client = new MeiliSearch({\n host: 'http://localhost:7700',\n apiKey: 'aSampleMasterKey'\n})\nclient.index('movies').addDocuments(movies)\n .then((res) => console.log(res))" - }, - { - "lang": "JS", - "source": "client.tasks.getTask(0)" - }, - { - "lang": "JS", - "source": "client.index('movies').search('botman').then((res) => console.log(res))" - }, - { - "lang": "JS", - "source": "const meteorites = require('./meteorites.json')\n\nclient.index('meteorites').addDocuments(meteorites)" - }, - { - "lang": "JS", - "source": "client.index('movies').updateRankingRules([\n 'exactness',\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'release_date:asc',\n 'rank:desc'\n])" - }, - { - "lang": "JS", - "source": "client.index('movies').updateDisplayedAttributes([\n 'title',\n 'overview',\n 'poster'\n])" - }, - { - "lang": "JS", - "source": "client.index('movies').updateSearchableAttributes([\n 'title'\n])" - }, - { - "lang": "JS", - "source": "client.index('movies').updateStopWords(['the'])" - }, - { - "lang": "JS", - "source": "client.index('movies').updateSynonyms({\n winnie: ['piglet'],\n piglet: ['winnie']\n})" - }, - { - "lang": "JS", - "source": "client.index('meteorites').search('', { filter: 'mass < 200' })" - }, - { - "lang": "JS", - "source": "client.index('meteorites').search('', { filter: '_geoRadius(46.9480, 7.4474, 210000)' })" - }, - { - "lang": "JS", - "source": "client.index('meteorites').search('', { sort: ['_geoPoint(48.8583701, 2.2922926):asc'] })" - }, - { - "lang": "JS", - "source": "client.index('meteorites').search('', {\n sort: ['mass:asc'],\n filter: 'mass < 200'\n})" - }, - { - "lang": "JS", - "source": "client.index('meteorites').updateSettings({\n filterableAttributes: ['mass', '_geo'],\n sortableAttributes: ['mass', '_geo']\n})" - }, - { - "lang": "JS", - "source": "client.index('movies')\n .search('thriller', {\n filter: [['genres = Horror', 'genres = Mystery'], 'director = \"Jordan Peele\"']\n })" - }, - { - "lang": "JS", - "source": "client.index('movies')\n .search('\"african american\" horror')" - }, - { - "lang": "JS", - "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'masterKey' })\nclient.getKeys()" - }, - { - "lang": "JS", - "source": "client.index('books').updateSortableAttributes([\n 'author',\n 'price'\n ])" - }, - { - "lang": "JS", - "source": "client.index('books').updateRankingRules([\n 'words',\n 'sort',\n 'typo',\n 'proximity',\n 'attribute',\n 'exactness'\n])" - }, - { - "lang": "JS", - "source": "client.index('books').search('science fiction', {\n 'sort': ['rating.users:asc'],\n})" - }, - { - "lang": "JS", - "source": "client.index('books').search('science fiction', {\n sort: ['price:asc'],\n})" - }, - { - "lang": "JS", - "source": "client.index('books').search('butler', {\n sort: ['author:desc'],\n})" - }, - { - "lang": "JS", - "source": "client.index('books').search('science fiction', {\n sort: ['price:asc'],\n})" - }, - { - "lang": "JS", - "source": "client.index('restaurants')\n.updateFilterableAttributes([\n '_geo'\n])" - }, - { - "lang": "JS", - "source": "client.index('restaurants').search('', {\n filter: ['_geoRadius(45.472735, 9.184019, 2000)'],\n})" - }, - { - "lang": "JS", - "source": "client.index('restaurants').search('', {\n filter: ['_geoRadius(45.472735, 9.184019, 2000) AND type = pizza'],\n})" - }, - { - "lang": "JS", - "source": "client.index('restaurants').search('', {\n filter: ['_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])'],\n})" - }, - { - "lang": "JS", - "source": "client.index('restaurants').updateSortableAttributes([\n '_geo'\n])" - }, - { - "lang": "JS", - "source": "client.index('restaurants').search('', {\n sort: ['_geoPoint(48.8561446, 2.2978204):asc'],\n})" - }, - { - "lang": "JS", - "source": "client.index('restaurants').search('', {\n sort: ['_geoPoint(48.8561446, 2.2978204):asc', 'rating:desc'],\n})" - }, - { - "lang": "JS", - "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'apiKey' })\nclient.index('patient_medical_records').search()" - }, - { - "lang": "JS", - "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'masterKey' })\nclient.updateKey('74c9c733-3368-4738-bbe5-1d18a5fecb37', {\n description: 'Default Search API Key'\n})" - }, - { - "lang": "JS", - "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'masterKey' })\nclient.createKey({\n description: 'Search patient records key',\n actions: ['search'],\n indexes: ['patient_medical_records'],\n expiresAt: '2023-01-01T00:00:00Z'\n})" - }, - { - "lang": "JS", - "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'masterKey' })\nclient.getKeys()" - }, - { - "lang": "JS", - "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'masterKey' })\nclient.deleteKey('ac5cd97d-5a4b-4226-a868-2d0eb6d197ab')" - }, - { - "lang": "JS", - "source": "client.createIndex('books', { primaryKey: 'reference_number' })" - }, - { - "lang": "JS", - "source": "client.index('books').addDocuments([\n {\n reference_number: 287947,\n title: 'Diary of a Wimpy Kid',\n author: 'Jeff Kinney',\n genres: ['comedy','humor'],\n price: 5.00\n }\n], { primaryKey: 'reference_number' })" - }, - { - "lang": "JS", - "source": "client.updateIndex('books', {\n primaryKey: 'title'\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').updateTypoTolerance({\n enabled: false\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').updateTypoTolerance({\n disableOnAttributes: ['title']\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').updateTypoTolerance({\n disableOnWords: ['shrek']\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').updateTypoTolerance({\n minWordSizeForTypos: {\n oneTypo: 4,\n twoTypos: 10\n }\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').updateTypoTolerance({\n disableOnNumbers: true\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').updateTypoTolerance({\n minWordSizeForTypos: {\n oneTypo: 4\n }\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').updateSynonyms({\n 'great': ['fantastic'],\n 'fantastic': ['great']\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').updateFaceting({\n maxValuesPerFacet: 2,\n sortFacetValuesBy: {\n '*': 'count'\n }\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').updatePagination({ maxTotalHits: 500 })" - }, - { - "lang": "JS", - "source": "client.index('movies').search('big fat liar', {\n matchingStrategy: 'last'\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('big fat liar', {\n matchingStrategy: 'all'\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('white shirt', {\n matchingStrategy: 'frequency'\n})" - }, - { - "lang": "JS", - "source": "const games = require('./games.json')\nclient.index('games').addDocuments(games).then((res) => console.log(res))" - }, - { - "lang": "JS", - "source": "client.index('games').updateFilterableAttributes(['release_timestamp'])" - }, - { - "lang": "JS", - "source": "client.index('games').search('', {\n filter: 'release_timestamp >= 1514761200 AND release_timestamp < 1672527600'\n})" - }, - { - "lang": "JS", - "source": "client.index('games').updateSortableAttributes(['release_timestamp'])" - }, - { - "lang": "JS", - "source": "client.index('games').search('', {\n sort: ['release_timestamp:desc'],\n})" - }, - { - "lang": "JS", - "source": "client.tasks.getTasks({ statuses: ['failed', 'canceled'] })" - }, - { - "lang": "JS", - "source": "client.tasks.getTasks({\n indexUids: ['movies'],\n types: ['documentAdditionOrUpdate','documentDeletion'],\n statuses: ['processing']\n})" - }, - { - "lang": "JS", - "source": "client.multiSearch({\n federation: {},\n queries: [\n {\n indexUid: 'movies',\n q: 'batman',\n },\n {\n indexUid: 'comics',\n q: 'batman',\n },\n ]\n})" - }, - { - "lang": "JS", - "source": "client.index('movie_ratings').updateFilterableAttributes(['genres', 'rating', 'language'])" - }, - { - "lang": "JS", - "source": "client.index('books').search('classic', { facets: ['genres', 'rating', 'language'] })" - }, - { - "lang": "JS", - "source": "client.index('movie_ratings').search('Batman', { facets: ['genres', 'rating'] })" - }, - { - "lang": "JS", - "source": "client.index('movies')\n .updateFilterableAttributes([\n 'director',\n 'genres'\n ])" - }, - { - "lang": "JS", - "source": "client.index('books').updateFaceting({\n sortFacetValuesBy: {\n genres: 'count'\n }\n})" - }, - { - "lang": "JS", - "source": "client.index('books').searchForFacetValues({\n facetQuery: 'c',\n facetName: 'genres'\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('dragon', {\n showRankingScore: true\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('dragon', { showRankingScoreDetails: true })" - }, - { - "lang": "JS", - "source": "client.index('movies').search('adventure', {\n attributesToSearchOn: ['overview']\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('-escape')" - }, - { - "lang": "JS", - "source": "client.index('movies').search('-\"escape\"')" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').search('QUERY TERMS', { distinct: 'ATTRIBUTE_A' })" - }, - { - "lang": "JS", - "source": "client.index('products').updateFilterableAttributes(['product_id', 'sku', 'url'])" - }, - { - "lang": "JS", - "source": "client.index('products').search('white shirt', { distinct: 'sku' })" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').search('badman', { rankingScoreThreshold: 0.2 })" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').search('QUERY TEXT IN JAPANESE', { locales: ['jpn'] })" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').search('kitchen utensils', {\n hybrid: {\n semanticRatio: 0.9,\n embedder: 'EMBEDDER_NAME'\n }\n})" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').search('kitchen utensils', {\n retrieveVectors: true,\n hybrid: {\n embedder: 'EMBEDDER_NAME'\n }\n})" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').search('a futuristic movie', {\n hybrid: {\n embedder: 'EMBEDDER_NAME'\n },\n media: {\n textAndPoster: {\n text: 'a futuristic movie',\n image: {\n mime: 'image/jpeg',\n data: 'base64EncodedImageData'\n }\n }\n }\n})" - }, - { - "lang": "Java", - "source": "client.getVersion();" - }, - { - "lang": "Java", - "source": "client.index(\"jackets\").updateDistinctAttributeSettings(\"product_id\");" - }, - { - "lang": "Java", - "source": "String[] attributes = {\"title\", \"overview\", \"genres\"}\nclient.index(\"movies\").updateSearchableAttributesSettings(attributes);" - }, - { - "lang": "Java", - "source": "String[] attributes = {\"title\", \"overview\", \"genres\", \"release_date\"}\nclient.index(\"movies\").updateDisplayedAttributesSettings(attributes);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"Avengers\").filter(new String[] {\"release_date > \\\"795484800\\\"\"}).build();\nclient.index(\"movie_ratings\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"Batman\").filter(new String[] {\"release_date > 795484800 AND (director = \\\"Tim Burton\\\" OR director = \\\"Christopher Nolan\\\")\"}).build();\nclient.index(\"movie_ratings\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"Planet of the Apes\").filter(new String[] {\"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\"}).build();\nclient.index(\"movie_ratings\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"thriller\").filter(new String[] {\"rating.users >= 90\"}).build();\nclient.index(\"movie_ratings\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").search(\"shifu\");" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"shifu\").offset(1).build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"shifu\").limit(2).build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").hitsPerPage(15).build();\nSearchResultPaginated searchResult = client.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").page(15).build();\nSearchResultPaginated searchResult = client.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"a\").attributesToRetrieve(new String[] {\"overview\", \"title\"}).build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest =\n SearchRequest.builder()\n .q(\"shifu\")\n .attributesToCrop(new String[] {\"overview\"})\n .cropLength(5)\n .build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest =\n SearchRequest.builder()\n .q(\"shifu\")\n .attributesToCrop(new String[] {\"overview\"})\n .cropMarker(\"[…]\")\n .build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest =\n new SearchRequest(\"winter feast\").setAttributesToHighlight(new String[] {\"overview\"});\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest =\n SearchRequest.builder()\n .q(\"winter feast\")\n .attributesToHighlight(new String[] {\"overview\"})\n .highlightPreTag(\"\")\n .highlightPostTag(\"\")\n .build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"winter feast\").showMatchesPosition(true).build();\nSearchResultPaginated searchResult = client.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "import com.meilisearch.sdk;\nimport org.json.JSONArray;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\nPath fileName = Path.of(\"movies.json\");\nString moviesJson = Files.readString(fileName);\nClient client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\nIndex index = client.index(\"movies\");\nindex.addDocuments(moviesJson);" - }, - { - "lang": "Java", - "source": "// For Maven:\n// Add the following code to the `` section of your project:\n//\n// \n// com.meilisearch.sdk\n// meilisearch-java\n// 0.17.1\n// pom\n// \n\n// For Gradle\n// Add the following line to the `dependencies` section of your `build.gradle`:\n//\n// implementation 'com.meilisearch.sdk:meilisearch-java:0.17.1'\n\n// In your .java file:\nimport com.meilisearch.sdk;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\nPath fileName = Path.of(\"movies.json\");\nString moviesJson = Files.readString(fileName);\nClient client = new Client(new Config(\"http://localhost:7700\", \"aSampleMasterKey\"));\nIndex index = client.index(\"movies\");\nindex.addDocuments(moviesJson);" - }, - { - "lang": "Java", - "source": "client.getTask(0);" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").search(\"botman\");" - }, - { - "lang": "Java", - "source": "import com.meilisearch.sdk;\nimport org.json.JSONArray;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\nPath fileName = Path.of(\"meteorites.json\");\nString meteoritesJson = Files.readString(fileName);\nClient client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\n\nclient.index(\"meteorites\").addDocuments(meteoritesJson);" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setRankingRules(new String[]\n{\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\"\n});\nclient.index(\"movies\").updateSettings(settings);" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setDisplayedAttributes(new String[]\n{\n \"title\",\n \"overview\",\n \"poster\"\n});\nclient.index(\"movies\").updateSettings(settings);" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setSearchableAttributes(new String[]\n{\n \"title\"\n});" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setStopWords(new String[]\n{\n \"the\"\n});\nclient.index(\"movies\").updateSettings(settings);" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nHashMap synonyms = new HashMap();\nsynonyms.put(\"winnie\", new String[] {\"piglet\"});\nsynonyms.put(\"piglet\", new String[] {\"winnie\"});\nsettings.setSynonyms(synonyms);\nclient.index(\"movies\").updateSettings(settings);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"mass < 200\"}).build();\nclient.index(\"meteorites\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"_geoRadius(46.9480, 7.4474, 210000)\"}).build();\nclient.index(\"meteorites\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").sort(new String[] {\"_geoPoint(48.8583701,2.2922926):asc\"}).build();\nclient.index(\"meteorites\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"mass < 200\"}).sort(new String[] {\"mass:asc\"}).build();\nclient.index(\"meteorites\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setFilterableAttributes(new String[] {\"mass\", \"_geo\"});\nsettings.setSortableAttributes(new String[] {\"mass\", \"_geo\"});\nclient.index(\"meteorites\").updateSettings(settings);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest =\n SearchRequest.builder().q(\"thriller\").filterArray(new String[][] {\n new String[] {\"genres = Horror\", \"genres = Mystery\"},\n new String[] {\"director = \\\"Jordan Peele\\\"\"}}).build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").search(\"\\\"african american\\\" horror\");" - }, - { - "lang": "Java", - "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\nclient.getKeys();" - }, - { - "lang": "Java", - "source": "client.index(\"books\").updateSortableAttributesSettings(new String[] {\"price\", \"author\"});" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setRankingRules(new String[]\n{\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\"\n});\nclient.index(\"books\").updateSettings(settings);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"science fiction\").sort(new String[] {\"rating.users:asc\"}).build();\nclient.index(\"books\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"science fiction\").sort(new String[] {\"price:asc\"}).build();\nclient.index(\"books\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"butler\").sort(new String[] {\"author:desc\"}).build();\nclient.index(\"books\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"science fiction\").sort(new String[] {\"price:asc\"}).build();\nclient.index(\"search_parameter_guide_sort_1\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setFilterableAttributes(new String[] {\"_geo\"});\nclient.index(\"restaurants\").updateSettings(settings);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"_geoRadius(45.472735, 9.184019, 2000)\"}).build();\nclient.index(\"restaurants\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\"}).build();\nclient.index(\"restaurants\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q()(\"\").filter(new String[] {\n \"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\"\n }).build();\nclient.index(\"restaurants\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "client.index(\"restaurants\").updateSortableAttributesSettings(new String[] {\"_geo\"});" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").sort(new String[] {\"_geoPoint(48.8561446,2.2978204):asc\"}).build();\nclient.index(\"restaurants\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q()(\"\").sort(new String[] {\n \"_geoPoint(48.8561446,2.2978204):asc\",\n \"rating:desc\",\n }).build();\nclient.index(\"restaurants\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"apiKey\"));\nclient.index(\"patient_medical_records\").search();" - }, - { - "lang": "Java", - "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\nclient.updateKey(\"74c9c733-3368-4738-bbe5-1d18a5fecb37\", new KeyUpdate().setDescription(\"Default Search API Key\"));" - }, - { - "lang": "Java", - "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\n\nSimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\nDate dateParsed = format.parse(\"2023-01-01T00:00:00Z\");\n\nKey keyInfo = new Key();\n\nkeyInfo.setDescription(\"Search patient records key\");\nkeyInfo.setActions(new String[] {\"search\"});\nkeyInfo.setIndexes(new String[] {\"patient_medical_records\"});\nkeyInfo.setExpiresAt(dateParsed);\n\nclient.createKey(keyInfo);" - }, - { - "lang": "Java", - "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\nclient.getKeys();" - }, - { - "lang": "Java", - "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\nclient.deleteKey(\"c5cd97d-5a4b-4226-a868-2d0eb6d197ab\");" - }, - { - "lang": "Java", - "source": "client.createIndex(\"books\", \"reference_number\");" - }, - { - "lang": "Java", - "source": "client.index(\"books\").addDocuments(\"[{\"\n + \"\\\"reference_number\\\": 2879,\"\n + \"\\\"title\\\": \\\"Diary of a Wimpy Kid\\\",\"\n + \"\\\"author\\\": \\\"Jeff Kinney\\\",\"\n + \"\\\"genres\\\": [\\\"comedy\\\", \\\"humor\\\"],\"\n + \"\\\"price\\\": 5.00\"\n + \"}]\"\n, \"reference_number\");" - }, - { - "lang": "Java", - "source": "client.updateIndex(\"books\", \"title\");" - }, - { - "lang": "Java", - "source": "TypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setEnabled(false);\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" - }, - { - "lang": "Java", - "source": "TypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setDisableOnAttributes(new String[] {\"title\"});\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" - }, - { - "lang": "Java", - "source": "TypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setDisableOnWords(new String[] {\"shrek\"});\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" - }, - { - "lang": "Java", - "source": "TypoTolerance typoTolerance = new TypoTolerance();\n HashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 4);\n put(\"twoTypos\", 10);\n }\n };\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" - }, - { - "lang": "Java", - "source": "TypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setDisableOnNumbers(true);\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" - }, - { - "lang": "Java", - "source": "HashMap minWordSizeTypos =\nnew HashMap() {\n {\n put(\"oneTypo\", 4);\n }\n};\n\nTypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\n\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" - }, - { - "lang": "Java", - "source": "HashMap synonyms = new HashMap();\nsynonyms.put(\"great\", new String[] {\"fantastic\"});\nsynonyms.put(\"fantastic\", new String[] {\"great\"});\n\nclient.index(\"movies\").updateSynonymsSettings(synonyms);" - }, - { - "lang": "Java", - "source": "Faceting newFaceting = new Faceting();\nnewFaceting.setMaxValuesPerFacet(2);\nHashMap facetSortValues = new HashMap<>();\nfacetSortValues.put(\"*\", FacetSortValue.COUNT);\nnewFaceting.setSortFacetValuesBy(facetSortValues);\nclient.index(\"movies\").updateFacetingSettings(newFaceting);" - }, - { - "lang": "Java", - "source": "Pagination newPagination = new Pagination();\nnewPagination.setMaxTotalHits(500);\nclient.index(\"movies\").updatePaginationSettings(newPagination);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"big fat liar\").matchingStrategy(MatchingStrategy.LAST).build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"big fat liar\").matchingStrategy(MatchingStrategy.ALL).build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"white shirt\").matchingStrategy(MatchingStrategy.FREQUENCY).build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "import com.meilisearch.sdk;\nimport org.json.JSONArray;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\nPath fileName = Path.of(\"games.json\");\nString gamesJson = Files.readString(fileName);\nIndex index = client.index(\"games\");\nindex.addDocuments(gamesJson);" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateFilterableAttributesSettings(new String[] { \"release_timestamp\" });" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\"}).build();\nclient.index(\"games\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setSortableAttributes(new String[] {\"release_timestamp\"});\nclient.index(\"games\").updateSettings(settings);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").sort(new String[] {\"release_timestamp:desc\"}).build();\nclient.index(\"games\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "TasksQuery query = new TasksQuery().setStatuses(new String[] {\"failed\", \"canceled\"});\nclient.getTasks(query);" - }, - { - "lang": "Java", - "source": "TasksQuery query =\n new TasksQuery()\n .setStatuses(new String[] {\"processing\"})\n .setTypes(new String[] {\"documentAdditionOrUpdate\", \"documentDeletion\"})\n .setIndexUids(new String[] {\"movies\"});\n\nclient.getTasks(query);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"classic\").facets(new String[]\n{\n \"genres\",\n \"rating\",\n \"language\"\n}).build();\nclient.index(\"books\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"Batman\").facets(new String[]\n{\n \"genres\",\n \"rating\"\n}).build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateFilterableAttributesSettings(new String[]\n{\n \"genres\",\n \"director\"\n});" - }, - { - "lang": "Java", - "source": "Faceting newFaceting = new Faceting();\nHashMap facetSortValues = new HashMap<>();\nfacetSortValues.put(\"genres\", FacetSortValue.COUNT);\nnewFaceting.setSortFacetValuesBy(facetSortValues);\nclient.index(\"books\").updateFacetingSettings(newFaceting);" - }, - { - "lang": "Java", - "source": "FacetSearchRequest fsr = FacetSearchRequest.builder().facetName(\"genres\").facetQuery(\"c\").build();\nclient.index(\"books\").facetSearch(fsr);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"dragon\").showRankingScore(true).build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"dragon\").showRankingScoreDetails(true).build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"adventure\").attributesToSearchOn(new String[] {\"overview\"});\nclient.index(\"movies\").searchRequest(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"QUERY TERMS\").distinct(\"ATTRIBUTE_A\").build();\nclient.index(\"INDEX_NAME\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setFilterableAttributes(new String[] {\"product_id\", \"SKU\", \"url\"});\nclient.index(\"products\").updateSettings(settings);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"white shirt\").distinct(\"sku\").build();\nclient.index(\"products\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"badman\").rankingScoreThreshold(0.2).build();\nclient.index(\"INDEX_NAME\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"QUERY TEXT IN JAPANESE\").locales(new String[]{\"jpn\"}).build();\nclient.index(\"INDEX_NAME\").search(searchRequest);" - }, - { - "lang": "PHP", - "source": "$client->version();" - }, - { - "lang": "PHP", - "source": "$client->index('jackets')->updateDistinctAttribute('product_id');" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movie_ratings')->search('Avengers', [\n 'filter' => 'release_date > 795484800'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movie_ratings')->search('Batman', [\n 'filter' => 'release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movie_ratings')->search('Planet of the Apes', [\n 'filter' => 'release_date > 1577884550 AND (NOT director = \"Tim Burton\")'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movie_ratings')->search('thriller', [\n 'filter' => 'rating.users >= 90'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('shifu');" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('shifu', ['offset' => 1]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('shifu', ['limit' => 2]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('', ['hitsPerPage' => 15]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('', ['page' => 2]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('shifu', [\n 'attributesToRetrieve' => ['overview', 'title']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('shifu', [\n 'attributesToCrop' => ['overview'],\n 'cropLength' => 5\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('shifu', [\n 'attributesToCrop' => ['overview'],\n 'cropMarker' => '[…]'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('winter feast', [\n 'attributesToHighlight' => ['overview']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('winter feast', [\n 'attributesToHighlight' => ['overview'],\n 'highlightPreTag' => '',\n 'highlightPostTag' => ''\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('winter feast', [\n 'attributesToHighlight' => ['overview'],\n 'showMatchesPosition' => true\n]);" - }, - { - "lang": "PHP", - "source": "$moviesJson = file_get_contents('movies.json');\n$movies = json_decode($moviesJson);\n\n$client->index('movies')->addDocuments($movies);" - }, - { - "lang": "PHP", - "source": "/**\n * Using `meilisearch-php` with the Guzzle HTTP client, in the command line:\n * composer require meilisearch/meilisearch-php \\\n * guzzlehttp/guzzle \\\n * http-interop/http-factory-guzzle:^1.0\n */\n\n/**\n * In your PHP file:\n */\nindex('movies')->addDocuments($movies);" - }, - { - "lang": "PHP", - "source": "$client->getTask(0);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('botman');" - }, - { - "lang": "PHP", - "source": "$client = new Client('http://localhost:7700');\n\n$meteorites_json = file_get_contents('meteorites.json');\n$meteorites = json_decode($meteorites_json);\n\n$client->index('meteorites')->addDocuments($meteorites);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateRankingRules([\n 'exactness',\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'release_date:asc',\n 'rank:desc'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateDisplayedAttributes([\n 'title',\n 'overview',\n 'poster'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateSearchableAttributes(['title']);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateStopWords(['the']);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateSynonyms([\n 'winnie' => ['piglet'],\n 'piglet' => ['winnie']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('meteorites')->search('', [\n 'filter' => 'mass < 200'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('meteorites')->search('', [\n 'filter' => '_geoRadius(46.9480, 7.4474, 210000)'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('meteorites')->search('', [\n 'sort' => ['_geoPoint(48.8583701,2.2922926):asc']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('meteorites')->search('', [\n 'filter' => 'mass < 200',\n 'sort' => ['mass:asc']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('meteorites')->updateSettings([\n 'filterableAttributes' => [\n 'mass',\n '_geo'\n ],\n 'sortableAttributes' => [\n 'mass',\n '_geo'\n ]\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('thriller', [\n 'filter' => [['genres = Horror', 'genres = Mystery'], 'director = \"Jordan Peele\"']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('\"african american\" horror');" - }, - { - "lang": "PHP", - "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->getKeys();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateSortableAttributes([\n 'author',\n 'price'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateRankingRules([\n 'words',\n 'sort',\n 'typo',\n 'proximity',\n 'attribute',\n 'exactness'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->search('science fiction', ['sort' => ['rating.users:asc']]);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->search('science fiction', ['sort' => ['price:asc']]);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->search('butler', ['sort' => ['author:desc']]);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->search('science fiction', ['sort' => ['price:asc']]);" - }, - { - "lang": "PHP", - "source": "$client->index('restaurants')->updateFilterableAttributes([\n '_geo'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('restaurants')->search('', [\n 'filter' => '_geoRadius(45.472735, 9.184019, 2000)'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('restaurants')->search('', [\n 'filter' => '_geoRadius(45.472735, 9.184019, 2000) AND type = pizza'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('restaurants')->search('', [\n 'filter' => '_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('restaurants')->updateSortableAttributes([\n '_geo'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('restaurants')->search('', [\n 'sort' => ['_geoPoint(48.8561446,2.2978204):asc']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('restaurants')->search('', [\n 'sort' => ['_geoPoint(48.8561446,2.2978204):asc', 'rating:desc']\n]);" - }, - { - "lang": "PHP", - "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->index('patient_medical_records')->search();" - }, - { - "lang": "PHP", - "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->updateKey('74c9c733-3368-4738-bbe5-1d18a5fecb37',\n ['description' => 'Default Search API Key']\n);" - }, - { - "lang": "PHP", - "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->createKey([\n 'description' => 'Search patient records key',\n 'actions' => ['search'],\n 'indexes' => ['patient_medical_records'],\n 'expiresAt' => '2023-01-01T00:00:00Z',\n]);" - }, - { - "lang": "PHP", - "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->getKeys();" - }, - { - "lang": "PHP", - "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->deleteKey('ac5cd97d-5a4b-4226-a868-2d0eb6d197ab');" - }, - { - "lang": "PHP", - "source": "$client->createIndex('books', ['primaryKey' => 'reference_number']);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->addDocuments([\n [\n 'reference_number' => 287947,\n 'title' => 'Diary of a Wimpy Kid',\n 'author' => 'Jeff Kinney',\n 'genres' => ['comedy', 'humor'],\n 'price' => 5.00\n ]\n], 'reference_number');" - }, - { - "lang": "PHP", - "source": "$client->updateIndex('books', ['primaryKey' => 'title']);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateTypoTolerance([\n 'enabled' => false\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateTypoTolerance([\n 'disableOnAttributes' => ['title']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateTypoTolerance([\n 'disableOnWords' => ['shrek']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateTypoTolerance([\n 'minWordSizeForTypos' => [\n 'oneTypo' => 4,\n 'twoTypos' => 10\n ]\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateTypoTolerance([\n 'disableOnNumbers' => true\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateTypoTolerance([\n 'minWordSizeForTypos' => [\n 'oneTypo' => 4\n ]\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateSynonyms([\n 'great' => ['fantastic'],\n 'fantastic' => ['great'],\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')\n ->updateFaceting([\n 'maxValuesPerFacet' => 2,\n 'sortFacetValuesBy' => ['*' => 'count']\n ]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updatePagination(['maxTotalHits' => 500]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('big fat liar', ['matchingStrategy' => 'last']);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('big fat liar', ['matchingStrategy' => 'all']);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('white shirt', ['matchingStrategy' => 'frequency']);" - }, - { - "lang": "PHP", - "source": "$gamesJson = file_get_contents('games.json');\n$games = json_decode($gamesJson);\n\n$client->index('games')->addDocuments($games);" - }, - { - "lang": "PHP", - "source": "$client->index('games')->updateFilterableAttributes(['release_timestamp']);" - }, - { - "lang": "PHP", - "source": "$client->index('games')->search('', [\n 'filter' => ['release_timestamp >= 1514761200 AND release_timestamp < 1672527600']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('games')->updateSortableAttributes(['release_timestamp']);" - }, - { - "lang": "PHP", - "source": "$client->index('games')->search('', ['sort' => ['release_timestamp:desc']]);" - }, - { - "lang": "PHP", - "source": "$client->getTasks((new TasksQuery())->setStatuses(['failed', 'canceled']));" - }, - { - "lang": "PHP", - "source": "$client->getTasks(\n (new TasksQuery())\n ->setStatuses(['processing'])\n ->setUids(['movies'])\n ->setTypes(['documentAdditionOrUpdate', 'documentDeletion'])\n);" - }, - { - "lang": "PHP", - "source": "$client->multiSearch([\n (new SearchQuery())\n ->setIndexUid('movies'))\n ->setQuery('batman'),\n (new SearchQuery())\n ->setIndexUid('comics')\n ->setQuery('batman'),\n ],\n (new MultiSearchFederation())\n);" - }, - { - "lang": "PHP", - "source": "$client->index('movie_ratings')->updateFilterableAttributes(['genres', 'rating', 'language']);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->search('classic', [\n 'facets' => ['genres', 'rating', 'language']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movie_ratings')->search('Batman', [\n 'facets' => ['genres', 'rating']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateFilterableAttributes(['director', 'genres']);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateFaceting(['sortFacetValuesBy' => ['genres' => 'count']]);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->facetSearch(\n (new FacetSearchQuery())\n ->setFacetQuery('c')\n ->setFacetName('genres')\n);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('dragon', [\n 'showRankingScore' => true\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('dragon', [\n 'showRankingScoreDetails' => true\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('adventure', [\n 'attributesToSearchOn' => ['overview']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('-escape');" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('-\"escape\"');" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->search('QUERY TERMS', [\n 'distinct' => 'ATTRIBUTE_A'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('products')->updateFilterableAttributes(['product_id', 'sku', 'url']);" - }, - { - "lang": "PHP", - "source": "$client->index('products')->search('white shirt', [\n 'distinct' => 'sku'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->search('badman', [\n 'rankingScoreThreshold' => 0.2\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->search('QUERY TEXT IN JAPANESE', [\n 'locales' => ['jpn']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->search('kitchen utensils', [\n 'hybrid' => [\n 'semanticRatio' => 0.9,\n 'embedder' => 'EMBEDDER_NAME'\n ]\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->search('kitchen utensils', [\n 'retrieveVectors' => true,\n 'hybrid' => [\n 'embedder': 'EMBEDDER_NAME'\n ]\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->search('a futuristic movie', [\n 'hybrid' => [\n 'embedder' => 'EMBEDDER_NAME'\n ],\n 'media' => [\n 'textAndPoster' => [\n 'text' => 'a futuristic movie',\n 'image' => [\n 'mime' => 'image/jpeg',\n 'data' => 'base64EncodedImageData'\n ]\n ]\n ]\n]);" - }, - { - "lang": "Python", - "source": "client.get_version()" - }, - { - "lang": "Python", - "source": "client.index('jackets').update_distinct_attribute('product_id')" - }, - { - "lang": "Python", - "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" - }, - { - "lang": "Python", - "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" - }, - { - "lang": "Python", - "source": "client.index('movie_ratings').search('Avengers', {\n 'filter': 'release_date > 795484800'\n})" - }, - { - "lang": "Python", - "source": "client.index('movie_ratings').search('Batman', {\n 'filter': 'release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")'\n})" - }, - { - "lang": "Python", - "source": "client.index('movie_ratings').search('Planet of the Apes', {\n 'filter': 'release_date > 1577884550 AND (NOT director = \"Tim Burton\"))'\n})" - }, - { - "lang": "Python", - "source": "client.index('movie_ratings').search('thriller', {\n 'filter': 'rating.users >= 90'\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('shifu')" - }, - { - "lang": "Python", - "source": "client.index('movies').search('shifu', {\n 'offset': 1\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('shifu', {\n 'limit': 2\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('', {'hitsPerPage': 15})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('', {'page': 2})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('shifu', {\n 'attributesToRetrieve': ['overview', 'title']\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('shifu', {\n 'attributesToCrop': ['overview'],\n 'cropLength': 5\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('shifu', {\n 'attributesToCrop': ['overview'],\n 'cropMarker': '[…]'\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('winter feast', {\n 'attributesToHighlight': ['overview']\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('winter feast', {\n 'attributesToHighlight': ['overview'],\n 'highlightPreTag': '',\n 'highlightPostTag': ''\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('winter feast', {\n 'showMatchesPosition': True\n})" - }, - { - "lang": "Python", - "source": "import json\n\njson_file = open('movies.json', encoding='utf-8')\nmovies = json.load(json_file)\nclient.index('movies').add_documents(movies)" - }, - { - "lang": "Python", - "source": "# In the command line:\n# pip3 install meilisearch\n\n# In your .py file:\nimport meilisearch\nimport json\n\nclient = meilisearch.Client('http://localhost:7700', 'aSampleMasterKey')\n\njson_file = open('movies.json', encoding='utf-8')\nmovies = json.load(json_file)\nclient.index('movies').add_documents(movies)" - }, - { - "lang": "Python", - "source": "client.get_task(0)" - }, - { - "lang": "Python", - "source": "client.index('movies').search('botman')" - }, - { - "lang": "Python", - "source": "import json\n\njson_file = open('meteorites.json', encoding='utf-8')\nmeteorites = json.load(json_file)\nclient.index('meteorites').add_documents(meteorites)" - }, - { - "lang": "Python", - "source": "client.index('movies').update_ranking_rules([\n 'exactness',\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'release_date:asc',\n 'rank:desc'\n])" - }, - { - "lang": "Python", - "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'poster'\n])" - }, - { - "lang": "Python", - "source": "client.index('movies').update_searchable_attributes([\n 'title'\n])" - }, - { - "lang": "Python", - "source": "client.index('movies').update_stop_words(['the'])" - }, - { - "lang": "Python", - "source": "client.index('movies').update_synonyms({\n 'winnie': ['piglet'],\n 'piglet': ['winnie']\n})" - }, - { - "lang": "Python", - "source": "client.index('meteorites').search('', {\n 'filter': 'mass < 200'\n})" - }, - { - "lang": "Python", - "source": "client.index('meteorites').search('', {\n 'filter': '_geoRadius(46.9480, 7.4474, 210000)'\n})" - }, - { - "lang": "Python", - "source": "client.index('meteorites').search('', {\n 'sort': ['_geoPoint(48.8583701,2.2922926):asc']\n})" - }, - { - "lang": "Python", - "source": "client.index('meteorites').search('', {\n 'filter': 'mass < 200',\n 'sort': ['mass:asc']\n})" - }, - { - "lang": "Python", - "source": "client.index('meteorites').update_settings({\n 'filterableAttributes': [\n 'mass',\n '_geo'\n ],\n 'sortableAttributes': [\n 'mass',\n '_geo'\n ]\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('thriller', {\n 'filter': [['genres = Horror', 'genres = Mystery'], 'director = \"Jordan Peele\"']\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('\"african american\" horror')" - }, - { - "lang": "Python", - "source": "client = Client('http://localhost:7700', 'masterKey')\nclient.get_keys()" - }, - { - "lang": "Python", - "source": "client.index('books').update_sortable_attributes([\n 'author',\n 'price'\n])" - }, - { - "lang": "Python", - "source": "client.index('books').update_ranking_rules([\n 'words',\n 'sort',\n 'typo',\n 'proximity',\n 'attribute',\n 'exactness'\n])" - }, - { - "lang": "Python", - "source": "client.index('books').search('science fiction', {\n 'sort': ['rating.users:asc']\n})" - }, - { - "lang": "Python", - "source": "client.index('books').search('science fiction', {\n 'sort': ['price:asc']\n})" - }, - { - "lang": "Python", - "source": "client.index('books').search('butler', {\n 'sort': ['author:desc']\n})" - }, - { - "lang": "Python", - "source": "client.index('books').search('science fiction', {\n 'sort': ['price:asc']\n})" - }, - { - "lang": "Python", - "source": "client.index('restaurants').update_filterable_attributes([\n '_geo'\n])" - }, - { - "lang": "Python", - "source": "client.index('restaurants').search('', {\n 'filter': '_geoRadius(45.472735, 9.184019, 2000)'\n})" - }, - { - "lang": "Python", - "source": "client.index('restaurants').search('', {\n 'filter': '_geoRadius(45.472735, 9.184019, 2000) AND type = pizza'\n})" - }, - { - "lang": "Python", - "source": "client.index('restaurants').search('Batman', {\n 'filter': '_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])'\n})" - }, - { - "lang": "Python", - "source": "client.index('restaurants').update_sortable_attributes([\n '_geo'\n])" - }, - { - "lang": "Python", - "source": "client.index('restaurants').search('', {\n 'sort': ['_geoPoint(48.8561446,2.2978204):asc']\n})" - }, - { - "lang": "Python", - "source": "client.index('restaurants').search('', {\n 'sort': ['_geoPoint(48.8561446,2.2978204):asc', 'rating:desc']\n})" - }, - { - "lang": "Python", - "source": "client = Client('http://localhost:7700', 'apiKey')\nclient.index('patient_medical_records').search()" - }, - { - "lang": "Python", - "source": "client = Client('http://localhost:7700', 'masterKey')\nclient.update_key(key_or_uid='74c9c733-3368-4738-bbe5-1d18a5fecb37', options={\n 'description': 'Default Search API Key'\n})" - }, - { - "lang": "Python", - "source": "client = Client('http://localhost:7700', 'masterKey')\n client.create_key(options={\n 'description': 'Search patient records key',\n 'actions': ['search'],\n 'indexes': ['patient_medical_records'],\n 'expiresAt': '2023-01-01T00:00:00Z'\n})" - }, - { - "lang": "Python", - "source": "client = Client('http://localhost:7700', 'masterKey')\nclient.get_keys()" - }, - { - "lang": "Python", - "source": "client = Client('http://localhost:7700', 'masterKey')\nclient.delete_key('ac5cd97d-5a4b-4226-a868-2d0eb6d197ab')" - }, - { - "lang": "Python", - "source": "client.create_index('books', {'primaryKey': 'reference_number'})" - }, - { - "lang": "Python", - "source": "client.index('books').add_documents([{\n 'reference_number': 287947,\n 'title': 'Diary of a Wimpy Kid',\n 'author': 'Jeff Kinney',\n 'genres': ['comedy', 'humor'],\n 'price': 5.00\n}], 'reference_number')" - }, - { - "lang": "Python", - "source": "client.index('books').update(primary_key='title')" - }, - { - "lang": "Python", - "source": "client.index('movies').update_typo_tolerance({\n 'enabled': False\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').update_typo_tolerance({\n 'disableOnAttributes': ['title']\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').update_typo_tolerance({\n 'disableOnWords': ['shrek']\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').update_typo_tolerance({\n 'minWordSizeForTypos': {\n 'oneTypo': 4,\n 'twoTypos': 10\n }\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').update_typo_tolerance({\n 'disableOnNumbers': True\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').update_typo_tolerance({\n 'minWordSizeForTypos': {\n 'oneTypo': 4\n }\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').update_synonyms({\n 'great': ['fantastic'],\n 'fantastic': ['great']\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').update_faceting_settings({\n 'maxValuesPerFacet': 2,\n 'sortFacetValuesBy': {\n '*': 'count'\n }\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').update_pagination_settings({'maxTotalHits': 500})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('big fat liar', {\n 'matchingStrategy': 'last'\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('big fat liar', {\n 'matchingStrategy': 'all'\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('big fat liar', {\n 'matchingStrategy': 'frequency'\n})" - }, - { - "lang": "Python", - "source": "import json\n\njson_file = open('./games.json', encoding='utf-8')\ngames = json.load(json_file)\nclient.index('games').add_documents(games)" - }, - { - "lang": "Python", - "source": "client.index('games').update_filterable_attributes(['release_timestamp'])" - }, - { - "lang": "Python", - "source": "client.index('games').search('', {\n 'filter': 'release_timestamp >= 1514761200 AND release_timestamp < 1672527600'\n})" - }, - { - "lang": "Python", - "source": "client.index('games').update_sortable_attributes(['release_timestamp'])" - }, - { - "lang": "Python", - "source": "client.index('games').search('', {\n 'sort': ['release_timestamp:desc']\n})" - }, - { - "lang": "Python", - "source": "client.get_tasks({'statuses': ['failed', 'canceled']})" - }, - { - "lang": "Python", - "source": "client.get_tasks(\n {\n 'indexUids': 'movies',\n 'types': ['documentAdditionOrUpdate', 'documentDeletion'],\n 'statuses': ['processing'],\n }\n)" - }, - { - "lang": "Python", - "source": "client.multi_search(\n [{\"indexUid\": \"movies\", \"q\": \"batman\"}, {\"indexUid\": \"comics\", \"q\": \"batman\"}],\n {}\n)" - }, - { - "lang": "Python", - "source": "client.index('movie_ratings').update_filterable_attributes([\n 'genres',\n 'director',\n 'language'\n])" - }, - { - "lang": "Python", - "source": "client.index('books').search('classic', {\n 'facets': ['genres', 'rating', 'language']\n})" - }, - { - "lang": "Python", - "source": "client.index('movie_ratings').search('Batman', {\n 'facets': ['genres', 'rating']\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').update_filterable_attributes([\n 'director',\n 'genres',\n])" - }, - { - "lang": "Python", - "source": "client.index('books').update_faceting_settings({ 'sortFacetValuesBy': { 'genres': 'count' } })" - }, - { - "lang": "Python", - "source": "client.index('books').facet_search('genres', 'c')" - }, - { - "lang": "Python", - "source": "client.index('movies').search('dragon', {\n 'showRankingScore': True\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('dragon', {\n 'showRankingScoreDetails': True\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('adventure', {\n 'attributesToSearchOn': ['overview']\n})" - }, - { - "lang": "Python", - "source": "client.index('INDEX_NAME').search('QUERY_TERMS', { distinct: 'ATTRIBUTE_A' })" - }, - { - "lang": "Python", - "source": "client.index('products').update_filterable_attributes(['product_id', 'sku', 'url'])" - }, - { - "lang": "Python", - "source": "client.index('products').search('white shirt', { distinct: 'sku' })" - }, - { - "lang": "Python", - "source": "client.index('INDEX_NAME').search('badman', { 'rankingScoreThreshold': 0.2 })" - }, - { - "lang": "Python", - "source": "client.index('INDEX_NAME').search('進撃の巨人', { 'locales': ['jpn'] })" - }, - { - "lang": "Ruby", - "source": "client.version" - }, - { - "lang": "Ruby", - "source": "client.index('jackets').update_distinct_attribute('product_id')" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_settings({\n displayed_attributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ]\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movie_ratings').search('Avengers', { filter: 'release_date > 795484800' })" - }, - { - "lang": "Ruby", - "source": "client.index('movie_ratings').search('Batman', {\n filter: 'release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")'\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movie_ratings').search('Planet of the Apes', {\n filter: \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\"\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies_ratings').search('thriller', {\n filter: 'rating.users >= 90'\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('shifu')" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('shifu', {\n offset: 1\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('shifu', {\n limit: 2\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('', hits_per_page: 15)" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('', page: 2)" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('shifu', {\n attributes_to_retrieve: ['overview', 'title']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('shifu', {\n attributes_to_crop: ['overview'],\n crop_length: 5\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('shifu', {\n attributes_to_crop: ['overview'],\n crop_marker: '[…]'\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('winter feast', {\n attributes_to_highlight: ['overview']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('winter feast', {\n attributes_to_highlight: ['overview'],\n highlight_pre_tag: '',\n highlight_post_tag: ''\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('winter feast', {\n show_matches_position: true\n})" - }, - { - "lang": "Ruby", - "source": "require 'json'\n\nmovies_json = File.read('movies.json')\nmovies = JSON.parse(movies_json)\nclient.index('movies').add_documents(movies)" - }, - { - "lang": "Ruby", - "source": "# In the command line:\n# bundle add meilisearch\n\n# In your .rb file:\nrequire 'json'\nrequire 'meilisearch'\n\nclient = MeiliSearch::Client.new('http://localhost:7700', 'aSampleMasterKey')\n\nmovies_json = File.read('movies.json')\nmovies = JSON.parse(movies_json)\n\nclient.index('movies').add_documents(movies)" - }, - { - "lang": "Ruby", - "source": "client.task(0)" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('botman')" - }, - { - "lang": "Ruby", - "source": "file = File.read('meteorites.json')\njson = JSON.parse(file)\n\nclient.index('meteorites').add_documents(json)" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_ranking_rules([\n 'exactness',\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'release_date:asc',\n 'rank:desc'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'poster'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_searchable_attributes([\n 'title'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_stop_words(['the'])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_synonyms({\n winnie: ['piglet'],\n piglet: ['winnie']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('meteorites').search('', { filter: 'mass < 200' })" - }, - { - "lang": "Ruby", - "source": "client.index('meteorites').search('', { filter: '_geoRadius(46.9480, 7.4474, 210000)' })" - }, - { - "lang": "Ruby", - "source": "client.index('meteorites').search('', { sort: ['_geoPoint(48.8583701, 2.2922926):asc'] })" - }, - { - "lang": "Ruby", - "source": "client.index('meteorites').search('', {\n sort: ['mass:asc'],\n filter: 'mass < 200'\n})" - }, - { - "lang": "Ruby", - "source": "client.index('meteorites').update_settings({\n filterable_attributes: ['mass', '_geo'],\n sortable_attributes: ['mass', '_geo']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('thriller', {\n filter: [['genres = Horror', 'genres = Mystery'], 'director = \"Jordan Peele\"']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('\"african american\" horror')" - }, - { - "lang": "Ruby", - "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'masterKey')\nclient.keys" - }, - { - "lang": "Ruby", - "source": "client.index('books').update_sortable_attributes(['author', 'price'])" - }, - { - "lang": "Ruby", - "source": "client.index('books').update_ranking_rules([\n 'words',\n 'sort',\n 'typo',\n 'proximity',\n 'attribute',\n 'exactness'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('books').search('science fiction', { sort: ['rating.users:asc'] })" - }, - { - "lang": "Ruby", - "source": "client.index('books').search('science fiction', { sort: ['price:asc'] })" - }, - { - "lang": "Ruby", - "source": "client.index('books').search('butler', { sort: ['author:desc'] })" - }, - { - "lang": "Ruby", - "source": "client.index('books').search('science fiction', { sort: ['price:asc'] })" - }, - { - "lang": "Ruby", - "source": "client.index('restaurants').update_filterable_attributes(['_geo'])" - }, - { - "lang": "Ruby", - "source": "client.index('restaurants').search('', { filter: '_geoRadius(45.472735, 9.184019, 2000)' })" - }, - { - "lang": "Ruby", - "source": "client.index('restaurants').search('', { filter: '_geoRadius(45.472735, 9.184019, 2000) AND type = pizza' })" - }, - { - "lang": "Ruby", - "source": "client.index('restaurants').search('', { filter: ['_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])'] })" - }, - { - "lang": "Ruby", - "source": "client.index('restaurants').update_sortable_attributes(['_geo'])" - }, - { - "lang": "Ruby", - "source": "client.index('restaurants').search('', { sort: ['_geoPoint(48.8561446, 2.2978204):asc'] })" - }, - { - "lang": "Ruby", - "source": "client.index('restaurants').search('', { sort: ['_geoPoint(48.8561446, 2.2978204):asc', 'rating:desc'] })" - }, - { - "lang": "Ruby", - "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'apiKey')\nclient.index('patient_medical_records').search" - }, - { - "lang": "Ruby", - "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'masterKey')\nclient.update_key('74c9c733-3368-4738-bbe5-1d18a5fecb37', description: 'Default Search API Key')" - }, - { - "lang": "Ruby", - "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'masterKey')\nclient.create_key(\n description: 'Search patient records key',\n actions: ['search'],\n indexes: ['patient_medical_records'],\n expires_at: '2023-01-01T00:00:00Z'\n)" - }, - { - "lang": "Ruby", - "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'masterKey')\nclient.keys" - }, - { - "lang": "Ruby", - "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'masterKey')\nclient.delete_key('ac5cd97d-5a4b-4226-a868-2d0eb6d197ab')" - }, - { - "lang": "Ruby", - "source": "client.create_index('books', primary_key: 'reference_number')" - }, - { - "lang": "Ruby", - "source": "client.index('books').add_documents([\n {\n reference_number: 287947,\n title: 'Diary of a Wimpy Kid',\n author: 'Jeff Kinney',\n genres: ['comedy', 'humor'],\n price: 5.00\n }\n], 'reference_number')" - }, - { - "lang": "Ruby", - "source": "client.index('books').update(primary_key: 'title')" - }, - { - "lang": "Ruby", - "source": "index('books').update_typo_tolerance({ enabled: false })" - }, - { - "lang": "Ruby", - "source": "index('books').update_typo_tolerance({ disable_on_attributes: ['title'] })" - }, - { - "lang": "Ruby", - "source": "index('books').update_typo_tolerance({ disable_on_words: ['shrek'] })" - }, - { - "lang": "Ruby", - "source": "index('books').update_typo_tolerance({\n min_word_size_for_typos: {\n one_typo: 4,\n two_typos: 10\n }\n})" - }, - { - "lang": "Ruby", - "source": "index('books').update_typo_tolerance({ disable_on_numbers: true })" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_typo_tolerance({ min_word_size_for_typos: { one_typo: 4 } })" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_synonyms({\n great: ['fantastic'],\n fantastic: ['great']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_faceting({\n max_values_per_facet: 2,\n sort_facet_values_by: {\n genres: 'count'\n }\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_pagination(max_total_hits: 500)" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('big fat liar', {\n matching_strategy: 'last'\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('big fat liar', {\n matching_strategy: 'all'\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('white shirt', {\n matching_strategy: 'frequency'\n})" - }, - { - "lang": "Ruby", - "source": "require 'json'\n\ngames = JSON.parse(File.read('games.json'))\nclient.index('games').add_documents(games)" - }, - { - "lang": "Ruby", - "source": "client.index('games').update_filterable_attributes(['release_timestamp'])" - }, - { - "lang": "Ruby", - "source": "client.index('games').search('', {\n filter: 'release_timestamp >= 1514761200 AND release_timestamp < 1672527600'\n})" - }, - { - "lang": "Ruby", - "source": "client.index('games').update_sortable_attributes(['release_timestamp'])" - }, - { - "lang": "Ruby", - "source": "client.index('games').search('', sort: ['release_timestamp:desc'])" - }, - { - "lang": "Ruby", - "source": "client.get_tasks(statuses: ['failed', 'canceled'])" - }, - { - "lang": "Ruby", - "source": "client.get_tasks(index_uids: ['movies'], types: ['documentAdditionOrUpdate', 'documentDeletion'], statuses: ['processing'])" - }, - { - "lang": "Ruby", - "source": "client.multi_search(\n queries: [{ index_uid: 'movies', q: 'batman' }, { index_uid: 'comics', q: 'batman' }],\n federation: {}\n)" - }, - { - "lang": "Ruby", - "source": "client.index('movie_ratings').update_filterable_attributes(['genres', 'rating', 'language'])" - }, - { - "lang": "Ruby", - "source": "client.index('books').search('classic', {\n facets: ['genres', 'rating', 'language']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movie_ratings').search('Batman', {\n facets: ['genres', 'rating']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_filterable_attributes([\n 'director',\n 'genres'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('books').update_faceting(\n sort_facet_values_by: {\n genres: 'count'\n }\n)" - }, - { - "lang": "Ruby", - "source": "client.index('books').facet_search('genres', 'c')" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('dragon', {\n show_ranking_score: true\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('dragon', {\n show_ranking_score_details: true\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('adventure', {\n attributes_to_search_on: ['overview']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').search('QUERY TERMS', {\n distinct: 'ATTRIBUTE_A'\n})" - }, - { - "lang": "Ruby", - "source": "client.index('products').update_filterable_attributes([\n 'product_id',\n 'sku',\n 'url'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('products').search('white shirt', {\n distinct: 'sku'\n})" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').search('badman', {\n rankingScoreThreshold: 0.2\n})" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').search('進撃の巨人', { locales: ['jpn'] })" - }, - { - "lang": "Rust", - "source": "let version: Version = client\n .get_version()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"jackets\")\n .set_distinct_attribute(\"product_id\")\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let searchable_attributes = [\n \"title\",\n \"overview\",\n \"genres\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_searchable_attributes(&searchable_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let displayed_attributes = [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_displayed_attributes(&displayed_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movie_ratings\")\n .search()\n .with_query(\"Avengers\")\n .with_filter(\"release_date > 795484800\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movie_ratings\")\n .search()\n .with_query(\"Batman\")\n .with_filter(r#\"release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")\"#)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movie_ratings\")\n .search()\n .with_query(\"Planet of the Apes\")\n .with_filter(r#\"release_date > 1577884550 AND (NOT director = \"Tim Burton\")\"#)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movie_rating\")\n .search()\n .with_query(\"thriller\")\n .with_filter(\"rating.users >= 90\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .with_offset(1)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .with_limit(2)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "client.index(\"movies\").search().with_hits_per_page(15).execute().await?;" - }, - { - "lang": "Rust", - "source": "client.index(\"movies\").search().with_page(2).execute().await?;" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .with_attributes_to_retrieve(Selectors::Some(&[\"overview\", \"title\"]))\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .with_attributes_to_crop(Selectors::Some(&[(\"overview\", None)]))\n .with_crop_length(5)\n .execute()\n .await\n .unwrap();\n\n// Get the formatted results\nlet formatted_results: Vec<&Movie> = results\n .hits\n .iter()\n .map(|r| r.formatted_result.as_ref().unwrap())\n .collect();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .with_attributes_to_crop(Selectors::Some(&[(\"overview\", None)]))\n .with_crop_marker(\"[…]\")\n .execute()\n .await\n .unwrap();\n\n// Get the formatted results\nlet formatted_results: Vec<&Movie> = results\n .hits\n .iter()\n .map(|r| r.formatted_result.as_ref().unwrap())\n .collect();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"winter feast\")\n .with_attributes_to_highlight(Selectors::Some(&[\"overview\"]))\n .execute()\n .await\n .unwrap();\n\n// Get the formatted results\nlet formatted_results: Vec<&Movie> = results\n .hits\n .iter()\n .map(|r| r.formatted_result.as_ref().unwrap())\n .collect();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"winter feast\")\n .with_attributes_to_highlight(Selectors::Some(&[\"overview\"]))\n .with_highlight_pre_tag(\"\")\n .with_highlight_post_tag(\"\")\n .execute()\n .await\n .unwrap();\n\n// Get the formatted results\nlet formatted_results: Vec<&Movie> = results\n .hits\n .iter()\n .map(|r| r.formatted_result.as_ref().unwrap())\n .collect();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"winter feast\")\n .with_show_matches_position(true)\n .execute()\n .await\n .unwrap();\n\n// Get the matches info\nlet matches_position: Vec<&HashMap>> = results\n .hits\n .iter()\n .map(|r| r.matches_position.as_ref().unwrap())\n .collect();" - }, - { - "lang": "Rust", - "source": "use meilisearch_sdk::{\n indexes::*,\n client::*,\n search::*,\n settings::*\n};\nuse serde::{Serialize, Deserialize};\nuse std::{io::prelude::*, fs::File};\nuse futures::executor::block_on;\n\nfn main() { block_on(async move {\n let client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\n\n // reading and parsing the file\n let mut file = File::open(\"movies.json\")\n .unwrap();\n let mut content = String::new();\n file\n .read_to_string(&mut content)\n .unwrap();\n let movies_docs: Vec = serde_json::from_str(&content)\n .unwrap();\n\n // adding documents\n client\n .index(\"movies\")\n .add_documents(&movies_docs, None)\n .await\n .unwrap();\n})}" - }, - { - "lang": "Rust", - "source": "// In your .toml file:\n [dependencies]\n meilisearch-sdk = \"0.31.0\"\n # futures: because we want to block on futures\n futures = \"0.3\"\n # serde: required if you are going to use documents\n serde = { version=\"1.0\", features = [\"derive\"] }\n # serde_json: required in some parts of this guide\n serde_json = \"1.0\"\n```\n\n// In your .rs file:\n// Documents in the Rust library are strongly typed\n#[derive(Serialize, Deserialize)]\nstruct Movie {\n id: i64,\n title: String,\n poster: String,\n overview: String,\n release_date: i64,\n genres: Vec\n}\n\n// You will often need this `Movie` struct in other parts of this documentation. (you will have to change it a bit sometimes)\n// You can also use schemaless values, by putting a `serde_json::Value` inside your own struct like this:\n#[derive(Serialize, Deserialize)]\nstruct Movie {\n id: i64,\n #[serde(flatten)]\n value: serde_json::Value,\n}\n\n// Then, add documents into the index:\nuse meilisearch_sdk::{\n indexes::*,\n client::*,\n search::*,\n settings::*\n};\nuse serde::{Serialize, Deserialize};\nuse std::{io::prelude::*, fs::File};\nuse futures::executor::block_on;\n\nfn main() { block_on(async move {\n let client = Client::new(\"http://localhost:7700\", Some(\"aSampleMasterKey\"));\n\n // Reading and parsing the file\n let mut file = File::open(\"movies.json\")\n .unwrap();\n let mut content = String::new();\n file\n .read_to_string(&mut content)\n .unwrap();\n let movies_docs: Vec = serde_json::from_str(&content)\n .unwrap();\n\n // Adding documents\n client\n .index(\"movies\")\n .add_documents(&movies_docs, None)\n .await\n .unwrap();\n})}" - }, - { - "lang": "Rust", - "source": "client\n .get_task(0)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "// You can build a `SearchQuery` and execute it later:\nlet query: SearchQuery = SearchQuery::new(&movies)\n .with_query(\"botman\")\n .build();\n\nlet results: SearchResults = client\n .index(\"movies\")\n .execute_query(&query)\n .await\n .unwrap();\n\n// You can build a `SearchQuery` and execute it directly:\nlet results: SearchResults = SearchQuery::new(&movies)\n .with_query(\"botman\")\n .execute()\n .await\n .unwrap();\n\n// You can search in an index directly:\nlet results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"botman\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "use serde::{Serialize, Deserialize};\nuse std::fs::File;\n\n#[derive(Serialize, Deserialize)]\nstruct Geo {\n lat: f64,\n lon: f64\n}\n\nstruct Meteorite {\n name: String,\n id: String,\n nametype: String,\n recclass: String,\n mass: i64,\n fall: String,\n _geo: Geo\n}\n\nlet mut file = File::open(\"meteorites.json\")?;\nlet meteorites: Vec = serde_json::from_reader(file)?;\n\nclient\n .index(\"meteorites\")\n .add_documents(&meteorites, None)\n .await?;" - }, - { - "lang": "Rust", - "source": "let ranking_rules = [\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\"\n];\n\nclient\n .index(\"movies\")\n .set_ranking_rules(&ranking_rules)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let displayed_attributes = [\n \"title\",\n \"overview\",\n \"poster\",\n];\n\nclient\n .index(\"movies\")\n .set_displayed_attributes(&displayed_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let searchable_attributes = [\n \"title\"\n];\n\nclient\n .index(\"movies\")\n .set_searchable_attributes(&searchable_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let stop_words = [\"the\"];\nclient\n .index(\"movies\")\n .set_stop_words(&stop_words)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"winnie\"), vec![String::from(\"piglet\")]);\nsynonyms.insert(String::from(\"piglet\"), vec![String::from(\"winnie\")]);\n\nclient\n .index(\"movies\")\n .set_synonyms(&synonyms)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"meteorites\")\n .search()\n .with_filter(\"mass < 200\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"meteorites\")\n .search()\n .with_filter(\"_geoRadius(46.9480, 7.4474, 210000)\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"meteorites\")\n .search()\n .with_sort(&[\"_geoPoint(48.8583701, 2.2922926):asc\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"meteorites\")\n .search()\n .with_filter(\"mass < 200\")\n .with_sort(&[\"mass:asc\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let settings = Settings::new()\n .with_filterable_attributes([\n \"mass\",\n \"_geo\"\n ])\n .with_sortable_attributes([\n \"mass\",\n \"_geo\"\n ])\nlet task: TaskInfo = client\n .index(\"meteorites\")\n .set_settings(&settings)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"thriller\")\n .with_filter(\"(genres = Horror AND genres = Mystery) OR director = \\\"Jordan Peele\\\"\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"\\\"african american\\\" horror\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let sortable_attributes = [\n \"author\",\n \"price\"\n];\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_sortable_attributes(&sortable_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let ranking_rules = [\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\"\n];\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_ranking_rules(&ranking_rules)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"books\")\n .search()\n .with_query(\"science fiction\")\n .with_sort(&[\"rating.users:asc\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"books\")\n .search()\n .with_query(\"science fiction\")\n .with_sort(&[\"price:asc\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"books\")\n .search()\n .with_query(\"butler\")\n .with_sort(&[\"author:desc\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"books\")\n .search()\n .with_query(\"science fiction\")\n .with_sort(&[\"price:asc\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"restaurants\")\n .set_filterable_attributes(&[\"_geo\"])\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"restaurants\")\n .search()\n .with_filter(\"_geoRadius(45.472735, 9.184019, 2000)\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"restaurants\")\n .search()\n .with_filter(\"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"restaurants\")\n .search()\n .with_filter(\"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"restaurants\")\n .set_sortable_attributes(&[\"_geo\"])\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"restaurants\")\n .search()\n .with_sort(&[\"_geoPoint(48.8561446, 2.2978204):asc\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"restaurants\")\n .search()\n .with_sort(&[\"_geoPoint(48.8561446, 2.2978204):asc\", \"rating:desc\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"MASTER_KEY\"));\nclient\n .get_keys()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"DEFAULT_ADMIN_API_KEY\"));\nlet task = client\n .create_index(\"medical_records\", Some(\"id\"))\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"DEFAULT_SEARCH_API_KEY\"));\nlet index = client.index(\"medical_records\");\nindex\n .search()\n .with_query(\"appointments\")\n .execute::()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet result = client.index(\"patient_medical_records\")\n .search()\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet mut key = client\n .get_key(\"74c9c733-3368-4738-bbe5-1d18a5fecb37\")\n .await\n .unwrap();\nkey\n .with_description(\"Default Search API key\".to_string())\n .update(&client);" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet mut key_options = KeyBuilder::new();\nkey_options\n .with_name(\"Search patient records key\")\n .with_action(Action::Search)\n .with_expires_at(time::macros::datetime!(2023 - 01 - 01 00:00:00 UTC))\n .with_index(\"patient_medical_records\");\nlet new_key = client\n .create_key(key_options)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet keys = client\n .get_keys()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet key = client\n .get_key(\"ac5cd97d-5a4b-4226-a868-2d0eb6d197ab\")\n .await\n .unwrap();\nclient\n .delete_key(&key)\n .await?;" - }, - { - "lang": "Rust", - "source": "client\n .create_index(\"books\", Some(\"reference_number\"))\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "#[derive(Serialize, Deserialize)]\nstruct Book {\n reference_number: String,\n title: String,\n author: String,\n genres: Vec,\n price: f64\n}\n\nlet task: TaskInfo = client\n .index(\"books\")\n .add_documents(&[\n Book {\n reference_number: \"287947\".to_string(),\n title: \"Diary of a Wimpy Kid\".to_string(),\n author: \"Jeff Kinney\".to_string(),\n genres: vec![\"comedy\".to_string(),\"humor\".to_string()],\n price: 5.00\n }\n ], Some(\"reference_number\"))\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let task = IndexUpdater::new(\"books\", &client)\n .with_primary_key(\"title\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let typo_tolerance = TypoToleranceSettings {\n enabled: Some(false),\n disable_on_attributes: None,\n disable_on_words: None,\n min_word_size_for_typos: None,\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(5),\n two_typos: Some(12)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![\"title\".to_string()]),\n disable_on_words: None,\n min_word_size_for_typos: None,\n};\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(5),\n two_typos: Some(12)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: None,\n disable_on_words: Some(vec![\"shrek\".to_string()]),\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(4),\n two_typos: Some(12)\n};\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![]),\n disable_on_words: Some(vec![\"title\".to_string()]),\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "// Deactivate typo tolerance on numbers and other high entropy words\nlet typo_tolerance = TypoToleranceSettings {\n disable_on_numbers: Some(true),\n ..Default::default()\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(5),\n two_typos: Some(4)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![]),\n disable_on_words: Some(vec![\"title\".to_string()]),\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"great\"), vec![String::from(\"fantastic\")]);\nsynonyms.insert(String::from(\"fantastic\"), vec![String::from(\"great\")]);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_synonyms(&synonyms)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let mut facet_sort_setting = BTreeMap::new();\nfacet_sort_setting.insert(\"*\".to_string(), FacetSortValue::Count);\nlet mut faceting = FacetingSettings {\n max_values_per_facet: 2,\n sort_facet_values_by: Some(facet_sort_setting),\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_faceting(&faceting)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let pagination = PaginationSetting {max_total_hits:500};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_pagination(pagination)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n.index(\"movies\")\n.search()\n.with_query(\"big fat liar\")\n.with_matching_strategy(MatchingStrategies::LAST)\n.execute()\n.await\n.unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n.index(\"movies\")\n.search()\n.with_query(\"big fat liar\")\n.with_matching_strategy(MatchingStrategies::ALL)\n.execute()\n.await\n.unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n.index(\"movies\")\n.search()\n.with_query(\"white shirt\")\n.with_matching_strategy(MatchingStrategies::FREQUENCY)\n.execute()\n.await\n.unwrap();" - }, - { - "lang": "Rust", - "source": "let mut file = File::open(\"games.json\")\n .unwrap();\nlet mut content = String::new();\nfile\n .read_to_string(&mut content)\n .unwrap();\nlet docs: Vec = serde_json::from_str(&content)\n .unwrap();\n\nclient\n .index(\"games\")\n .add_documents(&docs, None)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let settings = Settings::new()\n .with_filterable_attributes([\"release_timestamp\"]);\n\nlet task: TaskInfo = client\n .index(\"games\")\n .set_settings(&settings)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"games\")\n .search()\n .with_filter(\"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let settings = Settings::new()\n .with_sortable_attributes([\"release_timestamp\"]);\n\nlet task: TaskInfo = client\n .index(\"games\")\n .set_settings(&settings)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"games\")\n .search()\n .with_sort([\"release_timestamp:desc\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let mut query = TasksQuery::new(&client);\nlet tasks = query\n .with_statuses([\"failed\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let mut query = TasksQuery::new(&client);\nlet tasks = query\n .with_statuses([\"failed\", \"canceled\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let mut query = TasksQuery::new(&client);\nlet tasks = query\n .with_index_uids([\"movies\"])\n .with_types([\"documentAdditionOrUpdate\",\"documentDeletion\"])\n .with_statuses([\"processing\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movie_ratings\")\n .set_filterable_attributes(&[\"genres\", \"rating\", \"language\"])\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let books = client.index(\"books\");\n\nlet results: SearchResults = SearchQuery::new(&books)\n .with_query(\"classic\")\n .with_facets(Selectors::Some(&[\"genres\", \"rating\", \"language\"]))\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let books = client.index(\"movie_ratings\");\nlet results: SearchResults = SearchQuery::new(&books)\n .with_query(\"Batman\")\n .with_facets(Selectors::Some(&[\"genres\", \"rating\"))\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .set_filterable_attributes([\"director\", \"genres\"])\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let mut facet_sort_setting = BTreeMap::new();\nfacet_sort_setting.insert(\"genres\".to_string(), FacetSortValue::Count);\nlet faceting = FacetingSettings {\n max_values_per_facet: 100,\n sort_facet_values_by: Some(facet_sort_setting),\n};\n\nlet res = client.index(\"books\")\n .set_faceting(&faceting)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let res = client.index(\"books\")\n .facet_search(\"genres\")\n .with_facet_query(\"c\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"dragon\")\n .with_show_ranking_score(true)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"dragon\")\n .with_show_ranking_score_details(true)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"adventure\")\n .with_attributes_to_search_on(&[\"overview\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let searchable_attributes: Vec = index\n .get_searchable_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let task = index\n .set_searchable_attributes([\"title\", \"overview\"])\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let task_status = index.get_task(&task).await.unwrap();" - }, - { - "lang": "Rust", - "source": "let results = index.search()\n .with_query(\"-escape\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results = index.search()\n .with_query(\"-\\\"escape room\\\"\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let res = client\n .index(\"INDEX_NAME\")\n .search()\n .with_query(\"QUERY TERMS\")\n .with_distinct(\"ATTRIBUTE_A\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"products\")\n .settings()\n .set_filterable_attributes([\"product_id\", \"sku\", \"url\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let res = client\n .index(\"products\")\n .search()\n .with_query(\"white shirt\")\n .with_distinct(\"sku\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let res = client\n .index(\"INDEX_NAME\")\n .search()\n .with_query(\"badman\")\n .with_ranking_score_threshold(0.2)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let res = client\n .index(\"books\")\n .search()\n .with_query(\"進撃の巨人\")\n .with_locales(&[\"jpn\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results = index\n .search()\n .with_query(\"kitchen utensils\")\n .with_hybrid(\"EMBEDDER_NAME\", 0.9)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results = index\n .search()\n .with_vector(&[0.0, 1.0, 2.0])\n .with_hybrid(\"EMBEDDER_NAME\", 1.0)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results = index\n .search()\n .with_query(\"kitchen utensils\")\n .with_retrieve_vectors(true)\n .with_hybrid(\"EMBEDDER_NAME\", 0.5)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let embedders = HashMap::from([(\n String::from(\"movies-text\"),\n Embedder {\n source: EmbedderSource::OpenAi,\n api_key: Some(String::from(\"OPENAI_API_KEY\")),\n model: Some(String::from(\"text-embedding-3-small\")),\n document_template: Some(String::from(\"A movie titled '{{doc.title}}' released in {{ doc.release_date }}. The movie genres are: {{doc.genres}}. The story is about: {{doc.overview|truncatewords: 20}}\")),\n ..Embedder::default()\n }\n)]);\nmovies.set_embedders(&embedders)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results = movies.search()\n .with_query(\"batman\")\n .with_hybrid(\"EMBEDDER_NAME\", 0.5)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results = movies.similar_search(\"192\", \"EMBEDDER_NAME\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_A' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"uid\": \"INDEX_B\" }'" - }, - { - "lang": "Rust", - "source": "let results = index\n .search()\n .with_hybrid(\"EMBEDDER_NAME\", 0.5)\n .with_media(json!({\n \"FIELD_A\": \"VALUE_A\",\n \"FIELD_B\": {\n \"FIELD_C\": \"VALUE_B\",\n \"FIELD_D\": \"VALUE_C\"\n }\n }))\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.version { (result) in\n switch result {\n case .success(let version):\n print(version)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.index(\"jackets\").updateDistinctAttribute(\"product_id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchableAttributes: [String] = [\n \"title\",\n \"overview\",\n \"genres\"\n]\nclient.index(\"movies\").updateSearchableAttributes(searchableAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let displayedAttributes: [String] = [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n]\nclient.index(\"movies\").updateDisplayedAttributes(displayedAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"Avengers\",\n filter: \"release_date > 795484800\"\n)\nclient.index(\"movie_ratings\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"Batman\",\n filter: \"release_date > 795484800 AND (director = \\\"Tim Burton\\\" OR director = \\\"Christopher Nolan\\\"\")\nclient.index(\"movie_ratings\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"Planet of the Apes\",\n filter: \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\"))\nclient.index(\"movie_ratings\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"thriller\",\n filter: \"rating.users >= 90\"\n)\nclient.index(\"movie_ratings\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").search(SearchParameters(query: \"shifu\")) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"shifu\",\n offset: 1)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"shifu\",\n limit: 2)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(query: \"\", hitsPerPage: 15)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(query: \"\", page: 15)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"shifu\",\n attributesToRetrieve: [\"overview\", \"title\"])\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"shifu\",\n attributesToCrop: [\"overview\"],\n cropLength: 5)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"shifu\",\n attributesToCrop: [\"overview\"],\n cropMarker: \"[…]\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"winter feast\",\n attributesToHighlight: [\"overview\"])\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"winter feast\",\n attributesToHighlight: [\"overview\"],\n highlightPreTag: \"\",\n highlightPostTag: \"\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"winter feast\",\n showMatchesPosition: true)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let path = Bundle.main.url(forResource: \"movies\", withExtension: \"json\")!\nlet documents: Data = try Data(contentsOf: path)\n\nclient.index(\"movies\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "// Add this to your `Package.swift`\ndependencies: [\n .package(url: \"https://github.com/meilisearch/meilisearch-swift.git\", from: \"0.17.0\")\n]\n\n// In your .swift file:\nlet path = Bundle.main.url(forResource: \"movies\", withExtension: \"json\")!\nlet documents: Data = try Data(contentsOf: path)\nlet client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"aSampleMasterKey\")\n\nclient.index(\"movies\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.getTask(taskUid: 0) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").search(SearchParameters(query: \"botman\")) { (result) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let file = \"meteorites.json\"\nlet path = URL(fileURLWithPath: file)\nlet documents: Data = try Data(contentsOf: path)\n\nclient.index(\"meteorites\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let rankingRules: [String] = [\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\"\n]\nclient.index(\"movies\").updateRankingRules(rankingRules) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let displayedAttributes: [String] = [\"title\", \"overview\", \"poster\"]\nclient.index(\"movies\").updateDisplayedAttributes(displayedAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" - }, - { - "lang": "Swift", - "source": "let searchableAttributes: [String] = [\"title\"]\nclient.index(\"movies\").updateSearchableAttributes(searchableAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let stopWords: [String] = [\"the\"]\nclient.index(\"movies\").updateStopWords(stopWords) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let synonyms: [String: [String]] = [\n \"winnie\": [\"piglet\"],\n \"piglet\": [\"winnie\"]\n]\n client.index(\"movies\").updateSynonyms(synonyms) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"\",\n filter: \"mass < 200\"\n )\n client.index(\"meteorites\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n }" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"\",\n filter: \"_geoRadius(46.9480, 7.4474, 210000)\"\n)\nclient.index(\"meteorites\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"\",\n sort: [\"_geoPoint(48.8583701, 2.2922926):asc\"]\n)\nclient.index(\"meteorites\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"\",\n filter: \"mass < 200\",\n sort: [\"mass:asc\"]\n)\nclient.index(\"meteorites\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let settings = Setting(\n filterableAttributes: [\"mass\", \"_geo\"],\n sortableAttributes: [\"mass\", \"_geo\"]\n)\nclient.index(\"meteorites\").updateSettings(settings) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"thriller\",\n filter: [\n [\n \"genres = Horror\",\n \"genres = Mystery\"\n ],\n \"director = \\\"Jordan Peele\\\"\"\n ])\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"\\\"african american\\\" horror\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"masterKey\")\nclient.getKeys { result in\n switch result {\n case .success(let keys):\n print(keys)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").updateSortableAttributes([\"price\", \"author\"]) { (result: Result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let rankingRules: [String] = [\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\"\n]\nclient.index(\"books\").updateRankingRules(rankingRules) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"science fiction\",\n sort: [\"rating.users:asc\"]\n)\nclient.index(\"books\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"science fiction\",\n sort: [\"price:asc\"]\n)\nclient.index(\"books\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"butler\",\n sort: [\"author:desc\"]\n)\nclient.index(\"books\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"science fiction\",\n sort: [\"price:asc\"]\n)\nclient.index(\"books\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.index(\"restaurants\").updateFilterableAttributes([\"_geo\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n filter: \"_geoRadius(45.472735, 9.184019, 2000)\"\n)\nclient.index(\"restaurants\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n filter: \"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\"\n)\nclient.index(\"restaurants\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n filter: \"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\"\n)\nclient.index(\"restaurants\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.index(\"restaurants\").updateSortableAttributes([\"_geo\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"\",\n sort: [\"_geoPoint(48.8561446, 2.2978204):asc\"]\n)\nclient.index(\"restaurants\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"\",\n sort: [\"_geoPoint(48.8561446, 2.2978204):asc\", \"rating:desc\"]\n)\nclient.index(\"restaurants\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"apiKey\")\nclient.index(\"patient_medical_records\")\n .search(SearchParameters(query: \"\")) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"masterKey\")\nlet keyParams = KeyUpdateParams(description: \"Default Search API Key\")\n\nclient.updateKey(key: \"74c9c733-3368-4738-bbe5-1d18a5fecb37\", keyParams: keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"masterKey\")\n\nlet keyParams = KeyParams(\n description: \"Search patient records key\",\n actions: [\"search\"],\n indexes: [\"patient_medical_records\"],\n expiresAt: \"2023-01-01T00:00:00Z\"\n)\nclient.createKey(keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"masterKey\")\n\nclient.getKeys() { result in\n switch result {\n case .success(let keys):\n print(keys)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"masterKey\")\n\nclient.deleteKey(keyOrUid: \"ac5cd97d-5a4b-4226-a868-2d0eb6d197ab\") { result in\n switch result {\n case .success:\n print(\"success\")\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.createIndex(uid: \"books\", primaryKey: \"reference_number\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let documents: Data = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Diary of a Wimpy Kid\",\n \"author\": \"Jeff Kinney\",\n \"genres\": [\"comedy\", \"humor\"],\n \"price\": 5\n }\n]\n\"\"\".data(using: .utf8)!\n\nclient.index(\"books\").addDocuments(documents: documents, primaryKey: \"reference_number\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.updateIndex(uid: \"movies\", primaryKey: \"title\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let synonyms: [String: [String]] = [\n \"great\": [\"fantastic\"],\n \"fantastic\": [\"great\"]\n]\n\nclient.index(\"movies\").updateSynonyms(synonyms) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").updateFaceting({ maxValuesPerFacet: 2 })" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").updatePagination({ maxTotalHits: 500 })" - }, - { - "lang": "Swift", - "source": "let path = Bundle.main.url(forResource: \"games\", withExtension: \"json\")!\nlet documents: Data = try Data(contentsOf: path)\n\nclient.index(\"games\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.index(\"games\").updateFilterableAttributes([\"release_timestamp\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"\",\n filter: \"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\"\n)\nclient.index(\"games\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.index(\"games\").updateSortableAttributes([\"release_timestamp\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"\",\n sort: [\"release_timestamp:desc\"],\n)\n\nclient.index(\"games\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.getTasks(params: TasksQuery(statuses: [.failed, .canceled])) { result in\n switch result {\n case .success(let taskResult):\n print(taskResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.getTasks(params: TasksQuery(indexUids: \"movies\", types: [\"documentAdditionOrUpdate\", \"documentDeletion\"], statuses: [\"processing\"])) { result in\n switch result {\n case .success(let taskResult):\n print(taskResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").updateFilterableAttributes([\"genre\", \"director\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(query: \"dragon\", showRankingScore: true)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult.rankingScore)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(query: \"dragon\", showRankingScoreDetails: true)\nlet movies: Searchable = try await client.index(\"movies\").search(searchParameters)" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(query: \"adventure\", attributesToSearchOn: [\"overview\"])\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/version'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/jackets/settings/distinct-attribute' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"product_id\"'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movie_ratings/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"Avengers\",\n \"filter\": \"release_date > 795484800\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movie_ratings/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"Batman\",\n \"filter\": \"release_date > 795484800 AND (director = \\\"Tim Burton\\\" OR director = \\\"Christopher Nolan\\\")\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movie_ratings/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"Planet of the Apes\",\n \"filter\": \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\"\n }' \\" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movie_ratings/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"thriller\",\n \"filter\": \"rating.users >= 90\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"shifu\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"shifu\",\n \"offset\": 1\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"shifu\",\n \"limit\": 2\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"\",\n \"hitsPerPage\": 15\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"\",\n \"page\": 2\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"shifu\",\n \"attributesToRetrieve\": [\n \"overview\",\n \"title\"\n ]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"shifu\",\n \"attributesToCrop\": [\"overview\"],\n \"cropLength\": 5\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"shifu\",\n \"cropMarker\": \"[…]\",\n \"attributesToCrop\": [\"overview\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"winter feast\",\n \"attributesToHighlight\": [\"overview\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"winter feast\",\n \"attributesToHighlight\": [\"overview\"],\n \"highlightPreTag\": \"\",\n \"highlightPostTag\": \"\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"winter feast\",\n \"showMatchesPosition\": true\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents'\\\n -H 'Content-Type: application/json' \\\n --data-binary @movies.json" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents?primaryKey=id' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer aSampleMasterKey' \\\n --data-binary @movies.json" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks/0' \\\n -H 'Authorization: Bearer aSampleMasterKey'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer aSampleMasterKey' \\\n --data-binary '{ \"q\": \"botman\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/meteorites/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary @meteorites.json" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"poster\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"title\"]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/stop-words' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"the\"]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/synonyms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"winnie\": [\"piglet\"],\n \"piglet\": [\"winnie\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/meteorites/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"filter\": \"mass < 200\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/meteorites/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"filter\": \"_geoRadius(46.9480, 7.4474, 210000)\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/meteorites/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"sort\": [\"_geoPoint(48.8583701,2.2922926):asc\"] }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/meteorites/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"mass < 200\",\n \"sort\": [\"mass:asc\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/meteorites/settings' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filterableAttributes\": [\n \"mass\",\n \"_geo\"\n ],\n \"sortableAttributes\": [\n \"mass\",\n \"_geo\"\n ]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"thriller\",\n \"filter\": [\n [\n \"genres = Horror\",\n \"genres = Mystery\"\n ],\n \"director = \\\"Jordan Peele\\\"\"\n ]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n--data-binary '{ \"q\": \"\\\"african american\\\" horror\" }'" - }, - { - "lang": "cURL", - "source": "# replace the MASTER_KEY placeholder with your master key\ncurl \\\n -X GET 'MEILISEARCH_URL/keys' \\\n -H 'Authorization: Bearer MASTER_KEY'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"author\",\n \"price\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/ranking-rules' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"science fiction\",\n \"sort\": [\"rating.users:asc\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"science fiction\",\n \"sort\": [\"price:asc\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"butler\",\n \"sort\": [\"author:desc\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"science fiction\",\n \"sort\": [\"price:asc\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/restaurants/settings/filterable-attributes' \\\n -H 'Content-type:application/json' \\\n --data-binary '[\"_geo\"]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"filter\": \"_geoRadius(45.472735, 9.184019, 2000)\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"filter\": \"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"filter\": \"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"filter\": \"_geoPolygon([45.494181, 9.214024], [45.449484, 9.179175], [45.449486, 9.179177])\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/restaurants/settings/sortable-attributes' \\\n -H 'Content-type:application/json' \\\n --data-binary '[\"_geo\"]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"sort\": [\"_geoPoint(48.8561446,2.2978204):asc\"] }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{\n \"sort\": [\n \"_geoPoint(48.8561446,2.2978204):asc\",\n \"rating:desc\"\n ]\n }'" - }, - { - "lang": "cURL", - "source": "curl -X GET 'MEILISEARCH_URL/keys' \\\n-H 'Authorization: Bearer MASTER_KEY'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_ADMIN_API_KEY' \\\n --data-binary '{\n \"uid\": \"medical_records\",\n \"primaryKey\": \"id\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/medical_records/search' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{ \"q\": \"appointments\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/patient_medical_records/search' \\\n -H 'Authorization: Bearer API_KEY'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/keys/74c9c733-3368-4738-bbe5-1d18a5fecb37' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"description\": \"Default Search API Key\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/keys' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n --data-binary '{\n \"description\": \"Search patient records key\",\n \"actions\": [\"search\"],\n \"indexes\": [\"patient_medical_records\"],\n \"expiresAt\": \"2023-01-01T00:00:00Z\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys' \\\n -H 'Authorization: Bearer MASTER_KEY'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/keys/ac5cd97d-5a4b-4226-a868-2d0eb6d197ab' \\\n -H 'Authorization: Bearer MASTER_KEY'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"uid\": \"books\",\n \"primaryKey\": \"reference_number\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/documents?primaryKey=reference_number' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"reference_number\": 287947,\n \"title\": \"Diary of a Wimpy Kid\",\n \"author\": \"Jeff Kinney\",\n \"genres\": [\n \"comedy\",\n \"humor\"\n ],\n \"price\": 5.00\n }\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"primaryKey\": \"title\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/patient_medical_records/search' \\\n -H 'Authorization: Bearer TENANT_TOKEN'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"enabled\": false }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"disableOnAttributes\": [\"title\"] }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"disableOnWords\": [\n \"shrek\"\n ]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"minWordSizeForTypos\": {\n \"oneTypo\": 4,\n \"twoTypos\": 10\n }\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"disableOnNumbers\": true\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'http:///version' \\\n -H 'Authorization: Bearer API_KEY'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'http:///version' \\\n -H 'X-Meili-API-Key: API_KEY'" - }, - { - "lang": "cURL", - "source": "# whenever you see {index_uid}, replace it with your index's unique id\ncurl \\\n -X GET 'http:///indexes/{index_uid}/settings/displayed-attributes' \\\n -H 'X-Meili-API-Key: API_KEY'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'http:///indexes/{index_uid}/settings/displayed-attributes' \\\n -H 'X-Meili-API-Key: API_KEY'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'http:///dumps' \\\n -H 'Authorization: Bearer API_KEY'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"minWordSizeForTypos\": { \"oneTypo\": 4 }\n}'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/synonyms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"great\": [\"fantastic\"], \"fantastic\": [\"great\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/faceting' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxValuesPerFacet\": 2,\n \"sortFacetValuesBy\": {\n \"*\": \"count\"\n }\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/pagination' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxTotalHits\": 500\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"big fat liar\",\n \"matchingStrategy\": \"last\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"big fat liar\",\n \"matchingStrategy\": \"all\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"white shirt\",\n \"matchingStrategy\": \"frequency\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -x POST 'MEILISEARCH_URL/indexes/games/documents' \\\n -h 'content-type: application/json' \\\n --data-binary @games.json" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/games/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"release_timestamp\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/games/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"\",\n \"filter\": \"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/games/settings/sortable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"release_timestamp\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/games/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"\",\n \"sort\": [\"release_timestamp:desc\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks?statuses=failed'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks?statuses=failed,canceled'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks?indexUids=movies&types=documentAdditionOrUpdate,documentDeletion&statuses=processing'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/multi-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"federation\": {},\n \"queries\": [\n {\n \"indexUid\": \"movies\",\n \"q\": \"batman\"\n },\n {\n \"indexUid\": \"comics\",\n \"q\": \"batman\"\n }\n ]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"genres\", \"rating\", \"language\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"classic\",\n \"facets\": [\n \"genres\", \"rating\", \"language\"\n ]\n}'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movie_ratings/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"Batman\",\n \"facets\": [\"genres\", \"rating\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movie_ratings/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"genres\",\n \"director\",\n \"release_date\",\n \"ratings\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/faceting' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"sortFacetValuesBy\": {\n \"genres\": \"count\"\n }\n}'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"facetQuery\": \"c\",\n \"facetName\": \"genres\"\n}'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"dragon\",\n \"showRankingScore\": true\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"dragon\",\n \"showRankingScoreDetails\": true\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"adventure\",\n \"attributesToSearchOn\": [\"overview\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/searchable-attributes'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks/TASK_UID'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"-escape\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"-\\\"escape room\\\"\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'https://PROJECT_URL/events' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"eventType\": \"click\",\n \"eventName\": \"Search Result Clicked\",\n \"indexUid\": \"products\",\n \"userId\": \"SEARCH_USER_ID\",\n \"queryUid\": \"019a01b7-a1c2-7782-a410-bb1274c81393\",\n \"objectId\": \"0\",\n \"objectName\": \"DOCUMENT_DESCRIPTION\",\n \"position\": 0\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'https://PROJECT_URL/events' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"eventType\": \"conversion\",\n \"eventName\": \"Product Added To Cart\",\n \"indexUid\": \"products\",\n \"userId\": \"SEARCH_USER_ID\",\n \"objectId\": \"0\",\n \"objectName\": \"DOCUMENT_DESCRIPTION\",\n \"position\": 0\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n -H 'X-MS-USER-ID: MEILISEARCH_USER_ID' \\\n --data-binary '{}'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'https://PROJECT_URL/events' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n -H 'X-MS-USER-ID: SEARCH_USER_ID' \\\n --data-binary '{\n \"eventType\": \"click\",\n \"eventName\": \"Search Result Clicked\",\n \"indexUid\": \"products\",\n \"objectId\": \"0\",\n \"position\": 0\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'https://PROJECT_URL/events' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"eventType\": \"click\",\n \"userId\": \"SEARCH_USER_ID\",\n \"eventName\": \"Search Result Clicked\",\n \"indexUid\": \"products\",\n \"objectId\": \"0\",\n \"position\": 0\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"QUERY TERMS\",\n \"distinct\": \"ATTRIBUTE_A\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/products/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"product_id\",\n \"sku\",\n \"url\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/products/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"white shirt\",\n \"distinct\": \"sku\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n-X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n-H 'Content-Type: application/json' \\\n--data-binary '{\n \"q\": \"badman\",\n \"rankingScoreThreshold\": 0.2\n}'" - }, - { - "lang": "cURL", - "source": "curl \\\n-X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n-H 'Content-Type: application/json' \\\n--data-binary '{\n \"q\": \"QUERY TEXT IN JAPANESE\",\n \"locales\": [\"jpn\"]\n}'" - }, - { - "lang": "cURL", - "source": "curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'content-type: application/json' \\\n --data-binary '{\n \"q\": \"kitchen utensils\",\n \"hybrid\": {\n \"semanticRatio\": 0.9,\n \"embedder\": \"EMBEDDER_NAME\"\n }\n }'" - }, - { - "lang": "cURL", - "source": "curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'content-type: application/json' \\\n --data-binary '{\n \"vector\": [0, 1, 2],\n \"hybrid\": {\n \"embedder\": \"EMBEDDER_NAME\"\n }\n }'" - }, - { - "lang": "cURL", - "source": "curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'content-type: application/json' \\\n --data-binary '{\n \"q\": \"kitchen utensils\",\n \"retrieveVectors\": true,\n \"hybrid\": {\n \"embedder\": \"EMBEDDER_NAME\"\n }\n }'" - }, - { - "lang": "cURL", - "source": "curl -X PATCH 'MEILISEARCH_URL/indexes/movies/settings'\n -H 'Content-Type: application/json'\n -H 'Authorization: Bearer MEILISEARCH_API_KEY'\n --data-binary '{\n \"embedders\": {\n \"movies-text\": {\n \"source\": \"openAi\",\n \"apiKey\": \"OPENAI_API_KEY\",\n \"model\": \"text-embedding-3-small\",\n \"documentTemplate\": \"A movie titled '{{doc.title}}' released in {{ doc.release_date }}. The movie genres are: {{doc.genres}}. The story is about: {{doc.overview|truncatewords: 20}}\"\n }\n }\n }'" - }, - { - "lang": "cURL", - "source": "curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'content-type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"q\": \"batman\",\n \"hybrid\": {\n \"embedder\": \"EMBEDDER_NAME\"\n }\n }'" + "lang": "Python", + "source": "client.get_version()" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/similar' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"id\": 192,\n \"embedder\": \"EMBEDDER_NAME\"\n }'" + "lang": "Ruby", + "source": "client.version" }, { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_A' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"uid\": \"INDEX_B\" }'" + "lang": "Rust", + "source": "let version: Version = client\n .get_version()\n .await\n .unwrap();" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/multi-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"federation\": {},\n \"queries\": [\n {\n \"indexUid\": \"movies\",\n \"q\": \"batman\",\n \"federationOptions\": {\n \"remote\": \"ms-00\"\n }\n },\n {\n \"indexUid\": \"movies\",\n \"q\": \"batman\",\n \"federationOptions\": {\n \"remote\": \"ms-01\"\n }\n }\n ]" + "lang": "Swift", + "source": "client.version { (result) in\n switch result {\n case .success(let version):\n print(version)\n case .failure(let error):\n print(error)\n }\n}" }, { "lang": "cURL", - "source": "curl \\\n-X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n-H 'Content-Type: application/json' \\\n--data-binary '{\n \"hybrid\": {\n \"embedder\": \"EMBEDDER_NAME\"\n },\n \"media\": {\n \"FIELD_A\": \"VALUE_A\",\n \"FIELD_B\" : {\n \"FIELD_C\": \"VALUE_B\"\n \"FIELD_D\": \"VALUE_C\"\n }\n }\n}'" + "source": "curl \\\n -X GET 'MEILISEARCH_URL/version'" } ] } @@ -18003,6 +13946,8 @@ "tags": [ "Webhooks" ], + "summary": "List webhooks", + "description": "Get the list of all registered webhooks.", "operationId": "get_webhooks", "responses": { "200": { @@ -18086,6 +14031,8 @@ "tags": [ "Webhooks" ], + "summary": "Create a webhook", + "description": "Create a new webhook to receive task notifications.", "operationId": "post_webhook", "requestBody": { "content": { @@ -18175,6 +14122,8 @@ "tags": [ "Webhooks" ], + "summary": "Get a webhook", + "description": "Get a single webhook by its UUID.", "operationId": "get_webhook", "parameters": [ { @@ -18237,12 +14186,36 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.GetWebhook(\"WEBHOOK_UUID\");" + }, + { + "lang": "JS", + "source": "client.getWebhook(WEBHOOK_UUID)" + }, + { + "lang": "Python", + "source": "client.get_webhook('WEBHOOK_UID')" + }, + { + "lang": "Rust", + "source": "let webhook = client.get_webhook(\"WEBHOOK_UUID\").await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID'" + } ] }, "delete": { "tags": [ "Webhooks" ], + "summary": "Delete a webhook", + "description": "Delete an existing webhook by its UUID.", "operationId": "delete_webhook", "parameters": [ { @@ -18289,12 +14262,36 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.DeleteWebhook(\"WEBHOOK_UUID\");" + }, + { + "lang": "JS", + "source": "client.deleteWebhook(WEBHOOK_UUID)" + }, + { + "lang": "Python", + "source": "client.delete_webhook('WEBHOOK_UID')" + }, + { + "lang": "Rust", + "source": "client.delete_webhook(\"WEBHOOK_UUID\").await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID'" + } ] }, "patch": { "tags": [ "Webhooks" ], + "summary": "Update a webhook", + "description": "Update an existing webhook's URL or headers.", "operationId": "patch_webhook", "parameters": [ { @@ -18366,6 +14363,28 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.UpdateWebhook(\"WEBHOOK_UUID\", &meilisearch.UpdateWebhookRequest{\n Header: map[string]string{\n \"referer\": \"\"\n },\n});" + }, + { + "lang": "JS", + "source": "client.updateWebhook(WEBHOOK_UUID, {\n headers: {\n referer: null\n }\n})" + }, + { + "lang": "Python", + "source": "client.update_webhook('WEBHOOK_UID', {\n 'url': 'https://example.com/new-webhook',\n 'headers': {\"Authorization\":\"\", \"X-Custom-Header\":\"test\"},\n})" + }, + { + "lang": "Rust", + "source": "let mut update = meilisearch_sdk::webhooks::WebhookUpdate::new();\nupdate.remove_header(\"referer\");\nlet webhook = client\n .update_webhook(\"WEBHOOK_UUID\", &update)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"header\": {\n \"referer\": null\n }\n }'" + } ] } } @@ -18629,25 +14648,10 @@ "snapshotCreation", "export", "upgradeDatabase", - "indexCompaction" + "indexCompaction", + "networkTopologyChange" ], - "example": [ - "documentAdditionOrUpdate", - "documentEdition", - "documentDeletion", - "settingsUpdate", - "indexCreation", - "indexDeletion", - "indexUpdate", - "indexSwap", - "taskCancelation", - "taskDeletion", - "dumpCreation", - "snapshotCreation", - "export", - "upgradeDatabase", - "indexCompaction" - ] + "example": "documentAdditionOrUpdate" } }, "indexUids": { @@ -18944,6 +14948,9 @@ "immutable_api_key_updated_at", "immutable_index_created_at", "immutable_index_updated_at", + "import_task_already_received", + "import_task_unknown_remote", + "import_task_without_network_task", "index_already_exists", "index_creation_failed", "index_not_found", @@ -18985,6 +14992,7 @@ "invalid_index_offset", "invalid_index_primary_key", "invalid_index_custom_metadata", + "invalid_skip_creation", "invalid_index_uid", "invalid_multi_search_facets", "invalid_multi_search_facets_by_index", @@ -19000,9 +15008,9 @@ "invalid_multi_search_query_position", "invalid_multi_search_remote", "invalid_multi_search_weight", + "invalid_network_leader", "invalid_network_remotes", "invalid_network_self", - "invalid_network_sharding", "invalid_network_search_api_key", "invalid_network_write_api_key", "invalid_network_url", @@ -19107,7 +15115,9 @@ "missing_search_hybrid", "missing_swap_indexes", "missing_task_filters", + "network_version_mismatch", "no_space_left_on_device", + "not_leader", "payload_too_large", "remote_bad_response", "remote_bad_request", @@ -19121,6 +15131,9 @@ "batch_not_found", "too_many_open_files", "too_many_vectors", + "unexpected_network_previous_remotes", + "network_version_too_old", + "unprocessed_network_task", "unretrievable_document", "unretrievable_error_code", "unsupported_media_type", @@ -19208,7 +15221,6 @@ "CreateApiKey": { "type": "object", "required": [ - "uid", "actions", "indexes" ], @@ -19230,10 +15242,12 @@ "example": "Indexing Products API key" }, "uid": { - "type": "string", - "format": "uuid", + "type": [ + "string", + "null" + ], "description": "A uuid v4 to identify the API Key. If not specified, it's generated by Meilisearch.", - "example": null + "example": "01b4bc42-eb33-4041-b481-254d00cce834" }, "actions": { "type": "array", @@ -19265,6 +15279,60 @@ } } }, + "DbTaskNetwork": { + "oneOf": [ + { + "type": "object", + "description": "Tasks that were duplicated from `origin`", + "required": [ + "origin" + ], + "properties": { + "origin": { + "$ref": "#/components/schemas/Origin" + } + } + }, + { + "type": "object", + "description": "Tasks that were duplicated as `remote_tasks`", + "required": [ + "remote_tasks" + ], + "properties": { + "remote_tasks": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/RemoteTask" + }, + "propertyNames": { + "type": "string" + } + }, + "network_version": { + "type": "string", + "format": "uuid" + } + } + }, + { + "type": "object", + "description": "Document import tasks sent in the context of `network_change`", + "required": [ + "import_from", + "network_change" + ], + "properties": { + "import_from": { + "$ref": "#/components/schemas/ImportData" + }, + "network_change": { + "$ref": "#/components/schemas/Origin" + } + } + } + ] + }, "DetailsExportIndexSettings": { "allOf": [ { @@ -19479,6 +15547,20 @@ "string", "null" ] + }, + "movedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "minimum": 0 + }, + "message": { + "type": [ + "string", + "null" + ] } } } @@ -20150,6 +16232,33 @@ } } }, + "ImportData": { + "type": "object", + "description": "Import data stored in a task", + "required": [ + "remoteName", + "documentCount" + ], + "properties": { + "remoteName": { + "type": "string", + "description": "Remote that this task is imported from" + }, + "indexName": { + "type": [ + "string", + "null" + ], + "description": "Index relevant to this task" + }, + "documentCount": { + "type": "integer", + "format": "u-int64", + "description": "Number of documents in this task", + "minimum": 0 + } + } + }, "IndexCreateRequest": { "type": "object", "required": [ @@ -20243,14 +16352,12 @@ "properties": { "indexes": { "type": "array", - "items": false, - "prefixItems": [ - { - "type": "string" - }, - { - "type": "string" - } + "items": { + "type": "string" + }, + "example": [ + "indexA", + "indexB" ] }, "rename": { @@ -20382,25 +16489,10 @@ "snapshotCreation", "export", "upgradeDatabase", - "indexCompaction" + "indexCompaction", + "networkTopologyChange" ], - "example": [ - "documentAdditionOrUpdate", - "documentEdition", - "documentDeletion", - "settingsUpdate", - "indexCreation", - "indexDeletion", - "indexUpdate", - "indexSwap", - "taskCancelation", - "taskDeletion", - "dumpCreation", - "snapshotCreation", - "export", - "upgradeDatabase", - "indexCompaction" - ] + "example": "documentAdditionOrUpdate" }, "Locale": { "type": "string", @@ -20631,7 +16723,14 @@ "propertyNames": { "type": "string" }, - "example": "http://localhost:7700" + "example": { + "ms-00": { + "url": "http://localhost:7700" + }, + "ms-01": { + "url": "http://localhost:7701" + } + } }, "self": { "type": [ @@ -20640,12 +16739,32 @@ ], "example": "ms-00" }, - "sharding": { + "leader": { "type": [ - "boolean", + "string", "null" ], - "example": true + "example": "ms-00" + }, + "previousRemotes": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/Remote" + }, + "propertyNames": { + "type": "string" + }, + "example": { + "ms-00": { + "url": "http://localhost:7700" + }, + "ms-01": { + "url": "http://localhost:7701" + } + } } } }, @@ -20661,7 +16780,12 @@ }, "taskUid": { "type": "integer", + "format": "u-int32", "minimum": 0 + }, + "networkVersion": { + "type": "string", + "format": "uuid" } } }, @@ -21037,23 +17161,7 @@ "string", "null" ], - "example": { - "ms-0": { - "url": "http://localhost:7700", - "searchApiKey": null, - "writeApiKey": null - }, - "ms-1": { - "url": "http://localhost:7701", - "searchApiKey": "foo", - "writeApiKey": "bar" - }, - "ms-2": { - "url": "http://localhost:7702", - "searchApiKey": "bar", - "writeApiKey": "foo" - } - } + "example": "http://localhost:7700" }, "searchApiKey": { "type": [ @@ -22172,7 +18280,7 @@ "items": { "$ref": "#/components/schemas/LocalizedAttributesRuleView" }, - "example": 50 + "example": null }, "facetSearch": { "type": [ @@ -22456,7 +18564,7 @@ "items": { "$ref": "#/components/schemas/LocalizedAttributesRuleView" }, - "example": 50 + "example": null }, "facetSearch": { "type": [ @@ -22816,38 +18924,6 @@ } } }, - "TaskNetwork": { - "oneOf": [ - { - "type": "object", - "required": [ - "origin" - ], - "properties": { - "origin": { - "$ref": "#/components/schemas/Origin" - } - } - }, - { - "type": "object", - "required": [ - "remote_tasks" - ], - "properties": { - "remote_tasks": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/RemoteTask" - }, - "propertyNames": { - "type": "string" - } - } - } - } - ] - }, "TaskView": { "type": "object", "required": [ @@ -22870,8 +18946,8 @@ "null" ], "format": "u-int32", - "description": "The unique identifier of the index where this task is operated.", - "example": "movies", + "description": "The unique identifier of the batch where this task is grouped.", + "example": 12, "minimum": 0 }, "indexUid": { @@ -22946,7 +19022,7 @@ "type": "null" }, { - "$ref": "#/components/schemas/TaskNetwork" + "$ref": "#/components/schemas/DbTaskNetwork" } ] }, @@ -23172,6 +19248,14 @@ "name": "Stats", "description": "Stats gives extended information and metrics about indexes and the Meilisearch database." }, + { + "name": "Health", + "description": "The health check endpoint enables you to periodically test the health of your Meilisearch instance." + }, + { + "name": "Version", + "description": "Returns the version of the running Meilisearch instance." + }, { "name": "Tasks", "description": "The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html).", @@ -23299,4 +19383,4 @@ } } ] -} +} \ No newline at end of file From 74a717da5d6282fc9c5808c6cb364c58b987de40 Mon Sep 17 00:00:00 2001 From: curquiza Date: Thu, 5 Feb 2026 22:49:40 +0100 Subject: [PATCH 09/45] Remove useless files --- assets/meilisearch.json | 1 - learn/meilisearch.json | 1 - meilisearch-openapi.json | 23320 ------------------------------------- 3 files changed, 23322 deletions(-) delete mode 100644 assets/meilisearch.json delete mode 100644 learn/meilisearch.json delete mode 100644 meilisearch-openapi.json diff --git a/assets/meilisearch.json b/assets/meilisearch.json deleted file mode 100644 index 778a31ae1..000000000 --- a/assets/meilisearch.json +++ /dev/null @@ -1 +0,0 @@ -{"openapi":"3.1.0","info":{"title":"meilisearch","description":"Meilisearch HTTP server","contact":{"name":"Quentin de Quelen","email":"quentin@dequelen.me"},"license":{"name":"MIT","identifier":"MIT"},"version":"1.22.1"},"servers":[{"url":"/","description":"Local server"}],"paths":{"/batches":{"get":{"tags":["Batches"],"summary":"Get batches","description":"List all batches, regardless of index. The batch objects are contained in the results array.\nBatches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first.\nBatch results are paginated and can be filtered with query parameters.","operationId":"get_batches","parameters":[{"name":"limit","in":"query","description":"Maximum number of results to return.","required":false,"schema":{"type":"integer","format":"u-int32","default":20,"minimum":0},"example":12},{"name":"from","in":"query","description":"Fetch the next set of results from the given uid.","required":false,"schema":{"type":"integer","format":"u-int32","minimum":0},"example":12421},{"name":"reverse","in":"query","description":"The order you want to retrieve the objects.","required":false,"schema":{"type":"boolean"},"example":true},{"name":"batchUids","in":"query","description":"Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character.","required":false,"schema":{"type":"integer","format":"u-int32","minimum":0},"example":12421},{"name":"uids","in":"query","description":"Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"canceledBy","in":"query","description":"Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[374,"*"]},{"name":"types","in":"query","description":"Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["documentAdditionOrUpdate","*"]},{"name":"statuses","in":"query","description":"Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Status"}},"example":["succeeded","failed","canceled","enqueued","processing","*"]},{"name":"indexUids","in":"query","description":"Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["movies","theater","*"]},{"name":"afterEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]}],"responses":{"200":{"description":"Return the batches","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllBatches"},"example":{"results":[{"uid":2,"details":{"stopWords":["of","the"]},"progress":null,"stats":{"totalNbTasks":1,"status":{"succeeded":1},"types":{"settingsUpdate":1},"indexUids":{"INDEX_NAME":1}},"duration":"PT0.110083S","startedAt":"2024-12-10T15:49:04.995321Z","finishedAt":"2024-12-10T15:49:05.105404Z"}],"total":3,"limit":1,"from":2,"next":1}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["tasks.get","tasks.*","*"]}]}},"/batches/{batchUid}":{"get":{"tags":["Batches"],"summary":"Get one batch","description":"Get a single batch.","operationId":"get_batch","parameters":[{"name":"batchUid","in":"path","description":"The unique batch id","required":true,"schema":{"type":"string"},"example":"8685"}],"responses":{"200":{"description":"Return the batch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchView"},"example":{"uid":1,"details":{"receivedDocuments":1,"indexedDocuments":1},"progress":null,"stats":{"totalNbTasks":1,"status":{"succeeded":1},"types":{"documentAdditionOrUpdate":1},"indexUids":{"INDEX_NAME":1}},"duration":"PT0.364788S","startedAt":"2024-12-10T15:48:49.672141Z","finishedAt":"2024-12-10T15:48:50.036929Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["tasks.get","tasks.*","*"]}]}},"/dumps":{"post":{"tags":["Dumps"],"summary":"Create a dump","description":"Triggers a dump creation process. Once the process is complete, a dump is created in the\n[dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory).\nIf the dump directory does not exist yet, it will be created.","operationId":"create_dump","responses":{"202":{"description":"Dump is being created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":0,"indexUid":null,"status":"enqueued","type":"DumpCreation","enqueuedAt":"2021-01-01T09:39:00.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["dumps.create","dumps.*","*"]}]}},"/experimental-features":{"get":{"tags":["Experimental features"],"summary":"Get all experimental features","description":"Get a list of all experimental features that can be activated via the /experimental-features route and whether or not they are currently activated.","operationId":"get_features","responses":{"200":{"description":"Experimental features are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeTogglableFeatures"},"example":{"metrics":true,"logsRoute":false,"editDocumentsByFunction":false,"containsFilter":false,"network":false,"getTaskDocumentsRoute":false,"compositeEmbedders":false,"chatCompletions":false,"multimodal":false,"vectorStoreSetting":false}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["experimental_features.get","experimental_features.*","*"]}]},"patch":{"tags":["Experimental features"],"summary":"Configure experimental features","description":"Activate or deactivate experimental features.","operationId":"patch_features","responses":{"200":{"description":"Experimental features are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeTogglableFeatures"},"example":{"metrics":true,"logsRoute":false,"editDocumentsByFunction":false,"containsFilter":false,"network":false,"getTaskDocumentsRoute":false,"compositeEmbedders":false,"chatCompletions":false,"multimodal":false,"vectorStoreSetting":false}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["experimental_features.update","experimental_features.*","*"]}]}},"/export":{"post":{"tags":["Export"],"operationId":"export","responses":{"202":{"description":"Export successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":1,"status":"enqueued","type":"export","enqueuedAt":"2021-08-11T09:25:53.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["export","*"]}]}},"/health":{"get":{"tags":["Health"],"summary":"Get Health","description":"The health check endpoint enables you to periodically test the health of your Meilisearch instance.","operationId":"get_health","responses":{"200":{"description":"Instance is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"},"example":{"status":"available"}}}}}}},"/indexes":{"get":{"tags":["Indexes"],"summary":"List indexes","description":"List all indexes.","operationId":"list_indexes","parameters":[{"name":"offset","in":"query","description":"The number of indexes to skip before starting to retrieve anything","required":false,"schema":{"type":"integer","minimum":0},"example":100},{"name":"limit","in":"query","description":"The number of indexes to retrieve","required":false,"schema":{"type":"integer","default":20,"minimum":0},"example":1}],"responses":{"200":{"description":"Indexes are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationView_IndexView"},"example":{"results":[{"uid":"movies","primaryKey":"movie_id","createdAt":"2019-11-20T09:40:33.711324Z","updatedAt":"2019-11-20T09:40:33.711324Z"}],"limit":1,"offset":0,"total":1}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["indexes.get","indexes.*","*"]}]},"post":{"tags":["Indexes"],"summary":"Create index","description":"Create an index.","operationId":"create_index","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexCreateRequest"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"indexCreation","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["indexes.create","indexes.*","*"]}]}},"/indexes/{indexUid}":{"get":{"tags":["Indexes"],"summary":"Get index","description":"Get information about an index.","operationId":"get_index","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"The index is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexView"},"example":{"uid":"movies","primaryKey":"movie_id","createdAt":"2019-11-20T09:40:33.711324Z","updatedAt":"2019-11-20T09:40:33.711324Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["indexes.get","indexes.*","*"]}]},"delete":{"tags":["Indexes"],"summary":"Delete index","description":"Delete an index.","operationId":"delete_index","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"202":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":0,"indexUid":"movies","status":"enqueued","type":"indexDeletion","enqueuedAt":"2021-01-01T09:39:00.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["indexes.delete","indexes.*","*"]}]},"patch":{"tags":["Indexes"],"summary":"Update index","description":"Update the `primaryKey` of an index.\nReturn an error if the index doesn't exists yet or if it contains documents.","operationId":"update_index","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIndexRequest"}}},"required":true},"responses":{"202":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":0,"indexUid":"movies","status":"enqueued","type":"indexUpdate","enqueuedAt":"2021-01-01T09:39:00.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["indexes.update","indexes.*","*"]}]}},"/indexes/{indexUid}/delete-batch":{"post":{"tags":["Documents"],"summary":"Delete documents by batch","description":"Delete a set of documents based on an array of document ids.","operationId":"delete_documents_batch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentAdditionOrUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.delete","documents.*","*"]}]}},"/indexes/{indexUid}/documents":{"get":{"tags":["Documents"],"summary":"Get documents","description":"Get documents by batches.","operationId":"get_documents","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"retrieveVectors","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"filter","in":"query","required":false,"schema":{"type":"string"},"example":"popularity > 1000"},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationView_Value"},"example":{"results":[{"id":25684,"title":"American Ninja 5","poster":"https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg","overview":"When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.","release_date":725846400},{"id":45881,"title":"The Bridge of San Luis Rey","poster":"https://image.tmdb.org/t/p/w500/4X7quIcdkc24Cveg5XdpfRqxtYA.jpg","overview":"The Bridge of San Luis Rey is American author Thornton Wilder's second novel, first published in 1927 to worldwide acclaim. It tells the story of several interrelated people who die in the collapse of an Inca rope-fiber suspension bridge in Peru, and the events that lead up to their being on the bridge.[ A friar who has witnessed the tragic accident then goes about inquiring into the lives of the victims, seeking some sort of cosmic answer to the question of why each had to die. The novel won the Pulitzer Prize in 1928.","release_date":1072915200}],"limit":20,"offset":0,"total":2}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["documents.get","documents.*","*"]}]},"put":{"tags":["Documents"],"summary":"Add or update documents","description":"Add a list of documents or update them if they already exist.\nIf you send an already existing document (same id) the old document will be only partially updated according to the fields of the new document. Thus, any fields not present in the new document are kept and remained unchanged.\nTo completely overwrite a document, see Add or replace documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document. `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved `_vectors` field in your documents.\n> It can accept an array of floats, multiple arrays of floats in an outer array or an object.\n> This object accepts keys corresponding to the different embedders defined your index settings.","operationId":"update_documents","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"primaryKey","in":"query","description":"The primary key of the documents. primaryKey is optional. If you want to set the primary key of your index through this route,\nit only has to be done the first time you add documents to the index. After which it will be ignored if given.","required":false,"schema":{"type":"string"},"example":"id"},{"name":"csvDelimiter","in":"query","description":"Customize the csv delimiter when importing CSV documents.","required":true,"schema":{"type":"string","default":","},"example":";"}],"requestBody":{"content":{"application/json":{"schema":{}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentAdditionOrUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.add","documents.*","*"]}]},"post":{"tags":["Documents"],"summary":"Add or replace documents","description":"Add a list of documents or replace them if they already exist.\n\nIf you send an already existing document (same id) the whole existing document will be overwritten by the new document. Fields previously in the document not present in the new document are removed.\n\nFor a partial update of the document see Add or update documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document. `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved `_vectors` field in your documents.\n> It can accept an array of floats, multiple arrays of floats in an outer array or an object.\n> This object accepts keys corresponding to the different embedders defined your index settings.","operationId":"replace_documents","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"primaryKey","in":"query","description":"The primary key of the documents. primaryKey is optional. If you want to set the primary key of your index through this route,\nit only has to be done the first time you add documents to the index. After which it will be ignored if given.","required":false,"schema":{"type":"string"},"example":"id"},{"name":"csvDelimiter","in":"query","description":"Customize the csv delimiter when importing CSV documents.","required":true,"schema":{"type":"string","default":","},"example":";"}],"requestBody":{"content":{"application/json":{"schema":{}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentAdditionOrUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.add","documents.*","*"]}]},"delete":{"tags":["Documents"],"summary":"Delete all documents","description":"Delete all documents in the specified index.","operationId":"clear_all_documents","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentDeletion","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.delete","documents.*","*"]}]}},"/indexes/{indexUid}/documents/delete":{"post":{"tags":["Documents"],"summary":"Delete documents by filter","description":"Delete a set of documents based on a filter.","operationId":"delete_documents_by_filter","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDeletionByFilter"}}},"required":true},"responses":{"202":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentDeletion","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.delete","documents.*","*"]}]}},"/indexes/{indexUid}/documents/edit":{"post":{"tags":["Documents"],"summary":"Edit documents by function.","description":"Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to edit one or more documents directly in Meilisearch.","operationId":"edit_documents_by_function","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentEditionByFunction"}}},"required":true},"responses":{"202":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentDeletion","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.*","*"]}]}},"/indexes/{indexUid}/documents/fetch":{"post":{"tags":["Documents"],"summary":"Get documents with POST","description":"Get a set of documents.","operationId":"documents_by_query_post","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowseQuery"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationView_Value"},"example":{"results":[{"title":"The Travels of Ibn Battuta","genres":["Travel","Adventure"],"language":"English","rating":4.5},{"title":"Pride and Prejudice","genres":["Classics","Fiction","Romance","Literature"],"language":"English","rating":4}],"offset":0,"limit":2,"total":5}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.delete","documents.*","*"]}]}},"/indexes/{indexUid}/documents/{documentId}":{"get":{"tags":["Documents"],"summary":"Get one document","description":"Get one document from its primary key.","operationId":"get_document","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"documentId","in":"path","description":"The document identifier","required":true,"schema":{"type":"string"},"example":"85087"},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"retrieveVectors","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"The document is returned","content":{"application/json":{"schema":{},"example":{"id":25684,"title":"American Ninja 5","poster":"https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg","overview":"When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.","release_date":725846400}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Document not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Document `a` not found.","code":"document_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#document_not_found"}}}}},"security":[{"Bearer":["documents.get","documents.*","*"]}]},"delete":{"tags":["Documents"],"summary":"Delete a document","description":"Delete a single document by id.","operationId":"delete_document","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"documentId","in":"path","description":"Document Identifier","required":true,"schema":{"type":"string"},"example":"853"}],"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentAdditionOrUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.delete","documents.*","*"]}]}},"/indexes/{indexUid}/facet-search":{"post":{"tags":["Facet Search"],"summary":"Perform a facet search","description":"Search for a facet value within a given facet.","operationId":"search","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacetSearchQuery"}}},"required":true},"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"},"example":{"hits":[{"id":2770,"title":"American Pie 2","poster":"https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg","overview":"The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…","release_date":997405200},{"id":190859,"title":"American Sniper","poster":"https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg","overview":"U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…","release_date":1418256000}],"offset":0,"limit":2,"estimatedTotalHits":976,"processingTimeMs":35,"query":"american "}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["search","*"]}]}},"/indexes/{indexUid}/search":{"get":{"tags":["Indexes","Search"],"summary":"Search an index with GET","description":"Search for documents matching a specific query in the given index.","operationId":"search_with_url_query","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"vector","in":"query","required":true,"schema":{"type":"array","items":{"type":"number","format":"float"}},"explode":false},{"name":"offset","in":"query","required":true,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"limit","in":"query","required":true,"schema":{"type":"integer","default":20,"minimum":0}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"hitsPerPage","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"attributesToRetrieve","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"retrieveVectors","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"attributesToCrop","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"cropLength","in":"query","required":true,"schema":{"type":"integer","default":10,"minimum":0}},{"name":"attributesToHighlight","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"filter","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"distinct","in":"query","required":false,"schema":{"type":"string"}},{"name":"showMatchesPosition","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"showRankingScore","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"showRankingScoreDetails","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"facets","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"highlightPreTag","in":"query","required":true,"schema":{"type":"string","default":""}},{"name":"highlightPostTag","in":"query","required":true,"schema":{"type":"string","default":""}},{"name":"cropMarker","in":"query","required":true,"schema":{"type":"string","default":"…"}},{"name":"matchingStrategy","in":"query","required":true,"schema":{"$ref":"#/components/schemas/MatchingStrategy"}},{"name":"attributesToSearchOn","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"hybridEmbedder","in":"query","required":false,"schema":{"type":"string"}},{"name":"hybridSemanticRatio","in":"query","required":true,"schema":{"type":"number","format":"float"}},{"name":"rankingScoreThreshold","in":"query","required":true,"schema":{"type":"number","format":"float"}},{"name":"locales","in":"query","required":true,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Locale"}},"explode":false}],"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"},"example":{"hits":[{"id":2770,"title":"American Pie 2","poster":"https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg","overview":"The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…","release_date":997405200},{"id":190859,"title":"American Sniper","poster":"https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg","overview":"U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…","release_date":1418256000}],"offset":0,"limit":2,"estimatedTotalHits":976,"processingTimeMs":35,"query":"american "}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["search","*"]}]},"post":{"tags":["Indexes","Search"],"summary":"Search with POST","description":"Search for documents matching a specific query in the given index.","operationId":"search_with_post","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchQuery"}}},"required":true},"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"},"example":{"hits":[{"id":2770,"title":"American Pie 2","poster":"https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg","overview":"The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…","release_date":997405200},{"id":190859,"title":"American Sniper","poster":"https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg","overview":"U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…","release_date":1418256000}],"offset":0,"limit":2,"estimatedTotalHits":976,"processingTimeMs":35,"query":"american "}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["search","*"]}]}},"/indexes/{indexUid}/settings":{"get":{"tags":["Settings"],"summary":"All settings","description":"This route allows you to retrieve, configure, or reset all of an index's settings at once.","operationId":"get_all","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"Settings are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings_Unchecked"},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset settings","description":"Reset all the settings of an index to their default value.","operationId":"delete_all","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update settings","description":"Update the settings of an index.\nPassing null to an index setting will reset it to its default value.\nUpdates in the settings route are partial. This means that any parameters not provided in the body will be left unchanged.\nIf the provided index does not exist, it will be created.","operationId":"update_all","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings_Unchecked"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/chat":{"get":{"tags":["Settings"],"summary":"Get chat","description":"Get an user defined chat","operationId":"getchat","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"chat is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSettings"},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset chat","description":"Reset an index's chat to its default value","operationId":"deletechat","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update chat","description":"Update an index's user defined chat","operationId":"patchchat","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/dictionary":{"get":{"tags":["Settings"],"summary":"Get dictionary","description":"Get an user defined dictionary","operationId":"getdictionary","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"dictionary is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update dictionary","description":"Update an index's user defined dictionary","operationId":"putdictionary","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset dictionary","description":"Reset an index's dictionary to its default value","operationId":"deletedictionary","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/displayed-attributes":{"get":{"tags":["Settings"],"summary":"Get displayedAttributes","description":"Get an user defined displayedAttributes","operationId":"getdisplayedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"displayedAttributes is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update displayedAttributes","description":"Update an index's user defined displayedAttributes","operationId":"putdisplayedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset displayedAttributes","description":"Reset an index's displayedAttributes to its default value","operationId":"deletedisplayedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/distinct-attribute":{"get":{"tags":["Settings"],"summary":"Get distinctAttribute","description":"Get an user defined distinctAttribute","operationId":"getdistinctAttribute","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"distinctAttribute is returned","content":{"application/json":{"schema":{"type":"string"},"example":""}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update distinctAttribute","description":"Update an index's user defined distinctAttribute","operationId":"putdistinctAttribute","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset distinctAttribute","description":"Reset an index's distinctAttribute to its default value","operationId":"deletedistinctAttribute","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/embedders":{"get":{"tags":["Settings"],"summary":"Get embedders","description":"Get an user defined embedders","operationId":"getembedders","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"embedders is returned","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/SettingEmbeddingSettings"},"propertyNames":{"type":"string"}},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset embedders","description":"Reset an index's embedders to its default value","operationId":"deleteembedders","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/SettingEmbeddingSettings"},"propertyNames":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update embedders","description":"Update an index's user defined embedders","operationId":"patchembedders","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/SettingEmbeddingSettings"},"propertyNames":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/facet-search":{"get":{"tags":["Settings"],"summary":"Get facetSearch","description":"Get an user defined facetSearch","operationId":"getfacetSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"facetSearch is returned","content":{"application/json":{"schema":{"type":"boolean"},"example":false}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update facetSearch","description":"Update an index's user defined facetSearch","operationId":"putfacetSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"boolean"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset facetSearch","description":"Reset an index's facetSearch to its default value","operationId":"deletefacetSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"boolean"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/faceting":{"get":{"tags":["Settings"],"summary":"Get faceting","description":"Get an user defined faceting","operationId":"getfaceting","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"faceting is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacetingSettings"},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset faceting","description":"Reset an index's faceting to its default value","operationId":"deletefaceting","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacetingSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update faceting","description":"Update an index's user defined faceting","operationId":"patchfaceting","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacetingSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/filterable-attributes":{"get":{"tags":["Settings"],"summary":"Get filterableAttributes","description":"Get an user defined filterableAttributes","operationId":"getfilterableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"filterableAttributes is returned","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FilterableAttributesRule"}},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update filterableAttributes","description":"Update an index's user defined filterableAttributes","operationId":"putfilterableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FilterableAttributesRule"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset filterableAttributes","description":"Reset an index's filterableAttributes to its default value","operationId":"deletefilterableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FilterableAttributesRule"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/localized-attributes":{"get":{"tags":["Settings"],"summary":"Get localizedAttributes","description":"Get an user defined localizedAttributes","operationId":"getlocalizedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"localizedAttributes is returned","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LocalizedAttributesRuleView"}},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update localizedAttributes","description":"Update an index's user defined localizedAttributes","operationId":"putlocalizedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LocalizedAttributesRuleView"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset localizedAttributes","description":"Reset an index's localizedAttributes to its default value","operationId":"deletelocalizedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LocalizedAttributesRuleView"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/non-separator-tokens":{"get":{"tags":["Settings"],"summary":"Get nonSeparatorTokens","description":"Get an user defined nonSeparatorTokens","operationId":"getnonSeparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"nonSeparatorTokens is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update nonSeparatorTokens","description":"Update an index's user defined nonSeparatorTokens","operationId":"putnonSeparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset nonSeparatorTokens","description":"Reset an index's nonSeparatorTokens to its default value","operationId":"deletenonSeparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/pagination":{"get":{"tags":["Settings"],"summary":"Get pagination","description":"Get an user defined pagination","operationId":"getpagination","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"pagination is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationSettings"},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset pagination","description":"Reset an index's pagination to its default value","operationId":"deletepagination","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update pagination","description":"Update an index's user defined pagination","operationId":"patchpagination","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/prefix-search":{"get":{"tags":["Settings"],"summary":"Get prefixSearch","description":"Get an user defined prefixSearch","operationId":"getprefixSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"prefixSearch is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrefixSearchSettings"},"example":"indexingTime"}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update prefixSearch","description":"Update an index's user defined prefixSearch","operationId":"putprefixSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrefixSearchSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset prefixSearch","description":"Reset an index's prefixSearch to its default value","operationId":"deleteprefixSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrefixSearchSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/proximity-precision":{"get":{"tags":["Settings"],"summary":"Get proximityPrecision","description":"Get an user defined proximityPrecision","operationId":"getproximityPrecision","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"proximityPrecision is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProximityPrecisionView"},"example":"byWord"}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update proximityPrecision","description":"Update an index's user defined proximityPrecision","operationId":"putproximityPrecision","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProximityPrecisionView"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset proximityPrecision","description":"Reset an index's proximityPrecision to its default value","operationId":"deleteproximityPrecision","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProximityPrecisionView"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/ranking-rules":{"get":{"tags":["Settings"],"summary":"Get rankingRules","description":"Get an user defined rankingRules","operationId":"getrankingRules","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"rankingRules is returned","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RankingRuleView"}},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update rankingRules","description":"Update an index's user defined rankingRules","operationId":"putrankingRules","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RankingRuleView"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset rankingRules","description":"Reset an index's rankingRules to its default value","operationId":"deleterankingRules","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RankingRuleView"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/search-cutoff-ms":{"get":{"tags":["Settings"],"summary":"Get searchCutoffMs","description":"Get an user defined searchCutoffMs","operationId":"getsearchCutoffMs","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"searchCutoffMs is returned","content":{"application/json":{"schema":{"type":"integer","format":"u-int64","minimum":0},"example":0}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update searchCutoffMs","description":"Update an index's user defined searchCutoffMs","operationId":"putsearchCutoffMs","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"integer","format":"u-int64","minimum":0}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset searchCutoffMs","description":"Reset an index's searchCutoffMs to its default value","operationId":"deletesearchCutoffMs","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"integer","format":"u-int64","minimum":0}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/searchable-attributes":{"get":{"tags":["Settings"],"summary":"Get searchableAttributes","description":"Get an user defined searchableAttributes","operationId":"getsearchableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"searchableAttributes is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update searchableAttributes","description":"Update an index's user defined searchableAttributes","operationId":"putsearchableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset searchableAttributes","description":"Reset an index's searchableAttributes to its default value","operationId":"deletesearchableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/separator-tokens":{"get":{"tags":["Settings"],"summary":"Get separatorTokens","description":"Get an user defined separatorTokens","operationId":"getseparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"separatorTokens is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update separatorTokens","description":"Update an index's user defined separatorTokens","operationId":"putseparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset separatorTokens","description":"Reset an index's separatorTokens to its default value","operationId":"deleteseparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/sortable-attributes":{"get":{"tags":["Settings"],"summary":"Get sortableAttributes","description":"Get an user defined sortableAttributes","operationId":"getsortableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"sortableAttributes is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update sortableAttributes","description":"Update an index's user defined sortableAttributes","operationId":"putsortableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset sortableAttributes","description":"Reset an index's sortableAttributes to its default value","operationId":"deletesortableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/stop-words":{"get":{"tags":["Settings"],"summary":"Get stopWords","description":"Get an user defined stopWords","operationId":"getstopWords","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"stopWords is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update stopWords","description":"Update an index's user defined stopWords","operationId":"putstopWords","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset stopWords","description":"Reset an index's stopWords to its default value","operationId":"deletestopWords","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/synonyms":{"get":{"tags":["Settings"],"summary":"Get synonyms","description":"Get an user defined synonyms","operationId":"getsynonyms","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"synonyms is returned","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"propertyNames":{"type":"string"}},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update synonyms","description":"Update an index's user defined synonyms","operationId":"putsynonyms","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"propertyNames":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset synonyms","description":"Reset an index's synonyms to its default value","operationId":"deletesynonyms","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"propertyNames":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/typo-tolerance":{"get":{"tags":["Settings"],"summary":"Get typoTolerance","description":"Get an user defined typoTolerance","operationId":"gettypoTolerance","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"typoTolerance is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypoSettings"},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset typoTolerance","description":"Reset an index's typoTolerance to its default value","operationId":"deletetypoTolerance","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypoSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update typoTolerance","description":"Update an index's user defined typoTolerance","operationId":"patchtypoTolerance","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypoSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/vector-store":{"get":{"tags":["Settings"],"summary":"Get vectorStore","description":"Get an user defined vectorStore","operationId":"getvectorStore","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"vectorStore is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreBackend"},"example":"stable"}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset vectorStore","description":"Reset an index's vectorStore to its default value","operationId":"deletevectorStore","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreBackend"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update vectorStore","description":"Update an index's user defined vectorStore","operationId":"patchvectorStore","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreBackend"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/similar":{"get":{"tags":["Similar documents"],"summary":"Get similar documents with GET","description":"Retrieve documents similar to a specific search result.","operationId":"similar_get","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"id","in":"query","required":true,"schema":{"type":"string"}},{"name":"offset","in":"query","required":true,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"limit","in":"query","required":true,"schema":{"type":"integer","default":20,"minimum":0}},{"name":"attributes_to_retrieve","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"retrieve_vectors","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"filter","in":"query","required":false,"schema":{"type":"string"}},{"name":"show_ranking_score","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"show_ranking_score_details","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"ranking_score_threshold","in":"query","required":false,"schema":{"type":"number","format":"float"}},{"name":"embedder","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimilarResult"},"example":{"hits":[{"id":2770,"title":"American Pie 2","poster":"https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg","overview":"The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…","release_date":997405200},{"id":190859,"title":"American Sniper","poster":"https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg","overview":"U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…","release_date":1418256000}],"offset":0,"limit":2,"estimatedTotalHits":976,"processingTimeMs":35,"query":"american "}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["search","*"]}]},"post":{"tags":["Similar documents"],"summary":"Get similar documents with POST","description":"Retrieve documents similar to a specific search result.","operationId":"similar_post","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimilarQuery"}}},"required":true},"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimilarResult"},"example":{"hits":[{"id":2770,"title":"American Pie 2","poster":"https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg","overview":"The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…","release_date":997405200},{"id":190859,"title":"American Sniper","poster":"https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg","overview":"U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…","release_date":1418256000}],"offset":0,"limit":2,"estimatedTotalHits":976,"processingTimeMs":35,"query":"american "}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["search","*"]}]}},"/indexes/{indexUid}/stats":{"get":{"tags":["Stats"],"summary":"Get stats of index","description":"Get the stats of an index.","operationId":"get_index_stats","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"The stats of the index","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexStats"},"example":{"numberOfDocuments":10,"rawDocumentDbSize":10,"avgDocumentSize":10,"numberOfEmbeddings":10,"numberOfEmbeddedDocuments":10,"isIndexing":true,"fieldDistribution":{"genre":10,"author":9}}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["stats.get","stats.*","*"]}]}},"/keys":{"get":{"tags":["Keys"],"summary":"Get API Keys","description":"List all API Keys","operationId":"list_api_keys","parameters":[{"name":"offset","in":"query","required":true,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"limit","in":"query","required":true,"schema":{"type":"integer","default":20,"minimum":0}}],"responses":{"202":{"description":"List of keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationView_KeyView"},"example":{"results":[{"uid":"01b4bc42-eb33-4041-b481-254d00cce834","key":"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4","name":"An API Key","description":null,"actions":["documents.add"],"indexes":["movies"],"expiresAt":"2022-11-12T10:00:00Z","createdAt":"2021-11-12T10:00:00Z","updatedAt":"2021-11-12T10:00:00Z"}],"limit":20,"offset":0,"total":1}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["keys.get","keys.*","*"]}]},"post":{"tags":["Keys"],"summary":"Create an API Key","description":"Create an API Key.","operationId":"create_api_key","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKey"}}},"required":true},"responses":{"202":{"description":"Key has been created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyView"},"example":{"uid":"01b4bc42-eb33-4041-b481-254d00cce834","key":"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4","name":"Indexing Products API key","description":null,"actions":["documents.add"],"indexes":["products"],"expiresAt":"2021-11-13T00:00:00Z","createdAt":"2021-11-12T10:00:00Z","updatedAt":"2021-11-12T10:00:00Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["keys.create","keys.*","*"]}]}},"/keys/{uidOrKey}":{"get":{"tags":["Keys"],"summary":"Get an API Key","description":"Get an API key from its `uid` or its `key` field.","operationId":"get_api_key","parameters":[{"name":"uidOrKey","in":"path","description":"The `uid` or `key` field of an existing API key","required":true,"schema":{"type":"string","format":"password"},"example":"7b198a7f-52a0-4188-8762-9ad93cd608b2"}],"responses":{"200":{"description":"The key is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyView"},"example":{"uid":"01b4bc42-eb33-4041-b481-254d00cce834","key":"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4","name":"An API Key","description":null,"actions":["documents.add"],"indexes":["movies"],"expiresAt":"2022-11-12T10:00:00Z","createdAt":"2021-11-12T10:00:00Z","updatedAt":"2021-11-12T10:00:00Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["keys.get","keys.*","*"]}]},"delete":{"tags":["Keys"],"summary":"Delete a key","description":"Delete the specified API key.","operationId":"delete_api_key","parameters":[{"name":"uidOrKey","in":"path","description":"The `uid` or `key` field of an existing API key","required":true,"schema":{"type":"string","format":"password"},"example":"7b198a7f-52a0-4188-8762-9ad93cd608b2"}],"responses":{"204":{"description":"The key have been removed"},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["keys.delete","keys.*","*"]}]},"patch":{"tags":["Keys"],"summary":"Update a Key","description":"Update the name and description of an API key.\nUpdates to keys are partial. This means you should provide only the fields you intend to update, as any fields not present in the payload will remain unchanged.","operationId":"patch_api_key","parameters":[{"name":"uidOrKey","in":"path","description":"The `uid` or `key` field of an existing API key","required":true,"schema":{"type":"string","format":"password"},"example":"7b198a7f-52a0-4188-8762-9ad93cd608b2"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchApiKey"}}},"required":true},"responses":{"200":{"description":"The key have been updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyView"},"example":{"uid":"01b4bc42-eb33-4041-b481-254d00cce834","key":"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4","name":"An API Key","description":null,"actions":["documents.add"],"indexes":["movies"],"expiresAt":"2022-11-12T10:00:00Z","createdAt":"2021-11-12T10:00:00Z","updatedAt":"2021-11-12T10:00:00Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["keys.update","keys.*","*"]}]}},"/logs/stderr":{"post":{"tags":["Logs"],"summary":"Update target of the console logs","description":"This route lets you specify at runtime the level of the console logs outputted on stderr.","operationId":"update_stderr_target","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStderrLogs"}}},"required":true},"responses":{"204":{"description":"The console logs have been updated"},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["metrics.get","metrics.*","*"]}]}},"/logs/stream":{"post":{"tags":["Logs"],"summary":"Retrieve logs","description":"Stream logs over HTTP. The format of the logs depends on the configuration specified in the payload.\nThe logs are sent as multi-part, and the stream never stops, so make sure your clients correctly handle that.\nTo make the server stop sending you logs, you can call the `DELETE /logs/stream` route.\n\nThere can only be one listener at a timeand an error will be returned if you call this route while it's being used by another client.","operationId":"get_logs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLogs"}}},"required":true},"responses":{"200":{"description":"Logs are being returned","content":{"application/json":{"schema":{"type":"string"},"example":"\n2024-10-08T13:35:02.643750Z WARN HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: tracing_actix_web::middleware: Error encountered while processing the incoming HTTP request: ResponseError { code: 400, message: \"Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625\", error_code: \"feature_not_enabled\", error_type: \"invalid_request\", error_link: \"https://docs.meilisearch.com/errors#feature_not_enabled\" }\n2024-10-08T13:35:02.644191Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: meilisearch: close time.busy=1.66ms time.idle=658µs\n2024-10-08T13:35:18.564152Z INFO HTTP request{method=PATCH host=\"localhost:7700\" route=/experimental-features query_parameters= user_agent=curl/8.6.0 status_code=200}: meilisearch: close time.busy=1.17ms time.idle=127µs\n2024-10-08T13:35:23.094987Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=200}: meilisearch: close time.busy=2.12ms time.idle=595µs\n"}}},"400":{"description":"The route is already being used","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The `/logs/stream` route is currently in use by someone else.","code":"bad_request","type":"invalid_request","link":"https://docs.meilisearch.com/errors#bad_request"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["metrics.get","metrics.*","*"]}]},"delete":{"tags":["Logs"],"summary":"Stop retrieving logs","description":"Call this route to make the engine stops sending logs through the `POST /logs/stream` route.","operationId":"cancel_logs","responses":{"204":{"description":"Logs are being returned"},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["metrics.get","metrics.*","*"]}]}},"/metrics":{"get":{"tags":["Stats"],"summary":"Get prometheus metrics","description":"Retrieve metrics on the engine. See https://www.meilisearch.com/docs/learn/experimental/metrics\nCurrently, [the feature is experimental](https://www.meilisearch.com/docs/learn/experimental/overview)\nwhich means it must be enabled.","operationId":"get_metrics","responses":{"200":{"description":"The metrics of the instance","content":{"text/plain":{"schema":{"type":"string"},"example":"\n# HELP meilisearch_db_size_bytes Meilisearch DB Size In Bytes\n# TYPE meilisearch_db_size_bytes gauge\nmeilisearch_db_size_bytes 1130496\n# HELP meilisearch_http_requests_total Meilisearch HTTP requests total\n# TYPE meilisearch_http_requests_total counter\nmeilisearch_http_requests_total{method=\"GET\",path=\"/metrics\",status=\"400\"} 1\nmeilisearch_http_requests_total{method=\"PATCH\",path=\"/experimental-features\",status=\"200\"} 1\n# HELP meilisearch_http_response_time_seconds Meilisearch HTTP response times\n# TYPE meilisearch_http_response_time_seconds histogram\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.005\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.01\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.025\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.05\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.075\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.25\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.75\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"2.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"7.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"10\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"+Inf\"} 0\nmeilisearch_http_response_time_seconds_sum{method=\"GET\",path=\"/metrics\"} 0\nmeilisearch_http_response_time_seconds_count{method=\"GET\",path=\"/metrics\"} 0\n# HELP meilisearch_index_count Meilisearch Index Count\n# TYPE meilisearch_index_count gauge\nmeilisearch_index_count 1\n# HELP meilisearch_index_docs_count Meilisearch Index Docs Count\n# TYPE meilisearch_index_docs_count gauge\nmeilisearch_index_docs_count{index=\"mieli\"} 2\n# HELP meilisearch_is_indexing Meilisearch Is Indexing\n# TYPE meilisearch_is_indexing gauge\nmeilisearch_is_indexing 0\n# HELP meilisearch_last_update Meilisearch Last Update\n# TYPE meilisearch_last_update gauge\nmeilisearch_last_update 1726675964\n# HELP meilisearch_nb_tasks Meilisearch Number of tasks\n# TYPE meilisearch_nb_tasks gauge\nmeilisearch_nb_tasks{kind=\"indexes\",value=\"mieli\"} 39\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"canceled\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"enqueued\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"failed\"} 4\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"processing\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"succeeded\"} 35\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentAdditionOrUpdate\"} 9\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentDeletion\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentEdition\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"dumpCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexDeletion\"} 8\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexSwap\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexUpdate\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"settingsUpdate\"} 22\nmeilisearch_nb_tasks{kind=\"types\",value=\"snapshotCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskCancelation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskDeletion\"} 0\n# HELP meilisearch_used_db_size_bytes Meilisearch Used DB Size In Bytes\n# TYPE meilisearch_used_db_size_bytes gauge\nmeilisearch_used_db_size_bytes 409600\n"}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["metrics.get","metrics.*","*"]}]}},"/multi-search":{"post":{"tags":["Multi-search"],"summary":"Perform a multi-search","description":"Bundle multiple search queries in a single API request. Use this endpoint to search through multiple indexes at once.","operationId":"multi_search_with_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FederatedSearch"}}},"required":true},"responses":{"200":{"description":"Federated multi-search","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FederatedSearchResult"},"example":{"hits":[{"id":42,"title":"Batman returns","overview":"The overview of batman returns","_federation":{"indexUid":"movies","queriesPosition":0}},{"comicsId":"batman-killing-joke","description":"This comic is really awesome","title":"Batman: the killing joke","_federation":{"indexUid":"comics","queriesPosition":1}}],"processingTimeMs":0,"limit":20,"offset":0,"estimatedTotalHits":2,"semanticHitCount":0}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["search","*"]}]}},"/network":{"get":{"tags":["Network"],"summary":"Get network topology","description":"Get a list of all Meilisearch instances currently known to this instance.","operationId":"get_network","responses":{"200":{"description":"Known nodes are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Network"},"example":{"self":"ms-0","remotes":{"ms-0":{"url":"http://localhost:7700","searchApiKey":null,"writeApiKey":null},"ms-1":{"url":"http://localhost:7701","searchApiKey":"foo","writeApiKey":"bar"},"ms-2":{"url":"http://localhost:7702","searchApiKey":"bar","writeApiKey":"foo"}}}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["network.get","*"]}]},"patch":{"tags":["Network"],"summary":"Configure Network","description":"Add or remove nodes from network.","operationId":"patch_network","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Network"}}},"required":true},"responses":{"200":{"description":"New network state is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Network"},"example":{"self":"ms-0","remotes":{"ms-0":{"url":"http://localhost:7700","searchApiKey":null,"writeApiKey":null},"ms-1":{"url":"http://localhost:7701","searchApiKey":"foo","writeApiKey":"bar"},"ms-2":{"url":"http://localhost:7702","searchApiKey":"bar","writeApiKey":"foo"}}}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["network.update","*"]}]}},"/snapshots":{"post":{"tags":["Snapshots"],"summary":"Create a snapshot","description":"Triggers a snapshot creation process. Once the process is complete, a snapshot is created in the snapshot directory. If the snapshot directory does not exist yet, it will be created.","operationId":"create_snapshot","responses":{"202":{"description":"Snapshot is being created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":0,"indexUid":null,"status":"enqueued","type":"snapshotCreation","enqueuedAt":"2021-01-01T09:39:00.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["snapshots.create","snapshots.*","*"]}]}},"/stats":{"get":{"tags":["Stats"],"summary":"Get stats of all indexes.","description":"Get stats of all indexes.","operationId":"get_stats","responses":{"200":{"description":"The stats of the instance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stats"},"example":{"databaseSize":567,"usedDatabaseSize":456,"lastUpdate":"2019-11-20T09:40:33.711324Z","indexes":{"movies":{"numberOfDocuments":10,"rawDocumentDbSize":100,"maxDocumentSize":16,"avgDocumentSize":10,"isIndexing":true,"fieldDistribution":{"genre":10,"author":9}}}}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["stats.get","stats.*","*"]}]}},"/swap-indexes":{"post":{"tags":["Indexes"],"summary":"Swap indexes","description":"Swap the documents, settings, and task history of two or more indexes. You can only swap indexes in pairs. However, a single request can swap as many index pairs as you wish.\nSwapping indexes is an atomic transaction: either all indexes are successfully swapped, or none are.\nSwapping indexA and indexB will also replace every mention of indexA by indexB and vice-versa in the task history. enqueued tasks are left unmodified.","operationId":"swap_indexes","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SwapIndexesPayload"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":3,"indexUid":null,"status":"enqueued","type":"indexSwap","enqueuedAt":"2021-08-12T10:00:00.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["search","*"]}]}},"/tasks":{"get":{"tags":["Tasks"],"summary":"Get all tasks","description":"Get all [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)","operationId":"get_tasks","parameters":[{"name":"limit","in":"query","description":"Maximum number of results to return.","required":false,"schema":{"type":"integer","format":"u-int32","default":20,"minimum":0},"example":12},{"name":"from","in":"query","description":"Fetch the next set of results from the given uid.","required":false,"schema":{"type":"integer","format":"u-int32","minimum":0},"example":12421},{"name":"reverse","in":"query","description":"The order you want to retrieve the objects.","required":false,"schema":{"type":"boolean"},"example":true},{"name":"batchUids","in":"query","description":"Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character.","required":false,"schema":{"type":"integer","format":"u-int32","minimum":0},"example":12421},{"name":"uids","in":"query","description":"Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"canceledBy","in":"query","description":"Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[374,"*"]},{"name":"types","in":"query","description":"Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["documentAdditionOrUpdate","*"]},{"name":"statuses","in":"query","description":"Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Status"}},"example":["succeeded","failed","canceled","enqueued","processing","*"]},{"name":"indexUids","in":"query","description":"Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["movies","theater","*"]},{"name":"afterEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]}],"responses":{"200":{"description":"Get all tasks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllTasks"},"example":{"results":[{"uid":144,"indexUid":"mieli","status":"succeeded","type":"settingsUpdate","canceledBy":null,"details":{"settings":{"filterableAttributes":["play_count"]}},"error":null,"duration":"PT0.009330S","enqueuedAt":"2024-08-08T09:01:13.348471Z","startedAt":"2024-08-08T09:01:13.349442Z","finishedAt":"2024-08-08T09:01:13.358772Z"}],"total":1,"limit":1,"from":144,"next":null}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["tasks.get","tasks.*","*"]}]},"delete":{"tags":["Tasks"],"summary":"Delete tasks","description":"Delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) on filter","operationId":"delete_tasks","parameters":[{"name":"uids","in":"query","description":"Permits to filter tasks by their uid. By default, when the `uids` query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"batchUids","in":"query","description":"Lets you filter tasks by their `batchUid`.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"canceledBy","in":"query","description":"Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[374,"*"]},{"name":"types","in":"query","description":"Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Kind"}},"example":["documentDeletion","*"]},{"name":"statuses","in":"query","description":"Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Status"}},"example":["succeeded","failed","canceled","*"]},{"name":"indexUids","in":"query","description":"Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["movies","theater","*"]},{"name":"afterEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]}],"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"taskDeletion","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"400":{"description":"A filter is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Query parameters to filter the tasks to delete are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.","code":"missing_task_filters","type":"invalid_request","link":"https://docs.meilisearch.com/errors#missing_task_filters"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"The task uid does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Task :taskUid not found.","code":"task_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors/#task_not_found"}}}}},"security":[{"Bearer":["tasks.delete","tasks.*","*"]}]}},"/tasks/cancel":{"post":{"tags":["Tasks"],"summary":"Cancel tasks","description":"Cancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)","operationId":"cancel_tasks","parameters":[{"name":"uids","in":"query","description":"Permits to filter tasks by their uid. By default, when the `uids` query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"batchUids","in":"query","description":"Lets you filter tasks by their `batchUid`.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"canceledBy","in":"query","description":"Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[374,"*"]},{"name":"types","in":"query","description":"Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Kind"}},"example":["documentDeletion","*"]},{"name":"statuses","in":"query","description":"Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Status"}},"example":["succeeded","failed","canceled","*"]},{"name":"indexUids","in":"query","description":"Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["movies","theater","*"]},{"name":"afterEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]}],"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"taskCancelation","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"400":{"description":"A filter is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Query parameters to filter the tasks to cancel are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.","code":"missing_task_filters","type":"invalid_request","link":"https://docs.meilisearch.com/errors#missing_task_filters"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"The task uid does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Task :taskUid not found.","code":"task_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors/#task_not_found"}}}}},"security":[{"Bearer":["tasks.cancel","tasks.*","*"]}]}},"/tasks/{taskUid}":{"get":{"tags":["Tasks"],"summary":"Get a task","description":"Get a [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)","operationId":"get_task","parameters":[{"name":"taskUid","in":"path","description":"The task identifier","required":true,"schema":{"type":"string","format":"u-int32"},"example":0}],"responses":{"200":{"description":"Task successfully retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskView"},"example":{"uid":1,"indexUid":"movies","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":79000,"indexedDocuments":79000},"error":null,"duration":"PT1S","enqueuedAt":"2021-01-01T09:39:00.000000Z","startedAt":"2021-01-01T09:39:01.000000Z","finishedAt":"2021-01-01T09:39:02.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"The task uid does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Task :taskUid not found.","code":"task_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors/#task_not_found"}}}}},"security":[{"Bearer":["tasks.get","tasks.*","*"]}]}},"/version":{"get":{"tags":["Version"],"summary":"Get version","description":"Current version of Meilisearch.","operationId":"get_version","responses":{"200":{"description":"Instance is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionResponse"},"example":{"commitSha":"b46889b5f0f2f8b91438a08a358ba8f05fc09fc1","commitDate":"2021-07-08","pkgVersion":"0.23.0"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["version","*"]}]}},"/webhooks":{"get":{"tags":["Webhooks"],"operationId":"get_webhooks","responses":{"200":{"description":"Webhooks are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResults"},"example":{"results":[{"uuid":"550e8400-e29b-41d4-a716-446655440000","url":"https://your.site/on-tasks-completed","headers":{"Authorization":"Bearer a-secret-token"},"isEditable":true},{"uuid":"550e8400-e29b-41d4-a716-446655440001","url":"https://another.site/on-tasks-completed","isEditable":true}]}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["webhooks.get","webhooks.*","*.get","*"]}]},"post":{"tags":["Webhooks"],"operationId":"post_webhook","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSettings"}}},"required":true},"responses":{"201":{"description":"Webhook created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithMetadata"},"example":{"uuid":"550e8400-e29b-41d4-a716-446655440000","url":"https://your.site/on-tasks-completed","headers":{"Authorization":"Bearer a-secret-token"},"isEditable":true}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}},"security":[{"Bearer":["webhooks.create","webhooks.*","*"]}]}},"/webhooks/{uuid}":{"get":{"tags":["Webhooks"],"operationId":"get_webhook","parameters":[{"name":"uuid","in":"path","description":"The universally unique identifier of the webhook","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Webhook found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithMetadata"},"example":{"uuid":"550e8400-e29b-41d4-a716-446655440000","url":"https://your.site/on-tasks-completed","headers":{"Authorization":"Bearer a-secret"},"isEditable":true}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}},"security":[{"Bearer":["webhooks.get","webhooks.*","*.get","*"]}]},"delete":{"tags":["Webhooks"],"operationId":"delete_webhook","parameters":[{"name":"uuid","in":"path","description":"The universally unique identifier of the webhook","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Webhook deleted successfully"},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}},"security":[{"Bearer":["webhooks.delete","webhooks.*","*"]}]},"patch":{"tags":["Webhooks"],"operationId":"patch_webhook","parameters":[{"name":"uuid","in":"path","description":"The universally unique identifier of the webhook","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSettings"}}},"required":true},"responses":{"200":{"description":"Webhook updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithMetadata"},"example":{"uuid":"550e8400-e29b-41d4-a716-446655440000","url":"https://your.site/on-tasks-completed","headers":{"Authorization":"Bearer a-secret-token"},"isEditable":true}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}},"security":[{"Bearer":["webhooks.update","webhooks.*","*"]}]}}},"components":{"schemas":{"Action":{"type":"string","enum":["*","search","documents.*","documents.add","documents.get","documents.delete","indexes.*","indexes.create","indexes.get","indexes.update","indexes.delete","indexes.swap","tasks.*","tasks.cancel","tasks.delete","tasks.get","settings.*","settings.get","settings.update","stats.*","stats.get","metrics.*","metrics.get","dumps.*","dumps.create","snapshots.*","snapshots.create","version","keys.create","keys.get","keys.update","keys.delete","experimental.get","experimental.update","export","network.get","network.update","chatCompletions","chats.*","chats.get","chats.delete","chatsSettings.*","chatsSettings.get","chatsSettings.update","*.get","webhooks.get","webhooks.update","webhooks.delete","webhooks.create","webhooks.*"]},"AllBatches":{"type":"object","required":["results","total","limit"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/BatchView"}},"total":{"type":"integer","format":"u-int64","minimum":0},"limit":{"type":"integer","format":"u-int32","minimum":0},"from":{"type":["integer","null"],"format":"u-int32","minimum":0},"next":{"type":["integer","null"],"format":"u-int32","minimum":0}}},"AllTasks":{"type":"object","required":["results","total","limit"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/TaskView"},"description":"The list of tasks that matched the filter."},"total":{"type":"integer","format":"u-int64","description":"Total number of browsable results using offset/limit parameters for the given resource.","minimum":0},"limit":{"type":"integer","format":"u-int32","description":"Limit given for the query. If limit is not provided as a query parameter, this parameter displays the default limit value.","minimum":0},"from":{"type":["integer","null"],"format":"u-int32","description":"The first task uid returned.","minimum":0},"next":{"type":["integer","null"],"format":"u-int32","description":"Represents the value to send in from to fetch the next slice of the results. The first item for the next slice starts at this exact number. When the returned value is null, it means that all the data have been browsed in the given order.","minimum":0}}},"AttributePatterns":{"type":"object","required":["patterns"],"properties":{"patterns":{"type":"array","items":{"type":"string"},"example":["title","overview_*","release_date"]}}},"BTreeMap":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","required":["start","length"],"properties":{"start":{"type":"integer","minimum":0},"length":{"type":"integer","minimum":0},"indices":{"type":["array","null"],"items":{"type":"integer","minimum":0}}}}},"propertyNames":{"type":"string"}},"BatchStats":{"type":"object","required":["totalNbTasks","status","types","indexUids"],"properties":{"totalNbTasks":{"$ref":"#/components/schemas/u32"},"status":{"type":"object","additionalProperties":{"type":"integer","format":"u-int32","minimum":0},"propertyNames":{"type":"string","description":"The status of a task.","enum":["enqueued","processing","succeeded","failed","canceled"],"example":"processing"}},"types":{"type":"object","additionalProperties":{"type":"integer","format":"u-int32","minimum":0},"propertyNames":{"type":"string","description":"The type of the task.","enum":["documentAdditionOrUpdate","documentEdition","documentDeletion","settingsUpdate","indexCreation","indexDeletion","indexUpdate","indexSwap","taskCancelation","taskDeletion","dumpCreation","snapshotCreation","export","upgradeDatabase"],"example":["documentAdditionOrUpdate","documentEdition","documentDeletion","settingsUpdate","indexCreation","indexDeletion","indexUpdate","indexSwap","taskCancelation","taskDeletion","dumpCreation","snapshotCreation","export","upgradeDatabase"]}},"indexUids":{"type":"object","additionalProperties":{"type":"integer","format":"u-int32","minimum":0},"propertyNames":{"type":"string"}},"progressTrace":{"type":"object","additionalProperties":{},"propertyNames":{"type":"string"}},"writeChannelCongestion":{"type":["object","null"],"additionalProperties":{},"propertyNames":{"type":"string"}},"internalDatabaseSizes":{"type":"object","additionalProperties":{},"propertyNames":{"type":"string"}}}},"BatchStatsView":{"allOf":[{"$ref":"#/components/schemas/BatchStats"},{"type":"object","properties":{"embedderRequests":{"$ref":"#/components/schemas/EmbedderStatsView"}}}]},"BatchView":{"type":"object","required":["uid","details","stats"],"properties":{"uid":{"$ref":"#/components/schemas/u32"},"progress":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProgressView"}]},"details":{"$ref":"#/components/schemas/DetailsView"},"stats":{"$ref":"#/components/schemas/BatchStatsView"},"duration":{"type":["string","null"]},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"type":["string","null"],"format":"date-time"},"batchStrategy":{"type":"string"}}},"BrowseQuery":{"type":"object","required":["offset","limit","retrieveVectors"],"properties":{"offset":{"type":"integer","example":150,"minimum":0},"limit":{"type":"integer","default":20,"example":1,"minimum":0},"fields":{"type":["array","null"],"items":{"type":"string"},"example":["title, description"]},"retrieveVectors":{"type":"boolean","example":true},"ids":{"type":["array","null"],"items":{"type":"string"},"example":["cody","finn","brandy","gambit"]},"filter":{},"sort":{"type":["array","null"],"items":{"type":"string"},"example":["title:asc","rating:desc"]}}},"ChatSearchParams":{"type":"object","properties":{"hybrid":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HybridQuery"}]},"limit":{"type":["integer","null"],"minimum":0},"sort":{"type":["array","null"],"items":{"type":"string"}},"distinct":{"type":["string","null"]},"matchingStrategy":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MatchingStrategy"}]},"attributesToSearchOn":{"type":["array","null"],"items":{"type":"string"}},"rankingScoreThreshold":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RankingScoreThreshold"}]}},"additionalProperties":false},"ChatSettings":{"type":"object","properties":{"description":{"type":["string","null"]},"documentTemplate":{"type":["string","null"],"description":"A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text."},"documentTemplateMaxBytes":{"type":["integer","null"],"description":"Rendered texts are truncated to this size. Defaults to 400.","minimum":0},"searchParameters":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ChatSearchParams","description":"The search parameters to use for the LLM."}]}},"additionalProperties":false},"Code":{"type":"string","enum":["api_key_already_exists","api_key_not_found","bad_parameter","bad_request","database_size_limit_reached","document_not_found","dump_already_processing","dump_not_found","dump_process_failed","duplicate_index_found","immutable_api_key_actions","immutable_api_key_created_at","immutable_api_key_expires_at","immutable_api_key_indexes","immutable_api_key_key","immutable_api_key_uid","immutable_api_key_updated_at","immutable_index_created_at","immutable_index_updated_at","index_already_exists","index_creation_failed","index_not_found","index_primary_key_already_exists","index_primary_key_multiple_candidates_found","index_primary_key_no_candidate_found","internal","invalid_api_key","invalid_api_key_actions","invalid_api_key_description","invalid_api_key_expires_at","invalid_api_key_indexes","invalid_api_key_limit","invalid_api_key_name","invalid_api_key_offset","invalid_api_key_uid","invalid_content_type","invalid_document_csv_delimiter","invalid_document_fields","invalid_document_retrieve_vectors","missing_document_filter","missing_document_edition_function","inconsistent_document_change_headers","invalid_document_filter","invalid_document_sort","invalid_document_geo_field","invalid_document_geojson_field","invalid_header_value","invalid_vector_dimensions","invalid_vectors_type","invalid_document_id","invalid_document_ids","invalid_document_limit","invalid_document_offset","invalid_search_embedder","invalid_similar_embedder","invalid_search_hybrid_query","invalid_index_limit","invalid_index_offset","invalid_index_primary_key","invalid_index_uid","invalid_multi_search_facets","invalid_multi_search_facets_by_index","invalid_multi_search_facet_order","invalid_multi_search_federated","invalid_multi_search_federation_options","invalid_multi_search_max_values_per_facet","invalid_multi_search_merge_facets","invalid_multi_search_query_facets","invalid_multi_search_query_pagination","invalid_multi_search_query_ranking_rules","invalid_multi_search_query_position","invalid_multi_search_remote","invalid_multi_search_weight","invalid_network_remotes","invalid_network_self","invalid_network_sharding","invalid_network_search_api_key","invalid_network_write_api_key","invalid_network_url","invalid_search_attributes_to_search_on","invalid_search_attributes_to_crop","invalid_search_attributes_to_highlight","invalid_similar_attributes_to_retrieve","invalid_similar_retrieve_vectors","invalid_search_attributes_to_retrieve","invalid_search_ranking_score_threshold","invalid_similar_ranking_score_threshold","invalid_search_retrieve_vectors","invalid_search_crop_length","invalid_search_crop_marker","invalid_search_facets","invalid_search_semantic_ratio","invalid_search_locales","invalid_facet_search_exhaustive_facet_count","invalid_facet_search_facet_name","invalid_similar_id","invalid_search_filter","invalid_similar_filter","invalid_search_highlight_post_tag","invalid_search_highlight_pre_tag","invalid_search_hits_per_page","invalid_similar_limit","invalid_search_limit","invalid_search_matching_strategy","invalid_similar_offset","invalid_search_offset","invalid_search_page","invalid_search_q","invalid_facet_search_query","invalid_facet_search_name","facet_search_disabled","invalid_search_vector","invalid_search_media","invalid_search_show_matches_position","invalid_search_show_ranking_score","invalid_similar_show_ranking_score","invalid_search_show_ranking_score_details","invalid_similar_show_ranking_score_details","invalid_search_sort","invalid_search_distinct","invalid_search_media_and_vector","invalid_settings_displayed_attributes","invalid_settings_distinct_attribute","invalid_settings_proximity_precision","invalid_settings_facet_search","invalid_settings_prefix_search","invalid_settings_faceting","invalid_settings_filterable_attributes","invalid_settings_pagination","invalid_settings_search_cutoff_ms","invalid_settings_embedders","invalid_settings_ranking_rules","invalid_settings_searchable_attributes","invalid_settings_sortable_attributes","invalid_settings_stop_words","invalid_settings_non_separator_tokens","invalid_settings_separator_tokens","invalid_settings_dictionary","invalid_settings_synonyms","invalid_settings_typo_tolerance","invalid_settings_localized_attributes","invalid_state","invalid_store_file","invalid_swap_duplicate_index_found","invalid_swap_indexes","invalid_swap_rename","invalid_task_after_enqueued_at","invalid_task_after_finished_at","invalid_task_after_started_at","invalid_task_before_enqueued_at","invalid_task_before_finished_at","invalid_task_before_started_at","invalid_task_canceled_by","invalid_task_from","invalid_task_limit","invalid_task_reverse","invalid_task_statuses","invalid_task_types","invalid_task_uids","invalid_batch_uids","io_error","feature_not_enabled","malformed_payload","max_fields_limit_exceeded","missing_api_key_actions","missing_api_key_expires_at","missing_api_key_indexes","missing_authorization_header","missing_content_type","missing_document_id","missing_facet_search_facet_name","missing_index_uid","missing_master_key","missing_network_url","missing_payload","missing_search_hybrid","missing_swap_indexes","missing_task_filters","no_space_left_on_device","payload_too_large","remote_bad_response","remote_bad_request","remote_could_not_send_request","remote_invalid_api_key","remote_remote_error","remote_timeout","too_many_search_requests","task_not_found","task_file_not_found","batch_not_found","too_many_open_files","too_many_vectors","unretrievable_document","unretrievable_error_code","unsupported_media_type","vector_embedding_error","not_found_similar_id","invalid_document_edition_context","invalid_document_edition_function_filter","edit_documents_by_function_error","invalid_settings_index_chat","invalid_settings_vector_store","invalid_export_url","invalid_export_api_key","invalid_export_payload_size","invalid_export_indexes_patterns","invalid_export_index_filter","invalid_export_index_override_settings","unimplemented_external_function_calling","unimplemented_non_streaming_chat_completions","unimplemented_multi_choice_chat_completions","chat_not_found","invalid_chat_setting_document_template","invalid_chat_completion_org_id","invalid_chat_completion_project_id","invalid_chat_completion_api_version","invalid_chat_completion_deployment_id","invalid_chat_completion_source","invalid_chat_completion_base_api","invalid_chat_completion_api_key","invalid_chat_completion_prompts","invalid_chat_completion_system_prompt","invalid_chat_completion_search_description_prompt","invalid_chat_completion_search_query_param_prompt","invalid_chat_completion_search_filter_param_prompt","invalid_chat_completion_search_index_uid_param_prompt","invalid_chat_completion_pre_query_prompt","invalid_webhooks","invalid_webhook_url","invalid_webhook_headers","immutable_webhook","invalid_webhook_uuid","webhook_not_found","immutable_webhook_uuid","immutable_webhook_is_editable"]},"ComputedFacets":{"type":"object","required":["distribution","stats"],"properties":{"distribution":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"integer","format":"u-int64","minimum":0},"propertyNames":{"type":"string"}},"propertyNames":{"type":"string"}},"stats":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FacetStats"},"propertyNames":{"type":"string"}}}},"CreateApiKey":{"type":"object","required":["uid","actions","indexes"],"properties":{"description":{"type":["string","null"],"description":"A description for the key. `null` if empty.","example":null},"name":{"type":["string","null"],"description":"A human-readable name for the key. `null` if empty.","example":"Indexing Products API key"},"uid":{"type":"string","format":"uuid","description":"A uuid v4 to identify the API Key. If not specified, it's generated by Meilisearch.","example":null},"actions":{"type":"array","items":{"$ref":"#/components/schemas/Action"},"description":"A list of actions permitted for the key. `[\"*\"]` for all actions. The `*` character can be used as a wildcard when located at the last position. e.g. `documents.*` to authorize access on all documents endpoints.","example":["documents.add"]},"indexes":{"type":"array","items":{"type":"string"},"description":"A list of accessible indexes permitted for the key. `[\"*\"]` for all indexes. The `*` character can be used as a wildcard when located at the last position. e.g. `products_*` to allow access to all indexes whose names start with `products_`.","example":["products"]},"expiresAt":{"type":["string","null"],"format":"date-time","description":"Represent the expiration date and time as RFC 3339 format. `null` equals to no expiration time."}}},"DetailsExportIndexSettings":{"allOf":[{"$ref":"#/components/schemas/ExportIndexSettings"},{"type":"object","properties":{"matchedDocuments":{"type":["integer","null"],"format":"u-int64","minimum":0}}}]},"DetailsView":{"allOf":[{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Settings_Unchecked","description":"[Learn more about the settings in this guide](https://www.meilisearch.com/docs/reference/api/settings)."}]},{"type":"object","properties":{"receivedDocuments":{"type":["integer","null"],"format":"u-int64","description":"Number of documents received for documentAdditionOrUpdate task.","minimum":0},"indexedDocuments":{"type":["integer","null"],"format":"u-int64","description":"Number of documents finally indexed for documentAdditionOrUpdate task or a documentAdditionOrUpdate batch of tasks.","minimum":0},"editedDocuments":{"type":["integer","null"],"format":"u-int64","description":"Number of documents edited for editDocumentByFunction task.","minimum":0},"primaryKey":{"type":["string","null"],"description":"Value for the primaryKey field encountered if any for indexCreation or indexUpdate task."},"providedIds":{"type":["integer","null"],"description":"Number of provided document ids for the documentDeletion task.","minimum":0},"deletedDocuments":{"type":["integer","null"],"format":"u-int64","description":"Number of documents finally deleted for documentDeletion and indexDeletion tasks.","minimum":0},"matchedTasks":{"type":["integer","null"],"format":"u-int64","description":"Number of tasks that match the request for taskCancelation or taskDeletion tasks.","minimum":0},"canceledTasks":{"type":["integer","null"],"format":"u-int64","description":"Number of tasks canceled for taskCancelation.","minimum":0},"deletedTasks":{"type":["integer","null"],"format":"u-int64","description":"Number of tasks deleted for taskDeletion.","minimum":0},"originalFilter":{"type":["string","null"],"description":"Original filter query for taskCancelation or taskDeletion tasks."},"dumpUid":{"type":["string","null"],"description":"Identifier generated for the dump for dumpCreation task."},"context":{"type":["object","null"]},"function":{"type":["string","null"]},"swaps":{"type":["array","null"],"items":{"$ref":"#/components/schemas/IndexSwap"}},"upgradeFrom":{"type":["string","null"]},"upgradeTo":{"type":["string","null"]},"url":{"type":["string","null"]},"apiKey":{"type":["string","null"]},"payloadSize":{"type":["string","null"]},"indexes":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/DetailsExportIndexSettings"},"propertyNames":{"type":"string"}},"oldIndexUid":{"type":["string","null"]},"newIndexUid":{"type":["string","null"]}}}]},"DistributionShift":{"type":"object","description":"Describes the mean and sigma of distribution of embedding similarity in the embedding space.\n\nThe intended use is to make the similarity score more comparable to the regular ranking score.\nThis allows to correct effects where results are too \"packed\" around a certain value.","required":["current_mean","current_sigma"],"properties":{"current_mean":{"type":"number","format":"float","description":"Value where the results are \"packed\".\n\nSimilarity scores are translated so that they are packed around 0.5 instead"},"current_sigma":{"type":"number","format":"float","description":"standard deviation of a similarity score.\n\nSet below 0.4 to make the results less packed around the mean, and above 0.4 to make them more packed."}}},"DocumentDeletionByFilter":{"type":"object","required":["filter"],"properties":{"filter":{}}},"DocumentEditionByFunction":{"type":"object","required":["function"],"properties":{"filter":{"description":"A string containing a RHAI function."},"context":{"description":"A string containing a filter expression."},"function":{"type":"string","description":"An object with data Meilisearch should make available for the editing function."}}},"EmbedderSource":{"type":"string","enum":["openAi","huggingFace","ollama","userProvided","rest","composite"]},"EmbedderStatsView":{"type":"object","required":["total","failed"],"properties":{"total":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"lastError":{"type":["string","null"]}}},"ErrorType":{"type":"string","enum":["internal","invalid_request","auth","system"]},"Export":{"type":"object","properties":{"url":{"type":["string","null"],"example":"https://ms-1234.heaven.meilisearch.com"},"apiKey":{"type":["string","null"],"example":"1234abcd"},"payloadSize":{"type":["string","null"],"example":"24MiB"},"indexes":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/ExportIndexSettings"},"propertyNames":{"type":"string"},"example":{"*":{"filter":null}}}}},"ExportIndexSettings":{"type":"object","properties":{"filter":{"type":["string","null"],"example":"genres = action"},"overrideSettings":{"type":["boolean","null"],"example":true}}},"FacetSearchQuery":{"type":"object","required":["facet_name","matching_strategy"],"properties":{"facet_query":{"type":["string","null"]},"facet_name":{"type":"string"},"q":{"type":["string","null"]},"vector":{"type":["array","null"],"items":{"type":"number","format":"float"}},"media":{},"hybrid":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HybridQuery"}]},"filter":{},"matching_strategy":{"$ref":"#/components/schemas/MatchingStrategy"},"attributes_to_search_on":{"type":["array","null"],"items":{"type":"string"}},"ranking_score_threshold":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RankingScoreThreshold"}]},"locales":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Locale"}},"exhaustive_facet_count":{"type":["boolean","null"]}}},"FacetStats":{"type":"object","required":["min","max"],"properties":{"min":{"type":"number","format":"double"},"max":{"type":"number","format":"double"}}},"FacetValuesSort":{"type":"string","enum":["alpha","count"]},"FacetingSettings":{"type":"object","properties":{"maxValuesPerFacet":{"type":["integer","null"],"example":10,"minimum":0},"sortFacetValuesBy":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/FacetValuesSort"},"propertyNames":{"type":"string"},"example":{"genre":"count"}}},"additionalProperties":false},"FederatedFacets":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ComputedFacets"},"propertyNames":{"type":"string"}},"FederatedSearch":{"type":"object","required":["queries"],"properties":{"queries":{"type":"array","items":{"$ref":"#/components/schemas/SearchQueryWithIndex"}},"federation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Federation"}]}}},"FederatedSearchResult":{"allOf":[{"$ref":"#/components/schemas/HitsInfo"},{"type":"object","required":["hits","processingTimeMs"],"properties":{"hits":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"}},"processingTimeMs":{"type":"integer","minimum":0},"queryVectors":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/Vec"},"propertyNames":{"type":"integer","minimum":0}},"semanticHitCount":{"type":["integer","null"],"format":"u-int32","minimum":0},"facetDistribution":{"type":["object","null"],"additionalProperties":{"type":"object","additionalProperties":{"type":"integer","format":"u-int64","minimum":0},"propertyNames":{"type":"string"}},"propertyNames":{"type":"string"}},"facetStats":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/FacetStats"},"propertyNames":{"type":"string"}},"facetsByIndex":{"$ref":"#/components/schemas/FederatedFacets"},"requestUid":{"type":["string","null"],"format":"uuid"},"remoteErrors":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/ResponseError"},"propertyNames":{"type":"string"}}}}]},"Federation":{"type":"object","required":["limit","offset","facetsByIndex"],"properties":{"limit":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0},"facetsByIndex":{"type":"object","additionalProperties":{"type":["array","null"],"items":{"type":"string"}},"propertyNames":{"type":"string","description":"An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long","example":"movies"}},"mergeFacets":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MergeFacets"}]}}},"FederationOptions":{"type":"object","required":["weight"],"properties":{"weight":{"type":"number","format":"double"},"remote":{"type":["string","null"]},"queryPosition":{"type":["integer","null"],"minimum":0}}},"FilterFeatures":{"type":"object","properties":{"equality":{"type":"boolean"},"comparison":{"type":"boolean"}},"additionalProperties":false},"FilterableAttributesFeatures":{"type":"object","properties":{"facetSearch":{"type":"boolean"},"filter":{"$ref":"#/components/schemas/FilterFeatures"}},"additionalProperties":false},"FilterableAttributesPatterns":{"type":"object","required":["attributePatterns"],"properties":{"attributePatterns":{"$ref":"#/components/schemas/AttributePatterns"},"features":{"$ref":"#/components/schemas/FilterableAttributesFeatures"}},"additionalProperties":false},"FilterableAttributesRule":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/FilterableAttributesPatterns"}]},"GetLogs":{"type":"object","required":["target","mode","profileMemory"],"properties":{"target":{"type":"string","description":"Lets you specify which parts of the code you want to inspect and is formatted like that: code_part=log_level,code_part=log_level\n- If the `code_part` is missing, then the `log_level` will be applied to everything.\n- If the `log_level` is missing, then the `code_part` will be selected in `info` log level.","default":"info","example":"milli=trace,index_scheduler,actix_web=off"},"mode":{"oneOf":[{"$ref":"#/components/schemas/LogMode","description":"Lets you customize the format of the logs."}],"default":"Human"},"profileMemory":{"type":"boolean","description":"A boolean to indicate if you want to profile the memory as well. This is only useful while using the `profile` mode.\nBe cautious, though; it slows down the engine a lot.","default":false}}},"HealthResponse":{"type":"object","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/HealthStatus","description":"The status of the instance."}}},"HealthStatus":{"type":"string","enum":["available"]},"HitsInfo":{"oneOf":[{"type":"object","required":["hitsPerPage","page","totalPages","totalHits"],"properties":{"hitsPerPage":{"type":"integer","minimum":0},"page":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"totalHits":{"type":"integer","minimum":0}}},{"type":"object","required":["limit","offset","estimatedTotalHits"],"properties":{"limit":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0},"estimatedTotalHits":{"type":"integer","minimum":0}}}]},"HybridQuery":{"type":"object","required":["embedder"],"properties":{"semanticRatio":{"type":"number","format":"float"},"embedder":{"type":"string"}}},"IndexCreateRequest":{"type":"object","required":["uid"],"properties":{"uid":{"$ref":"#/components/schemas/IndexUid","description":"The name of the index"},"primaryKey":{"type":["string","null"],"description":"The primary key of the index","example":"id"}}},"IndexStats":{"type":"object","description":"Stats of an `Index`, as known to the `stats` route.","required":["numberOfDocuments","rawDocumentDbSize","avgDocumentSize","isIndexing","fieldDistribution"],"properties":{"numberOfDocuments":{"type":"integer","format":"u-int64","description":"Number of documents in the index","minimum":0},"rawDocumentDbSize":{"type":"integer","format":"u-int64","description":"Size of the documents database, in bytes.","minimum":0},"avgDocumentSize":{"type":"integer","format":"u-int64","description":"Average size of a document in the documents database.","minimum":0},"isIndexing":{"type":"boolean","description":"Whether or not the index is currently ingesting document"},"numberOfEmbeddings":{"type":["integer","null"],"format":"u-int64","description":"Number of embeddings in the index","minimum":0},"numberOfEmbeddedDocuments":{"type":["integer","null"],"format":"u-int64","description":"Number of embedded documents in the index","minimum":0},"fieldDistribution":{"type":"object","description":"Association of every field name with the number of times it occurs in the documents.","additionalProperties":{"type":"integer","format":"u-int64","minimum":0},"propertyNames":{"type":"string"}}}},"IndexSwap":{"type":"object","required":["indexes"],"properties":{"indexes":{"type":"array","items":false,"prefixItems":[{"type":"string"},{"type":"string"}]},"rename":{"type":"boolean"}}},"IndexUid":{"type":"string","description":"An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long","example":"movies"},"IndexView":{"type":"object","required":["uid","createdAt","updatedAt"],"properties":{"uid":{"type":"string","description":"Unique identifier for the index"},"createdAt":{"type":"string","format":"date-time","description":"An `RFC 3339` format for date/time/duration."},"updatedAt":{"type":"string","format":"date-time","description":"An `RFC 3339` format for date/time/duration."},"primaryKey":{"type":["string","null"],"description":"Custom primaryKey for documents"}}},"KeyView":{"type":"object","required":["key","uid","actions","indexes","createdAt","updatedAt"],"properties":{"name":{"type":["string","null"],"description":"The name of the API Key if any"},"description":{"type":["string","null"],"description":"The description of the API Key if any"},"key":{"type":"string","description":"The actual API Key you can send to Meilisearch"},"uid":{"type":"string","format":"uuid","description":"The `Uuid` specified while creating the key or autogenerated by Meilisearch."},"actions":{"type":"array","items":{"$ref":"#/components/schemas/Action"},"description":"The actions accessible with this key."},"indexes":{"type":"array","items":{"type":"string"},"description":"The indexes accessible with this key."},"expiresAt":{"type":["string","null"],"format":"date-time","description":"The expiration date of the key. Once this timestamp is exceeded the key is not deleted but cannot be used anymore."},"createdAt":{"type":"string","format":"date-time","description":"The date of creation of this API Key.","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"The date of the last update made on this key.","readOnly":true}}},"Kind":{"type":"string","description":"The type of the task.","enum":["documentAdditionOrUpdate","documentEdition","documentDeletion","settingsUpdate","indexCreation","indexDeletion","indexUpdate","indexSwap","taskCancelation","taskDeletion","dumpCreation","snapshotCreation","export","upgradeDatabase"],"example":["documentAdditionOrUpdate","documentEdition","documentDeletion","settingsUpdate","indexCreation","indexDeletion","indexUpdate","indexSwap","taskCancelation","taskDeletion","dumpCreation","snapshotCreation","export","upgradeDatabase"]},"Locale":{"type":"string","enum":["af","ak","am","ar","az","be","bn","bg","ca","cs","da","de","el","en","eo","et","fi","fr","gu","he","hi","hr","hu","hy","id","it","jv","ja","kn","ka","km","ko","la","lv","lt","ml","mr","mk","my","ne","nl","nb","or","pa","fa","pl","pt","ro","ru","si","sk","sl","sn","es","sr","sv","ta","te","tl","th","tk","tr","uk","ur","uz","vi","yi","zh","zu","afr","aka","amh","ara","aze","bel","ben","bul","cat","ces","dan","deu","ell","eng","epo","est","fin","fra","guj","heb","hin","hrv","hun","hye","ind","ita","jav","jpn","kan","kat","khm","kor","lat","lav","lit","mal","mar","mkd","mya","nep","nld","nob","ori","pan","pes","pol","por","ron","rus","sin","slk","slv","sna","spa","srp","swe","tam","tel","tgl","tha","tuk","tur","ukr","urd","uzb","vie","yid","zho","zul","cmn"]},"LocalizedAttributesRuleView":{"type":"object","required":["attributePatterns","locales"],"properties":{"attributePatterns":{"$ref":"#/components/schemas/AttributePatterns"},"locales":{"type":"array","items":{"$ref":"#/components/schemas/Locale"}}}},"LogMode":{"type":"string","enum":["human","json","profile"]},"MatchingStrategy":{"type":"string","description":"This is unfortunately a duplication of the struct in .\nThe reason why it is duplicated is because milli cannot depend on meilisearch. It would be cyclic imports.","enum":["last","all","frequency"]},"MergeFacets":{"type":"object","properties":{"maxValuesPerFacet":{"type":["integer","null"],"minimum":0}}},"MinWordSizeTyposSetting":{"type":"object","properties":{"oneTypo":{"type":["integer","null"],"format":"u-int8","example":5,"minimum":0},"twoTypos":{"type":["integer","null"],"format":"u-int8","example":9,"minimum":0}},"additionalProperties":false},"Network":{"type":"object","properties":{"remotes":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/Remote"},"propertyNames":{"type":"string"},"example":"http://localhost:7700"},"self":{"type":["string","null"],"example":"ms-00"},"sharding":{"type":["boolean","null"],"example":true}}},"Origin":{"type":"object","required":["remoteName","taskUid"],"properties":{"remoteName":{"type":"string"},"taskUid":{"type":"integer","minimum":0}}},"OverridePooling":{"type":"string","enum":["useModel","forceCls","forceMean"]},"PaginationSettings":{"type":"object","properties":{"maxTotalHits":{"type":["integer","null"],"example":250,"minimum":0}},"additionalProperties":false},"PaginationView_IndexView":{"type":"object","required":["results","offset","limit","total"],"properties":{"results":{"type":"array","items":{"type":"object","required":["uid","createdAt","updatedAt"],"properties":{"uid":{"type":"string","description":"Unique identifier for the index"},"createdAt":{"type":"string","format":"date-time","description":"An `RFC 3339` format for date/time/duration."},"updatedAt":{"type":"string","format":"date-time","description":"An `RFC 3339` format for date/time/duration."},"primaryKey":{"type":["string","null"],"description":"Custom primaryKey for documents"}}}},"offset":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}}},"PaginationView_KeyView":{"type":"object","required":["results","offset","limit","total"],"properties":{"results":{"type":"array","items":{"type":"object","required":["key","uid","actions","indexes","createdAt","updatedAt"],"properties":{"name":{"type":["string","null"],"description":"The name of the API Key if any"},"description":{"type":["string","null"],"description":"The description of the API Key if any"},"key":{"type":"string","description":"The actual API Key you can send to Meilisearch"},"uid":{"type":"string","format":"uuid","description":"The `Uuid` specified while creating the key or autogenerated by Meilisearch."},"actions":{"type":"array","items":{"$ref":"#/components/schemas/Action"},"description":"The actions accessible with this key."},"indexes":{"type":"array","items":{"type":"string"},"description":"The indexes accessible with this key."},"expiresAt":{"type":["string","null"],"format":"date-time","description":"The expiration date of the key. Once this timestamp is exceeded the key is not deleted but cannot be used anymore."},"createdAt":{"type":"string","format":"date-time","description":"The date of creation of this API Key.","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"The date of the last update made on this key.","readOnly":true}}}},"offset":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}}},"PaginationView_Value":{"type":"object","required":["results","offset","limit","total"],"properties":{"results":{"type":"array","items":{}},"offset":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}}},"PatchApiKey":{"type":"object","properties":{"description":{"type":["string","null"],"example":"This key is used to update documents in the products index"},"name":{"type":["string","null"],"example":"Indexing Products API key"}}},"PrefixSearchSettings":{"type":"string","enum":["indexingTime","disabled"]},"ProgressStepView":{"type":"object","required":["currentStep","finished","total"],"properties":{"currentStep":{"type":"string"},"finished":{"type":"integer","format":"u-int32","minimum":0},"total":{"type":"integer","format":"u-int32","minimum":0}}},"ProgressView":{"type":"object","required":["steps","percentage"],"properties":{"steps":{"type":"array","items":{"$ref":"#/components/schemas/ProgressStepView"}},"percentage":{"type":"number","format":"float"}}},"ProximityPrecisionView":{"type":"string","enum":["byWord","byAttribute"]},"RankingRuleView":{"oneOf":[{"type":"string","description":"Sorted by decreasing number of matched query terms.\nQuery words at the front of an attribute is considered better than if it was at the back.","enum":["Words"]},{"type":"string","description":"Sorted by increasing number of typos.","enum":["Typo"]},{"type":"string","description":"Sorted by increasing distance between matched query terms.","enum":["Proximity"]},{"type":"string","description":"Documents with quey words contained in more important\nattributes are considered better.","enum":["Attribute"]},{"type":"string","description":"Dynamically sort at query time the documents. None, one or multiple Asc/Desc sortable\nattributes can be used in place of this criterion at query time.","enum":["Sort"]},{"type":"string","description":"Sorted by the similarity of the matched words with the query words.","enum":["Exactness"]},{"type":"object","description":"Sorted by the increasing value of the field specified.","required":["Asc"],"properties":{"Asc":{"type":"string","description":"Sorted by the increasing value of the field specified."}}},{"type":"object","description":"Sorted by the decreasing value of the field specified.","required":["Desc"],"properties":{"Desc":{"type":"string","description":"Sorted by the decreasing value of the field specified."}}}]},"RankingScoreThreshold":{"type":"number","format":"double"},"Remote":{"type":"object","properties":{"url":{"type":["string","null"],"example":{"ms-0":{"url":"http://localhost:7700","searchApiKey":null,"writeApiKey":null},"ms-1":{"url":"http://localhost:7701","searchApiKey":"foo","writeApiKey":"bar"},"ms-2":{"url":"http://localhost:7702","searchApiKey":"bar","writeApiKey":"foo"}}},"searchApiKey":{"type":["string","null"],"example":"XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU"},"writeApiKey":{"type":["string","null"],"example":"XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU"}}},"RemoteTask":{"type":"object","properties":{"taskUid":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/u32"}]},"error":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ResponseError"}]}}},"ResponseError":{"type":"object","required":["message","code","type","link"],"properties":{"message":{"type":"string","description":"The error message."},"code":{"$ref":"#/components/schemas/Code","description":"The error code."},"type":{"$ref":"#/components/schemas/ErrorType","description":"The error type."},"link":{"type":"string","description":"A link to the documentation about this specific error."}}},"RuntimeTogglableFeatures":{"type":"object","properties":{"metrics":{"type":["boolean","null"]},"logsRoute":{"type":["boolean","null"]},"editDocumentsByFunction":{"type":["boolean","null"]},"containsFilter":{"type":["boolean","null"]},"network":{"type":["boolean","null"]},"getTaskDocumentsRoute":{"type":["boolean","null"]},"compositeEmbedders":{"type":["boolean","null"]},"chatCompletions":{"type":["boolean","null"]},"multimodal":{"type":["boolean","null"]},"vectorStoreSetting":{"type":["boolean","null"]}}},"SearchHit":{"type":"object","properties":{"_formatted":{"type":"object","additionalProperties":true},"_matchesPosition":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BTreeMap"}]},"_rankingScore":{"type":["number","null"],"format":"double"},"_rankingScoreDetails":{"type":["object","null"],"additionalProperties":{},"propertyNames":{"type":"string"}}},"additionalProperties":{}},"SearchQuery":{"type":"object","required":["offset","limit","retrieve_vectors","crop_length","show_matches_position","show_ranking_score","show_ranking_score_details","highlight_pre_tag","highlight_post_tag","crop_marker","matching_strategy"],"properties":{"q":{"type":["string","null"]},"vector":{"type":["array","null"],"items":{"type":"number","format":"float"}},"media":{},"hybrid":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HybridQuery"}]},"offset":{"type":"integer","default":0,"minimum":0},"limit":{"type":"integer","default":20,"minimum":0},"page":{"type":["integer","null"],"minimum":0},"hits_per_page":{"type":["integer","null"],"minimum":0},"attributes_to_retrieve":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"retrieve_vectors":{"type":"boolean"},"attributes_to_crop":{"type":["array","null"],"items":{"type":"string"}},"crop_length":{"type":"integer","default":10,"minimum":0},"attributes_to_highlight":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"show_matches_position":{"type":"boolean"},"show_ranking_score":{"type":"boolean"},"show_ranking_score_details":{"type":"boolean"},"filter":{},"sort":{"type":["array","null"],"items":{"type":"string"}},"distinct":{"type":["string","null"]},"facets":{"type":["array","null"],"items":{"type":"string"}},"highlight_pre_tag":{"type":"string","default":""},"highlight_post_tag":{"type":"string","default":""},"crop_marker":{"type":"string","default":"…"},"matching_strategy":{"$ref":"#/components/schemas/MatchingStrategy"},"attributes_to_search_on":{"type":["array","null"],"items":{"type":"string"}},"ranking_score_threshold":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RankingScoreThreshold"}]},"locales":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Locale"}}}},"SearchQueryWithIndex":{"type":"object","description":"A `SearchQuery` + an index UID and optional FederationOptions.","required":["indexUid","retrieveVectors","cropLength","showRankingScore","showRankingScoreDetails","showMatchesPosition","highlightPreTag","highlightPostTag","cropMarker","matchingStrategy"],"properties":{"indexUid":{"$ref":"#/components/schemas/IndexUid"},"q":{"type":["string","null"]},"vector":{"type":["array","null"],"items":{"type":"number","format":"float"}},"media":{},"hybrid":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HybridQuery"}]},"offset":{"type":["integer","null"],"minimum":0},"limit":{"type":["integer","null"],"minimum":0},"page":{"type":["integer","null"],"minimum":0},"hitsPerPage":{"type":["integer","null"],"minimum":0},"attributesToRetrieve":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"retrieveVectors":{"type":"boolean"},"attributesToCrop":{"type":["array","null"],"items":{"type":"string"}},"cropLength":{"type":"integer","minimum":0},"attributesToHighlight":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"showRankingScore":{"type":"boolean"},"showRankingScoreDetails":{"type":"boolean"},"showMatchesPosition":{"type":"boolean"},"filter":{},"sort":{"type":["array","null"],"items":{"type":"string"}},"distinct":{"type":["string","null"]},"facets":{"type":["array","null"],"items":{"type":"string"}},"highlightPreTag":{"type":"string"},"highlightPostTag":{"type":"string"},"cropMarker":{"type":"string"},"matchingStrategy":{"$ref":"#/components/schemas/MatchingStrategy"},"attributesToSearchOn":{"type":["array","null"],"items":{"type":"string"}},"rankingScoreThreshold":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RankingScoreThreshold"}]},"locales":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Locale"}},"federationOptions":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FederationOptions"}]}}},"SearchResult":{"allOf":[{"$ref":"#/components/schemas/HitsInfo"},{"type":"object","required":["hits","query","processingTimeMs"],"properties":{"hits":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"}},"query":{"type":"string"},"queryVector":{"type":["array","null"],"items":{"type":"number","format":"float"}},"processingTimeMs":{"type":"integer","minimum":0},"facetDistribution":{"type":["object","null"],"additionalProperties":{},"propertyNames":{"type":"string"}},"facetStats":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/FacetStats"},"propertyNames":{"type":"string"}},"requestUid":{"type":["string","null"],"format":"uuid"},"semanticHitCount":{"type":["integer","null"],"format":"u-int32","minimum":0}}}]},"SearchResultWithIndex":{"allOf":[{"$ref":"#/components/schemas/SearchResult"},{"type":"object","required":["indexUid"],"properties":{"indexUid":{"type":"string"}}}]},"SearchResults":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/SearchResultWithIndex"}}}},"SettingEmbeddingSettings":{"type":"object","description":"\"Technical\" type that is required due to utoipa.\n\nWe did not find a way to implement [`utoipa::ToSchema`] for the [`Setting`] enum,\nbut most types can use the `value_type` macro parameter to workaround that issue.\n\nHowever that type is used in the settings route, including through the macro that auto-generate\nall the settings route, so we can't remap the `value_type`.","properties":{"inner":{"oneOf":[{"type":"null"},{"type":"object","properties":{"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EmbedderSource","description":"The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`"}]},"model":{"type":["string","null"],"description":"The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`"},"revision":{"type":["string","null"],"description":"The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`"},"pooling":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OverridePooling","description":"The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior."}]},"apiKey":{"type":["string","null"],"description":"The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings"},"dimensions":{"type":["string","null"],"description":"The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text."},"binaryQuantized":{"type":["boolean","null"],"description":"Whether to binary quantize the embeddings of this embedder.\n\nBinary quantized embeddings are smaller than regular embeddings, which improves\ndisk usage and retrieval speed, at the cost of relevancy.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🏗️ When set to `true`, embeddings are not regenerated, but they are binary quantized, which takes time.\n\n# Defaults\n\n- Defaults to `false`\n\n# Note\n\nAs binary quantization is a destructive operation, it is not possible to disable again this setting after\nfirst enabling it. If you are unsure of whether the performance-relevancy tradeoff is right for you,\nwe recommend to use this parameter on a test index first."},"documentTemplate":{"type":["boolean","null"],"description":"A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text."},"documentTemplateMaxBytes":{"type":["integer","null"],"description":"Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400","minimum":0},"url":{"type":["string","null"],"description":"URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated"},"indexingFragments":{"type":["object","null"],"description":"Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.","additionalProperties":{},"propertyNames":{"type":"string"}},"searchFragments":{"type":["object","null"],"description":"Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings","additionalProperties":{},"propertyNames":{"type":"string"}},"request":{"description":"Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings"},"response":{"description":"Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings"},"headers":{"type":["object","null"],"description":"Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"searchEmbedder":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SubEmbeddingSettings"}]},"indexingEmbedder":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SubEmbeddingSettings"}]},"distribution":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DistributionShift","description":"Affine transformation applied to the semantic score to make it more comparable to the ranking score.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings"}]}},"additionalProperties":false}]}}},"Settings_Checked":{"type":"object","description":"Holds all the settings for an index. `T` can either be `Checked` if they represents settings\nwhose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a\ncall to `check` will return a `Settings` from a `Settings`.","properties":{"displayedAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Fields displayed in the returned documents.","example":["id","title","description","url"]},"searchableAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Fields in which to search for matching query words sorted by order of importance.","example":["title","description"]},"filterableAttributes":{"type":["array","null"],"items":{"$ref":"#/components/schemas/FilterableAttributesRule"},"description":"Attributes to use for faceting and filtering. See [Filtering and Faceted Search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).","example":["release_date","genre"]},"sortableAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Attributes to use when sorting search results.","example":["release_date"]},"rankingRules":{"type":["array","null"],"items":{"type":"string"},"description":"List of ranking rules sorted by order of importance. The order is customizable.\n[A list of ordered built-in ranking rules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).","example":["words","typo","proximity","attribute","exactness"]},"stopWords":{"type":["array","null"],"items":{"type":"string"},"description":"List of words ignored when present in search queries.","example":["the","a","them","their"]},"nonSeparatorTokens":{"type":["array","null"],"items":{"type":"string"},"description":"List of characters not delimiting where one term begins and ends.","example":[" ","\n"]},"separatorTokens":{"type":["array","null"],"items":{"type":"string"},"description":"List of characters delimiting where one term begins and ends.","example":["S"]},"dictionary":{"type":["array","null"],"items":{"type":"string"},"description":"List of strings Meilisearch should parse as a single term.","example":["iPhone pro"]},"synonyms":{"type":["object","null"],"description":"List of associated words treated similarly. A word associated to an array of word as synonyms.","additionalProperties":{"type":"array","items":{"type":"string"}},"propertyNames":{"type":"string"},"example":{"he":["she","they","them"],"phone":["iPhone","android"]}},"distinctAttribute":{"type":["string","null"],"description":"Search returns documents with distinct (different) values of the given field.","example":"sku"},"proximityPrecision":{"type":["string","null"],"description":"Precision level when calculating the proximity ranking rule.","example":"byAttribute"},"typoTolerance":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TypoSettings","description":"Customize typo tolerance feature."}]},"faceting":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FacetingSettings","description":"Faceting settings."}]},"pagination":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PaginationSettings","description":"Pagination settings."}]},"embedders":{"type":["object","null"],"description":"Embedder required for performing semantic search queries.","additionalProperties":{"$ref":"#/components/schemas/SettingEmbeddingSettings"},"propertyNames":{"type":"string"}},"searchCutoffMs":{"type":["integer","null"],"format":"u-int64","description":"Maximum duration of a search query.","example":50,"minimum":0},"localizedAttributes":{"type":["array","null"],"items":{"$ref":"#/components/schemas/LocalizedAttributesRuleView"},"example":50},"facetSearch":{"type":["boolean","null"],"example":true},"prefixSearch":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrefixSearchSettings"}]},"chat":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ChatSettings","description":"Customize the chat prompting."}]},"vectorStore":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VectorStoreBackend"}]}},"additionalProperties":false},"Settings_Unchecked":{"type":"object","description":"Holds all the settings for an index. `T` can either be `Checked` if they represents settings\nwhose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a\ncall to `check` will return a `Settings` from a `Settings`.","properties":{"displayedAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Fields displayed in the returned documents.","example":["id","title","description","url"]},"searchableAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Fields in which to search for matching query words sorted by order of importance.","example":["title","description"]},"filterableAttributes":{"type":["array","null"],"items":{"$ref":"#/components/schemas/FilterableAttributesRule"},"description":"Attributes to use for faceting and filtering. See [Filtering and Faceted Search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).","example":["release_date","genre"]},"sortableAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Attributes to use when sorting search results.","example":["release_date"]},"rankingRules":{"type":["array","null"],"items":{"type":"string"},"description":"List of ranking rules sorted by order of importance. The order is customizable.\n[A list of ordered built-in ranking rules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).","example":["words","typo","proximity","attribute","exactness"]},"stopWords":{"type":["array","null"],"items":{"type":"string"},"description":"List of words ignored when present in search queries.","example":["the","a","them","their"]},"nonSeparatorTokens":{"type":["array","null"],"items":{"type":"string"},"description":"List of characters not delimiting where one term begins and ends.","example":[" ","\n"]},"separatorTokens":{"type":["array","null"],"items":{"type":"string"},"description":"List of characters delimiting where one term begins and ends.","example":["S"]},"dictionary":{"type":["array","null"],"items":{"type":"string"},"description":"List of strings Meilisearch should parse as a single term.","example":["iPhone pro"]},"synonyms":{"type":["object","null"],"description":"List of associated words treated similarly. A word associated to an array of word as synonyms.","additionalProperties":{"type":"array","items":{"type":"string"}},"propertyNames":{"type":"string"},"example":{"he":["she","they","them"],"phone":["iPhone","android"]}},"distinctAttribute":{"type":["string","null"],"description":"Search returns documents with distinct (different) values of the given field.","example":"sku"},"proximityPrecision":{"type":["string","null"],"description":"Precision level when calculating the proximity ranking rule.","example":"byAttribute"},"typoTolerance":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TypoSettings","description":"Customize typo tolerance feature."}]},"faceting":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FacetingSettings","description":"Faceting settings."}]},"pagination":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PaginationSettings","description":"Pagination settings."}]},"embedders":{"type":["object","null"],"description":"Embedder required for performing semantic search queries.","additionalProperties":{"$ref":"#/components/schemas/SettingEmbeddingSettings"},"propertyNames":{"type":"string"}},"searchCutoffMs":{"type":["integer","null"],"format":"u-int64","description":"Maximum duration of a search query.","example":50,"minimum":0},"localizedAttributes":{"type":["array","null"],"items":{"$ref":"#/components/schemas/LocalizedAttributesRuleView"},"example":50},"facetSearch":{"type":["boolean","null"],"example":true},"prefixSearch":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrefixSearchSettings"}]},"chat":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ChatSettings","description":"Customize the chat prompting."}]},"vectorStore":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VectorStoreBackend"}]}},"additionalProperties":false},"SimilarQuery":{"type":"object","required":["id","offset","limit","embedder","retrieve_vectors","show_ranking_score","show_ranking_score_details","ranking_score_threshold"],"properties":{"id":{"type":"string"},"offset":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"filter":{},"embedder":{"type":"string"},"attributes_to_retrieve":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"retrieve_vectors":{"type":"boolean"},"show_ranking_score":{"type":"boolean"},"show_ranking_score_details":{"type":"boolean"},"ranking_score_threshold":{"type":"number","format":"double"}}},"SimilarResult":{"allOf":[{"$ref":"#/components/schemas/HitsInfo"},{"type":"object","required":["hits","id","processingTimeMs"],"properties":{"hits":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"}},"id":{"type":"string"},"processingTimeMs":{"type":"integer","minimum":0}}}]},"Stats":{"type":"object","required":["databaseSize","usedDatabaseSize","indexes"],"properties":{"databaseSize":{"type":"integer","format":"u-int64","description":"The disk space used by the database, in bytes.","minimum":0},"usedDatabaseSize":{"type":"integer","format":"u-int64","description":"The size of the database, in bytes.","minimum":0},"lastUpdate":{"type":["string","null"],"format":"date-time","description":"The date of the last update in the RFC 3339 formats. Can be `null` if no update has ever been processed."},"indexes":{"type":"object","description":"The stats of every individual index your API key lets you access.","additionalProperties":{"$ref":"#/components/schemas/IndexStats"},"propertyNames":{"type":"string"}}}},"Status":{"type":"string","description":"The status of a task.","enum":["enqueued","processing","succeeded","failed","canceled"],"example":"processing"},"SubEmbeddingSettings":{"type":"object","properties":{"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EmbedderSource","description":"The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`"}]},"model":{"type":["string","null"],"description":"The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`"},"revision":{"type":["string","null"],"description":"The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`"},"pooling":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OverridePooling","description":"The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior."}]},"apiKey":{"type":["string","null"],"description":"The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings"},"dimensions":{"type":["string","null"],"description":"The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text."},"documentTemplate":{"type":["boolean","null"],"description":"A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text."},"documentTemplateMaxBytes":{"type":["integer","null"],"description":"Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400","minimum":0},"url":{"type":["string","null"],"description":"URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated"},"indexingFragments":{"type":["object","null"],"description":"Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.","additionalProperties":{},"propertyNames":{"type":"string"}},"searchFragments":{"type":["object","null"],"description":"Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings","additionalProperties":{},"propertyNames":{"type":"string"}},"request":{"description":"Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings"},"response":{"description":"Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings"},"headers":{"type":["object","null"],"description":"Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}}},"additionalProperties":false},"SummarizedTaskView":{"type":"object","required":["taskUid","status","type","enqueuedAt"],"properties":{"taskUid":{"type":"integer","format":"u-int32","description":"The task unique identifier.","minimum":0},"indexUid":{"type":["string","null"],"description":"The index affected by this task. May be `null` if the task is not linked to any index."},"status":{"$ref":"#/components/schemas/Status","description":"The status of the task."},"type":{"$ref":"#/components/schemas/Kind","description":"The type of the task."},"enqueuedAt":{"type":"string","format":"date-time","description":"The date on which the task was enqueued."}}},"SwapIndexesPayload":{"type":"object","required":["indexes","rename"],"properties":{"indexes":{"type":"array","items":{"$ref":"#/components/schemas/IndexUid"},"description":"Array of the two indexUids to be swapped"},"rename":{"type":"boolean","description":"If set to true, instead of swapping the left and right indexes it'll change the name of the first index to the second"}}},"TaskNetwork":{"oneOf":[{"type":"object","required":["origin"],"properties":{"origin":{"$ref":"#/components/schemas/Origin"}}},{"type":"object","required":["remote_tasks"],"properties":{"remote_tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/RemoteTask"},"propertyNames":{"type":"string"}}}}]},"TaskView":{"type":"object","required":["uid","status","type","enqueuedAt"],"properties":{"uid":{"type":"integer","format":"u-int32","description":"The unique sequential identifier of the task.","example":4312,"minimum":0},"batchUid":{"type":["integer","null"],"format":"u-int32","description":"The unique identifier of the index where this task is operated.","example":"movies","minimum":0},"indexUid":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/Status"},"type":{"$ref":"#/components/schemas/Kind","description":"The type of the task."},"canceledBy":{"type":["integer","null"],"format":"u-int32","description":"The uid of the task that performed the taskCancelation if the task has been canceled.","example":4326,"minimum":0},"details":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DetailsView"}]},"error":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ResponseError"}]},"duration":{"type":["string","null"],"description":"Total elasped time the engine was in processing state expressed as a `ISO-8601` duration format.","example":null},"enqueuedAt":{"type":"string","description":"An `RFC 3339` format for date/time/duration.","example":"2024-08-08_14:12:09.393Z"},"startedAt":{"type":"string","description":"An `RFC 3339` format for date/time/duration.","example":"2024-08-08_14:12:09.393Z"},"finishedAt":{"type":"string","description":"An `RFC 3339` format for date/time/duration.","example":"2024-08-08_14:12:09.393Z"},"network":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TaskNetwork"}]}}},"TypoSettings":{"type":"object","properties":{"enabled":{"type":["boolean","null"],"example":true},"minWordSizeForTypos":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MinWordSizeTyposSetting"}]},"disableOnWords":{"type":["array","null"],"items":{"type":"string"},"example":["iPhone","phone"],"uniqueItems":true},"disableOnAttributes":{"type":["array","null"],"items":{"type":"string"},"example":["uuid","url"],"uniqueItems":true},"disableOnNumbers":{"type":["boolean","null"],"example":true}},"additionalProperties":false},"Unchecked":{"default":null},"UpdateIndexRequest":{"type":"object","properties":{"primaryKey":{"type":["string","null"],"description":"The new primary key of the index"},"uid":{"type":["string","null"],"description":"The new uid of the index (for renaming)"}}},"UpdateStderrLogs":{"type":"object","required":["target"],"properties":{"target":{"type":"string","description":"Lets you specify which parts of the code you want to inspect and is formatted like that: code_part=log_level,code_part=log_level\n- If the `code_part` is missing, then the `log_level` will be applied to everything.\n- If the `log_level` is missing, then the `code_part` will be selected in `info` log level.","default":"info","example":"milli=trace,index_scheduler,actix_web=off"}}},"Vec":{"type":"array","items":{"type":"number","format":"float"}},"VectorStoreBackend":{"type":"string","enum":["stable","experimental"]},"VersionResponse":{"type":"object","required":["commitSha","commitDate","pkgVersion"],"properties":{"commitSha":{"type":"string","description":"The commit used to compile this build of Meilisearch."},"commitDate":{"type":"string","description":"The date of this build."},"pkgVersion":{"type":"string","description":"The version of Meilisearch."}}},"WebhookResults":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/WebhookWithMetadata"}}}},"WebhookSettings":{"type":"object","properties":{"url":{"type":["string","null"],"example":"https://your.site/on-tasks-completed"},"headers":{"type":["object","null"],"additionalProperties":{"type":"string"},"propertyNames":{"type":"string"},"example":{"Authorization":"Bearer a-secret-token"}}}},"WebhookWithMetadata":{"allOf":[{"$ref":"#/components/schemas/WebhookSettings"},{"type":"object","required":["uuid","isEditable"],"properties":{"uuid":{"type":"string","format":"uuid"},"isEditable":{"type":"boolean"}}}]},"u32":{"type":"integer","format":"u-int32","minimum":0}},"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"Uuidv4, string or JWT","description":"An API key is a token that you provide when making API calls. Include the token in a header parameter called `Authorization`.\nExample: `Authorization: Bearer 8fece4405662dd830e4cb265e7e047aab2e79672a760a12712d2a263c9003509`"}}},"tags":[{"name":"Stats","description":"Stats gives extended information and metrics about indexes and the Meilisearch database."},{"name":"Tasks","description":"The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html).","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/tasks","description":null}},{"name":"Batches","description":"The /batches route gives information about the progress of batches of asynchronous operations.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/batches","description":null}},{"name":"Indexes","description":"An index is an entity that gathers a set of [documents](https://www.meilisearch.com/docs/learn/getting_started/documents) with its own [settings](https://www.meilisearch.com/docs/reference/api/settings). Learn more about indexes.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/indexes","description":null}},{"name":"Documents","description":"Documents are objects composed of fields that can store any type of data. Each field contains an attribute and its associated value. Documents are stored inside [indexes](https://www.meilisearch.com/docs/learn/getting_started/indexes).","externalDocs":{"url":"https://www.meilisearch.com/docs/learn/getting_started/documents","description":null}},{"name":"Facet Search","description":"The `/facet-search` route allows you to search for facet values. Facet search supports prefix search and typo tolerance. The returned hits are sorted lexicographically in ascending order. You can configure how facets are sorted using the sortFacetValuesBy property of the faceting index settings.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/facet_search","description":null}},{"name":"Similar documents","description":"The /similar route uses AI-powered search to return a number of documents similar to a target document.\n\nMeilisearch exposes two routes for retrieving similar documents: POST and GET. In the majority of cases, POST will offer better performance and ease of use.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/similar","description":null}},{"name":"Settings","description":"Use the /settings route to customize search settings for a given index. You can either modify all index settings at once using the update settings endpoint, or use a child route to configure a single setting.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/settings","description":null}},{"name":"Search","description":"Meilisearch exposes two routes to perform searches:\n\n- A POST route: this is the preferred route when using API authentication, as it allows [preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) caching and better performance.\n- A GET route: the usage of this route is discouraged, unless you have good reason to do otherwise (specific caching abilities for example)","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/search","description":null}},{"name":"Snapshots","description":"The snapshots route allows the creation of database snapshots. Snapshots are .snapshot files that can be used to launch Meilisearch.\nCreating a snapshot is also referred to as exporting it, whereas launching Meilisearch with a snapshot is referred to as importing it.\nDuring a snapshot export, all indexes of the current instance are exported—together with their documents and settings—and saved as a single .snapshot file.\nDuring a snapshot import, all indexes contained in the indicated .snapshot file are imported along with their associated documents and settings.\nSnapshot imports are performed at launch using an option.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/snapshots","description":null}},{"name":"Dumps","description":"The `dumps` route allows the creation of database dumps.\nDumps are `.dump` files that can be used to launch Meilisearch. Dumps are compatible between Meilisearch versions.\nCreating a dump is also referred to as exporting it, whereas launching Meilisearch with a dump is referred to as importing it.\nDuring a [dump export](https://www.meilisearch.com/docs/reference/api/dump#create-a-dump), all indexes of the current instance are\nexported—together with their documents and settings—and saved as a single `.dump` file. During a dump import,\nall indexes contained in the indicated `.dump` file are imported along with their associated documents and settings.\nAny existing index with the same uid as an index in the dump file will be overwritten.\nDump imports are [performed at launch](https://www.meilisearch.com/docs/learn/advanced/dumps#importing-a-dump) using an option.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/dump","description":null}},{"name":"Keys","description":"Manage API `keys` for a Meilisearch instance. Each key has a given set of permissions.\nYou must have the master key or the default admin key to access the keys route. More information about the keys and their rights.\nAccessing any route under `/keys` without having set a master key will result in an error.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/keys","description":null}},{"name":"Logs","description":"Everything about retrieving or customizing logs.\nCurrently [experimental](https://www.meilisearch.com/docs/learn/experimental/overview).","externalDocs":{"url":"https://www.meilisearch.com/docs/learn/experimental/log_customization","description":null}},{"name":"Multi-search","description":"The `/multi-search` route allows you to perform multiple search queries on one or more indexes by bundling them into a single HTTP request. Multi-search is also known as federated search.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/multi_search","description":null}},{"name":"Experimental features","description":"The `/experimental-features` route allows you to activate or deactivate some of Meilisearch's experimental features.\n\nThis route is **synchronous**. This means that no task object will be returned, and any activated or deactivated features will be made available or unavailable immediately.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/experimental_features","description":null}},{"name":"Export","description":"The `/export` route allows you to trigger an export process to a remote Meilisearch instance.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/export","description":null}},{"name":"Network","description":"The `/network` route allows you to describe the topology of a network of Meilisearch instances.\n\nThis route is **synchronous**. This means that no task object will be returned, and any change to the network will be made available immediately.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/network","description":null}},{"name":"Webhooks","description":"The `/webhooks` route allows you to register endpoints to be called once tasks are processed.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/webhooks","description":null}}]} \ No newline at end of file diff --git a/learn/meilisearch.json b/learn/meilisearch.json deleted file mode 100644 index 778a31ae1..000000000 --- a/learn/meilisearch.json +++ /dev/null @@ -1 +0,0 @@ -{"openapi":"3.1.0","info":{"title":"meilisearch","description":"Meilisearch HTTP server","contact":{"name":"Quentin de Quelen","email":"quentin@dequelen.me"},"license":{"name":"MIT","identifier":"MIT"},"version":"1.22.1"},"servers":[{"url":"/","description":"Local server"}],"paths":{"/batches":{"get":{"tags":["Batches"],"summary":"Get batches","description":"List all batches, regardless of index. The batch objects are contained in the results array.\nBatches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first.\nBatch results are paginated and can be filtered with query parameters.","operationId":"get_batches","parameters":[{"name":"limit","in":"query","description":"Maximum number of results to return.","required":false,"schema":{"type":"integer","format":"u-int32","default":20,"minimum":0},"example":12},{"name":"from","in":"query","description":"Fetch the next set of results from the given uid.","required":false,"schema":{"type":"integer","format":"u-int32","minimum":0},"example":12421},{"name":"reverse","in":"query","description":"The order you want to retrieve the objects.","required":false,"schema":{"type":"boolean"},"example":true},{"name":"batchUids","in":"query","description":"Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character.","required":false,"schema":{"type":"integer","format":"u-int32","minimum":0},"example":12421},{"name":"uids","in":"query","description":"Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"canceledBy","in":"query","description":"Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[374,"*"]},{"name":"types","in":"query","description":"Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["documentAdditionOrUpdate","*"]},{"name":"statuses","in":"query","description":"Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Status"}},"example":["succeeded","failed","canceled","enqueued","processing","*"]},{"name":"indexUids","in":"query","description":"Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["movies","theater","*"]},{"name":"afterEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]}],"responses":{"200":{"description":"Return the batches","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllBatches"},"example":{"results":[{"uid":2,"details":{"stopWords":["of","the"]},"progress":null,"stats":{"totalNbTasks":1,"status":{"succeeded":1},"types":{"settingsUpdate":1},"indexUids":{"INDEX_NAME":1}},"duration":"PT0.110083S","startedAt":"2024-12-10T15:49:04.995321Z","finishedAt":"2024-12-10T15:49:05.105404Z"}],"total":3,"limit":1,"from":2,"next":1}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["tasks.get","tasks.*","*"]}]}},"/batches/{batchUid}":{"get":{"tags":["Batches"],"summary":"Get one batch","description":"Get a single batch.","operationId":"get_batch","parameters":[{"name":"batchUid","in":"path","description":"The unique batch id","required":true,"schema":{"type":"string"},"example":"8685"}],"responses":{"200":{"description":"Return the batch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchView"},"example":{"uid":1,"details":{"receivedDocuments":1,"indexedDocuments":1},"progress":null,"stats":{"totalNbTasks":1,"status":{"succeeded":1},"types":{"documentAdditionOrUpdate":1},"indexUids":{"INDEX_NAME":1}},"duration":"PT0.364788S","startedAt":"2024-12-10T15:48:49.672141Z","finishedAt":"2024-12-10T15:48:50.036929Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["tasks.get","tasks.*","*"]}]}},"/dumps":{"post":{"tags":["Dumps"],"summary":"Create a dump","description":"Triggers a dump creation process. Once the process is complete, a dump is created in the\n[dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory).\nIf the dump directory does not exist yet, it will be created.","operationId":"create_dump","responses":{"202":{"description":"Dump is being created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":0,"indexUid":null,"status":"enqueued","type":"DumpCreation","enqueuedAt":"2021-01-01T09:39:00.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["dumps.create","dumps.*","*"]}]}},"/experimental-features":{"get":{"tags":["Experimental features"],"summary":"Get all experimental features","description":"Get a list of all experimental features that can be activated via the /experimental-features route and whether or not they are currently activated.","operationId":"get_features","responses":{"200":{"description":"Experimental features are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeTogglableFeatures"},"example":{"metrics":true,"logsRoute":false,"editDocumentsByFunction":false,"containsFilter":false,"network":false,"getTaskDocumentsRoute":false,"compositeEmbedders":false,"chatCompletions":false,"multimodal":false,"vectorStoreSetting":false}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["experimental_features.get","experimental_features.*","*"]}]},"patch":{"tags":["Experimental features"],"summary":"Configure experimental features","description":"Activate or deactivate experimental features.","operationId":"patch_features","responses":{"200":{"description":"Experimental features are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeTogglableFeatures"},"example":{"metrics":true,"logsRoute":false,"editDocumentsByFunction":false,"containsFilter":false,"network":false,"getTaskDocumentsRoute":false,"compositeEmbedders":false,"chatCompletions":false,"multimodal":false,"vectorStoreSetting":false}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["experimental_features.update","experimental_features.*","*"]}]}},"/export":{"post":{"tags":["Export"],"operationId":"export","responses":{"202":{"description":"Export successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":1,"status":"enqueued","type":"export","enqueuedAt":"2021-08-11T09:25:53.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["export","*"]}]}},"/health":{"get":{"tags":["Health"],"summary":"Get Health","description":"The health check endpoint enables you to periodically test the health of your Meilisearch instance.","operationId":"get_health","responses":{"200":{"description":"Instance is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"},"example":{"status":"available"}}}}}}},"/indexes":{"get":{"tags":["Indexes"],"summary":"List indexes","description":"List all indexes.","operationId":"list_indexes","parameters":[{"name":"offset","in":"query","description":"The number of indexes to skip before starting to retrieve anything","required":false,"schema":{"type":"integer","minimum":0},"example":100},{"name":"limit","in":"query","description":"The number of indexes to retrieve","required":false,"schema":{"type":"integer","default":20,"minimum":0},"example":1}],"responses":{"200":{"description":"Indexes are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationView_IndexView"},"example":{"results":[{"uid":"movies","primaryKey":"movie_id","createdAt":"2019-11-20T09:40:33.711324Z","updatedAt":"2019-11-20T09:40:33.711324Z"}],"limit":1,"offset":0,"total":1}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["indexes.get","indexes.*","*"]}]},"post":{"tags":["Indexes"],"summary":"Create index","description":"Create an index.","operationId":"create_index","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexCreateRequest"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"indexCreation","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["indexes.create","indexes.*","*"]}]}},"/indexes/{indexUid}":{"get":{"tags":["Indexes"],"summary":"Get index","description":"Get information about an index.","operationId":"get_index","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"The index is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexView"},"example":{"uid":"movies","primaryKey":"movie_id","createdAt":"2019-11-20T09:40:33.711324Z","updatedAt":"2019-11-20T09:40:33.711324Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["indexes.get","indexes.*","*"]}]},"delete":{"tags":["Indexes"],"summary":"Delete index","description":"Delete an index.","operationId":"delete_index","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"202":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":0,"indexUid":"movies","status":"enqueued","type":"indexDeletion","enqueuedAt":"2021-01-01T09:39:00.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["indexes.delete","indexes.*","*"]}]},"patch":{"tags":["Indexes"],"summary":"Update index","description":"Update the `primaryKey` of an index.\nReturn an error if the index doesn't exists yet or if it contains documents.","operationId":"update_index","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIndexRequest"}}},"required":true},"responses":{"202":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":0,"indexUid":"movies","status":"enqueued","type":"indexUpdate","enqueuedAt":"2021-01-01T09:39:00.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["indexes.update","indexes.*","*"]}]}},"/indexes/{indexUid}/delete-batch":{"post":{"tags":["Documents"],"summary":"Delete documents by batch","description":"Delete a set of documents based on an array of document ids.","operationId":"delete_documents_batch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentAdditionOrUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.delete","documents.*","*"]}]}},"/indexes/{indexUid}/documents":{"get":{"tags":["Documents"],"summary":"Get documents","description":"Get documents by batches.","operationId":"get_documents","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"retrieveVectors","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"filter","in":"query","required":false,"schema":{"type":"string"},"example":"popularity > 1000"},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationView_Value"},"example":{"results":[{"id":25684,"title":"American Ninja 5","poster":"https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg","overview":"When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.","release_date":725846400},{"id":45881,"title":"The Bridge of San Luis Rey","poster":"https://image.tmdb.org/t/p/w500/4X7quIcdkc24Cveg5XdpfRqxtYA.jpg","overview":"The Bridge of San Luis Rey is American author Thornton Wilder's second novel, first published in 1927 to worldwide acclaim. It tells the story of several interrelated people who die in the collapse of an Inca rope-fiber suspension bridge in Peru, and the events that lead up to their being on the bridge.[ A friar who has witnessed the tragic accident then goes about inquiring into the lives of the victims, seeking some sort of cosmic answer to the question of why each had to die. The novel won the Pulitzer Prize in 1928.","release_date":1072915200}],"limit":20,"offset":0,"total":2}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["documents.get","documents.*","*"]}]},"put":{"tags":["Documents"],"summary":"Add or update documents","description":"Add a list of documents or update them if they already exist.\nIf you send an already existing document (same id) the old document will be only partially updated according to the fields of the new document. Thus, any fields not present in the new document are kept and remained unchanged.\nTo completely overwrite a document, see Add or replace documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document. `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved `_vectors` field in your documents.\n> It can accept an array of floats, multiple arrays of floats in an outer array or an object.\n> This object accepts keys corresponding to the different embedders defined your index settings.","operationId":"update_documents","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"primaryKey","in":"query","description":"The primary key of the documents. primaryKey is optional. If you want to set the primary key of your index through this route,\nit only has to be done the first time you add documents to the index. After which it will be ignored if given.","required":false,"schema":{"type":"string"},"example":"id"},{"name":"csvDelimiter","in":"query","description":"Customize the csv delimiter when importing CSV documents.","required":true,"schema":{"type":"string","default":","},"example":";"}],"requestBody":{"content":{"application/json":{"schema":{}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentAdditionOrUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.add","documents.*","*"]}]},"post":{"tags":["Documents"],"summary":"Add or replace documents","description":"Add a list of documents or replace them if they already exist.\n\nIf you send an already existing document (same id) the whole existing document will be overwritten by the new document. Fields previously in the document not present in the new document are removed.\n\nFor a partial update of the document see Add or update documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document. `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved `_vectors` field in your documents.\n> It can accept an array of floats, multiple arrays of floats in an outer array or an object.\n> This object accepts keys corresponding to the different embedders defined your index settings.","operationId":"replace_documents","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"primaryKey","in":"query","description":"The primary key of the documents. primaryKey is optional. If you want to set the primary key of your index through this route,\nit only has to be done the first time you add documents to the index. After which it will be ignored if given.","required":false,"schema":{"type":"string"},"example":"id"},{"name":"csvDelimiter","in":"query","description":"Customize the csv delimiter when importing CSV documents.","required":true,"schema":{"type":"string","default":","},"example":";"}],"requestBody":{"content":{"application/json":{"schema":{}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentAdditionOrUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.add","documents.*","*"]}]},"delete":{"tags":["Documents"],"summary":"Delete all documents","description":"Delete all documents in the specified index.","operationId":"clear_all_documents","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentDeletion","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.delete","documents.*","*"]}]}},"/indexes/{indexUid}/documents/delete":{"post":{"tags":["Documents"],"summary":"Delete documents by filter","description":"Delete a set of documents based on a filter.","operationId":"delete_documents_by_filter","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDeletionByFilter"}}},"required":true},"responses":{"202":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentDeletion","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.delete","documents.*","*"]}]}},"/indexes/{indexUid}/documents/edit":{"post":{"tags":["Documents"],"summary":"Edit documents by function.","description":"Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to edit one or more documents directly in Meilisearch.","operationId":"edit_documents_by_function","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentEditionByFunction"}}},"required":true},"responses":{"202":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentDeletion","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.*","*"]}]}},"/indexes/{indexUid}/documents/fetch":{"post":{"tags":["Documents"],"summary":"Get documents with POST","description":"Get a set of documents.","operationId":"documents_by_query_post","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowseQuery"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationView_Value"},"example":{"results":[{"title":"The Travels of Ibn Battuta","genres":["Travel","Adventure"],"language":"English","rating":4.5},{"title":"Pride and Prejudice","genres":["Classics","Fiction","Romance","Literature"],"language":"English","rating":4}],"offset":0,"limit":2,"total":5}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.delete","documents.*","*"]}]}},"/indexes/{indexUid}/documents/{documentId}":{"get":{"tags":["Documents"],"summary":"Get one document","description":"Get one document from its primary key.","operationId":"get_document","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"documentId","in":"path","description":"The document identifier","required":true,"schema":{"type":"string"},"example":"85087"},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"retrieveVectors","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"The document is returned","content":{"application/json":{"schema":{},"example":{"id":25684,"title":"American Ninja 5","poster":"https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg","overview":"When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.","release_date":725846400}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Document not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Document `a` not found.","code":"document_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#document_not_found"}}}}},"security":[{"Bearer":["documents.get","documents.*","*"]}]},"delete":{"tags":["Documents"],"summary":"Delete a document","description":"Delete a single document by id.","operationId":"delete_document","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"documentId","in":"path","description":"Document Identifier","required":true,"schema":{"type":"string"},"example":"853"}],"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"documentAdditionOrUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["documents.delete","documents.*","*"]}]}},"/indexes/{indexUid}/facet-search":{"post":{"tags":["Facet Search"],"summary":"Perform a facet search","description":"Search for a facet value within a given facet.","operationId":"search","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacetSearchQuery"}}},"required":true},"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"},"example":{"hits":[{"id":2770,"title":"American Pie 2","poster":"https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg","overview":"The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…","release_date":997405200},{"id":190859,"title":"American Sniper","poster":"https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg","overview":"U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…","release_date":1418256000}],"offset":0,"limit":2,"estimatedTotalHits":976,"processingTimeMs":35,"query":"american "}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["search","*"]}]}},"/indexes/{indexUid}/search":{"get":{"tags":["Indexes","Search"],"summary":"Search an index with GET","description":"Search for documents matching a specific query in the given index.","operationId":"search_with_url_query","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"vector","in":"query","required":true,"schema":{"type":"array","items":{"type":"number","format":"float"}},"explode":false},{"name":"offset","in":"query","required":true,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"limit","in":"query","required":true,"schema":{"type":"integer","default":20,"minimum":0}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"hitsPerPage","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"attributesToRetrieve","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"retrieveVectors","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"attributesToCrop","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"cropLength","in":"query","required":true,"schema":{"type":"integer","default":10,"minimum":0}},{"name":"attributesToHighlight","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"filter","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"distinct","in":"query","required":false,"schema":{"type":"string"}},{"name":"showMatchesPosition","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"showRankingScore","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"showRankingScoreDetails","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"facets","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"highlightPreTag","in":"query","required":true,"schema":{"type":"string","default":""}},{"name":"highlightPostTag","in":"query","required":true,"schema":{"type":"string","default":""}},{"name":"cropMarker","in":"query","required":true,"schema":{"type":"string","default":"…"}},{"name":"matchingStrategy","in":"query","required":true,"schema":{"$ref":"#/components/schemas/MatchingStrategy"}},{"name":"attributesToSearchOn","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"hybridEmbedder","in":"query","required":false,"schema":{"type":"string"}},{"name":"hybridSemanticRatio","in":"query","required":true,"schema":{"type":"number","format":"float"}},{"name":"rankingScoreThreshold","in":"query","required":true,"schema":{"type":"number","format":"float"}},{"name":"locales","in":"query","required":true,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Locale"}},"explode":false}],"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"},"example":{"hits":[{"id":2770,"title":"American Pie 2","poster":"https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg","overview":"The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…","release_date":997405200},{"id":190859,"title":"American Sniper","poster":"https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg","overview":"U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…","release_date":1418256000}],"offset":0,"limit":2,"estimatedTotalHits":976,"processingTimeMs":35,"query":"american "}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["search","*"]}]},"post":{"tags":["Indexes","Search"],"summary":"Search with POST","description":"Search for documents matching a specific query in the given index.","operationId":"search_with_post","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchQuery"}}},"required":true},"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"},"example":{"hits":[{"id":2770,"title":"American Pie 2","poster":"https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg","overview":"The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…","release_date":997405200},{"id":190859,"title":"American Sniper","poster":"https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg","overview":"U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…","release_date":1418256000}],"offset":0,"limit":2,"estimatedTotalHits":976,"processingTimeMs":35,"query":"american "}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["search","*"]}]}},"/indexes/{indexUid}/settings":{"get":{"tags":["Settings"],"summary":"All settings","description":"This route allows you to retrieve, configure, or reset all of an index's settings at once.","operationId":"get_all","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"Settings are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings_Unchecked"},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset settings","description":"Reset all the settings of an index to their default value.","operationId":"delete_all","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update settings","description":"Update the settings of an index.\nPassing null to an index setting will reset it to its default value.\nUpdates in the settings route are partial. This means that any parameters not provided in the body will be left unchanged.\nIf the provided index does not exist, it will be created.","operationId":"update_all","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings_Unchecked"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/chat":{"get":{"tags":["Settings"],"summary":"Get chat","description":"Get an user defined chat","operationId":"getchat","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"chat is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSettings"},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset chat","description":"Reset an index's chat to its default value","operationId":"deletechat","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update chat","description":"Update an index's user defined chat","operationId":"patchchat","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/dictionary":{"get":{"tags":["Settings"],"summary":"Get dictionary","description":"Get an user defined dictionary","operationId":"getdictionary","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"dictionary is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update dictionary","description":"Update an index's user defined dictionary","operationId":"putdictionary","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset dictionary","description":"Reset an index's dictionary to its default value","operationId":"deletedictionary","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/displayed-attributes":{"get":{"tags":["Settings"],"summary":"Get displayedAttributes","description":"Get an user defined displayedAttributes","operationId":"getdisplayedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"displayedAttributes is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update displayedAttributes","description":"Update an index's user defined displayedAttributes","operationId":"putdisplayedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset displayedAttributes","description":"Reset an index's displayedAttributes to its default value","operationId":"deletedisplayedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/distinct-attribute":{"get":{"tags":["Settings"],"summary":"Get distinctAttribute","description":"Get an user defined distinctAttribute","operationId":"getdistinctAttribute","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"distinctAttribute is returned","content":{"application/json":{"schema":{"type":"string"},"example":""}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update distinctAttribute","description":"Update an index's user defined distinctAttribute","operationId":"putdistinctAttribute","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset distinctAttribute","description":"Reset an index's distinctAttribute to its default value","operationId":"deletedistinctAttribute","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/embedders":{"get":{"tags":["Settings"],"summary":"Get embedders","description":"Get an user defined embedders","operationId":"getembedders","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"embedders is returned","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/SettingEmbeddingSettings"},"propertyNames":{"type":"string"}},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset embedders","description":"Reset an index's embedders to its default value","operationId":"deleteembedders","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/SettingEmbeddingSettings"},"propertyNames":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update embedders","description":"Update an index's user defined embedders","operationId":"patchembedders","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/SettingEmbeddingSettings"},"propertyNames":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/facet-search":{"get":{"tags":["Settings"],"summary":"Get facetSearch","description":"Get an user defined facetSearch","operationId":"getfacetSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"facetSearch is returned","content":{"application/json":{"schema":{"type":"boolean"},"example":false}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update facetSearch","description":"Update an index's user defined facetSearch","operationId":"putfacetSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"boolean"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset facetSearch","description":"Reset an index's facetSearch to its default value","operationId":"deletefacetSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"boolean"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/faceting":{"get":{"tags":["Settings"],"summary":"Get faceting","description":"Get an user defined faceting","operationId":"getfaceting","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"faceting is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacetingSettings"},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset faceting","description":"Reset an index's faceting to its default value","operationId":"deletefaceting","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacetingSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update faceting","description":"Update an index's user defined faceting","operationId":"patchfaceting","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacetingSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/filterable-attributes":{"get":{"tags":["Settings"],"summary":"Get filterableAttributes","description":"Get an user defined filterableAttributes","operationId":"getfilterableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"filterableAttributes is returned","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FilterableAttributesRule"}},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update filterableAttributes","description":"Update an index's user defined filterableAttributes","operationId":"putfilterableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FilterableAttributesRule"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset filterableAttributes","description":"Reset an index's filterableAttributes to its default value","operationId":"deletefilterableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FilterableAttributesRule"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/localized-attributes":{"get":{"tags":["Settings"],"summary":"Get localizedAttributes","description":"Get an user defined localizedAttributes","operationId":"getlocalizedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"localizedAttributes is returned","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LocalizedAttributesRuleView"}},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update localizedAttributes","description":"Update an index's user defined localizedAttributes","operationId":"putlocalizedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LocalizedAttributesRuleView"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset localizedAttributes","description":"Reset an index's localizedAttributes to its default value","operationId":"deletelocalizedAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LocalizedAttributesRuleView"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/non-separator-tokens":{"get":{"tags":["Settings"],"summary":"Get nonSeparatorTokens","description":"Get an user defined nonSeparatorTokens","operationId":"getnonSeparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"nonSeparatorTokens is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update nonSeparatorTokens","description":"Update an index's user defined nonSeparatorTokens","operationId":"putnonSeparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset nonSeparatorTokens","description":"Reset an index's nonSeparatorTokens to its default value","operationId":"deletenonSeparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/pagination":{"get":{"tags":["Settings"],"summary":"Get pagination","description":"Get an user defined pagination","operationId":"getpagination","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"pagination is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationSettings"},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset pagination","description":"Reset an index's pagination to its default value","operationId":"deletepagination","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update pagination","description":"Update an index's user defined pagination","operationId":"patchpagination","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/prefix-search":{"get":{"tags":["Settings"],"summary":"Get prefixSearch","description":"Get an user defined prefixSearch","operationId":"getprefixSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"prefixSearch is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrefixSearchSettings"},"example":"indexingTime"}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update prefixSearch","description":"Update an index's user defined prefixSearch","operationId":"putprefixSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrefixSearchSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset prefixSearch","description":"Reset an index's prefixSearch to its default value","operationId":"deleteprefixSearch","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrefixSearchSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/proximity-precision":{"get":{"tags":["Settings"],"summary":"Get proximityPrecision","description":"Get an user defined proximityPrecision","operationId":"getproximityPrecision","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"proximityPrecision is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProximityPrecisionView"},"example":"byWord"}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update proximityPrecision","description":"Update an index's user defined proximityPrecision","operationId":"putproximityPrecision","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProximityPrecisionView"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset proximityPrecision","description":"Reset an index's proximityPrecision to its default value","operationId":"deleteproximityPrecision","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProximityPrecisionView"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/ranking-rules":{"get":{"tags":["Settings"],"summary":"Get rankingRules","description":"Get an user defined rankingRules","operationId":"getrankingRules","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"rankingRules is returned","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RankingRuleView"}},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update rankingRules","description":"Update an index's user defined rankingRules","operationId":"putrankingRules","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RankingRuleView"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset rankingRules","description":"Reset an index's rankingRules to its default value","operationId":"deleterankingRules","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RankingRuleView"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/search-cutoff-ms":{"get":{"tags":["Settings"],"summary":"Get searchCutoffMs","description":"Get an user defined searchCutoffMs","operationId":"getsearchCutoffMs","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"searchCutoffMs is returned","content":{"application/json":{"schema":{"type":"integer","format":"u-int64","minimum":0},"example":0}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update searchCutoffMs","description":"Update an index's user defined searchCutoffMs","operationId":"putsearchCutoffMs","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"integer","format":"u-int64","minimum":0}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset searchCutoffMs","description":"Reset an index's searchCutoffMs to its default value","operationId":"deletesearchCutoffMs","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"text/plain":{"schema":{"type":"integer","format":"u-int64","minimum":0}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/searchable-attributes":{"get":{"tags":["Settings"],"summary":"Get searchableAttributes","description":"Get an user defined searchableAttributes","operationId":"getsearchableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"searchableAttributes is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update searchableAttributes","description":"Update an index's user defined searchableAttributes","operationId":"putsearchableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset searchableAttributes","description":"Reset an index's searchableAttributes to its default value","operationId":"deletesearchableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/separator-tokens":{"get":{"tags":["Settings"],"summary":"Get separatorTokens","description":"Get an user defined separatorTokens","operationId":"getseparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"separatorTokens is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update separatorTokens","description":"Update an index's user defined separatorTokens","operationId":"putseparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset separatorTokens","description":"Reset an index's separatorTokens to its default value","operationId":"deleteseparatorTokens","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/sortable-attributes":{"get":{"tags":["Settings"],"summary":"Get sortableAttributes","description":"Get an user defined sortableAttributes","operationId":"getsortableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"sortableAttributes is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update sortableAttributes","description":"Update an index's user defined sortableAttributes","operationId":"putsortableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset sortableAttributes","description":"Reset an index's sortableAttributes to its default value","operationId":"deletesortableAttributes","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/stop-words":{"get":{"tags":["Settings"],"summary":"Get stopWords","description":"Get an user defined stopWords","operationId":"getstopWords","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"stopWords is returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true},"example":[]}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update stopWords","description":"Update an index's user defined stopWords","operationId":"putstopWords","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset stopWords","description":"Reset an index's stopWords to its default value","operationId":"deletestopWords","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/synonyms":{"get":{"tags":["Settings"],"summary":"Get synonyms","description":"Get an user defined synonyms","operationId":"getsynonyms","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"synonyms is returned","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"propertyNames":{"type":"string"}},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"put":{"tags":["Settings"],"summary":"Update synonyms","description":"Update an index's user defined synonyms","operationId":"putsynonyms","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"propertyNames":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset synonyms","description":"Reset an index's synonyms to its default value","operationId":"deletesynonyms","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"propertyNames":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/typo-tolerance":{"get":{"tags":["Settings"],"summary":"Get typoTolerance","description":"Get an user defined typoTolerance","operationId":"gettypoTolerance","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"typoTolerance is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypoSettings"},"example":{}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset typoTolerance","description":"Reset an index's typoTolerance to its default value","operationId":"deletetypoTolerance","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypoSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update typoTolerance","description":"Update an index's user defined typoTolerance","operationId":"patchtypoTolerance","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypoSettings"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/settings/vector-store":{"get":{"tags":["Settings"],"summary":"Get vectorStore","description":"Get an user defined vectorStore","operationId":"getvectorStore","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"vectorStore is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreBackend"},"example":"stable"}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.get","settings.*","*"]}]},"delete":{"tags":["Settings"],"summary":"Reset vectorStore","description":"Reset an index's vectorStore to its default value","operationId":"deletevectorStore","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreBackend"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]},"patch":{"tags":["Settings"],"summary":"Update vectorStore","description":"Update an index's user defined vectorStore","operationId":"patchvectorStore","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreBackend"}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":"movies","status":"enqueued","type":"settingsUpdate","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["settings.update","settings.*","*"]}]}},"/indexes/{indexUid}/similar":{"get":{"tags":["Similar documents"],"summary":"Get similar documents with GET","description":"Retrieve documents similar to a specific search result.","operationId":"similar_get","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"},{"name":"id","in":"query","required":true,"schema":{"type":"string"}},{"name":"offset","in":"query","required":true,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"limit","in":"query","required":true,"schema":{"type":"integer","default":20,"minimum":0}},{"name":"attributes_to_retrieve","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"retrieve_vectors","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"filter","in":"query","required":false,"schema":{"type":"string"}},{"name":"show_ranking_score","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"show_ranking_score_details","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"ranking_score_threshold","in":"query","required":false,"schema":{"type":"number","format":"float"}},{"name":"embedder","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimilarResult"},"example":{"hits":[{"id":2770,"title":"American Pie 2","poster":"https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg","overview":"The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…","release_date":997405200},{"id":190859,"title":"American Sniper","poster":"https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg","overview":"U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…","release_date":1418256000}],"offset":0,"limit":2,"estimatedTotalHits":976,"processingTimeMs":35,"query":"american "}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["search","*"]}]},"post":{"tags":["Similar documents"],"summary":"Get similar documents with POST","description":"Retrieve documents similar to a specific search result.","operationId":"similar_post","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimilarQuery"}}},"required":true},"responses":{"200":{"description":"The documents are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimilarResult"},"example":{"hits":[{"id":2770,"title":"American Pie 2","poster":"https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg","overview":"The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…","release_date":997405200},{"id":190859,"title":"American Sniper","poster":"https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg","overview":"U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…","release_date":1418256000}],"offset":0,"limit":2,"estimatedTotalHits":976,"processingTimeMs":35,"query":"american "}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["search","*"]}]}},"/indexes/{indexUid}/stats":{"get":{"tags":["Stats"],"summary":"Get stats of index","description":"Get the stats of an index.","operationId":"get_index_stats","parameters":[{"name":"indexUid","in":"path","description":"Index Unique Identifier","required":true,"schema":{"type":"string"},"example":"movies"}],"responses":{"200":{"description":"The stats of the index","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexStats"},"example":{"numberOfDocuments":10,"rawDocumentDbSize":10,"avgDocumentSize":10,"numberOfEmbeddings":10,"numberOfEmbeddedDocuments":10,"isIndexing":true,"fieldDistribution":{"genre":10,"author":9}}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"Index not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Index `movies` not found.","code":"index_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors#index_not_found"}}}}},"security":[{"Bearer":["stats.get","stats.*","*"]}]}},"/keys":{"get":{"tags":["Keys"],"summary":"Get API Keys","description":"List all API Keys","operationId":"list_api_keys","parameters":[{"name":"offset","in":"query","required":true,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"limit","in":"query","required":true,"schema":{"type":"integer","default":20,"minimum":0}}],"responses":{"202":{"description":"List of keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationView_KeyView"},"example":{"results":[{"uid":"01b4bc42-eb33-4041-b481-254d00cce834","key":"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4","name":"An API Key","description":null,"actions":["documents.add"],"indexes":["movies"],"expiresAt":"2022-11-12T10:00:00Z","createdAt":"2021-11-12T10:00:00Z","updatedAt":"2021-11-12T10:00:00Z"}],"limit":20,"offset":0,"total":1}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["keys.get","keys.*","*"]}]},"post":{"tags":["Keys"],"summary":"Create an API Key","description":"Create an API Key.","operationId":"create_api_key","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKey"}}},"required":true},"responses":{"202":{"description":"Key has been created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyView"},"example":{"uid":"01b4bc42-eb33-4041-b481-254d00cce834","key":"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4","name":"Indexing Products API key","description":null,"actions":["documents.add"],"indexes":["products"],"expiresAt":"2021-11-13T00:00:00Z","createdAt":"2021-11-12T10:00:00Z","updatedAt":"2021-11-12T10:00:00Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["keys.create","keys.*","*"]}]}},"/keys/{uidOrKey}":{"get":{"tags":["Keys"],"summary":"Get an API Key","description":"Get an API key from its `uid` or its `key` field.","operationId":"get_api_key","parameters":[{"name":"uidOrKey","in":"path","description":"The `uid` or `key` field of an existing API key","required":true,"schema":{"type":"string","format":"password"},"example":"7b198a7f-52a0-4188-8762-9ad93cd608b2"}],"responses":{"200":{"description":"The key is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyView"},"example":{"uid":"01b4bc42-eb33-4041-b481-254d00cce834","key":"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4","name":"An API Key","description":null,"actions":["documents.add"],"indexes":["movies"],"expiresAt":"2022-11-12T10:00:00Z","createdAt":"2021-11-12T10:00:00Z","updatedAt":"2021-11-12T10:00:00Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["keys.get","keys.*","*"]}]},"delete":{"tags":["Keys"],"summary":"Delete a key","description":"Delete the specified API key.","operationId":"delete_api_key","parameters":[{"name":"uidOrKey","in":"path","description":"The `uid` or `key` field of an existing API key","required":true,"schema":{"type":"string","format":"password"},"example":"7b198a7f-52a0-4188-8762-9ad93cd608b2"}],"responses":{"204":{"description":"The key have been removed"},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["keys.delete","keys.*","*"]}]},"patch":{"tags":["Keys"],"summary":"Update a Key","description":"Update the name and description of an API key.\nUpdates to keys are partial. This means you should provide only the fields you intend to update, as any fields not present in the payload will remain unchanged.","operationId":"patch_api_key","parameters":[{"name":"uidOrKey","in":"path","description":"The `uid` or `key` field of an existing API key","required":true,"schema":{"type":"string","format":"password"},"example":"7b198a7f-52a0-4188-8762-9ad93cd608b2"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchApiKey"}}},"required":true},"responses":{"200":{"description":"The key have been updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyView"},"example":{"uid":"01b4bc42-eb33-4041-b481-254d00cce834","key":"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4","name":"An API Key","description":null,"actions":["documents.add"],"indexes":["movies"],"expiresAt":"2022-11-12T10:00:00Z","createdAt":"2021-11-12T10:00:00Z","updatedAt":"2021-11-12T10:00:00Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["keys.update","keys.*","*"]}]}},"/logs/stderr":{"post":{"tags":["Logs"],"summary":"Update target of the console logs","description":"This route lets you specify at runtime the level of the console logs outputted on stderr.","operationId":"update_stderr_target","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStderrLogs"}}},"required":true},"responses":{"204":{"description":"The console logs have been updated"},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["metrics.get","metrics.*","*"]}]}},"/logs/stream":{"post":{"tags":["Logs"],"summary":"Retrieve logs","description":"Stream logs over HTTP. The format of the logs depends on the configuration specified in the payload.\nThe logs are sent as multi-part, and the stream never stops, so make sure your clients correctly handle that.\nTo make the server stop sending you logs, you can call the `DELETE /logs/stream` route.\n\nThere can only be one listener at a timeand an error will be returned if you call this route while it's being used by another client.","operationId":"get_logs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLogs"}}},"required":true},"responses":{"200":{"description":"Logs are being returned","content":{"application/json":{"schema":{"type":"string"},"example":"\n2024-10-08T13:35:02.643750Z WARN HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: tracing_actix_web::middleware: Error encountered while processing the incoming HTTP request: ResponseError { code: 400, message: \"Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625\", error_code: \"feature_not_enabled\", error_type: \"invalid_request\", error_link: \"https://docs.meilisearch.com/errors#feature_not_enabled\" }\n2024-10-08T13:35:02.644191Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: meilisearch: close time.busy=1.66ms time.idle=658µs\n2024-10-08T13:35:18.564152Z INFO HTTP request{method=PATCH host=\"localhost:7700\" route=/experimental-features query_parameters= user_agent=curl/8.6.0 status_code=200}: meilisearch: close time.busy=1.17ms time.idle=127µs\n2024-10-08T13:35:23.094987Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=200}: meilisearch: close time.busy=2.12ms time.idle=595µs\n"}}},"400":{"description":"The route is already being used","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The `/logs/stream` route is currently in use by someone else.","code":"bad_request","type":"invalid_request","link":"https://docs.meilisearch.com/errors#bad_request"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["metrics.get","metrics.*","*"]}]},"delete":{"tags":["Logs"],"summary":"Stop retrieving logs","description":"Call this route to make the engine stops sending logs through the `POST /logs/stream` route.","operationId":"cancel_logs","responses":{"204":{"description":"Logs are being returned"},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["metrics.get","metrics.*","*"]}]}},"/metrics":{"get":{"tags":["Stats"],"summary":"Get prometheus metrics","description":"Retrieve metrics on the engine. See https://www.meilisearch.com/docs/learn/experimental/metrics\nCurrently, [the feature is experimental](https://www.meilisearch.com/docs/learn/experimental/overview)\nwhich means it must be enabled.","operationId":"get_metrics","responses":{"200":{"description":"The metrics of the instance","content":{"text/plain":{"schema":{"type":"string"},"example":"\n# HELP meilisearch_db_size_bytes Meilisearch DB Size In Bytes\n# TYPE meilisearch_db_size_bytes gauge\nmeilisearch_db_size_bytes 1130496\n# HELP meilisearch_http_requests_total Meilisearch HTTP requests total\n# TYPE meilisearch_http_requests_total counter\nmeilisearch_http_requests_total{method=\"GET\",path=\"/metrics\",status=\"400\"} 1\nmeilisearch_http_requests_total{method=\"PATCH\",path=\"/experimental-features\",status=\"200\"} 1\n# HELP meilisearch_http_response_time_seconds Meilisearch HTTP response times\n# TYPE meilisearch_http_response_time_seconds histogram\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.005\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.01\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.025\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.05\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.075\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.25\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.75\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"2.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"7.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"10\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"+Inf\"} 0\nmeilisearch_http_response_time_seconds_sum{method=\"GET\",path=\"/metrics\"} 0\nmeilisearch_http_response_time_seconds_count{method=\"GET\",path=\"/metrics\"} 0\n# HELP meilisearch_index_count Meilisearch Index Count\n# TYPE meilisearch_index_count gauge\nmeilisearch_index_count 1\n# HELP meilisearch_index_docs_count Meilisearch Index Docs Count\n# TYPE meilisearch_index_docs_count gauge\nmeilisearch_index_docs_count{index=\"mieli\"} 2\n# HELP meilisearch_is_indexing Meilisearch Is Indexing\n# TYPE meilisearch_is_indexing gauge\nmeilisearch_is_indexing 0\n# HELP meilisearch_last_update Meilisearch Last Update\n# TYPE meilisearch_last_update gauge\nmeilisearch_last_update 1726675964\n# HELP meilisearch_nb_tasks Meilisearch Number of tasks\n# TYPE meilisearch_nb_tasks gauge\nmeilisearch_nb_tasks{kind=\"indexes\",value=\"mieli\"} 39\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"canceled\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"enqueued\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"failed\"} 4\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"processing\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"succeeded\"} 35\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentAdditionOrUpdate\"} 9\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentDeletion\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentEdition\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"dumpCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexDeletion\"} 8\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexSwap\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexUpdate\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"settingsUpdate\"} 22\nmeilisearch_nb_tasks{kind=\"types\",value=\"snapshotCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskCancelation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskDeletion\"} 0\n# HELP meilisearch_used_db_size_bytes Meilisearch Used DB Size In Bytes\n# TYPE meilisearch_used_db_size_bytes gauge\nmeilisearch_used_db_size_bytes 409600\n"}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["metrics.get","metrics.*","*"]}]}},"/multi-search":{"post":{"tags":["Multi-search"],"summary":"Perform a multi-search","description":"Bundle multiple search queries in a single API request. Use this endpoint to search through multiple indexes at once.","operationId":"multi_search_with_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FederatedSearch"}}},"required":true},"responses":{"200":{"description":"Federated multi-search","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FederatedSearchResult"},"example":{"hits":[{"id":42,"title":"Batman returns","overview":"The overview of batman returns","_federation":{"indexUid":"movies","queriesPosition":0}},{"comicsId":"batman-killing-joke","description":"This comic is really awesome","title":"Batman: the killing joke","_federation":{"indexUid":"comics","queriesPosition":1}}],"processingTimeMs":0,"limit":20,"offset":0,"estimatedTotalHits":2,"semanticHitCount":0}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["search","*"]}]}},"/network":{"get":{"tags":["Network"],"summary":"Get network topology","description":"Get a list of all Meilisearch instances currently known to this instance.","operationId":"get_network","responses":{"200":{"description":"Known nodes are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Network"},"example":{"self":"ms-0","remotes":{"ms-0":{"url":"http://localhost:7700","searchApiKey":null,"writeApiKey":null},"ms-1":{"url":"http://localhost:7701","searchApiKey":"foo","writeApiKey":"bar"},"ms-2":{"url":"http://localhost:7702","searchApiKey":"bar","writeApiKey":"foo"}}}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["network.get","*"]}]},"patch":{"tags":["Network"],"summary":"Configure Network","description":"Add or remove nodes from network.","operationId":"patch_network","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Network"}}},"required":true},"responses":{"200":{"description":"New network state is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Network"},"example":{"self":"ms-0","remotes":{"ms-0":{"url":"http://localhost:7700","searchApiKey":null,"writeApiKey":null},"ms-1":{"url":"http://localhost:7701","searchApiKey":"foo","writeApiKey":"bar"},"ms-2":{"url":"http://localhost:7702","searchApiKey":"bar","writeApiKey":"foo"}}}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["network.update","*"]}]}},"/snapshots":{"post":{"tags":["Snapshots"],"summary":"Create a snapshot","description":"Triggers a snapshot creation process. Once the process is complete, a snapshot is created in the snapshot directory. If the snapshot directory does not exist yet, it will be created.","operationId":"create_snapshot","responses":{"202":{"description":"Snapshot is being created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":0,"indexUid":null,"status":"enqueued","type":"snapshotCreation","enqueuedAt":"2021-01-01T09:39:00.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["snapshots.create","snapshots.*","*"]}]}},"/stats":{"get":{"tags":["Stats"],"summary":"Get stats of all indexes.","description":"Get stats of all indexes.","operationId":"get_stats","responses":{"200":{"description":"The stats of the instance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stats"},"example":{"databaseSize":567,"usedDatabaseSize":456,"lastUpdate":"2019-11-20T09:40:33.711324Z","indexes":{"movies":{"numberOfDocuments":10,"rawDocumentDbSize":100,"maxDocumentSize":16,"avgDocumentSize":10,"isIndexing":true,"fieldDistribution":{"genre":10,"author":9}}}}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["stats.get","stats.*","*"]}]}},"/swap-indexes":{"post":{"tags":["Indexes"],"summary":"Swap indexes","description":"Swap the documents, settings, and task history of two or more indexes. You can only swap indexes in pairs. However, a single request can swap as many index pairs as you wish.\nSwapping indexes is an atomic transaction: either all indexes are successfully swapped, or none are.\nSwapping indexA and indexB will also replace every mention of indexA by indexB and vice-versa in the task history. enqueued tasks are left unmodified.","operationId":"swap_indexes","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SwapIndexesPayload"}}}},"required":true},"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":3,"indexUid":null,"status":"enqueued","type":"indexSwap","enqueuedAt":"2021-08-12T10:00:00.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["search","*"]}]}},"/tasks":{"get":{"tags":["Tasks"],"summary":"Get all tasks","description":"Get all [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)","operationId":"get_tasks","parameters":[{"name":"limit","in":"query","description":"Maximum number of results to return.","required":false,"schema":{"type":"integer","format":"u-int32","default":20,"minimum":0},"example":12},{"name":"from","in":"query","description":"Fetch the next set of results from the given uid.","required":false,"schema":{"type":"integer","format":"u-int32","minimum":0},"example":12421},{"name":"reverse","in":"query","description":"The order you want to retrieve the objects.","required":false,"schema":{"type":"boolean"},"example":true},{"name":"batchUids","in":"query","description":"Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character.","required":false,"schema":{"type":"integer","format":"u-int32","minimum":0},"example":12421},{"name":"uids","in":"query","description":"Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"canceledBy","in":"query","description":"Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[374,"*"]},{"name":"types","in":"query","description":"Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["documentAdditionOrUpdate","*"]},{"name":"statuses","in":"query","description":"Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Status"}},"example":["succeeded","failed","canceled","enqueued","processing","*"]},{"name":"indexUids","in":"query","description":"Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["movies","theater","*"]},{"name":"afterEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]}],"responses":{"200":{"description":"Get all tasks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllTasks"},"example":{"results":[{"uid":144,"indexUid":"mieli","status":"succeeded","type":"settingsUpdate","canceledBy":null,"details":{"settings":{"filterableAttributes":["play_count"]}},"error":null,"duration":"PT0.009330S","enqueuedAt":"2024-08-08T09:01:13.348471Z","startedAt":"2024-08-08T09:01:13.349442Z","finishedAt":"2024-08-08T09:01:13.358772Z"}],"total":1,"limit":1,"from":144,"next":null}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["tasks.get","tasks.*","*"]}]},"delete":{"tags":["Tasks"],"summary":"Delete tasks","description":"Delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) on filter","operationId":"delete_tasks","parameters":[{"name":"uids","in":"query","description":"Permits to filter tasks by their uid. By default, when the `uids` query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"batchUids","in":"query","description":"Lets you filter tasks by their `batchUid`.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"canceledBy","in":"query","description":"Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[374,"*"]},{"name":"types","in":"query","description":"Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Kind"}},"example":["documentDeletion","*"]},{"name":"statuses","in":"query","description":"Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Status"}},"example":["succeeded","failed","canceled","*"]},{"name":"indexUids","in":"query","description":"Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["movies","theater","*"]},{"name":"afterEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]}],"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"taskDeletion","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"400":{"description":"A filter is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Query parameters to filter the tasks to delete are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.","code":"missing_task_filters","type":"invalid_request","link":"https://docs.meilisearch.com/errors#missing_task_filters"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"The task uid does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Task :taskUid not found.","code":"task_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors/#task_not_found"}}}}},"security":[{"Bearer":["tasks.delete","tasks.*","*"]}]}},"/tasks/cancel":{"post":{"tags":["Tasks"],"summary":"Cancel tasks","description":"Cancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)","operationId":"cancel_tasks","parameters":[{"name":"uids","in":"query","description":"Permits to filter tasks by their uid. By default, when the `uids` query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"batchUids","in":"query","description":"Lets you filter tasks by their `batchUid`.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[231,423,598,"*"]},{"name":"canceledBy","in":"query","description":"Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"u-int32","minimum":0}},"example":[374,"*"]},{"name":"types","in":"query","description":"Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Kind"}},"example":["documentDeletion","*"]},{"name":"statuses","in":"query","description":"Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Status"}},"example":["succeeded","failed","canceled","*"]},{"name":"indexUids","in":"query","description":"Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["movies","theater","*"]},{"name":"afterEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeEnqueuedAt","in":"query","description":"Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeStartedAt","in":"query","description":"Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"afterFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]},{"name":"beforeFinishedAt","in":"query","description":"Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.","required":false,"schema":{"type":"string"},"example":["2024-08-08T16:37:09.971Z","*"]}],"responses":{"200":{"description":"Task successfully enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizedTaskView"},"example":{"taskUid":147,"indexUid":null,"status":"enqueued","type":"taskCancelation","enqueuedAt":"2024-08-08T17:05:55.791772Z"}}}},"400":{"description":"A filter is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Query parameters to filter the tasks to cancel are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.","code":"missing_task_filters","type":"invalid_request","link":"https://docs.meilisearch.com/errors#missing_task_filters"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"The task uid does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Task :taskUid not found.","code":"task_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors/#task_not_found"}}}}},"security":[{"Bearer":["tasks.cancel","tasks.*","*"]}]}},"/tasks/{taskUid}":{"get":{"tags":["Tasks"],"summary":"Get a task","description":"Get a [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)","operationId":"get_task","parameters":[{"name":"taskUid","in":"path","description":"The task identifier","required":true,"schema":{"type":"string","format":"u-int32"},"example":0}],"responses":{"200":{"description":"Task successfully retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskView"},"example":{"uid":1,"indexUid":"movies","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":79000,"indexedDocuments":79000},"error":null,"duration":"PT1S","enqueuedAt":"2021-01-01T09:39:00.000000Z","startedAt":"2021-01-01T09:39:01.000000Z","finishedAt":"2021-01-01T09:39:02.000000Z"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}},"404":{"description":"The task uid does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"Task :taskUid not found.","code":"task_not_found","type":"invalid_request","link":"https://docs.meilisearch.com/errors/#task_not_found"}}}}},"security":[{"Bearer":["tasks.get","tasks.*","*"]}]}},"/version":{"get":{"tags":["Version"],"summary":"Get version","description":"Current version of Meilisearch.","operationId":"get_version","responses":{"200":{"description":"Instance is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionResponse"},"example":{"commitSha":"b46889b5f0f2f8b91438a08a358ba8f05fc09fc1","commitDate":"2021-07-08","pkgVersion":"0.23.0"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["version","*"]}]}},"/webhooks":{"get":{"tags":["Webhooks"],"operationId":"get_webhooks","responses":{"200":{"description":"Webhooks are returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResults"},"example":{"results":[{"uuid":"550e8400-e29b-41d4-a716-446655440000","url":"https://your.site/on-tasks-completed","headers":{"Authorization":"Bearer a-secret-token"},"isEditable":true},{"uuid":"550e8400-e29b-41d4-a716-446655440001","url":"https://another.site/on-tasks-completed","isEditable":true}]}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"},"example":{"message":"The Authorization header is missing. It must use the bearer authorization method.","code":"missing_authorization_header","type":"auth","link":"https://docs.meilisearch.com/errors#missing_authorization_header"}}}}},"security":[{"Bearer":["webhooks.get","webhooks.*","*.get","*"]}]},"post":{"tags":["Webhooks"],"operationId":"post_webhook","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSettings"}}},"required":true},"responses":{"201":{"description":"Webhook created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithMetadata"},"example":{"uuid":"550e8400-e29b-41d4-a716-446655440000","url":"https://your.site/on-tasks-completed","headers":{"Authorization":"Bearer a-secret-token"},"isEditable":true}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}},"security":[{"Bearer":["webhooks.create","webhooks.*","*"]}]}},"/webhooks/{uuid}":{"get":{"tags":["Webhooks"],"operationId":"get_webhook","parameters":[{"name":"uuid","in":"path","description":"The universally unique identifier of the webhook","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Webhook found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithMetadata"},"example":{"uuid":"550e8400-e29b-41d4-a716-446655440000","url":"https://your.site/on-tasks-completed","headers":{"Authorization":"Bearer a-secret"},"isEditable":true}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}},"security":[{"Bearer":["webhooks.get","webhooks.*","*.get","*"]}]},"delete":{"tags":["Webhooks"],"operationId":"delete_webhook","parameters":[{"name":"uuid","in":"path","description":"The universally unique identifier of the webhook","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Webhook deleted successfully"},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}},"security":[{"Bearer":["webhooks.delete","webhooks.*","*"]}]},"patch":{"tags":["Webhooks"],"operationId":"patch_webhook","parameters":[{"name":"uuid","in":"path","description":"The universally unique identifier of the webhook","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSettings"}}},"required":true},"responses":{"200":{"description":"Webhook updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithMetadata"},"example":{"uuid":"550e8400-e29b-41d4-a716-446655440000","url":"https://your.site/on-tasks-completed","headers":{"Authorization":"Bearer a-secret-token"},"isEditable":true}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"The authorization header is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}},"security":[{"Bearer":["webhooks.update","webhooks.*","*"]}]}}},"components":{"schemas":{"Action":{"type":"string","enum":["*","search","documents.*","documents.add","documents.get","documents.delete","indexes.*","indexes.create","indexes.get","indexes.update","indexes.delete","indexes.swap","tasks.*","tasks.cancel","tasks.delete","tasks.get","settings.*","settings.get","settings.update","stats.*","stats.get","metrics.*","metrics.get","dumps.*","dumps.create","snapshots.*","snapshots.create","version","keys.create","keys.get","keys.update","keys.delete","experimental.get","experimental.update","export","network.get","network.update","chatCompletions","chats.*","chats.get","chats.delete","chatsSettings.*","chatsSettings.get","chatsSettings.update","*.get","webhooks.get","webhooks.update","webhooks.delete","webhooks.create","webhooks.*"]},"AllBatches":{"type":"object","required":["results","total","limit"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/BatchView"}},"total":{"type":"integer","format":"u-int64","minimum":0},"limit":{"type":"integer","format":"u-int32","minimum":0},"from":{"type":["integer","null"],"format":"u-int32","minimum":0},"next":{"type":["integer","null"],"format":"u-int32","minimum":0}}},"AllTasks":{"type":"object","required":["results","total","limit"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/TaskView"},"description":"The list of tasks that matched the filter."},"total":{"type":"integer","format":"u-int64","description":"Total number of browsable results using offset/limit parameters for the given resource.","minimum":0},"limit":{"type":"integer","format":"u-int32","description":"Limit given for the query. If limit is not provided as a query parameter, this parameter displays the default limit value.","minimum":0},"from":{"type":["integer","null"],"format":"u-int32","description":"The first task uid returned.","minimum":0},"next":{"type":["integer","null"],"format":"u-int32","description":"Represents the value to send in from to fetch the next slice of the results. The first item for the next slice starts at this exact number. When the returned value is null, it means that all the data have been browsed in the given order.","minimum":0}}},"AttributePatterns":{"type":"object","required":["patterns"],"properties":{"patterns":{"type":"array","items":{"type":"string"},"example":["title","overview_*","release_date"]}}},"BTreeMap":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","required":["start","length"],"properties":{"start":{"type":"integer","minimum":0},"length":{"type":"integer","minimum":0},"indices":{"type":["array","null"],"items":{"type":"integer","minimum":0}}}}},"propertyNames":{"type":"string"}},"BatchStats":{"type":"object","required":["totalNbTasks","status","types","indexUids"],"properties":{"totalNbTasks":{"$ref":"#/components/schemas/u32"},"status":{"type":"object","additionalProperties":{"type":"integer","format":"u-int32","minimum":0},"propertyNames":{"type":"string","description":"The status of a task.","enum":["enqueued","processing","succeeded","failed","canceled"],"example":"processing"}},"types":{"type":"object","additionalProperties":{"type":"integer","format":"u-int32","minimum":0},"propertyNames":{"type":"string","description":"The type of the task.","enum":["documentAdditionOrUpdate","documentEdition","documentDeletion","settingsUpdate","indexCreation","indexDeletion","indexUpdate","indexSwap","taskCancelation","taskDeletion","dumpCreation","snapshotCreation","export","upgradeDatabase"],"example":["documentAdditionOrUpdate","documentEdition","documentDeletion","settingsUpdate","indexCreation","indexDeletion","indexUpdate","indexSwap","taskCancelation","taskDeletion","dumpCreation","snapshotCreation","export","upgradeDatabase"]}},"indexUids":{"type":"object","additionalProperties":{"type":"integer","format":"u-int32","minimum":0},"propertyNames":{"type":"string"}},"progressTrace":{"type":"object","additionalProperties":{},"propertyNames":{"type":"string"}},"writeChannelCongestion":{"type":["object","null"],"additionalProperties":{},"propertyNames":{"type":"string"}},"internalDatabaseSizes":{"type":"object","additionalProperties":{},"propertyNames":{"type":"string"}}}},"BatchStatsView":{"allOf":[{"$ref":"#/components/schemas/BatchStats"},{"type":"object","properties":{"embedderRequests":{"$ref":"#/components/schemas/EmbedderStatsView"}}}]},"BatchView":{"type":"object","required":["uid","details","stats"],"properties":{"uid":{"$ref":"#/components/schemas/u32"},"progress":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProgressView"}]},"details":{"$ref":"#/components/schemas/DetailsView"},"stats":{"$ref":"#/components/schemas/BatchStatsView"},"duration":{"type":["string","null"]},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"type":["string","null"],"format":"date-time"},"batchStrategy":{"type":"string"}}},"BrowseQuery":{"type":"object","required":["offset","limit","retrieveVectors"],"properties":{"offset":{"type":"integer","example":150,"minimum":0},"limit":{"type":"integer","default":20,"example":1,"minimum":0},"fields":{"type":["array","null"],"items":{"type":"string"},"example":["title, description"]},"retrieveVectors":{"type":"boolean","example":true},"ids":{"type":["array","null"],"items":{"type":"string"},"example":["cody","finn","brandy","gambit"]},"filter":{},"sort":{"type":["array","null"],"items":{"type":"string"},"example":["title:asc","rating:desc"]}}},"ChatSearchParams":{"type":"object","properties":{"hybrid":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HybridQuery"}]},"limit":{"type":["integer","null"],"minimum":0},"sort":{"type":["array","null"],"items":{"type":"string"}},"distinct":{"type":["string","null"]},"matchingStrategy":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MatchingStrategy"}]},"attributesToSearchOn":{"type":["array","null"],"items":{"type":"string"}},"rankingScoreThreshold":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RankingScoreThreshold"}]}},"additionalProperties":false},"ChatSettings":{"type":"object","properties":{"description":{"type":["string","null"]},"documentTemplate":{"type":["string","null"],"description":"A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text."},"documentTemplateMaxBytes":{"type":["integer","null"],"description":"Rendered texts are truncated to this size. Defaults to 400.","minimum":0},"searchParameters":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ChatSearchParams","description":"The search parameters to use for the LLM."}]}},"additionalProperties":false},"Code":{"type":"string","enum":["api_key_already_exists","api_key_not_found","bad_parameter","bad_request","database_size_limit_reached","document_not_found","dump_already_processing","dump_not_found","dump_process_failed","duplicate_index_found","immutable_api_key_actions","immutable_api_key_created_at","immutable_api_key_expires_at","immutable_api_key_indexes","immutable_api_key_key","immutable_api_key_uid","immutable_api_key_updated_at","immutable_index_created_at","immutable_index_updated_at","index_already_exists","index_creation_failed","index_not_found","index_primary_key_already_exists","index_primary_key_multiple_candidates_found","index_primary_key_no_candidate_found","internal","invalid_api_key","invalid_api_key_actions","invalid_api_key_description","invalid_api_key_expires_at","invalid_api_key_indexes","invalid_api_key_limit","invalid_api_key_name","invalid_api_key_offset","invalid_api_key_uid","invalid_content_type","invalid_document_csv_delimiter","invalid_document_fields","invalid_document_retrieve_vectors","missing_document_filter","missing_document_edition_function","inconsistent_document_change_headers","invalid_document_filter","invalid_document_sort","invalid_document_geo_field","invalid_document_geojson_field","invalid_header_value","invalid_vector_dimensions","invalid_vectors_type","invalid_document_id","invalid_document_ids","invalid_document_limit","invalid_document_offset","invalid_search_embedder","invalid_similar_embedder","invalid_search_hybrid_query","invalid_index_limit","invalid_index_offset","invalid_index_primary_key","invalid_index_uid","invalid_multi_search_facets","invalid_multi_search_facets_by_index","invalid_multi_search_facet_order","invalid_multi_search_federated","invalid_multi_search_federation_options","invalid_multi_search_max_values_per_facet","invalid_multi_search_merge_facets","invalid_multi_search_query_facets","invalid_multi_search_query_pagination","invalid_multi_search_query_ranking_rules","invalid_multi_search_query_position","invalid_multi_search_remote","invalid_multi_search_weight","invalid_network_remotes","invalid_network_self","invalid_network_sharding","invalid_network_search_api_key","invalid_network_write_api_key","invalid_network_url","invalid_search_attributes_to_search_on","invalid_search_attributes_to_crop","invalid_search_attributes_to_highlight","invalid_similar_attributes_to_retrieve","invalid_similar_retrieve_vectors","invalid_search_attributes_to_retrieve","invalid_search_ranking_score_threshold","invalid_similar_ranking_score_threshold","invalid_search_retrieve_vectors","invalid_search_crop_length","invalid_search_crop_marker","invalid_search_facets","invalid_search_semantic_ratio","invalid_search_locales","invalid_facet_search_exhaustive_facet_count","invalid_facet_search_facet_name","invalid_similar_id","invalid_search_filter","invalid_similar_filter","invalid_search_highlight_post_tag","invalid_search_highlight_pre_tag","invalid_search_hits_per_page","invalid_similar_limit","invalid_search_limit","invalid_search_matching_strategy","invalid_similar_offset","invalid_search_offset","invalid_search_page","invalid_search_q","invalid_facet_search_query","invalid_facet_search_name","facet_search_disabled","invalid_search_vector","invalid_search_media","invalid_search_show_matches_position","invalid_search_show_ranking_score","invalid_similar_show_ranking_score","invalid_search_show_ranking_score_details","invalid_similar_show_ranking_score_details","invalid_search_sort","invalid_search_distinct","invalid_search_media_and_vector","invalid_settings_displayed_attributes","invalid_settings_distinct_attribute","invalid_settings_proximity_precision","invalid_settings_facet_search","invalid_settings_prefix_search","invalid_settings_faceting","invalid_settings_filterable_attributes","invalid_settings_pagination","invalid_settings_search_cutoff_ms","invalid_settings_embedders","invalid_settings_ranking_rules","invalid_settings_searchable_attributes","invalid_settings_sortable_attributes","invalid_settings_stop_words","invalid_settings_non_separator_tokens","invalid_settings_separator_tokens","invalid_settings_dictionary","invalid_settings_synonyms","invalid_settings_typo_tolerance","invalid_settings_localized_attributes","invalid_state","invalid_store_file","invalid_swap_duplicate_index_found","invalid_swap_indexes","invalid_swap_rename","invalid_task_after_enqueued_at","invalid_task_after_finished_at","invalid_task_after_started_at","invalid_task_before_enqueued_at","invalid_task_before_finished_at","invalid_task_before_started_at","invalid_task_canceled_by","invalid_task_from","invalid_task_limit","invalid_task_reverse","invalid_task_statuses","invalid_task_types","invalid_task_uids","invalid_batch_uids","io_error","feature_not_enabled","malformed_payload","max_fields_limit_exceeded","missing_api_key_actions","missing_api_key_expires_at","missing_api_key_indexes","missing_authorization_header","missing_content_type","missing_document_id","missing_facet_search_facet_name","missing_index_uid","missing_master_key","missing_network_url","missing_payload","missing_search_hybrid","missing_swap_indexes","missing_task_filters","no_space_left_on_device","payload_too_large","remote_bad_response","remote_bad_request","remote_could_not_send_request","remote_invalid_api_key","remote_remote_error","remote_timeout","too_many_search_requests","task_not_found","task_file_not_found","batch_not_found","too_many_open_files","too_many_vectors","unretrievable_document","unretrievable_error_code","unsupported_media_type","vector_embedding_error","not_found_similar_id","invalid_document_edition_context","invalid_document_edition_function_filter","edit_documents_by_function_error","invalid_settings_index_chat","invalid_settings_vector_store","invalid_export_url","invalid_export_api_key","invalid_export_payload_size","invalid_export_indexes_patterns","invalid_export_index_filter","invalid_export_index_override_settings","unimplemented_external_function_calling","unimplemented_non_streaming_chat_completions","unimplemented_multi_choice_chat_completions","chat_not_found","invalid_chat_setting_document_template","invalid_chat_completion_org_id","invalid_chat_completion_project_id","invalid_chat_completion_api_version","invalid_chat_completion_deployment_id","invalid_chat_completion_source","invalid_chat_completion_base_api","invalid_chat_completion_api_key","invalid_chat_completion_prompts","invalid_chat_completion_system_prompt","invalid_chat_completion_search_description_prompt","invalid_chat_completion_search_query_param_prompt","invalid_chat_completion_search_filter_param_prompt","invalid_chat_completion_search_index_uid_param_prompt","invalid_chat_completion_pre_query_prompt","invalid_webhooks","invalid_webhook_url","invalid_webhook_headers","immutable_webhook","invalid_webhook_uuid","webhook_not_found","immutable_webhook_uuid","immutable_webhook_is_editable"]},"ComputedFacets":{"type":"object","required":["distribution","stats"],"properties":{"distribution":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"integer","format":"u-int64","minimum":0},"propertyNames":{"type":"string"}},"propertyNames":{"type":"string"}},"stats":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FacetStats"},"propertyNames":{"type":"string"}}}},"CreateApiKey":{"type":"object","required":["uid","actions","indexes"],"properties":{"description":{"type":["string","null"],"description":"A description for the key. `null` if empty.","example":null},"name":{"type":["string","null"],"description":"A human-readable name for the key. `null` if empty.","example":"Indexing Products API key"},"uid":{"type":"string","format":"uuid","description":"A uuid v4 to identify the API Key. If not specified, it's generated by Meilisearch.","example":null},"actions":{"type":"array","items":{"$ref":"#/components/schemas/Action"},"description":"A list of actions permitted for the key. `[\"*\"]` for all actions. The `*` character can be used as a wildcard when located at the last position. e.g. `documents.*` to authorize access on all documents endpoints.","example":["documents.add"]},"indexes":{"type":"array","items":{"type":"string"},"description":"A list of accessible indexes permitted for the key. `[\"*\"]` for all indexes. The `*` character can be used as a wildcard when located at the last position. e.g. `products_*` to allow access to all indexes whose names start with `products_`.","example":["products"]},"expiresAt":{"type":["string","null"],"format":"date-time","description":"Represent the expiration date and time as RFC 3339 format. `null` equals to no expiration time."}}},"DetailsExportIndexSettings":{"allOf":[{"$ref":"#/components/schemas/ExportIndexSettings"},{"type":"object","properties":{"matchedDocuments":{"type":["integer","null"],"format":"u-int64","minimum":0}}}]},"DetailsView":{"allOf":[{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Settings_Unchecked","description":"[Learn more about the settings in this guide](https://www.meilisearch.com/docs/reference/api/settings)."}]},{"type":"object","properties":{"receivedDocuments":{"type":["integer","null"],"format":"u-int64","description":"Number of documents received for documentAdditionOrUpdate task.","minimum":0},"indexedDocuments":{"type":["integer","null"],"format":"u-int64","description":"Number of documents finally indexed for documentAdditionOrUpdate task or a documentAdditionOrUpdate batch of tasks.","minimum":0},"editedDocuments":{"type":["integer","null"],"format":"u-int64","description":"Number of documents edited for editDocumentByFunction task.","minimum":0},"primaryKey":{"type":["string","null"],"description":"Value for the primaryKey field encountered if any for indexCreation or indexUpdate task."},"providedIds":{"type":["integer","null"],"description":"Number of provided document ids for the documentDeletion task.","minimum":0},"deletedDocuments":{"type":["integer","null"],"format":"u-int64","description":"Number of documents finally deleted for documentDeletion and indexDeletion tasks.","minimum":0},"matchedTasks":{"type":["integer","null"],"format":"u-int64","description":"Number of tasks that match the request for taskCancelation or taskDeletion tasks.","minimum":0},"canceledTasks":{"type":["integer","null"],"format":"u-int64","description":"Number of tasks canceled for taskCancelation.","minimum":0},"deletedTasks":{"type":["integer","null"],"format":"u-int64","description":"Number of tasks deleted for taskDeletion.","minimum":0},"originalFilter":{"type":["string","null"],"description":"Original filter query for taskCancelation or taskDeletion tasks."},"dumpUid":{"type":["string","null"],"description":"Identifier generated for the dump for dumpCreation task."},"context":{"type":["object","null"]},"function":{"type":["string","null"]},"swaps":{"type":["array","null"],"items":{"$ref":"#/components/schemas/IndexSwap"}},"upgradeFrom":{"type":["string","null"]},"upgradeTo":{"type":["string","null"]},"url":{"type":["string","null"]},"apiKey":{"type":["string","null"]},"payloadSize":{"type":["string","null"]},"indexes":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/DetailsExportIndexSettings"},"propertyNames":{"type":"string"}},"oldIndexUid":{"type":["string","null"]},"newIndexUid":{"type":["string","null"]}}}]},"DistributionShift":{"type":"object","description":"Describes the mean and sigma of distribution of embedding similarity in the embedding space.\n\nThe intended use is to make the similarity score more comparable to the regular ranking score.\nThis allows to correct effects where results are too \"packed\" around a certain value.","required":["current_mean","current_sigma"],"properties":{"current_mean":{"type":"number","format":"float","description":"Value where the results are \"packed\".\n\nSimilarity scores are translated so that they are packed around 0.5 instead"},"current_sigma":{"type":"number","format":"float","description":"standard deviation of a similarity score.\n\nSet below 0.4 to make the results less packed around the mean, and above 0.4 to make them more packed."}}},"DocumentDeletionByFilter":{"type":"object","required":["filter"],"properties":{"filter":{}}},"DocumentEditionByFunction":{"type":"object","required":["function"],"properties":{"filter":{"description":"A string containing a RHAI function."},"context":{"description":"A string containing a filter expression."},"function":{"type":"string","description":"An object with data Meilisearch should make available for the editing function."}}},"EmbedderSource":{"type":"string","enum":["openAi","huggingFace","ollama","userProvided","rest","composite"]},"EmbedderStatsView":{"type":"object","required":["total","failed"],"properties":{"total":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"lastError":{"type":["string","null"]}}},"ErrorType":{"type":"string","enum":["internal","invalid_request","auth","system"]},"Export":{"type":"object","properties":{"url":{"type":["string","null"],"example":"https://ms-1234.heaven.meilisearch.com"},"apiKey":{"type":["string","null"],"example":"1234abcd"},"payloadSize":{"type":["string","null"],"example":"24MiB"},"indexes":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/ExportIndexSettings"},"propertyNames":{"type":"string"},"example":{"*":{"filter":null}}}}},"ExportIndexSettings":{"type":"object","properties":{"filter":{"type":["string","null"],"example":"genres = action"},"overrideSettings":{"type":["boolean","null"],"example":true}}},"FacetSearchQuery":{"type":"object","required":["facet_name","matching_strategy"],"properties":{"facet_query":{"type":["string","null"]},"facet_name":{"type":"string"},"q":{"type":["string","null"]},"vector":{"type":["array","null"],"items":{"type":"number","format":"float"}},"media":{},"hybrid":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HybridQuery"}]},"filter":{},"matching_strategy":{"$ref":"#/components/schemas/MatchingStrategy"},"attributes_to_search_on":{"type":["array","null"],"items":{"type":"string"}},"ranking_score_threshold":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RankingScoreThreshold"}]},"locales":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Locale"}},"exhaustive_facet_count":{"type":["boolean","null"]}}},"FacetStats":{"type":"object","required":["min","max"],"properties":{"min":{"type":"number","format":"double"},"max":{"type":"number","format":"double"}}},"FacetValuesSort":{"type":"string","enum":["alpha","count"]},"FacetingSettings":{"type":"object","properties":{"maxValuesPerFacet":{"type":["integer","null"],"example":10,"minimum":0},"sortFacetValuesBy":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/FacetValuesSort"},"propertyNames":{"type":"string"},"example":{"genre":"count"}}},"additionalProperties":false},"FederatedFacets":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ComputedFacets"},"propertyNames":{"type":"string"}},"FederatedSearch":{"type":"object","required":["queries"],"properties":{"queries":{"type":"array","items":{"$ref":"#/components/schemas/SearchQueryWithIndex"}},"federation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Federation"}]}}},"FederatedSearchResult":{"allOf":[{"$ref":"#/components/schemas/HitsInfo"},{"type":"object","required":["hits","processingTimeMs"],"properties":{"hits":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"}},"processingTimeMs":{"type":"integer","minimum":0},"queryVectors":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/Vec"},"propertyNames":{"type":"integer","minimum":0}},"semanticHitCount":{"type":["integer","null"],"format":"u-int32","minimum":0},"facetDistribution":{"type":["object","null"],"additionalProperties":{"type":"object","additionalProperties":{"type":"integer","format":"u-int64","minimum":0},"propertyNames":{"type":"string"}},"propertyNames":{"type":"string"}},"facetStats":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/FacetStats"},"propertyNames":{"type":"string"}},"facetsByIndex":{"$ref":"#/components/schemas/FederatedFacets"},"requestUid":{"type":["string","null"],"format":"uuid"},"remoteErrors":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/ResponseError"},"propertyNames":{"type":"string"}}}}]},"Federation":{"type":"object","required":["limit","offset","facetsByIndex"],"properties":{"limit":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0},"facetsByIndex":{"type":"object","additionalProperties":{"type":["array","null"],"items":{"type":"string"}},"propertyNames":{"type":"string","description":"An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long","example":"movies"}},"mergeFacets":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MergeFacets"}]}}},"FederationOptions":{"type":"object","required":["weight"],"properties":{"weight":{"type":"number","format":"double"},"remote":{"type":["string","null"]},"queryPosition":{"type":["integer","null"],"minimum":0}}},"FilterFeatures":{"type":"object","properties":{"equality":{"type":"boolean"},"comparison":{"type":"boolean"}},"additionalProperties":false},"FilterableAttributesFeatures":{"type":"object","properties":{"facetSearch":{"type":"boolean"},"filter":{"$ref":"#/components/schemas/FilterFeatures"}},"additionalProperties":false},"FilterableAttributesPatterns":{"type":"object","required":["attributePatterns"],"properties":{"attributePatterns":{"$ref":"#/components/schemas/AttributePatterns"},"features":{"$ref":"#/components/schemas/FilterableAttributesFeatures"}},"additionalProperties":false},"FilterableAttributesRule":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/FilterableAttributesPatterns"}]},"GetLogs":{"type":"object","required":["target","mode","profileMemory"],"properties":{"target":{"type":"string","description":"Lets you specify which parts of the code you want to inspect and is formatted like that: code_part=log_level,code_part=log_level\n- If the `code_part` is missing, then the `log_level` will be applied to everything.\n- If the `log_level` is missing, then the `code_part` will be selected in `info` log level.","default":"info","example":"milli=trace,index_scheduler,actix_web=off"},"mode":{"oneOf":[{"$ref":"#/components/schemas/LogMode","description":"Lets you customize the format of the logs."}],"default":"Human"},"profileMemory":{"type":"boolean","description":"A boolean to indicate if you want to profile the memory as well. This is only useful while using the `profile` mode.\nBe cautious, though; it slows down the engine a lot.","default":false}}},"HealthResponse":{"type":"object","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/HealthStatus","description":"The status of the instance."}}},"HealthStatus":{"type":"string","enum":["available"]},"HitsInfo":{"oneOf":[{"type":"object","required":["hitsPerPage","page","totalPages","totalHits"],"properties":{"hitsPerPage":{"type":"integer","minimum":0},"page":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"totalHits":{"type":"integer","minimum":0}}},{"type":"object","required":["limit","offset","estimatedTotalHits"],"properties":{"limit":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0},"estimatedTotalHits":{"type":"integer","minimum":0}}}]},"HybridQuery":{"type":"object","required":["embedder"],"properties":{"semanticRatio":{"type":"number","format":"float"},"embedder":{"type":"string"}}},"IndexCreateRequest":{"type":"object","required":["uid"],"properties":{"uid":{"$ref":"#/components/schemas/IndexUid","description":"The name of the index"},"primaryKey":{"type":["string","null"],"description":"The primary key of the index","example":"id"}}},"IndexStats":{"type":"object","description":"Stats of an `Index`, as known to the `stats` route.","required":["numberOfDocuments","rawDocumentDbSize","avgDocumentSize","isIndexing","fieldDistribution"],"properties":{"numberOfDocuments":{"type":"integer","format":"u-int64","description":"Number of documents in the index","minimum":0},"rawDocumentDbSize":{"type":"integer","format":"u-int64","description":"Size of the documents database, in bytes.","minimum":0},"avgDocumentSize":{"type":"integer","format":"u-int64","description":"Average size of a document in the documents database.","minimum":0},"isIndexing":{"type":"boolean","description":"Whether or not the index is currently ingesting document"},"numberOfEmbeddings":{"type":["integer","null"],"format":"u-int64","description":"Number of embeddings in the index","minimum":0},"numberOfEmbeddedDocuments":{"type":["integer","null"],"format":"u-int64","description":"Number of embedded documents in the index","minimum":0},"fieldDistribution":{"type":"object","description":"Association of every field name with the number of times it occurs in the documents.","additionalProperties":{"type":"integer","format":"u-int64","minimum":0},"propertyNames":{"type":"string"}}}},"IndexSwap":{"type":"object","required":["indexes"],"properties":{"indexes":{"type":"array","items":false,"prefixItems":[{"type":"string"},{"type":"string"}]},"rename":{"type":"boolean"}}},"IndexUid":{"type":"string","description":"An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long","example":"movies"},"IndexView":{"type":"object","required":["uid","createdAt","updatedAt"],"properties":{"uid":{"type":"string","description":"Unique identifier for the index"},"createdAt":{"type":"string","format":"date-time","description":"An `RFC 3339` format for date/time/duration."},"updatedAt":{"type":"string","format":"date-time","description":"An `RFC 3339` format for date/time/duration."},"primaryKey":{"type":["string","null"],"description":"Custom primaryKey for documents"}}},"KeyView":{"type":"object","required":["key","uid","actions","indexes","createdAt","updatedAt"],"properties":{"name":{"type":["string","null"],"description":"The name of the API Key if any"},"description":{"type":["string","null"],"description":"The description of the API Key if any"},"key":{"type":"string","description":"The actual API Key you can send to Meilisearch"},"uid":{"type":"string","format":"uuid","description":"The `Uuid` specified while creating the key or autogenerated by Meilisearch."},"actions":{"type":"array","items":{"$ref":"#/components/schemas/Action"},"description":"The actions accessible with this key."},"indexes":{"type":"array","items":{"type":"string"},"description":"The indexes accessible with this key."},"expiresAt":{"type":["string","null"],"format":"date-time","description":"The expiration date of the key. Once this timestamp is exceeded the key is not deleted but cannot be used anymore."},"createdAt":{"type":"string","format":"date-time","description":"The date of creation of this API Key.","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"The date of the last update made on this key.","readOnly":true}}},"Kind":{"type":"string","description":"The type of the task.","enum":["documentAdditionOrUpdate","documentEdition","documentDeletion","settingsUpdate","indexCreation","indexDeletion","indexUpdate","indexSwap","taskCancelation","taskDeletion","dumpCreation","snapshotCreation","export","upgradeDatabase"],"example":["documentAdditionOrUpdate","documentEdition","documentDeletion","settingsUpdate","indexCreation","indexDeletion","indexUpdate","indexSwap","taskCancelation","taskDeletion","dumpCreation","snapshotCreation","export","upgradeDatabase"]},"Locale":{"type":"string","enum":["af","ak","am","ar","az","be","bn","bg","ca","cs","da","de","el","en","eo","et","fi","fr","gu","he","hi","hr","hu","hy","id","it","jv","ja","kn","ka","km","ko","la","lv","lt","ml","mr","mk","my","ne","nl","nb","or","pa","fa","pl","pt","ro","ru","si","sk","sl","sn","es","sr","sv","ta","te","tl","th","tk","tr","uk","ur","uz","vi","yi","zh","zu","afr","aka","amh","ara","aze","bel","ben","bul","cat","ces","dan","deu","ell","eng","epo","est","fin","fra","guj","heb","hin","hrv","hun","hye","ind","ita","jav","jpn","kan","kat","khm","kor","lat","lav","lit","mal","mar","mkd","mya","nep","nld","nob","ori","pan","pes","pol","por","ron","rus","sin","slk","slv","sna","spa","srp","swe","tam","tel","tgl","tha","tuk","tur","ukr","urd","uzb","vie","yid","zho","zul","cmn"]},"LocalizedAttributesRuleView":{"type":"object","required":["attributePatterns","locales"],"properties":{"attributePatterns":{"$ref":"#/components/schemas/AttributePatterns"},"locales":{"type":"array","items":{"$ref":"#/components/schemas/Locale"}}}},"LogMode":{"type":"string","enum":["human","json","profile"]},"MatchingStrategy":{"type":"string","description":"This is unfortunately a duplication of the struct in .\nThe reason why it is duplicated is because milli cannot depend on meilisearch. It would be cyclic imports.","enum":["last","all","frequency"]},"MergeFacets":{"type":"object","properties":{"maxValuesPerFacet":{"type":["integer","null"],"minimum":0}}},"MinWordSizeTyposSetting":{"type":"object","properties":{"oneTypo":{"type":["integer","null"],"format":"u-int8","example":5,"minimum":0},"twoTypos":{"type":["integer","null"],"format":"u-int8","example":9,"minimum":0}},"additionalProperties":false},"Network":{"type":"object","properties":{"remotes":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/Remote"},"propertyNames":{"type":"string"},"example":"http://localhost:7700"},"self":{"type":["string","null"],"example":"ms-00"},"sharding":{"type":["boolean","null"],"example":true}}},"Origin":{"type":"object","required":["remoteName","taskUid"],"properties":{"remoteName":{"type":"string"},"taskUid":{"type":"integer","minimum":0}}},"OverridePooling":{"type":"string","enum":["useModel","forceCls","forceMean"]},"PaginationSettings":{"type":"object","properties":{"maxTotalHits":{"type":["integer","null"],"example":250,"minimum":0}},"additionalProperties":false},"PaginationView_IndexView":{"type":"object","required":["results","offset","limit","total"],"properties":{"results":{"type":"array","items":{"type":"object","required":["uid","createdAt","updatedAt"],"properties":{"uid":{"type":"string","description":"Unique identifier for the index"},"createdAt":{"type":"string","format":"date-time","description":"An `RFC 3339` format for date/time/duration."},"updatedAt":{"type":"string","format":"date-time","description":"An `RFC 3339` format for date/time/duration."},"primaryKey":{"type":["string","null"],"description":"Custom primaryKey for documents"}}}},"offset":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}}},"PaginationView_KeyView":{"type":"object","required":["results","offset","limit","total"],"properties":{"results":{"type":"array","items":{"type":"object","required":["key","uid","actions","indexes","createdAt","updatedAt"],"properties":{"name":{"type":["string","null"],"description":"The name of the API Key if any"},"description":{"type":["string","null"],"description":"The description of the API Key if any"},"key":{"type":"string","description":"The actual API Key you can send to Meilisearch"},"uid":{"type":"string","format":"uuid","description":"The `Uuid` specified while creating the key or autogenerated by Meilisearch."},"actions":{"type":"array","items":{"$ref":"#/components/schemas/Action"},"description":"The actions accessible with this key."},"indexes":{"type":"array","items":{"type":"string"},"description":"The indexes accessible with this key."},"expiresAt":{"type":["string","null"],"format":"date-time","description":"The expiration date of the key. Once this timestamp is exceeded the key is not deleted but cannot be used anymore."},"createdAt":{"type":"string","format":"date-time","description":"The date of creation of this API Key.","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"The date of the last update made on this key.","readOnly":true}}}},"offset":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}}},"PaginationView_Value":{"type":"object","required":["results","offset","limit","total"],"properties":{"results":{"type":"array","items":{}},"offset":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}}},"PatchApiKey":{"type":"object","properties":{"description":{"type":["string","null"],"example":"This key is used to update documents in the products index"},"name":{"type":["string","null"],"example":"Indexing Products API key"}}},"PrefixSearchSettings":{"type":"string","enum":["indexingTime","disabled"]},"ProgressStepView":{"type":"object","required":["currentStep","finished","total"],"properties":{"currentStep":{"type":"string"},"finished":{"type":"integer","format":"u-int32","minimum":0},"total":{"type":"integer","format":"u-int32","minimum":0}}},"ProgressView":{"type":"object","required":["steps","percentage"],"properties":{"steps":{"type":"array","items":{"$ref":"#/components/schemas/ProgressStepView"}},"percentage":{"type":"number","format":"float"}}},"ProximityPrecisionView":{"type":"string","enum":["byWord","byAttribute"]},"RankingRuleView":{"oneOf":[{"type":"string","description":"Sorted by decreasing number of matched query terms.\nQuery words at the front of an attribute is considered better than if it was at the back.","enum":["Words"]},{"type":"string","description":"Sorted by increasing number of typos.","enum":["Typo"]},{"type":"string","description":"Sorted by increasing distance between matched query terms.","enum":["Proximity"]},{"type":"string","description":"Documents with quey words contained in more important\nattributes are considered better.","enum":["Attribute"]},{"type":"string","description":"Dynamically sort at query time the documents. None, one or multiple Asc/Desc sortable\nattributes can be used in place of this criterion at query time.","enum":["Sort"]},{"type":"string","description":"Sorted by the similarity of the matched words with the query words.","enum":["Exactness"]},{"type":"object","description":"Sorted by the increasing value of the field specified.","required":["Asc"],"properties":{"Asc":{"type":"string","description":"Sorted by the increasing value of the field specified."}}},{"type":"object","description":"Sorted by the decreasing value of the field specified.","required":["Desc"],"properties":{"Desc":{"type":"string","description":"Sorted by the decreasing value of the field specified."}}}]},"RankingScoreThreshold":{"type":"number","format":"double"},"Remote":{"type":"object","properties":{"url":{"type":["string","null"],"example":{"ms-0":{"url":"http://localhost:7700","searchApiKey":null,"writeApiKey":null},"ms-1":{"url":"http://localhost:7701","searchApiKey":"foo","writeApiKey":"bar"},"ms-2":{"url":"http://localhost:7702","searchApiKey":"bar","writeApiKey":"foo"}}},"searchApiKey":{"type":["string","null"],"example":"XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU"},"writeApiKey":{"type":["string","null"],"example":"XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU"}}},"RemoteTask":{"type":"object","properties":{"taskUid":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/u32"}]},"error":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ResponseError"}]}}},"ResponseError":{"type":"object","required":["message","code","type","link"],"properties":{"message":{"type":"string","description":"The error message."},"code":{"$ref":"#/components/schemas/Code","description":"The error code."},"type":{"$ref":"#/components/schemas/ErrorType","description":"The error type."},"link":{"type":"string","description":"A link to the documentation about this specific error."}}},"RuntimeTogglableFeatures":{"type":"object","properties":{"metrics":{"type":["boolean","null"]},"logsRoute":{"type":["boolean","null"]},"editDocumentsByFunction":{"type":["boolean","null"]},"containsFilter":{"type":["boolean","null"]},"network":{"type":["boolean","null"]},"getTaskDocumentsRoute":{"type":["boolean","null"]},"compositeEmbedders":{"type":["boolean","null"]},"chatCompletions":{"type":["boolean","null"]},"multimodal":{"type":["boolean","null"]},"vectorStoreSetting":{"type":["boolean","null"]}}},"SearchHit":{"type":"object","properties":{"_formatted":{"type":"object","additionalProperties":true},"_matchesPosition":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BTreeMap"}]},"_rankingScore":{"type":["number","null"],"format":"double"},"_rankingScoreDetails":{"type":["object","null"],"additionalProperties":{},"propertyNames":{"type":"string"}}},"additionalProperties":{}},"SearchQuery":{"type":"object","required":["offset","limit","retrieve_vectors","crop_length","show_matches_position","show_ranking_score","show_ranking_score_details","highlight_pre_tag","highlight_post_tag","crop_marker","matching_strategy"],"properties":{"q":{"type":["string","null"]},"vector":{"type":["array","null"],"items":{"type":"number","format":"float"}},"media":{},"hybrid":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HybridQuery"}]},"offset":{"type":"integer","default":0,"minimum":0},"limit":{"type":"integer","default":20,"minimum":0},"page":{"type":["integer","null"],"minimum":0},"hits_per_page":{"type":["integer","null"],"minimum":0},"attributes_to_retrieve":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"retrieve_vectors":{"type":"boolean"},"attributes_to_crop":{"type":["array","null"],"items":{"type":"string"}},"crop_length":{"type":"integer","default":10,"minimum":0},"attributes_to_highlight":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"show_matches_position":{"type":"boolean"},"show_ranking_score":{"type":"boolean"},"show_ranking_score_details":{"type":"boolean"},"filter":{},"sort":{"type":["array","null"],"items":{"type":"string"}},"distinct":{"type":["string","null"]},"facets":{"type":["array","null"],"items":{"type":"string"}},"highlight_pre_tag":{"type":"string","default":""},"highlight_post_tag":{"type":"string","default":""},"crop_marker":{"type":"string","default":"…"},"matching_strategy":{"$ref":"#/components/schemas/MatchingStrategy"},"attributes_to_search_on":{"type":["array","null"],"items":{"type":"string"}},"ranking_score_threshold":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RankingScoreThreshold"}]},"locales":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Locale"}}}},"SearchQueryWithIndex":{"type":"object","description":"A `SearchQuery` + an index UID and optional FederationOptions.","required":["indexUid","retrieveVectors","cropLength","showRankingScore","showRankingScoreDetails","showMatchesPosition","highlightPreTag","highlightPostTag","cropMarker","matchingStrategy"],"properties":{"indexUid":{"$ref":"#/components/schemas/IndexUid"},"q":{"type":["string","null"]},"vector":{"type":["array","null"],"items":{"type":"number","format":"float"}},"media":{},"hybrid":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HybridQuery"}]},"offset":{"type":["integer","null"],"minimum":0},"limit":{"type":["integer","null"],"minimum":0},"page":{"type":["integer","null"],"minimum":0},"hitsPerPage":{"type":["integer","null"],"minimum":0},"attributesToRetrieve":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"retrieveVectors":{"type":"boolean"},"attributesToCrop":{"type":["array","null"],"items":{"type":"string"}},"cropLength":{"type":"integer","minimum":0},"attributesToHighlight":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"showRankingScore":{"type":"boolean"},"showRankingScoreDetails":{"type":"boolean"},"showMatchesPosition":{"type":"boolean"},"filter":{},"sort":{"type":["array","null"],"items":{"type":"string"}},"distinct":{"type":["string","null"]},"facets":{"type":["array","null"],"items":{"type":"string"}},"highlightPreTag":{"type":"string"},"highlightPostTag":{"type":"string"},"cropMarker":{"type":"string"},"matchingStrategy":{"$ref":"#/components/schemas/MatchingStrategy"},"attributesToSearchOn":{"type":["array","null"],"items":{"type":"string"}},"rankingScoreThreshold":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RankingScoreThreshold"}]},"locales":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Locale"}},"federationOptions":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FederationOptions"}]}}},"SearchResult":{"allOf":[{"$ref":"#/components/schemas/HitsInfo"},{"type":"object","required":["hits","query","processingTimeMs"],"properties":{"hits":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"}},"query":{"type":"string"},"queryVector":{"type":["array","null"],"items":{"type":"number","format":"float"}},"processingTimeMs":{"type":"integer","minimum":0},"facetDistribution":{"type":["object","null"],"additionalProperties":{},"propertyNames":{"type":"string"}},"facetStats":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/FacetStats"},"propertyNames":{"type":"string"}},"requestUid":{"type":["string","null"],"format":"uuid"},"semanticHitCount":{"type":["integer","null"],"format":"u-int32","minimum":0}}}]},"SearchResultWithIndex":{"allOf":[{"$ref":"#/components/schemas/SearchResult"},{"type":"object","required":["indexUid"],"properties":{"indexUid":{"type":"string"}}}]},"SearchResults":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/SearchResultWithIndex"}}}},"SettingEmbeddingSettings":{"type":"object","description":"\"Technical\" type that is required due to utoipa.\n\nWe did not find a way to implement [`utoipa::ToSchema`] for the [`Setting`] enum,\nbut most types can use the `value_type` macro parameter to workaround that issue.\n\nHowever that type is used in the settings route, including through the macro that auto-generate\nall the settings route, so we can't remap the `value_type`.","properties":{"inner":{"oneOf":[{"type":"null"},{"type":"object","properties":{"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EmbedderSource","description":"The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`"}]},"model":{"type":["string","null"],"description":"The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`"},"revision":{"type":["string","null"],"description":"The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`"},"pooling":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OverridePooling","description":"The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior."}]},"apiKey":{"type":["string","null"],"description":"The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings"},"dimensions":{"type":["string","null"],"description":"The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text."},"binaryQuantized":{"type":["boolean","null"],"description":"Whether to binary quantize the embeddings of this embedder.\n\nBinary quantized embeddings are smaller than regular embeddings, which improves\ndisk usage and retrieval speed, at the cost of relevancy.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🏗️ When set to `true`, embeddings are not regenerated, but they are binary quantized, which takes time.\n\n# Defaults\n\n- Defaults to `false`\n\n# Note\n\nAs binary quantization is a destructive operation, it is not possible to disable again this setting after\nfirst enabling it. If you are unsure of whether the performance-relevancy tradeoff is right for you,\nwe recommend to use this parameter on a test index first."},"documentTemplate":{"type":["boolean","null"],"description":"A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text."},"documentTemplateMaxBytes":{"type":["integer","null"],"description":"Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400","minimum":0},"url":{"type":["string","null"],"description":"URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated"},"indexingFragments":{"type":["object","null"],"description":"Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.","additionalProperties":{},"propertyNames":{"type":"string"}},"searchFragments":{"type":["object","null"],"description":"Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings","additionalProperties":{},"propertyNames":{"type":"string"}},"request":{"description":"Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings"},"response":{"description":"Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings"},"headers":{"type":["object","null"],"description":"Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"searchEmbedder":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SubEmbeddingSettings"}]},"indexingEmbedder":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SubEmbeddingSettings"}]},"distribution":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DistributionShift","description":"Affine transformation applied to the semantic score to make it more comparable to the ranking score.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings"}]}},"additionalProperties":false}]}}},"Settings_Checked":{"type":"object","description":"Holds all the settings for an index. `T` can either be `Checked` if they represents settings\nwhose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a\ncall to `check` will return a `Settings` from a `Settings`.","properties":{"displayedAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Fields displayed in the returned documents.","example":["id","title","description","url"]},"searchableAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Fields in which to search for matching query words sorted by order of importance.","example":["title","description"]},"filterableAttributes":{"type":["array","null"],"items":{"$ref":"#/components/schemas/FilterableAttributesRule"},"description":"Attributes to use for faceting and filtering. See [Filtering and Faceted Search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).","example":["release_date","genre"]},"sortableAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Attributes to use when sorting search results.","example":["release_date"]},"rankingRules":{"type":["array","null"],"items":{"type":"string"},"description":"List of ranking rules sorted by order of importance. The order is customizable.\n[A list of ordered built-in ranking rules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).","example":["words","typo","proximity","attribute","exactness"]},"stopWords":{"type":["array","null"],"items":{"type":"string"},"description":"List of words ignored when present in search queries.","example":["the","a","them","their"]},"nonSeparatorTokens":{"type":["array","null"],"items":{"type":"string"},"description":"List of characters not delimiting where one term begins and ends.","example":[" ","\n"]},"separatorTokens":{"type":["array","null"],"items":{"type":"string"},"description":"List of characters delimiting where one term begins and ends.","example":["S"]},"dictionary":{"type":["array","null"],"items":{"type":"string"},"description":"List of strings Meilisearch should parse as a single term.","example":["iPhone pro"]},"synonyms":{"type":["object","null"],"description":"List of associated words treated similarly. A word associated to an array of word as synonyms.","additionalProperties":{"type":"array","items":{"type":"string"}},"propertyNames":{"type":"string"},"example":{"he":["she","they","them"],"phone":["iPhone","android"]}},"distinctAttribute":{"type":["string","null"],"description":"Search returns documents with distinct (different) values of the given field.","example":"sku"},"proximityPrecision":{"type":["string","null"],"description":"Precision level when calculating the proximity ranking rule.","example":"byAttribute"},"typoTolerance":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TypoSettings","description":"Customize typo tolerance feature."}]},"faceting":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FacetingSettings","description":"Faceting settings."}]},"pagination":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PaginationSettings","description":"Pagination settings."}]},"embedders":{"type":["object","null"],"description":"Embedder required for performing semantic search queries.","additionalProperties":{"$ref":"#/components/schemas/SettingEmbeddingSettings"},"propertyNames":{"type":"string"}},"searchCutoffMs":{"type":["integer","null"],"format":"u-int64","description":"Maximum duration of a search query.","example":50,"minimum":0},"localizedAttributes":{"type":["array","null"],"items":{"$ref":"#/components/schemas/LocalizedAttributesRuleView"},"example":50},"facetSearch":{"type":["boolean","null"],"example":true},"prefixSearch":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrefixSearchSettings"}]},"chat":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ChatSettings","description":"Customize the chat prompting."}]},"vectorStore":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VectorStoreBackend"}]}},"additionalProperties":false},"Settings_Unchecked":{"type":"object","description":"Holds all the settings for an index. `T` can either be `Checked` if they represents settings\nwhose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a\ncall to `check` will return a `Settings` from a `Settings`.","properties":{"displayedAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Fields displayed in the returned documents.","example":["id","title","description","url"]},"searchableAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Fields in which to search for matching query words sorted by order of importance.","example":["title","description"]},"filterableAttributes":{"type":["array","null"],"items":{"$ref":"#/components/schemas/FilterableAttributesRule"},"description":"Attributes to use for faceting and filtering. See [Filtering and Faceted Search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).","example":["release_date","genre"]},"sortableAttributes":{"type":["array","null"],"items":{"type":"string"},"description":"Attributes to use when sorting search results.","example":["release_date"]},"rankingRules":{"type":["array","null"],"items":{"type":"string"},"description":"List of ranking rules sorted by order of importance. The order is customizable.\n[A list of ordered built-in ranking rules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).","example":["words","typo","proximity","attribute","exactness"]},"stopWords":{"type":["array","null"],"items":{"type":"string"},"description":"List of words ignored when present in search queries.","example":["the","a","them","their"]},"nonSeparatorTokens":{"type":["array","null"],"items":{"type":"string"},"description":"List of characters not delimiting where one term begins and ends.","example":[" ","\n"]},"separatorTokens":{"type":["array","null"],"items":{"type":"string"},"description":"List of characters delimiting where one term begins and ends.","example":["S"]},"dictionary":{"type":["array","null"],"items":{"type":"string"},"description":"List of strings Meilisearch should parse as a single term.","example":["iPhone pro"]},"synonyms":{"type":["object","null"],"description":"List of associated words treated similarly. A word associated to an array of word as synonyms.","additionalProperties":{"type":"array","items":{"type":"string"}},"propertyNames":{"type":"string"},"example":{"he":["she","they","them"],"phone":["iPhone","android"]}},"distinctAttribute":{"type":["string","null"],"description":"Search returns documents with distinct (different) values of the given field.","example":"sku"},"proximityPrecision":{"type":["string","null"],"description":"Precision level when calculating the proximity ranking rule.","example":"byAttribute"},"typoTolerance":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TypoSettings","description":"Customize typo tolerance feature."}]},"faceting":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FacetingSettings","description":"Faceting settings."}]},"pagination":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PaginationSettings","description":"Pagination settings."}]},"embedders":{"type":["object","null"],"description":"Embedder required for performing semantic search queries.","additionalProperties":{"$ref":"#/components/schemas/SettingEmbeddingSettings"},"propertyNames":{"type":"string"}},"searchCutoffMs":{"type":["integer","null"],"format":"u-int64","description":"Maximum duration of a search query.","example":50,"minimum":0},"localizedAttributes":{"type":["array","null"],"items":{"$ref":"#/components/schemas/LocalizedAttributesRuleView"},"example":50},"facetSearch":{"type":["boolean","null"],"example":true},"prefixSearch":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrefixSearchSettings"}]},"chat":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ChatSettings","description":"Customize the chat prompting."}]},"vectorStore":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VectorStoreBackend"}]}},"additionalProperties":false},"SimilarQuery":{"type":"object","required":["id","offset","limit","embedder","retrieve_vectors","show_ranking_score","show_ranking_score_details","ranking_score_threshold"],"properties":{"id":{"type":"string"},"offset":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"filter":{},"embedder":{"type":"string"},"attributes_to_retrieve":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"retrieve_vectors":{"type":"boolean"},"show_ranking_score":{"type":"boolean"},"show_ranking_score_details":{"type":"boolean"},"ranking_score_threshold":{"type":"number","format":"double"}}},"SimilarResult":{"allOf":[{"$ref":"#/components/schemas/HitsInfo"},{"type":"object","required":["hits","id","processingTimeMs"],"properties":{"hits":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"}},"id":{"type":"string"},"processingTimeMs":{"type":"integer","minimum":0}}}]},"Stats":{"type":"object","required":["databaseSize","usedDatabaseSize","indexes"],"properties":{"databaseSize":{"type":"integer","format":"u-int64","description":"The disk space used by the database, in bytes.","minimum":0},"usedDatabaseSize":{"type":"integer","format":"u-int64","description":"The size of the database, in bytes.","minimum":0},"lastUpdate":{"type":["string","null"],"format":"date-time","description":"The date of the last update in the RFC 3339 formats. Can be `null` if no update has ever been processed."},"indexes":{"type":"object","description":"The stats of every individual index your API key lets you access.","additionalProperties":{"$ref":"#/components/schemas/IndexStats"},"propertyNames":{"type":"string"}}}},"Status":{"type":"string","description":"The status of a task.","enum":["enqueued","processing","succeeded","failed","canceled"],"example":"processing"},"SubEmbeddingSettings":{"type":"object","properties":{"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EmbedderSource","description":"The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`"}]},"model":{"type":["string","null"],"description":"The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`"},"revision":{"type":["string","null"],"description":"The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`"},"pooling":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OverridePooling","description":"The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior."}]},"apiKey":{"type":["string","null"],"description":"The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings"},"dimensions":{"type":["string","null"],"description":"The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text."},"documentTemplate":{"type":["boolean","null"],"description":"A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text."},"documentTemplateMaxBytes":{"type":["integer","null"],"description":"Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400","minimum":0},"url":{"type":["string","null"],"description":"URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated"},"indexingFragments":{"type":["object","null"],"description":"Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.","additionalProperties":{},"propertyNames":{"type":"string"}},"searchFragments":{"type":["object","null"],"description":"Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings","additionalProperties":{},"propertyNames":{"type":"string"}},"request":{"description":"Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings"},"response":{"description":"Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings"},"headers":{"type":["object","null"],"description":"Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}}},"additionalProperties":false},"SummarizedTaskView":{"type":"object","required":["taskUid","status","type","enqueuedAt"],"properties":{"taskUid":{"type":"integer","format":"u-int32","description":"The task unique identifier.","minimum":0},"indexUid":{"type":["string","null"],"description":"The index affected by this task. May be `null` if the task is not linked to any index."},"status":{"$ref":"#/components/schemas/Status","description":"The status of the task."},"type":{"$ref":"#/components/schemas/Kind","description":"The type of the task."},"enqueuedAt":{"type":"string","format":"date-time","description":"The date on which the task was enqueued."}}},"SwapIndexesPayload":{"type":"object","required":["indexes","rename"],"properties":{"indexes":{"type":"array","items":{"$ref":"#/components/schemas/IndexUid"},"description":"Array of the two indexUids to be swapped"},"rename":{"type":"boolean","description":"If set to true, instead of swapping the left and right indexes it'll change the name of the first index to the second"}}},"TaskNetwork":{"oneOf":[{"type":"object","required":["origin"],"properties":{"origin":{"$ref":"#/components/schemas/Origin"}}},{"type":"object","required":["remote_tasks"],"properties":{"remote_tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/RemoteTask"},"propertyNames":{"type":"string"}}}}]},"TaskView":{"type":"object","required":["uid","status","type","enqueuedAt"],"properties":{"uid":{"type":"integer","format":"u-int32","description":"The unique sequential identifier of the task.","example":4312,"minimum":0},"batchUid":{"type":["integer","null"],"format":"u-int32","description":"The unique identifier of the index where this task is operated.","example":"movies","minimum":0},"indexUid":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/Status"},"type":{"$ref":"#/components/schemas/Kind","description":"The type of the task."},"canceledBy":{"type":["integer","null"],"format":"u-int32","description":"The uid of the task that performed the taskCancelation if the task has been canceled.","example":4326,"minimum":0},"details":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DetailsView"}]},"error":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ResponseError"}]},"duration":{"type":["string","null"],"description":"Total elasped time the engine was in processing state expressed as a `ISO-8601` duration format.","example":null},"enqueuedAt":{"type":"string","description":"An `RFC 3339` format for date/time/duration.","example":"2024-08-08_14:12:09.393Z"},"startedAt":{"type":"string","description":"An `RFC 3339` format for date/time/duration.","example":"2024-08-08_14:12:09.393Z"},"finishedAt":{"type":"string","description":"An `RFC 3339` format for date/time/duration.","example":"2024-08-08_14:12:09.393Z"},"network":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TaskNetwork"}]}}},"TypoSettings":{"type":"object","properties":{"enabled":{"type":["boolean","null"],"example":true},"minWordSizeForTypos":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MinWordSizeTyposSetting"}]},"disableOnWords":{"type":["array","null"],"items":{"type":"string"},"example":["iPhone","phone"],"uniqueItems":true},"disableOnAttributes":{"type":["array","null"],"items":{"type":"string"},"example":["uuid","url"],"uniqueItems":true},"disableOnNumbers":{"type":["boolean","null"],"example":true}},"additionalProperties":false},"Unchecked":{"default":null},"UpdateIndexRequest":{"type":"object","properties":{"primaryKey":{"type":["string","null"],"description":"The new primary key of the index"},"uid":{"type":["string","null"],"description":"The new uid of the index (for renaming)"}}},"UpdateStderrLogs":{"type":"object","required":["target"],"properties":{"target":{"type":"string","description":"Lets you specify which parts of the code you want to inspect and is formatted like that: code_part=log_level,code_part=log_level\n- If the `code_part` is missing, then the `log_level` will be applied to everything.\n- If the `log_level` is missing, then the `code_part` will be selected in `info` log level.","default":"info","example":"milli=trace,index_scheduler,actix_web=off"}}},"Vec":{"type":"array","items":{"type":"number","format":"float"}},"VectorStoreBackend":{"type":"string","enum":["stable","experimental"]},"VersionResponse":{"type":"object","required":["commitSha","commitDate","pkgVersion"],"properties":{"commitSha":{"type":"string","description":"The commit used to compile this build of Meilisearch."},"commitDate":{"type":"string","description":"The date of this build."},"pkgVersion":{"type":"string","description":"The version of Meilisearch."}}},"WebhookResults":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/WebhookWithMetadata"}}}},"WebhookSettings":{"type":"object","properties":{"url":{"type":["string","null"],"example":"https://your.site/on-tasks-completed"},"headers":{"type":["object","null"],"additionalProperties":{"type":"string"},"propertyNames":{"type":"string"},"example":{"Authorization":"Bearer a-secret-token"}}}},"WebhookWithMetadata":{"allOf":[{"$ref":"#/components/schemas/WebhookSettings"},{"type":"object","required":["uuid","isEditable"],"properties":{"uuid":{"type":"string","format":"uuid"},"isEditable":{"type":"boolean"}}}]},"u32":{"type":"integer","format":"u-int32","minimum":0}},"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"Uuidv4, string or JWT","description":"An API key is a token that you provide when making API calls. Include the token in a header parameter called `Authorization`.\nExample: `Authorization: Bearer 8fece4405662dd830e4cb265e7e047aab2e79672a760a12712d2a263c9003509`"}}},"tags":[{"name":"Stats","description":"Stats gives extended information and metrics about indexes and the Meilisearch database."},{"name":"Tasks","description":"The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html).","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/tasks","description":null}},{"name":"Batches","description":"The /batches route gives information about the progress of batches of asynchronous operations.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/batches","description":null}},{"name":"Indexes","description":"An index is an entity that gathers a set of [documents](https://www.meilisearch.com/docs/learn/getting_started/documents) with its own [settings](https://www.meilisearch.com/docs/reference/api/settings). Learn more about indexes.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/indexes","description":null}},{"name":"Documents","description":"Documents are objects composed of fields that can store any type of data. Each field contains an attribute and its associated value. Documents are stored inside [indexes](https://www.meilisearch.com/docs/learn/getting_started/indexes).","externalDocs":{"url":"https://www.meilisearch.com/docs/learn/getting_started/documents","description":null}},{"name":"Facet Search","description":"The `/facet-search` route allows you to search for facet values. Facet search supports prefix search and typo tolerance. The returned hits are sorted lexicographically in ascending order. You can configure how facets are sorted using the sortFacetValuesBy property of the faceting index settings.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/facet_search","description":null}},{"name":"Similar documents","description":"The /similar route uses AI-powered search to return a number of documents similar to a target document.\n\nMeilisearch exposes two routes for retrieving similar documents: POST and GET. In the majority of cases, POST will offer better performance and ease of use.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/similar","description":null}},{"name":"Settings","description":"Use the /settings route to customize search settings for a given index. You can either modify all index settings at once using the update settings endpoint, or use a child route to configure a single setting.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/settings","description":null}},{"name":"Search","description":"Meilisearch exposes two routes to perform searches:\n\n- A POST route: this is the preferred route when using API authentication, as it allows [preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) caching and better performance.\n- A GET route: the usage of this route is discouraged, unless you have good reason to do otherwise (specific caching abilities for example)","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/search","description":null}},{"name":"Snapshots","description":"The snapshots route allows the creation of database snapshots. Snapshots are .snapshot files that can be used to launch Meilisearch.\nCreating a snapshot is also referred to as exporting it, whereas launching Meilisearch with a snapshot is referred to as importing it.\nDuring a snapshot export, all indexes of the current instance are exported—together with their documents and settings—and saved as a single .snapshot file.\nDuring a snapshot import, all indexes contained in the indicated .snapshot file are imported along with their associated documents and settings.\nSnapshot imports are performed at launch using an option.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/snapshots","description":null}},{"name":"Dumps","description":"The `dumps` route allows the creation of database dumps.\nDumps are `.dump` files that can be used to launch Meilisearch. Dumps are compatible between Meilisearch versions.\nCreating a dump is also referred to as exporting it, whereas launching Meilisearch with a dump is referred to as importing it.\nDuring a [dump export](https://www.meilisearch.com/docs/reference/api/dump#create-a-dump), all indexes of the current instance are\nexported—together with their documents and settings—and saved as a single `.dump` file. During a dump import,\nall indexes contained in the indicated `.dump` file are imported along with their associated documents and settings.\nAny existing index with the same uid as an index in the dump file will be overwritten.\nDump imports are [performed at launch](https://www.meilisearch.com/docs/learn/advanced/dumps#importing-a-dump) using an option.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/dump","description":null}},{"name":"Keys","description":"Manage API `keys` for a Meilisearch instance. Each key has a given set of permissions.\nYou must have the master key or the default admin key to access the keys route. More information about the keys and their rights.\nAccessing any route under `/keys` without having set a master key will result in an error.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/keys","description":null}},{"name":"Logs","description":"Everything about retrieving or customizing logs.\nCurrently [experimental](https://www.meilisearch.com/docs/learn/experimental/overview).","externalDocs":{"url":"https://www.meilisearch.com/docs/learn/experimental/log_customization","description":null}},{"name":"Multi-search","description":"The `/multi-search` route allows you to perform multiple search queries on one or more indexes by bundling them into a single HTTP request. Multi-search is also known as federated search.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/multi_search","description":null}},{"name":"Experimental features","description":"The `/experimental-features` route allows you to activate or deactivate some of Meilisearch's experimental features.\n\nThis route is **synchronous**. This means that no task object will be returned, and any activated or deactivated features will be made available or unavailable immediately.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/experimental_features","description":null}},{"name":"Export","description":"The `/export` route allows you to trigger an export process to a remote Meilisearch instance.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/export","description":null}},{"name":"Network","description":"The `/network` route allows you to describe the topology of a network of Meilisearch instances.\n\nThis route is **synchronous**. This means that no task object will be returned, and any change to the network will be made available immediately.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/network","description":null}},{"name":"Webhooks","description":"The `/webhooks` route allows you to register endpoints to be called once tasks are processed.","externalDocs":{"url":"https://www.meilisearch.com/docs/reference/api/webhooks","description":null}}]} \ No newline at end of file diff --git a/meilisearch-openapi.json b/meilisearch-openapi.json deleted file mode 100644 index 9bb6e27a7..000000000 --- a/meilisearch-openapi.json +++ /dev/null @@ -1,23320 +0,0 @@ -{ - "openapi": "3.1.0", - "info": { - "title": "meilisearch", - "description": "Meilisearch HTTP server", - "contact": { - "name": "Quentin de Quelen", - "email": "quentin@dequelen.me" - }, - "license": { - "name": "MIT", - "identifier": "MIT" - }, - "version": "1.28.2" - }, - "servers": [ - { - "url": "/", - "description": "Local server" - } - ], - "paths": { - "/batches": { - "get": { - "tags": [ - "Batches" - ], - "summary": "Get batches", - "description": "List all batches, regardless of index. The batch objects are contained in the results array.\nBatches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first.\nBatch results are paginated and can be filtered with query parameters.", - "operationId": "get_batches", - "parameters": [ - { - "name": "limit", - "in": "query", - "description": "Maximum number of results to return.", - "required": false, - "schema": { - "type": "integer", - "format": "u-int32", - "default": 20, - "minimum": 0 - }, - "example": 12 - }, - { - "name": "from", - "in": "query", - "description": "Fetch the next set of results from the given uid.", - "required": false, - "schema": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "example": 12421 - }, - { - "name": "reverse", - "in": "query", - "description": "The order you want to retrieve the objects.", - "required": false, - "schema": { - "type": "boolean" - }, - "example": true - }, - { - "name": "batchUids", - "in": "query", - "description": "Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "example": 12421 - }, - { - "name": "uids", - "in": "query", - "description": "Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 231, - 423, - 598, - "*" - ] - }, - { - "name": "canceledBy", - "in": "query", - "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 374, - "*" - ] - }, - { - "name": "types", - "in": "query", - "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [ - "documentAdditionOrUpdate", - "*" - ] - }, - { - "name": "statuses", - "in": "query", - "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Status" - } - }, - "example": [ - "succeeded", - "failed", - "canceled", - "enqueued", - "processing", - "*" - ] - }, - { - "name": "indexUids", - "in": "query", - "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [ - "movies", - "theater", - "*" - ] - }, - { - "name": "afterEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "afterStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "afterFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - } - ], - "responses": { - "200": { - "description": "Return the batches", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AllBatches" - }, - "example": { - "results": [ - { - "uid": 2, - "details": { - "stopWords": [ - "of", - "the" - ] - }, - "progress": null, - "stats": { - "totalNbTasks": 1, - "status": { - "succeeded": 1 - }, - "types": { - "settingsUpdate": 1 - }, - "indexUids": { - "INDEX_NAME": 1 - } - }, - "duration": "PT0.110083S", - "startedAt": "2024-12-10T15:49:04.995321Z", - "finishedAt": "2024-12-10T15:49:05.105404Z" - } - ], - "total": 3, - "limit": 1, - "from": 2, - "next": 1 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "tasks.get", - "tasks.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.GetBatches();" - }, - { - "lang": "JS", - "source": "client.batches.getBatches();" - }, - { - "lang": "PHP", - "source": "$client->getBatches();" - }, - { - "lang": "Python", - "source": "client.get_batches()" - }, - { - "lang": "Ruby", - "source": "client.batches" - }, - { - "lang": "Rust", - "source": "let mut query = meilisearch_sdk::batches::BatchesQuery::new(&client);\nquery.with_limit(20);\nlet batches: meilisearch_sdk::batches::BatchesResults =\n client.get_batches_with(&query).await.unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches'" - } - ] - } - }, - "/batches/{batchUid}": { - "get": { - "tags": [ - "Batches" - ], - "summary": "Get one batch", - "description": "Get a single batch.", - "operationId": "get_batch", - "parameters": [ - { - "name": "batchUid", - "in": "path", - "description": "The unique batch id", - "required": true, - "schema": { - "type": "string" - }, - "example": "8685" - } - ], - "responses": { - "200": { - "description": "Return the batch", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BatchView" - }, - "example": { - "uid": 1, - "details": { - "receivedDocuments": 1, - "indexedDocuments": 1 - }, - "progress": null, - "stats": { - "totalNbTasks": 1, - "status": { - "succeeded": 1 - }, - "types": { - "documentAdditionOrUpdate": 1 - }, - "indexUids": { - "INDEX_NAME": 1 - } - }, - "duration": "PT0.364788S", - "startedAt": "2024-12-10T15:48:49.672141Z", - "finishedAt": "2024-12-10T15:48:50.036929Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "tasks.get", - "tasks.*", - "*" - ] - } - ] - } - }, - "/dumps": { - "post": { - "tags": [ - "Dumps" - ], - "summary": "Create a dump", - "description": "Triggers a dump creation process. Once the process is complete, a dump is created in the\n[dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory).\nIf the dump directory does not exist yet, it will be created.", - "operationId": "create_dump", - "responses": { - "202": { - "description": "Dump is being created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 0, - "indexUid": null, - "status": "enqueued", - "type": "DumpCreation", - "enqueuedAt": "2021-01-01T09:39:00.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "dumps.create", - "dumps.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.CreateDumpAsync();" - }, - { - "lang": "Dart", - "source": "await client.createDump();" - }, - { - "lang": "Go", - "source": "resp, err := client.CreateDump()" - }, - { - "lang": "JS", - "source": "client.createDump()" - }, - { - "lang": "Java", - "source": "client.createDump();" - }, - { - "lang": "PHP", - "source": "$client->createDump();" - }, - { - "lang": "Python", - "source": "client.create_dump()" - }, - { - "lang": "Ruby", - "source": "client.create_dump" - }, - { - "lang": "Rust", - "source": "client\n .create_dump()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.createDump { result in\n switch result {\n case .success(let dumpStatus):\n print(dumpStatus)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/dumps'" - } - ] - } - }, - "/experimental-features": { - "get": { - "tags": [ - "Experimental features" - ], - "summary": "Get all experimental features", - "description": "Get a list of all experimental features that can be activated via the /experimental-features route and whether or not they are currently activated.", - "operationId": "get_features", - "responses": { - "200": { - "description": "Experimental features are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuntimeTogglableFeatures" - }, - "example": { - "metrics": true, - "logsRoute": false, - "editDocumentsByFunction": false, - "containsFilter": false, - "network": false, - "getTaskDocumentsRoute": false, - "compositeEmbedders": false, - "chatCompletions": false, - "multimodal": false, - "vectorStoreSetting": false - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "experimental_features.get", - "experimental_features.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.ExperimentalFeatures().Get()" - }, - { - "lang": "Ruby", - "source": "client.experimental_features" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nlet res = features\n .get()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/experimental-features/'" - } - ] - }, - "patch": { - "tags": [ - "Experimental features" - ], - "summary": "Configure experimental features", - "description": "Activate or deactivate experimental features.", - "operationId": "patch_features", - "responses": { - "200": { - "description": "Experimental features are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuntimeTogglableFeatures" - }, - "example": { - "metrics": true, - "logsRoute": false, - "editDocumentsByFunction": false, - "containsFilter": false, - "network": false, - "getTaskDocumentsRoute": false, - "compositeEmbedders": false, - "chatCompletions": false, - "multimodal": false, - "vectorStoreSetting": false - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "experimental_features.update", - "experimental_features.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.ExperimentalFeatures().SetMetrics(true).Update()" - }, - { - "lang": "Ruby", - "source": "client.update_experimental_features(metrics: true)" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nfeatures.set_metrics(true)\nlet res = features\n .update()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/experimental-features/' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"metrics\": true\n }'" - } - ] - } - }, - "/export": { - "post": { - "tags": [ - "Export" - ], - "operationId": "export", - "responses": { - "202": { - "description": "Export successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 1, - "status": "enqueued", - "type": "export", - "enqueuedAt": "2021-08-11T09:25:53.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "export", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "Java", - "source": "Map indexes = new HashMap<>();\nindexes.put(\"*\", ExportIndexFilter.builder().overrideSettings(true).build());\nExportRequest request = ExportRequest.builder().url(\"TARGET_INSTANCE_URL\").indexes(indexes).build();\nclient.export(request);" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/export' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"TARGET_INSTANCE_URL\",\n \"indexes\": {\n \"*\": {\n \"overrideSettings\": true\n }\n }\n }'" - } - ] - } - }, - "/health": { - "get": { - "tags": [ - "Health" - ], - "summary": "Get Health", - "description": "The health check endpoint enables you to periodically test the health of your Meilisearch instance.", - "operationId": "get_health", - "responses": { - "200": { - "description": "Instance is healthy", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HealthResponse" - }, - "example": { - "status": "available" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.HealthAsync();" - }, - { - "lang": "Dart", - "source": "await client.health();" - }, - { - "lang": "Go", - "source": "client.Health()" - }, - { - "lang": "JS", - "source": "client.health()" - }, - { - "lang": "Java", - "source": "client.health();" - }, - { - "lang": "PHP", - "source": "$client->health();" - }, - { - "lang": "Python", - "source": "client.health()" - }, - { - "lang": "Ruby", - "source": "client.health" - }, - { - "lang": "Rust", - "source": "// health() return an Err() if the server is not healthy, so this example would panic due to the unwrap\nclient\n .health()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.health { (result) in\n switch result {\n case .success:\n print(\"Healthy!\")\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/health'" - } - ] - } - }, - "/indexes": { - "get": { - "tags": [ - "Indexes" - ], - "summary": "List indexes", - "description": "List all indexes.", - "operationId": "list_indexes", - "parameters": [ - { - "name": "offset", - "in": "query", - "description": "The number of indexes to skip before starting to retrieve anything", - "required": false, - "schema": { - "type": "integer", - "minimum": 0 - }, - "example": 100 - }, - { - "name": "limit", - "in": "query", - "description": "The number of indexes to retrieve", - "required": false, - "schema": { - "type": "integer", - "default": 20, - "minimum": 0 - }, - "example": 1 - } - ], - "responses": { - "200": { - "description": "Indexes are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationView_IndexView" - }, - "example": { - "results": [ - { - "uid": "movies", - "primaryKey": "movie_id", - "createdAt": "2019-11-20T09:40:33.711324Z", - "updatedAt": "2019-11-20T09:40:33.711324Z" - } - ], - "limit": 1, - "offset": 0, - "total": 1 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "indexes.get", - "indexes.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.GetAllIndexesAsync(new IndexesQuery { Limit = 3 });" - }, - { - "lang": "Dart", - "source": "await client.getIndexes(params: IndexesQuery(limit: 3));" - }, - { - "lang": "Go", - "source": "client.GetIndexes(&meilisearch.IndexesQuery{\n Limit: 3,\n})" - }, - { - "lang": "JS", - "source": "client.getIndexes({ limit: 3 })" - }, - { - "lang": "Java", - "source": "IndexesQuery query = new IndexesQuery().setLimit(3);\nclient.getIndexes(query);" - }, - { - "lang": "PHP", - "source": "$client->getIndexes((new IndexesQuery())->setLimit(3));" - }, - { - "lang": "Python", - "source": "client.get_indexes({'limit': 3})" - }, - { - "lang": "Ruby", - "source": "client.indexes(limit: 3)" - }, - { - "lang": "Rust", - "source": "let mut indexes = IndexesQuery::new(&client)\n .with_limit(3)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.getIndexes { (result) in\n switch result {\n case .success(let indexes):\n print(indexes)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes?limit=3'" - } - ] - }, - "post": { - "tags": [ - "Indexes" - ], - "summary": "Create index", - "description": "Create an index.", - "operationId": "create_index", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IndexCreateRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "indexCreation", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "indexes.create", - "indexes.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "TaskInfo task = await client.CreateIndexAsync(\"movies\", \"id\");" - }, - { - "lang": "Dart", - "source": "await client.createIndex('movies', primaryKey: 'id');" - }, - { - "lang": "Go", - "source": "client.CreateIndex(&meilisearch.IndexConfig{\n Uid: \"movies\",\n PrimaryKey: \"id\",\n})" - }, - { - "lang": "JS", - "source": "client.createIndex('movies', { primaryKey: 'id' })" - }, - { - "lang": "Java", - "source": "client.createIndex(\"movies\", \"id\");" - }, - { - "lang": "PHP", - "source": "$client->createIndex('movies', ['primaryKey' => 'id']);" - }, - { - "lang": "Python", - "source": "client.create_index('movies', {'primaryKey': 'id'})" - }, - { - "lang": "Ruby", - "source": "client.create_index('movies', primary_key: 'id')" - }, - { - "lang": "Rust", - "source": "client.create_index(\"movies\", Some(\"id\"))\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.createIndex(uid: \"movies\", primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"uid\": \"movies\",\n \"primaryKey\": \"id\"\n }'" - } - ] - } - }, - "/indexes/{indexUid}": { - "get": { - "tags": [ - "Indexes" - ], - "summary": "Get index", - "description": "Get information about an index.", - "operationId": "get_index", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "The index is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IndexView" - }, - "example": { - "uid": "movies", - "primaryKey": "movie_id", - "createdAt": "2019-11-20T09:40:33.711324Z", - "updatedAt": "2019-11-20T09:40:33.711324Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "indexes.get", - "indexes.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.GetIndexAsync(\"movies\");" - }, - { - "lang": "Dart", - "source": "await client.getIndex('movies');" - }, - { - "lang": "Go", - "source": "client.GetIndex(\"movies\")" - }, - { - "lang": "JS", - "source": "client.index('movies').getRawInfo()" - }, - { - "lang": "Java", - "source": "client.getIndex(\"movies\");" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->fetchRawInfo();" - }, - { - "lang": "Python", - "source": "client.get_index('movies')" - }, - { - "lang": "Ruby", - "source": "client.fetch_index('movies')" - }, - { - "lang": "Rust", - "source": "let movies: Index = client\n .get_index(\"movies\")\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.getIndex(\"movies\") { (result) in\n switch result {\n case .success(let index):\n print(index)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies'" - } - ] - }, - "delete": { - "tags": [ - "Indexes" - ], - "summary": "Delete index", - "description": "Delete an index.", - "operationId": "delete_index", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "202": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 0, - "indexUid": "movies", - "status": "enqueued", - "type": "indexDeletion", - "enqueuedAt": "2021-01-01T09:39:00.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "indexes.delete", - "indexes.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.DeleteIndexAsync(\"movies\");" - }, - { - "lang": "Dart", - "source": "await client.index('movies').delete();" - }, - { - "lang": "Go", - "source": "client.DeleteIndex(\"movies\")\n// OR\nclient.Index(\"movies\").Delete()" - }, - { - "lang": "JS", - "source": "client.deleteIndex('movies')" - }, - { - "lang": "Java", - "source": "client.deleteIndex(\"movies\");" - }, - { - "lang": "PHP", - "source": "$client->deleteIndex('movies');" - }, - { - "lang": "Python", - "source": "client.delete_index('movies')\n// OR\nclient.index('movies').delete()" - }, - { - "lang": "Ruby", - "source": "client.delete_index('movies')" - }, - { - "lang": "Rust", - "source": "client.index(\"movies\")\n .delete()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").delete { (result) in\n switch result {\n case .success:\n print(\"Index deleted\")\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies'" - } - ] - }, - "patch": { - "tags": [ - "Indexes" - ], - "summary": "Update index", - "description": "Update the `primaryKey` of an index.\nReturn an error if the index doesn't exists yet or if it contains documents.", - "operationId": "update_index", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateIndexRequest" - } - } - }, - "required": true - }, - "responses": { - "202": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 0, - "indexUid": "movies", - "status": "enqueued", - "type": "indexUpdate", - "enqueuedAt": "2021-01-01T09:39:00.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "indexes.update", - "indexes.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "TaskInfo task = await client.UpdateIndexAsync(\"movies\", \"id\");" - }, - { - "lang": "Dart", - "source": "await client.index('movies').update(primaryKey: 'id');" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateIndex(&meilisearch.UpdateIndexRequestParams{\n PrimaryKey: \"id\",\n})" - }, - { - "lang": "JS", - "source": "client.updateIndex('movies', { primaryKey: 'id' })" - }, - { - "lang": "Java", - "source": "client.updateIndex(\"movies\", \"id\");" - }, - { - "lang": "PHP", - "source": "$client->updateIndex('movies', ['primaryKey' => 'id']);" - }, - { - "lang": "Python", - "source": "client.index('movies').update(primary_key='id')" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update(primary_key: 'movie_id')" - }, - { - "lang": "Rust", - "source": "let task = IndexUpdater::new(\"movies\", &client)\n .with_primary_key(\"movie_review_id\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").update(primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"primaryKey\": \"id\" }'" - } - ] - } - }, - "/indexes/{indexUid}/compact": { - "post": { - "tags": [ - "Compact an index" - ], - "summary": "Compact an index", - "operationId": "compact", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "202": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentDeletion", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "Java", - "source": "client.index(\"INDEX_NAME\").compact();" - }, - { - "lang": "Python", - "source": "client.index('movies').compact()" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"INDEX_UID\")\n .compact()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_UID/compact'" - } - ] - } - }, - "/indexes/{indexUid}/documents": { - "get": { - "tags": [ - "Documents" - ], - "summary": "Get documents", - "description": "Get documents by batches.", - "operationId": "get_documents", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - }, - { - "name": "offset", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "fields", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "retrieveVectors", - "in": "query", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "ids", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "filter", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "example": "popularity > 1000" - }, - { - "name": "sort", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The documents are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationView_Value" - }, - "example": { - "results": [ - { - "id": 25684, - "title": "American Ninja 5", - "poster": "https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg", - "overview": "When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.", - "release_date": 725846400 - }, - { - "id": 45881, - "title": "The Bridge of San Luis Rey", - "poster": "https://image.tmdb.org/t/p/w500/4X7quIcdkc24Cveg5XdpfRqxtYA.jpg", - "overview": "The Bridge of San Luis Rey is American author Thornton Wilder's second novel, first published in 1927 to worldwide acclaim. It tells the story of several interrelated people who die in the collapse of an Inca rope-fiber suspension bridge in Peru, and the events that lead up to their being on the bridge.[ A friar who has witnessed the tragic accident then goes about inquiring into the lives of the victims, seeking some sort of cosmic answer to the question of why each had to die. The novel won the Pulitzer Prize in 1928.", - "release_date": 1072915200 - } - ], - "limit": 20, - "offset": 0, - "total": 2 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.get", - "documents.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() { Limit = 2, Filter = \"genres = action\" });" - }, - { - "lang": "Go", - "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"movies\").GetDocuments(&meilisearch.DocumentsQuery{\n Limit: 2,\n Filter: \"genres = action\",\n}, &result)" - }, - { - "lang": "JS", - "source": "client.index('movies').getDocuments({\n limit: 2,\n filter: 'genres = action'\n})" - }, - { - "lang": "Java", - "source": "DocumentsQuery query = new DocumentsQuery().setLimit(2).setFilter(new String[] {\"genres = action\"});\nclient.index(\"movies\").getDocuments(query, TargetClassName.class);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getDocuments((new DocumentsQuery())->setFilter('genres = action')->setLimit(2));" - }, - { - "lang": "Python", - "source": "client.index('movies').get_documents({\n 'limit':2, 'filter': 'genres=action',\n 'sort': ['rating:desc', 'release_date:asc'] # list format\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').get_documents(limit: 2, filter: 'genres = action')" - }, - { - "lang": "Rust", - "source": "let index = client.index(\"movies\");\nlet documents: DocumentsResults = DocumentsQuery::new(&index)\n .with_filter(\"genres = action\")\n .with_limit(2)\n .execute::()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getDocuments(params: DocumentsQuery(limit: 2)) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let movies):\n print(movies)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents?limit=2&filter=genres=action'" - } - ] - }, - "put": { - "tags": [ - "Documents" - ], - "summary": "Add or update documents", - "description": "Add a list of documents or update them if they already exist.\nIf you send an already existing document (same id) the old document will be only partially updated according to the fields of the new document. Thus, any fields not present in the new document are kept and remained unchanged.\nTo completely overwrite a document, see Add or replace documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document. `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved `_vectors` field in your documents.\n> It can accept an array of floats, multiple arrays of floats in an outer array or an object.\n> This object accepts keys corresponding to the different embedders defined your index settings.", - "operationId": "update_documents", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - }, - { - "name": "primaryKey", - "in": "query", - "description": "The primary key of the documents. primaryKey is optional. If you want to set the primary key of your index through this route,\nit only has to be done the first time you add documents to the index. After which it will be ignored if given.", - "required": false, - "schema": { - "type": "string" - }, - "example": "id" - }, - { - "name": "csvDelimiter", - "in": "query", - "description": "Customize the csv delimiter when importing CSV documents.", - "required": true, - "schema": { - "type": "string", - "default": "," - }, - "example": ";" - }, - { - "name": "customMetadata", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "example": "custom" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentAdditionOrUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.add", - "documents.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "var movie = new[]\n{\n new Movie { Id = \"287947\", Title = \"Shazam ⚡️\", Genres = \"comedy\" }\n};\nawait index.UpdateDocumentsAsync(movie);" - }, - { - "lang": "Go", - "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\",\n },\n}\nclient.Index(\"movies\").UpdateDocuments(documents, nil)" - }, - { - "lang": "JS", - "source": "client.index('movies').updateDocuments([{\n id: 287947,\n title: 'Shazam ⚡️',\n genres: 'comedy'\n}])" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateDocuments(\"[{\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam ⚡️\\\",\"\n + \"\\\"genres\\\": \\\"comedy\\\"\"\n + \"}]\"\n);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateDocuments([\n [\n 'id' => 287947,\n 'title' => 'Shazam ⚡️',\n 'genres' => 'comedy'\n ]\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_documents([{\n 'id': 287947,\n 'title': 'Shazam ⚡️',\n 'genres': 'comedy'\n}])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_documents([\n {\n id: 287947,\n title: 'Shazam ⚡️',\n genres: 'comedy'\n }\n])" - }, - { - "lang": "Rust", - "source": "// Define the type of our documents\n#[derive(Serialize, Deserialize)]\nstruct IncompleteMovie {\n id: usize,\n title: String,\n genres: String\n}\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .add_or_update(&[\n IncompleteMovie {\n id: 287947,\n title: \"Shazam ⚡️\".to_string(),\n genres: \"comedy\".to_string()\n }\n ], None)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let documentJsonString = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\"\n }\n]\n\"\"\"\nlet documents: Data = documentJsonString.data(using: .utf8)!\n\nclient.index(\"movies\").updateDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\"\n }\n ]'" - } - ] - }, - "post": { - "tags": [ - "Documents" - ], - "summary": "Add or replace documents", - "description": "Add a list of documents or replace them if they already exist.\n\nIf you send an already existing document (same id) the whole existing document will be overwritten by the new document. Fields previously in the document not present in the new document are removed.\n\nFor a partial update of the document see Add or update documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document. `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved `_vectors` field in your documents.\n> It can accept an array of floats, multiple arrays of floats in an outer array or an object.\n> This object accepts keys corresponding to the different embedders defined your index settings.", - "operationId": "replace_documents", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - }, - { - "name": "primaryKey", - "in": "query", - "description": "The primary key of the documents. primaryKey is optional. If you want to set the primary key of your index through this route,\nit only has to be done the first time you add documents to the index. After which it will be ignored if given.", - "required": false, - "schema": { - "type": "string" - }, - "example": "id" - }, - { - "name": "csvDelimiter", - "in": "query", - "description": "Customize the csv delimiter when importing CSV documents.", - "required": true, - "schema": { - "type": "string", - "default": "," - }, - "example": ";" - }, - { - "name": "customMetadata", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "example": "custom" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentAdditionOrUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.add", - "documents.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "var movie = new[]\n{\n new Movie\n {\n Id = \"287947\",\n Title = \"Shazam\",\n Poster = \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n Overview = \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n ReleaseDate = \"2019-03-23\"\n }\n};\nawait index.AddDocumentsAsync(movie);" - }, - { - "lang": "Dart", - "source": "await client.index('movies').addDocuments([\n {\n 'id': 287947,\n 'title': 'Shazam',\n 'poster':\n 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview':\n 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n }\n]);" - }, - { - "lang": "Go", - "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\",\n },\n}\nclient.Index(\"movies\").AddDocuments(documents, nil)" - }, - { - "lang": "JS", - "source": "client.index('movies').addDocuments([{\n id: 287947,\n title: 'Shazam',\n poster: 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n overview: 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n release_date: '2019-03-23'\n}])" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").addDocuments(\"[{\"\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam\\\",\"\n + \"\\\"poster\\\": \\\"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\\\",\"\n + \"\\\"overview\\\": \\\"A boy is given the ability to become an adult superhero in times of need with a single magic word.\\\",\"\n + \"\\\"release_date\\\": \\\"2019-03-23\\\"\"\n + \"}]\"\n);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->addDocuments([\n [\n 'id' => 287947,\n 'title' => 'Shazam',\n 'poster' => 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview' => 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date' => '2019-03-23'\n ]\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').add_documents([{\n 'id': 287947,\n 'title': 'Shazam',\n 'poster': 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview': 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n}])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').add_documents([\n {\n id: 287947,\n title: 'Shazam',\n poster: 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n overview: 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n release_date: '2019-03-23'\n }\n])" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .add_or_replace(&[\n Movie {\n id: 287947,\n title: \"Shazam\".to_string(),\n poster: \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\".to_string(),\n overview: \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\".to_string(),\n release_date: \"2019-03-23\".to_string(),\n }\n ], None)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let documentJsonString = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n]\n\"\"\"\nlet documents: Data = documentJsonString.data(using: .utf8)!\n\nclient.index(\"movies\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n ]'" - } - ] - }, - "delete": { - "tags": [ - "Documents" - ], - "summary": "Delete all documents", - "description": "Delete all documents in the specified index.", - "operationId": "clear_all_documents", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentDeletion", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.delete", - "documents.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteAllDocumentsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').deleteAllDocuments();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteAllDocuments()" - }, - { - "lang": "JS", - "source": "client.index('movies').deleteAllDocuments()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").deleteAllDocuments();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->deleteAllDocuments();" - }, - { - "lang": "Python", - "source": "client.index('movies').delete_all_documents()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').delete_all_documents" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_all_documents()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").deleteAllDocuments() { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/documents'" - } - ] - } - }, - "/indexes/{indexUid}/documents/delete": { - "post": { - "tags": [ - "Documents" - ], - "summary": "Delete documents by filter", - "description": "Delete a set of documents based on a filter.", - "operationId": "delete_documents_by_filter", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DocumentDeletionByFilter" - } - } - }, - "required": true - }, - "responses": { - "202": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentDeletion", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.delete", - "documents.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new DeleteDocumentsQuery() { Filter = \"genres = action OR genres = adventure\" });" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteDocumentsByFilter(\"genres=action OR genres=adventure\")" - }, - { - "lang": "JS", - "source": "client.index('movies').deleteDocuments({\n filter: 'genres = action OR genres = adventure'\n})" - }, - { - "lang": "Java", - "source": "String filter = \"genres = action OR genres = adventure\";\nclient.index(\"movies\").deleteDocumentsByFilter(filter);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->deleteDocuments(['filter' => 'genres = action OR genres = adventure']);" - }, - { - "lang": "Python", - "source": "client.index('movies').delete_documents(filter='genres=action OR genres=adventure')" - }, - { - "lang": "Ruby", - "source": "client.index('movies').delete_documents(filter: 'genres = action OR genres = adventure')" - }, - { - "lang": "Rust", - "source": "let index = client.index(\"movies\");\nlet task = DocumentDeletionQuery::new(&index)\n .with_filter(\"genres = action OR genres = adventure\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/movies/documents/delete \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"genres = action OR genres = adventure\"\n }'" - } - ] - } - }, - "/indexes/{indexUid}/documents/delete-batch": { - "post": { - "tags": [ - "Documents" - ], - "summary": "Delete documents by batch", - "description": "Delete a set of documents based on an array of document ids.", - "operationId": "delete_documents_batch", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": {} - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentAdditionOrUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.delete", - "documents.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new[] { \"23488\", \"153738\", \"437035\", \"363869\" });" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteDocuments([]string{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\",\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').deleteDocuments([23488, 153738, 437035, 363869])" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").deleteDocuments(Arrays.asList(new String[]\n{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\"\n}));" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->deleteDocuments([23488, 153738, 437035, 363869]);" - }, - { - "lang": "Python", - "source": "client.index('movies').delete_documents([23488, 153738, 437035, 363869])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').delete_documents([23488, 153738, 437035, 363869])" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_documents(&[23488, 153738, 437035, 363869])\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents/delete-batch' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n 23488,\n 153738,\n 437035,\n 363869\n ]'" - } - ] - } - }, - "/indexes/{indexUid}/documents/edit": { - "post": { - "tags": [ - "Documents" - ], - "summary": "Edit documents by function.", - "description": "Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to edit one or more documents directly in Meilisearch.", - "operationId": "edit_documents_by_function", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DocumentEditionByFunction" - } - } - }, - "required": true - }, - "responses": { - "202": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentDeletion", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/documents/fetch": { - "post": { - "tags": [ - "Documents" - ], - "summary": "Get documents with POST", - "description": "Get a set of documents.", - "operationId": "documents_by_query_post", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BrowseQuery" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationView_Value" - }, - "example": { - "results": [ - { - "title": "The Travels of Ibn Battuta", - "genres": [ - "Travel", - "Adventure" - ], - "language": "English", - "rating": 4.5 - }, - { - "title": "Pride and Prejudice", - "genres": [ - "Classics", - "Fiction", - "Romance", - "Literature" - ], - "language": "English", - "rating": 4 - } - ], - "offset": 0, - "limit": 2, - "total": 5 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.delete", - "documents.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() {\n Limit = 3,\n Fields = new List { \"title\", \"genres\", \"rating\", \"language\"},\n Filter = \"(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English\"\n});" - }, - { - "lang": "Go", - "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"books\").GetDocuments(&meilisearch.DocumentsQuery{\n Fields: []string{\"title\", \"genres\", \"rating\", \"language\"},\n Filter: \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n}, &result)" - }, - { - "lang": "JS", - "source": "client.index('books').getDocuments({\n filter: '(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English',\n fields: ['title', 'genres', 'rating', 'language'],\n limit: 3\n})" - }, - { - "lang": "Java", - "source": "DocumentsQuery query = new DocumentsQuery()\n .setFilter(new String[] {\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\"})\n .setFields(new String[] {\"title\", \"genres\", \"rating\", \"language\"})\n .setLimit(3);\nclient.index(\"books\").getDocuments(query, TargetClassName.class);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->getDocuments(\n (new DocumentsQuery())\n ->setFilter('(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English')\n ->setLimit(3)\n ->setFields(['title', 'genres', 'rating', 'language'])\n);" - }, - { - "lang": "Python", - "source": "client.index('books').get_documents({\n 'limit':3,\n 'fields': ['title', 'genres', 'rating', 'language'],\n 'filter': '(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English',\n 'sort': 'rating:desc, title:asc' # comma-separated string format\n})" - }, - { - "lang": "Ruby", - "source": "client.index('books').get_documents(\n filter: '(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English',\n limit: 3,\n fields: ['title', 'genres', 'rating', 'language']\n)" - }, - { - "lang": "Rust", - "source": "let index = client.index(\"books\");\nlet documents: DocumentsResults = DocumentsQuery::new(&index)\n .with_filter(\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\")\n .with_fields([\"title\", \"genres\", \"rating\", \"language\"])\n .with_limit(2)\n .execute::()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/books/documents/fetch \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n \"fields\": [\"title\", \"genres\", \"rating\", \"language\"],\n \"limit\": 3\n }'" - } - ] - } - }, - "/indexes/{indexUid}/documents/{documentId}": { - "get": { - "tags": [ - "Documents" - ], - "summary": "Get one document", - "description": "Get one document from its primary key.", - "operationId": "get_document", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - }, - { - "name": "documentId", - "in": "path", - "description": "The document identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "85087" - }, - { - "name": "fields", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "retrieveVectors", - "in": "query", - "required": false, - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { - "description": "The document is returned", - "content": { - "application/json": { - "schema": {}, - "example": { - "id": 25684, - "title": "American Ninja 5", - "poster": "https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg", - "overview": "When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.", - "release_date": 725846400 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Document not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Document `a` not found.", - "code": "document_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#document_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.get", - "documents.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDocumentAsync(25684, new List { \"id\", \"title\", \"poster\", \"release_date\" });" - }, - { - "lang": "Go", - "source": "var a interface{}\nclient.Index(\"movies\").GetDocument(\"25684\",&meilisearch.DocumentQuery{\n Fields: []string{\"id\", \"title\", \"poster\", \"release_date\"},\n}, &a)" - }, - { - "lang": "JS", - "source": "client\n .index('movies')\n .getDocument(25684, { fields: ['id', 'title', 'poster', 'release_date'] })" - }, - { - "lang": "Java", - "source": "DocumentQuery query = new DocumentQuery().setFields(new String[] {\"id\", \"title\", \"poster\", \"release_date\"});\nclient.index(\"movies\").getDocument(\"25684\", query);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getDocument(25684, ['id', 'title', 'poster', 'release_date']);" - }, - { - "lang": "Python", - "source": "client.index('movies').get_document(25684, {\n 'fields': ['id', 'title', 'poster', 'release_date']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').document(25684, fields: ['id', 'title', 'poster', 'release_date'])" - }, - { - "lang": "Rust", - "source": "let index = client\n .index(\"movies\");\nlet document = DocumentQuery::new(&index)\n .with_fields([\"id\", \"title\", \"poster\", \"release_date\"])\n .execute::(\"25684\")\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getDocument(25684) { (result: Result) in\n switch result {\n case .success(let movie):\n print(movie)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents/25684?fields=id,title,poster,release_date'" - } - ] - }, - "delete": { - "tags": [ - "Documents" - ], - "summary": "Delete a document", - "description": "Delete a single document by id.", - "operationId": "delete_document", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - }, - { - "name": "documentId", - "in": "path", - "description": "Document Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "853" - } - ], - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentAdditionOrUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.delete", - "documents.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/facet-search": { - "post": { - "tags": [ - "Facet Search" - ], - "summary": "Perform a facet search", - "description": "Search for a facet value within a given facet.", - "operationId": "search", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FacetSearchQuery" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "The documents are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchResult" - }, - "example": { - "hits": [ - { - "id": 2770, - "title": "American Pie 2", - "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", - "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", - "release_date": 997405200 - }, - { - "id": 190859, - "title": "American Sniper", - "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", - "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", - "release_date": 1418256000 - } - ], - "offset": 0, - "limit": 2, - "estimatedTotalHits": 976, - "processingTimeMs": 35, - "query": "american " - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "var query = new SearchFacetsQuery()\n{\n FacetQuery = \"fiction\",\n Filter = \"rating > 3\"\n};\nawait client.Index(\"books\").FacetSearchAsync(\"genres\", query);" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").FacetSearch(&meilisearch.FacetSearchRequest{\n FacetQuery: \"fiction\",\n FacetName: \"genres\",\n Filter: \"rating > 3\",\n})" - }, - { - "lang": "JS", - "source": "client.index('books').searchForFacetValues({\n facetQuery: 'fiction',\n facetName: 'genres'\n filter: 'rating > 3'\n})" - }, - { - "lang": "Java", - "source": "FacetSearchRequest fsr = FacetSearchRequest.builder().facetName(\"genres\").facetQuery(\"fiction\").filter(new String[]{\"rating > 3\"}).build();\nclient.index(\"books\").facetSearch(fsr);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->facetSearch(\n (new FacetSearchQuery())\n ->setFacetQuery('fiction')\n ->setFacetName('genres')\n ->setFilter(['rating > 3'])\n);" - }, - { - "lang": "Python", - "source": "client.index('books').facet_search('genres', 'fiction', {\n 'filter': 'rating > 3'\n})" - }, - { - "lang": "Ruby", - "source": "client.index('books').facet_search('genres', 'fiction', filter: 'rating > 3')" - }, - { - "lang": "Rust", - "source": "let res = client.index(\"books\")\n .facet_search(\"genres\")\n .with_facet_query(\"fiction\")\n .with_filter(\"rating > 3\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"facetQuery\": \"fiction\",\n \"facetName\": \"genres\",\n \"filter\": \"rating > 3\"\n }'" - } - ] - } - }, - "/indexes/{indexUid}/search": { - "get": { - "tags": [ - "Indexes", - "Search" - ], - "summary": "Search an index with GET", - "description": "Search for documents matching a specific query in the given index.", - "operationId": "search_with_url_query", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - }, - { - "name": "q", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "vector", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "number", - "format": "float" - } - }, - "explode": false - }, - { - "name": "offset", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "default": 0, - "minimum": 0 - } - }, - { - "name": "limit", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "default": 20, - "minimum": 0 - } - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "hitsPerPage", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "attributesToRetrieve", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "explode": false - }, - { - "name": "retrieveVectors", - "in": "query", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "attributesToCrop", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "explode": false - }, - { - "name": "cropLength", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "default": 10, - "minimum": 0 - } - }, - { - "name": "attributesToHighlight", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "explode": false - }, - { - "name": "filter", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sort", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "distinct", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "showMatchesPosition", - "in": "query", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "showRankingScore", - "in": "query", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "showRankingScoreDetails", - "in": "query", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "facets", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "explode": false - }, - { - "name": "highlightPreTag", - "in": "query", - "required": true, - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "highlightPostTag", - "in": "query", - "required": true, - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "cropMarker", - "in": "query", - "required": true, - "schema": { - "type": "string", - "default": "…" - } - }, - { - "name": "matchingStrategy", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/MatchingStrategy" - } - }, - { - "name": "attributesToSearchOn", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "explode": false - }, - { - "name": "hybridEmbedder", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hybridSemanticRatio", - "in": "query", - "required": true, - "schema": { - "type": "number", - "format": "float" - } - }, - { - "name": "rankingScoreThreshold", - "in": "query", - "required": true, - "schema": { - "type": "number", - "format": "float" - } - }, - { - "name": "locales", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Locale" - } - }, - "explode": false - }, - { - "name": "personalizeUserContext", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The documents are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchResult" - }, - "example": { - "hits": [ - { - "id": 2770, - "title": "American Pie 2", - "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", - "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", - "release_date": 997405200 - }, - { - "id": 190859, - "title": "American Sniper", - "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", - "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", - "release_date": 1418256000 - } - ], - "offset": 0, - "limit": 2, - "estimatedTotalHits": 976, - "processingTimeMs": 35, - "query": "american " - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "JS", - "source": "client.index('movies').searchGet('American ninja')" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/search?q=american%20ninja'" - } - ] - }, - "post": { - "tags": [ - "Indexes", - "Search" - ], - "summary": "Search with POST", - "description": "Search for documents matching a specific query in the given index.", - "operationId": "search_with_post", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchQuery" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "The documents are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchResult" - }, - "example": { - "hits": [ - { - "id": 2770, - "title": "American Pie 2", - "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", - "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", - "release_date": 997405200 - }, - { - "id": 190859, - "title": "American Sniper", - "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", - "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", - "release_date": 1418256000 - } - ], - "offset": 0, - "limit": 2, - "estimatedTotalHits": 976, - "processingTimeMs": 35, - "query": "american " - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").SearchAsync(\"American ninja\");" - }, - { - "lang": "Dart", - "source": "await client.index('movies').search('American ninja');" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").Search(\"american ninja\", &meilisearch.SearchRequest{})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('American ninja')" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").search(\"American ninja\");" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('american ninja');" - }, - { - "lang": "Python", - "source": "client.index('movies').search('American ninja')" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('american ninja')" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"american ninja\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(query: \"American ninja\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"american ninja\" }'" - } - ] - } - }, - "/indexes/{indexUid}/settings": { - "get": { - "tags": [ - "Settings" - ], - "summary": "All settings", - "description": "This route allows you to retrieve, configure, or reset all of an index's settings at once.", - "operationId": "get_all", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "Settings are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Settings_Unchecked" - }, - "example": {} - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSettingsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getSettings();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSettings()" - }, - { - "lang": "JS", - "source": "client.index('movies').getSettings()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getSettings();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_settings()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').settings" - }, - { - "lang": "Rust", - "source": "let settings: Settings = client\n .index(\"movies\")\n .get_settings()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getSettings { (result) in\n switch result {\n case .success(let setting):\n print(setting)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset settings", - "description": "Reset all the settings of an index to their default value.", - "operationId": "delete_all", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSettingsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetSettings();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetSettings()" - }, - { - "lang": "JS", - "source": "client.index('movies').resetSettings()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetSettings();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_settings()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_settings" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_settings()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").resetSettings { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings'" - } - ] - }, - "patch": { - "tags": [ - "Settings" - ], - "summary": "Update settings", - "description": "Update the settings of an index.\nPassing null to an index setting will reset it to its default value.\nUpdates in the settings route are partial. This means that any parameters not provided in the body will be left unchanged.\nIf the provided index does not exist, it will be created.", - "operationId": "update_all", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Settings_Unchecked" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "Settings newSettings = new Settings\n{\n RankingRules = new string[]\n {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n },\n DistinctAttribute = \"movie_id\",\n SearchableAttributes = new string[] { \"title\", \"overview\", \"genres\" },\n DisplayedAttributes = new string[] { \"title\", \"overview\", \"genres\", \"release_date\" },\n SortableAttributes = new string[] { \"title\", \"release_date\" },\n StopWords = new string[] { \"the\", \"a\", \"an\" },\n Synonyms = new Dictionary>\n {\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\" } },\n },\n FilterableAttributes = new string[] { },\n TypoTolerance = new TypoTolerance\n {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeForTypos = new TypoTolerance.TypoSize\n {\n OneTypo = 8,\n TwoTypos = 10\n }\n },\n SearchCutoffMs = 150\n};\nTaskInfo task = await client.Index(\"movies\").UpdateSettingsAsync(newFilters);" - }, - { - "lang": "Go", - "source": "distinctAttribute := \"movie_id\"\nsettings := meilisearch.Settings{\n RankingRules: []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\",\n },\n DistinctAttribute: &distinctAttribute,\n SearchableAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n },\n DisplayedAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n },\n StopWords: []string{\n \"the\",\n \"a\",\n \"an\",\n },\n SortableAttributes: []string{\n \"title\",\n \"release_date\",\n },\n Synonyms: map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\"},\n },\n TypoTolerance: &meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 8,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n },\n Pagination: &meilisearch.Pagination{\n MaxTotalHits: 5000,\n },\n Faceting: &meilisearch.Faceting{\n MaxValuesPerFacet: 200,\n },\n SearchCutoffMs: 150,\n}\nclient.Index(\"movies\").UpdateSettings(&settings)" - }, - { - "lang": "JS", - "source": "client.index('movies').updateSettings({\n rankingRules: [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n distinctAttribute: 'movie_id',\n searchableAttributes: [\n 'title',\n 'overview',\n 'genres'\n ],\n displayedAttributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n stopWords: [\n 'the',\n 'a',\n 'an'\n ],\n sortableAttributes: [\n 'title',\n 'release_date'\n ],\n synonyms: {\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine']\n },\n typoTolerance: {\n 'minWordSizeForTypos': {\n 'oneTypo': 8,\n 'twoTypos': 10\n },\n 'disableOnAttributes': [\n 'title'\n ]\n },\n pagination: {\n maxTotalHits: 5000\n },\n faceting: {\n maxValuesPerFacet: 200\n },\n searchCutoffMs: 150\n})" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setRankingRules(\n new String[] {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n });\nsettings.setDistinctAttribute(\"movie_id\");\nsettings.setSearchableAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\"\n });\nsettings.setDisplayedAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n });\nsettings.setStopWords(\n new String[] {\n \"the\",\n \"a\",\n \"an\"\n });\nsettings.setSortableAttributes(\n new String[] {\n \"title\",\n \"release_date\"\n });\n\nHashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nsettings.setSynonyms(synonyms);\n\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 8);\n put(\"twoTypos\", 10);\n }\n };\nTypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\nsettings.setTypoTolerance(typoTolerance);\nsettings.setSearchCutoffMs(150);\nclient.index(\"movies\").updateSettings(settings);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateSettings([\n 'rankingRules' => [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n 'distinctAttribute' => 'movie_id',\n 'searchableAttributes' => [\n 'title',\n 'overview',\n 'genres'\n ],\n 'displayedAttributes' => [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n 'stopWords' => [\n 'the',\n 'a',\n 'an'\n ],\n 'sortableAttributes' => [\n 'title',\n 'release_date'\n ],\n 'synonyms' => [\n 'wolverine' => ['xmen', 'logan'],\n 'logan' => ['wolverine']\n ],\n 'typoTolerance' => [\n 'minWordSizeForTypos' => [\n 'oneTypo' => 8,\n 'twoTypos' => 10\n ],\n 'disableOnAttributes' => ['title']\n ],\n 'pagination' => [\n 'maxTotalHits' => 5000\n ],\n 'faceting' => [\n 'maxValuesPerFacet' => 200\n ],\n 'searchCutoffMs' => 150\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_settings({\n 'rankingRules': [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n 'distinctAttribute': 'movie_id',\n 'searchableAttributes': [\n 'title',\n 'overview',\n 'genres'\n ],\n 'displayedAttributes': [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n 'sortableAttributes': [\n 'title',\n 'release_date'\n ],\n 'stopWords': [\n 'the',\n 'a',\n 'an'\n ],\n 'synonyms': {\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine']\n },\n 'typoTolerance': {\n 'minWordSizeForTypos': {\n 'oneTypo': 8,\n 'twoTypos': 10\n },\n 'disableOnAttributes': ['title']\n },\n 'pagination': {\n 'maxTotalHits': 5000\n },\n 'faceting': {\n 'maxValuesPerFacet': 200\n },\n 'searchCutoffMs': 150\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_settings({\n ranking_rules: [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n distinct_attribute: 'movie_id',\n searchable_attributes: [\n 'title',\n 'overview',\n 'genres'\n ],\n displayed_attributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n stop_words: [\n 'the',\n 'a',\n 'an'\n ],\n sortable_attributes: [\n 'title',\n 'release_date'\n ],\n synonyms: {\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine']\n },\n pagination: {\n max_total_hits: 5000\n },\n faceting: {\n max_values_per_facet: 200\n },\n search_cutoff_ms: 150\n})" - }, - { - "lang": "Rust", - "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"wolverine\"), vec![\"xmen\", \"logan\"]);\nsynonyms.insert(String::from(\"logan\"), vec![\"wolverine\"]);\n\nlet min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(4),\n two_typos; Some(12)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![\"title\".to_string()]),\n disable_on_words: Some(vec![])\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet settings = Settings::new()\n .with_ranking_rules([\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ])\n .with_distinct_attribute(Some(\"movie_id\"))\n .with_searchable_attributes([\n \"title\",\n \"overview\",\n \"genres\"\n ])\n .with_displayed_attributes([\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ])\n .with_stop_words([\n \"the\",\n \"a\",\n \"an\"\n ])\n .with_sortable_attributes([\n \"title\",\n \"release_date\"\n ])\n .with_synonyms(synonyms)\n .with_typo_tolerance(typo_tolerance)\n .with_search_cutoff(150);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_settings(&settings)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let settings = Setting(rankingRules: [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n], searchableAttributes: [\n \"title\",\n \"overview\",\n \"genres\"\n], displayedAttributes: [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n], stopWords: [\n \"the\",\n \"a\",\n \"an\"\n], synonyms: [\n \"wolverine\": [\"xmen\", \"logan\"],\n \"logan\": [\"wolverine\"]\n], distinctAttribute: \"movie_id\",\nsortableAttributes: [\n \"title\",\n \"release_date\"\n])\nclient.index(\"movies\").updateSettings(settings) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"rankingRules\": [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ],\n \"distinctAttribute\": \"movie_id\",\n \"searchableAttributes\": [\n \"title\",\n \"overview\",\n \"genres\"\n ],\n \"displayedAttributes\": [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ],\n \"stopWords\": [\n \"the\",\n \"a\",\n \"an\"\n ],\n \"sortableAttributes\": [\n \"title\",\n \"release_date\"\n ],\n \"synonyms\": {\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\"wolverine\"]\n },\n \"typoTolerance\": {\n \"minWordSizeForTypos\": {\n \"oneTypo\": 8,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n },\n \"pagination\": {\n \"maxTotalHits\": 5000\n },\n \"faceting\": {\n \"maxValuesPerFacet\": 200\n },\n \"searchCutoffMs\": 150\n }'" - } - ] - } - }, - "/indexes/{indexUid}/settings/chat": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get chat", - "description": "Get an user defined chat", - "operationId": "getchat", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "chat is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChatSettings" - }, - "example": {} - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset chat", - "description": "Reset an index's chat to its default value", - "operationId": "deletechat", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChatSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "patch": { - "tags": [ - "Settings" - ], - "summary": "Update chat", - "description": "Update an index's user defined chat", - "operationId": "patchchat", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChatSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/dictionary": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get dictionary", - "description": "Get an user defined dictionary", - "operationId": "getdictionary", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "dictionary is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "var indexDictionary = await client.Index(\"books\").GetDictionaryAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetDictionary()" - }, - { - "lang": "JS", - "source": "client.index('books').getDictionary()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").getDictionarySettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->getDictionary();" - }, - { - "lang": "Python", - "source": "client.index('books').get_dictionary()" - }, - { - "lang": "Ruby", - "source": "client.index('books').dictionary" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('books')\n .get_dictionary()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").getDictionary { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/dictionary'" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update dictionary", - "description": "Update an index's user defined dictionary", - "operationId": "putdictionary", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "var newDictionary = new string[] { \"J. R. R.\", \"W. E. B.\" };\nawait client.Index(\"books\").UpdateDictionaryAsync(newDictionary);" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateDictionary([]string{\n \"J. R. R.\",\n \"W. E. B.\",\n})" - }, - { - "lang": "JS", - "source": "client.index('books').updateDictionary(['J. R. R.', 'W. E. B.'])" - }, - { - "lang": "Java", - "source": "client.index(\"books\").updateDictionarySettings(new String[] {\"J. R. R.\", \"W. E. B.\"});" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateDictionary(['J. R. R.', 'W. E. B.']);" - }, - { - "lang": "Python", - "source": "client.index('books').update_dictionary([\"J. R. R.\", \"W. E. B.\"])" - }, - { - "lang": "Ruby", - "source": "client.index('books').update_dictionary(['J. R. R.', 'W. E. B.'])" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('books')\n .set_dictionary(['J. R. R.', 'W. E. B.'])\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").updateDictionary([\"J. R. R.\", \"W. E. B.\"]) { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/dictionary' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"J. R. R.\",\n \"W. E. B.\"\n ]'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset dictionary", - "description": "Reset an index's dictionary to its default value", - "operationId": "deletedictionary", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"books\").ResetDictionaryAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetDictionary()" - }, - { - "lang": "JS", - "source": "client.index('books').resetDictionary()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").resetDictionarySettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->resetDictionary();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_dictionary()" - }, - { - "lang": "Ruby", - "source": "client.index('books').reset_dictionary" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('books')\n .reset_dictionary()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").resetDictionary { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/dictionary'" - } - ] - } - }, - "/indexes/{indexUid}/settings/displayed-attributes": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get displayedAttributes", - "description": "Get an user defined displayedAttributes", - "operationId": "getdisplayedAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "displayedAttributes is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDisplayedAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getDisplayedAttributes();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetDisplayedAttributes()" - }, - { - "lang": "JS", - "source": "client.index('movies').getDisplayedAttributes()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getDisplayedAttributesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getDisplayedAttributes();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_displayed_attributes()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').get_displayed_attributes" - }, - { - "lang": "Rust", - "source": "let displayed_attributes: Vec = client\n .index(\"movies\")\n .get_displayed_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getDisplayedAttributes { (result) in\n switch result {\n case .success(let displayedAttributes):\n print(displayedAttributes)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update displayedAttributes", - "description": "Update an index's user defined displayedAttributes", - "operationId": "putdisplayedAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateDisplayedAttributesAsync(new[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" - }, - { - "lang": "Go", - "source": "displayedAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n}\nclient.Index(\"movies\").UpdateDisplayedAttributes(&displayedAttributes)" - }, - { - "lang": "JS", - "source": "client.index('movies').updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateDisplayedAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" - }, - { - "lang": "Rust", - "source": "let displayed_attributes = [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_displayed_attributes(&displayed_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let displayedAttributes: [String] = [\"title\", \"overview\", \"genres\", \"release_date\"]\nclient.index(\"movies\").updateDisplayedAttributes(displayedAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ]'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset displayedAttributes", - "description": "Reset an index's displayedAttributes to its default value", - "operationId": "deletedisplayedAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetDisplayedAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetDisplayedAttributes();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetDisplayedAttributes()" - }, - { - "lang": "JS", - "source": "client.index('movies').resetDisplayedAttributes()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetDisplayedAttributesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetDisplayedAttributes();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_displayed_attributes()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_displayed_attributes" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_displayed_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").resetDisplayedAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" - } - ] - } - }, - "/indexes/{indexUid}/settings/distinct-attribute": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get distinctAttribute", - "description": "Get an user defined distinctAttribute", - "operationId": "getdistinctAttribute", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "distinctAttribute is returned", - "content": { - "application/json": { - "schema": { - "type": "string" - }, - "example": "" - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "string result = await client.Index(\"shoes\").GetDistinctAttributeAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('shoes').getDistinctAttribute();" - }, - { - "lang": "Go", - "source": "client.Index(\"shoes\").GetDistinctAttribute()" - }, - { - "lang": "JS", - "source": "client.index('shoes').getDistinctAttribute()" - }, - { - "lang": "Java", - "source": "client.index(\"shoes\").getDistinctAttributeSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('shoes')->getDistinctAttribute();" - }, - { - "lang": "Python", - "source": "client.index('shoes').get_distinct_attribute()" - }, - { - "lang": "Ruby", - "source": "client.index('shoes').distinct_attribute" - }, - { - "lang": "Rust", - "source": "let distinct_attribute: Option = client\n .index(\"shoes\")\n .get_distinct_attribute()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"shoes\").getDistinctAttribute { (result) in\n switch result {\n case .success(let distinctAttribute):\n print(distinctAttribute)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update distinctAttribute", - "description": "Update an index's user defined distinctAttribute", - "operationId": "putdistinctAttribute", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "TaskInfo result = await client.Index(\"shoes\").UpdateDistinctAttributeAsync(\"skuid\");" - }, - { - "lang": "Dart", - "source": "await client.index('shoes').updateDistinctAttribute('skuid');" - }, - { - "lang": "Go", - "source": "client.Index(\"shoes\").UpdateDistinctAttribute(\"skuid\")" - }, - { - "lang": "JS", - "source": "client.index('shoes').updateDistinctAttribute('skuid')" - }, - { - "lang": "Java", - "source": "client.index(\"shoes\").updateDistinctAttributeSettings(\"skuid\");" - }, - { - "lang": "PHP", - "source": "$client->index('shoes')->updateDistinctAttribute('skuid');" - }, - { - "lang": "Python", - "source": "client.index('shoes').update_distinct_attribute('skuid')" - }, - { - "lang": "Ruby", - "source": "client.index('shoes').update_distinct_attribute('skuid')" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"shoes\")\n .set_distinct_attribute(\"skuid\")\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"shoes\").updateDistinctAttribute(\"skuid\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"skuid\"'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset distinctAttribute", - "description": "Reset an index's distinctAttribute to its default value", - "operationId": "deletedistinctAttribute", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "TaskInfo result = await client.Index(\"shoes\").ResetDistinctAttributeAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('shoes').resetDistinctAttribute();" - }, - { - "lang": "Go", - "source": "client.Index(\"shoes\").ResetDistinctAttribute()" - }, - { - "lang": "JS", - "source": "client.index('shoes').resetDistinctAttribute()" - }, - { - "lang": "Java", - "source": "client.index(\"shoes\").resetDistinctAttributeSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('shoes')->resetDistinctAttribute();" - }, - { - "lang": "Python", - "source": "client.index('shoes').reset_distinct_attribute()" - }, - { - "lang": "Ruby", - "source": "client.index('shoes').reset_distinct_attribute" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"shoes\")\n .reset_distinct_attribute()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"shoes\").resetDistinctAttribute { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" - } - ] - } - }, - "/indexes/{indexUid}/settings/embedders": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get embedders", - "description": "Get an user defined embedders", - "operationId": "getembedders", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "embedders is returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/SettingEmbeddingSettings" - }, - "propertyNames": { - "type": "string" - } - }, - "example": {} - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').embedders" - }, - { - "lang": "Rust", - "source": "let embedders = index.get_embedders().await.unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset embedders", - "description": "Reset an index's embedders to its default value", - "operationId": "deleteembedders", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/SettingEmbeddingSettings" - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').reset_embedders" - }, - { - "lang": "Rust", - "source": "index.reset_embedders().await.unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" - } - ] - }, - "patch": { - "tags": [ - "Settings" - ], - "summary": "Update embedders", - "description": "Update an index's user defined embedders", - "operationId": "patchembedders", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/SettingEmbeddingSettings" - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "JS", - "source": "client.index('INDEX_NAME').updateEmbedders({\n default: {\n source: 'openAi',\n apiKey: 'OPEN_AI_API_KEY',\n model: 'text-embedding-3-small',\n documentTemplate: 'A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}'\n }\n});" - }, - { - "lang": "PHP", - "source": "$client->updateEmbedders([\n 'default' => [\n 'source' => 'openAi',\n 'apiKey' => 'OPEN_AI_API_KEY',\n 'model' => 'text-embedding-3-small',\n 'documentTemplate' => 'A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}'\n ]\n]);" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').update_embedders(\n default: {\n source: 'openAi',\n api_key: 'OPEN_AI_API_KEY',\n model: 'text-embedding-3-small',\n document_template: \"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\"\n }\n)" - }, - { - "lang": "Rust", - "source": "let embedders = HashMap::from([(\n String::from(\"default\"),\n Embedder {\n source: EmbedderSource::OpenAi,\n api_key: Some(String::from(\"OPEN_AI_API_KEY\")),\n model: Some(String::from(\"text-embedding-3-small\")),\n document_template: Some(String::from(\"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\")),\n ..Embedder::default()\n }\n)]);\nlet task = index\n .set_embedders(&embedders)\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"default\": {\n \"source\": \"openAi\",\n \"apiKey\": \"OPEN_AI_API_KEY\",\n \"model\": \"text-embedding-3-small\",\n \"documentTemplate\": \"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\"\n }\n }'" - } - ] - } - }, - "/indexes/{indexUid}/settings/facet-search": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get facetSearch", - "description": "Get an user defined facetSearch", - "operationId": "getfacetSearch", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "facetSearch is returned", - "content": { - "application/json": { - "schema": { - "type": "boolean" - }, - "example": false - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.Index(\"books\").GetFacetSearch()" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').getFacetSearch();" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->getFacetSearch();" - }, - { - "lang": "Python", - "source": "client.index('books').get_facet_search_settings()" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_UID').facet_search_setting" - }, - { - "lang": "Rust", - "source": "let facet_search: bool = client\n .index(INDEX_UID)\n .get_facet_search()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update facetSearch", - "description": "Update an index's user defined facetSearch", - "operationId": "putfacetSearch", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "boolean" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateFacetSearch(false)" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').updateFacetSearch(false);" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->updateFacetSearch(false);" - }, - { - "lang": "Python", - "source": "client.index('books').update_facet_search_settings(False)" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_UID').update_facet_search_setting(false)" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_facet_search(false)\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary 'false'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset facetSearch", - "description": "Reset an index's facetSearch to its default value", - "operationId": "deletefacetSearch", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "boolean" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.Index(\"books\").ResetFacetSearch()" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').resetFacetSearch();" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->resetFacetSearch();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_facet_search_settings()" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_UID').reset_facet_search_setting" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_facet_search()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" - } - ] - } - }, - "/indexes/{indexUid}/settings/faceting": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get faceting", - "description": "Get an user defined faceting", - "operationId": "getfaceting", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "faceting is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FacetingSettings" - }, - "example": {} - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetFacetingAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getFaceting();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetFaceting()" - }, - { - "lang": "JS", - "source": "client.index('books').getFaceting()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").getFacetingSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->getFaceting();" - }, - { - "lang": "Python", - "source": "client.index('books').get_faceting_settings()" - }, - { - "lang": "Ruby", - "source": "client.index('books').faceting" - }, - { - "lang": "Rust", - "source": "let faceting: FacetingSettings = client\n .index(\"books\")\n .get_faceting()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/faceting'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset faceting", - "description": "Reset an index's faceting to its default value", - "operationId": "deletefaceting", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FacetingSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetFacetingAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetFaceting();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetFaceting()" - }, - { - "lang": "JS", - "source": "client.index('books').resetFaceting()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").resetFacetingSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->resetFaceting();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_faceting_settings()" - }, - { - "lang": "Ruby", - "source": "index('books').reset_faceting" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_faceting()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/faceting'" - } - ] - }, - "patch": { - "tags": [ - "Settings" - ], - "summary": "Update faceting", - "description": "Update an index's user defined faceting", - "operationId": "patchfaceting", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FacetingSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "var faceting = new Faceting\n{\n MaxValuesPerFacet = 2,\n SortFacetValuesBy = new Dictionary\n {\n [\"*\"] = SortFacetValuesByType.Alpha,\n [\"genres\"] = SortFacetValuesByType.Count\n }\n};\nawait client.Index(\"books\").UpdateFacetingAsync(faceting);" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateFaceting(&meilisearch.Faceting{\n MaxValuesPerFacet: 2,\n SortFacetValuesBy: {\n \"*\": SortFacetTypeAlpha,\n \"genres\": SortFacetTypeCount,\n }\n})" - }, - { - "lang": "JS", - "source": "client.index('books').updateFaceting({\n maxValuesPerFacet: 2\n sortFacetValuesBy: {\n '*': 'alpha',\n genres: 'count'\n }\n})" - }, - { - "lang": "Java", - "source": "Faceting newFaceting = new Faceting();\nnewFaceting.setMaxValuesPerFacet(2);\nHashMap facetSortValues = new HashMap<>();\nfacetSortValues.put(\"*\", FacetSortValue.ALPHA);\nfacetSortValues.put(\"genres\", FacetSortValue.COUNT);\nnewFaceting.setSortFacetValuesBy(facetSortValues);\nclient.index(\"books\").updateFacetingSettings(newFaceting);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateFaceting([\n 'maxValuesPerFacet' => 2,\n 'sortFacetValuesBy' => ['*' => 'alpha', 'genres' => 'count']\n]);" - }, - { - "lang": "Python", - "source": "params = {\n 'maxValuesPerFacet': 2,\n 'sortFacetValuesBy': {\n '*': 'count',\n 'genres': 'count'\n }\n}\nclient.index('books').update_faceting_settings(params)" - }, - { - "lang": "Ruby", - "source": "client.index('books').update_faceting({\n max_values_per_facet: 2,\n sort_facet_values_by: {\n '*': 'alpha',\n genres: 'count'\n }\n})" - }, - { - "lang": "Rust", - "source": "let mut facet_sort_setting = BTreeMap::new();\nfacet_sort_setting.insert(String::from(\"*\"), FacetSortValue::Alpha);\nfacet_sort_setting.insert(String::from(\"genres\"), FacetSortValue::Count);\nlet mut faceting = FacetingSettings {\n max_values_per_facet: 2,\n sort_facet_values_by: Some(facet_sort_setting),\n};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_faceting(&faceting)\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/faceting' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxValuesPerFacet\": 2,\n \"sortFacetValuesBy\": {\n \"*\": \"alpha\",\n \"genres\": \"count\"\n }\n }'" - } - ] - } - }, - "/indexes/{indexUid}/settings/filterable-attributes": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get filterableAttributes", - "description": "Get an user defined filterableAttributes", - "operationId": "getfilterableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "filterableAttributes is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FilterableAttributesRule" - } - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "IEnumerable attributes = await client.Index(\"movies\").GetFilterableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getFilterableAttributes();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetFilterableAttributes()" - }, - { - "lang": "JS", - "source": "client.index('movies').getFilterableAttributes()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getFilterableAttributesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getFilterableAttributes();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_filterable_attributes()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').filterable_attributes" - }, - { - "lang": "Rust", - "source": "let filterable_attributes: Vec = client\n .index(\"movies\")\n .get_filterable_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update filterableAttributes", - "description": "Update an index's user defined filterableAttributes", - "operationId": "putfilterableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FilterableAttributesRule" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "List attributes = new() { \"genres\", \"director\" };\nTaskInfo result = await client.Index(\"movies\").UpdateFilterableAttributesAsync(attributes);" - }, - { - "lang": "Go", - "source": "filterableAttributes := []interface{}{\n \"genres\",\n \"director\",\n AttributeRule{\n AttributePatterns: []string{\"tag\"}\n Features: AttributeFeatures{\n FacetSearch: false,\n Filter: FilterFeatures{\n Equality: true,\n Comparison: false,\n }\n }\n },\n map[string]interface{}{\n \"attributePatterns\": []interface{}{\"year\"}\n \"features\": map[string]interface{}{\n \"facetSearch\": false,\n \"filter\": map[string]interface{}{\n \"equality\": true,\n \"comparison\": true,\n }\n }\n }\n}\nclient.Index(\"movies\").UpdateFilterableAttributes(&filterableAttributes)" - }, - { - "lang": "JS", - "source": "client.index('movies')\n .updateFilterableAttributes([\n \"genres\",\n {\n attributePatterns: [\"genre\"],\n features: {\n facetSearch: true,\n filter: { equality: true, comparison: false },\n },\n }\n ])" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setFilterableAttributes(new String[] {\"genres\", \"director\"});\nclient.index(\"movies\").updateSettings(settings);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateFilterableAttributes([\n 'author',\n [\n 'attributePatterns' => ['genres'],\n 'features' => [\n 'facetSearch' => true,\n 'filter' => [\n 'equality' => true,\n 'comparison' => false,\n ],\n ],\n ],\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_filterable_attributes([\n 'genres',\n 'director'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_filterable_attributes([\n 'genres',\n 'director'\n])" - }, - { - "lang": "Rust", - "source": "let filterable_attributes = [\n \"genres\",\n \"director\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_filterable_attributes(&filterable_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").updateFilterableAttributes([\"genre\", \"director\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"genres\",\n \"director\",\n {\n \"attributePatterns\": [\"*_ratings\"],\n \"features\": {\n \"facetSearch\": false,\n \"filter\": {\n \"equality\": true,\n \"comparison\": false\n }\n }\n }\n ]'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset filterableAttributes", - "description": "Reset an index's filterableAttributes to its default value", - "operationId": "deletefilterableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FilterableAttributesRule" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "TaskInfo result = await client.Index(\"movies\").ResetFilterableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetFilterableAttributes();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetFilterableAttributes()" - }, - { - "lang": "JS", - "source": "client.index('movies').resetFilterableAttributes()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetFilterableAttributesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetFilterableAttributes();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_filterable_attributes()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_filterable_attributes" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_filterable_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").resetFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" - } - ] - } - }, - "/indexes/{indexUid}/settings/localized-attributes": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get localizedAttributes", - "description": "Get an user defined localizedAttributes", - "operationId": "getlocalizedAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "localizedAttributes is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LocalizedAttributesRuleView" - } - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.index(\"INDEX_NAME\").GetLocalizedAttributes()" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').getLocalizedAttributes()" - }, - { - "lang": "Java", - "source": "client.index(\"INDEX_NAME\").getLocalizedAttributesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->getLocalizedAttributes();" - }, - { - "lang": "Python", - "source": "client.index('INDEX_NAME').get_localized_attributes()" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').localized_attributes" - }, - { - "lang": "Rust", - "source": "let localized_attributes: Option> = client\n .index(\"books\")\n .get_localized_attributes()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update localizedAttributes", - "description": "Update an index's user defined localizedAttributes", - "operationId": "putlocalizedAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LocalizedAttributesRuleView" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.index(\"INDEX_NAME\").UpdateLocalizedAttributes([]*LocalizedAttributes{\n { AttributePatterns: [\"*_ja\"], Locales: [\"jpn\"] },\n})" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').updateLocalizedAttributes([\n { attributePatterns: ['*_ja'], locales: ['jpn'] },\n])" - }, - { - "lang": "Java", - "source": "LocalizedAttribute attribute = new LocalizedAttribute();\nattribute.setAttributePatterns(new String[] {\"jpn\"});\nattribute.setLocales(new String[] {\"*_ja\"});\n\nclient.index(\"INDEX_NAME\").updateLocalizedAttributesSettings(\n new LocalizedAttributes[] {attribute}\n);" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->updateLocalizedAttributes([\n 'locales' => ['jpn'],\n 'attributePatterns' => ['*_ja']\n]);" - }, - { - "lang": "Python", - "source": "client.index('INDEX_NAME').update_localized_attributes([\n {'attribute_patterns': ['*_ja'], 'locales': ['jpn']}\n])" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').update_localized_attributes([\n { attribute_patterns: ['*_ja'], locales: ['jpn'] },\n])" - }, - { - "lang": "Rust", - "source": "let localized_attributes = vec![LocalizedAttributes {\n locales: vec![\"jpn\".to_string()],\n attribute_patterns: vec![\"*_ja\".to_string()],\n}];\nlet task: TaskInfo = client\n .index(\"books\")\n .set_localized_attributes(&localizced_attributes)\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\"locales\": [\"jpn\"], \"attributePatterns\": [\"*_ja\"]}\n ]'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset localizedAttributes", - "description": "Reset an index's localizedAttributes to its default value", - "operationId": "deletelocalizedAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LocalizedAttributesRuleView" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.index(\"INDEX_NAME\").ResetLocalizedAttributes()" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').resetLocalizedAttributes()" - }, - { - "lang": "Java", - "source": "client.index(\"INDEX_NAME\").resetLocalizedAttributesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->resetLocalizedAttributes();" - }, - { - "lang": "Python", - "source": "client.index('INDEX_NAME').reset_localized_attributes()" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').reset_localized_attributes" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_localized_attributes()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" - } - ] - } - }, - "/indexes/{indexUid}/settings/non-separator-tokens": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get nonSeparatorTokens", - "description": "Get an user defined nonSeparatorTokens", - "operationId": "getnonSeparatorTokens", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "nonSeparatorTokens is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetNonSeparatorTokensAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").GetNonSeparatorTokens()" - }, - { - "lang": "JS", - "source": "client.index('books').getNonSeparatorTokens()" - }, - { - "lang": "Java", - "source": "client.index(\"articles\").getNonSeparatorTokensSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('articles')->getNonSeparatorTokens();" - }, - { - "lang": "Python", - "source": "client.index('articles').get_non_separator_tokens()" - }, - { - "lang": "Ruby", - "source": "client.index('articles').non_separator_tokens" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('articles')\n .get_non_separator_tokens()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").getNonSeparatorTokens { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update nonSeparatorTokens", - "description": "Update an index's user defined nonSeparatorTokens", - "operationId": "putnonSeparatorTokens", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateNonSeparatorTokensAsync(new[] { \"@\", \"#\" });" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").UpdateNonSeparatorTokens([]string{\n \"@\",\n \"#\",\n})" - }, - { - "lang": "JS", - "source": "client.index('books').updateNonSeparatorTokens(['@', '#'])" - }, - { - "lang": "Java", - "source": "String[] newSeparatorTokens = { \"@\", \"#\" };\nclient.index(\"articles\").updateNonSeparatorTokensSettings(newSeparatorTokens);" - }, - { - "lang": "PHP", - "source": "$client->index('articles')->updateNonSeparatorTokens(['@', '#']);" - }, - { - "lang": "Python", - "source": "client.index('articles').update_non_separator_tokens([\"@\", \"#\"])" - }, - { - "lang": "Ruby", - "source": "client.index('articles').update_non_separator_tokens(['@', '#'])" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('articles')\n .set_non_separator_tokens(&vec!['@'.to_string(), '#'.to_string()])\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").updateNonSeparatorTokens([\"@\", \"#\"]) { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"@\", \"#\"]'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset nonSeparatorTokens", - "description": "Reset an index's nonSeparatorTokens to its default value", - "operationId": "deletenonSeparatorTokens", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetNonSeparatorTokensAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").ResetNonSeparatorTokens()" - }, - { - "lang": "JS", - "source": "client.index('books').resetNonSeparatorTokens()" - }, - { - "lang": "Java", - "source": "client.index(\"articles\").resetNonSeparatorTokensSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('articles')->resetNonSeparatorTokens();" - }, - { - "lang": "Python", - "source": "client.index('articles').reset_non_separator_tokens()" - }, - { - "lang": "Ruby", - "source": "client.index('articles').reset_non_separator_tokens" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('articles')\n .reset_non_separator_tokens()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").resetNonSeparatorTokens { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" - } - ] - } - }, - "/indexes/{indexUid}/settings/pagination": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get pagination", - "description": "Get an user defined pagination", - "operationId": "getpagination", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "pagination is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationSettings" - }, - "example": {} - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetPaginationAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getPagination();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetPagination()" - }, - { - "lang": "JS", - "source": "client.index('books').getPagination()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").getPaginationSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->getPagination();" - }, - { - "lang": "Python", - "source": "client.index('books').get_pagination_settings()" - }, - { - "lang": "Ruby", - "source": "index('books').pagination" - }, - { - "lang": "Rust", - "source": "let pagination: PaginationSetting = client\n .index(\"books\")\n .get_pagination()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/pagination'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset pagination", - "description": "Reset an index's pagination to its default value", - "operationId": "deletepagination", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetPaginationAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetPagination();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetPagination()" - }, - { - "lang": "JS", - "source": "client.index('books').resetPagination()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").resetPaginationSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->resetPagination();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_pagination_settings()" - }, - { - "lang": "Ruby", - "source": "index('books').reset_pagination" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_pagination()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/pagination'" - } - ] - }, - "patch": { - "tags": [ - "Settings" - ], - "summary": "Update pagination", - "description": "Update an index's user defined pagination", - "operationId": "patchpagination", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "var pagination = new Pagination {\n MaxTotalHits = 20\n};\nawait client.Index(\"movies\").UpdatePaginationAsync(pagination);" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdatePagination(&meilisearch.Pagination{\n MaxTotalHits: 100,\n})" - }, - { - "lang": "JS", - "source": "client.index('books').updateSettings({ pagination: { maxTotalHits: 100 }})" - }, - { - "lang": "Java", - "source": "Pagination newPagination = new Pagination();\nnewPagination.setMaxTotalHits(100);\nclient.index(\"books\").updatePaginationSettings(newPagination);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateSettings([\n 'pagination' => [\n 'maxTotalHits' => 100\n ]\n]);" - }, - { - "lang": "Python", - "source": "client.index('books').update_pagination_settings({'maxTotalHits': 100})" - }, - { - "lang": "Ruby", - "source": "index('books').update_pagination({ max_total_hits: 100 })" - }, - { - "lang": "Rust", - "source": "let pagination = PaginationSetting {max_total_hits:100};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_pagination(pagination)\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/pagination' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxTotalHits\": 100\n }'" - } - ] - } - }, - "/indexes/{indexUid}/settings/prefix-search": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get prefixSearch", - "description": "Get an user defined prefixSearch", - "operationId": "getprefixSearch", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "prefixSearch is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PrefixSearchSettings" - }, - "example": "indexingTime" - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.Index(\"books\").GetPrefixSearch()" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').getPrefixSearch();" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->getPrefixSearch();" - }, - { - "lang": "Python", - "source": "client.index('books').get_prefix_search()" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_UID').prefix_search" - }, - { - "lang": "Rust", - "source": "let prefix_search: PrefixSearchSettings = client\n .index(INDEX_UID)\n .get_prefix_search()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update prefixSearch", - "description": "Update an index's user defined prefixSearch", - "operationId": "putprefixSearch", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PrefixSearchSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.Index(\"books\").UpdatePrefixSearch(\"disabled\")" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').updatePrefixSearch('disabled');" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->updatePrefixSearch('disabled');" - }, - { - "lang": "Python", - "source": "client.index('books').update_prefix_search(PrefixSearch.DISABLED)" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_UID').update_prefix_search('disabled')" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_prefix_search(PrefixSearchSettings::Disabled)\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"disabled\"'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset prefixSearch", - "description": "Reset an index's prefixSearch to its default value", - "operationId": "deleteprefixSearch", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PrefixSearchSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.Index(\"books\").ResetPrefixSearch()" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').resetPrefixSearch();" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->resetPrefixSearch();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_prefix_search()" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_UID').reset_prefix_search" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_prefix_search()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" - } - ] - } - }, - "/indexes/{indexUid}/settings/proximity-precision": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get proximityPrecision", - "description": "Get an user defined proximityPrecision", - "operationId": "getproximityPrecision", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "proximityPrecision is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProximityPrecisionView" - }, - "example": "byWord" - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"books\").GetProximityPrecisionAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetProximityPrecision()" - }, - { - "lang": "JS", - "source": "client.index('books').getProximityPrecision()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").getProximityPrecisionSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->getProximityPrecision();" - }, - { - "lang": "Python", - "source": "client.index('books').get_proximity_precision()" - }, - { - "lang": "Ruby", - "source": "client.index('books').proximity_precision" - }, - { - "lang": "Rust", - "source": "let proximity_precision: String = client\n .index(\"books\")\n .get_proximity_precision()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let precisionValue = try await self.client.index(\"books\").getProximityPrecision()" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update proximityPrecision", - "description": "Update an index's user defined proximityPrecision", - "operationId": "putproximityPrecision", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProximityPrecisionView" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"books\").UpdateProximityPrecisionAsync(\"byAttribute\");" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateProximityPrecision(ByAttribute)" - }, - { - "lang": "JS", - "source": "client.index('books').updateProximityPrecision('byAttribute')" - }, - { - "lang": "Java", - "source": "client.index(\"books\").updateProximityPrecisionSettings(\"byAttribute\");" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateProximityPrecision('byAttribute');" - }, - { - "lang": "Python", - "source": "client.index('books').update_proximity_precision(ProximityPrecision.BY_ATTRIBUTE)" - }, - { - "lang": "Ruby", - "source": "client.index('books').update_proximity_precision('byAttribute')" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .set_proximity_precision(\"byAttribute\".to_string())\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let task = try await self.client.index(\"books\").updateProximityPrecision(.byWord)" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/proximity-precision' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"byAttribute\"'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset proximityPrecision", - "description": "Reset an index's proximityPrecision to its default value", - "operationId": "deleteproximityPrecision", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProximityPrecisionView" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"books\").ResetProximityPrecisionAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetProximityPrecision()" - }, - { - "lang": "JS", - "source": "client.index('books').resetProximityPrecision()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").resetProximityPrecisionSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->resetProximityPrecision();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_proximity_precision()" - }, - { - "lang": "Ruby", - "source": "client.index('books').reset_proximity_precision" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_proximity_precision()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let task = try await self.client.index(\"books\").resetProximityPrecision()" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" - } - ] - } - }, - "/indexes/{indexUid}/settings/ranking-rules": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get rankingRules", - "description": "Get an user defined rankingRules", - "operationId": "getrankingRules", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "rankingRules is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RankingRuleView" - } - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetRankingRulesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getRankingRules();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetRankingRules()" - }, - { - "lang": "JS", - "source": "client.index('movies').getRankingRules()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getRankingRulesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getRankingRules();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_ranking_rules()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').ranking_rules" - }, - { - "lang": "Rust", - "source": "let ranking_rules: Vec = client\n .index(\"movies\")\n .get_ranking_rules()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getRankingRules { (result) in\n switch result {\n case .success(let rankingRules):\n print(rankingRules)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update rankingRules", - "description": "Update an index's user defined rankingRules", - "operationId": "putrankingRules", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RankingRuleView" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateRankingRulesAsync(new[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});" - }, - { - "lang": "Go", - "source": "rankingRules := []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\",\n}\nclient.Index(\"movies\").UpdateRankingRules(&rankingRules)" - }, - { - "lang": "JS", - "source": "client.index('movies').updateRankingRules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setRankingRules(new String[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});\nclient.index(\"movies\").updateSettings(settings);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateRankingRules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_ranking_rules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_ranking_rules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" - }, - { - "lang": "Rust", - "source": "let ranking_rules = [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\",\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_ranking_rules(&ranking_rules)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let rankingRules: [String] = [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n]\nclient.index(\"movies\").updateRankingRules(rankingRules) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n ]'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset rankingRules", - "description": "Reset an index's rankingRules to its default value", - "operationId": "deleterankingRules", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RankingRuleView" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetRankingRulesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetRankingRules();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetRankingRules()" - }, - { - "lang": "JS", - "source": "client.index('movies').resetRankingRules()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetRankingRulesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetRankingRules();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_ranking_rules()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_ranking_rules" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_ranking_rules()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").resetRankingRules { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" - } - ] - } - }, - "/indexes/{indexUid}/settings/search-cutoff-ms": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get searchCutoffMs", - "description": "Get an user defined searchCutoffMs", - "operationId": "getsearchCutoffMs", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "searchCutoffMs is returned", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - }, - "example": 0 - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "var searchCutoff = await client.Index(\"movies\").GetSearchCutoffMsAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSearchCutoffMs()" - }, - { - "lang": "JS", - "source": "client.index('movies').getSearchCutoffMs()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getSearchCutoffMsSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getSearchCutoffMs();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_search_cutoff_ms()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search_cutoff_ms" - }, - { - "lang": "Rust", - "source": "let search_cutoff_ms: String = client\n .index(\"movies\")\n .get_search_cutoff_ms()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let precisionValue = try await self.client.index(\"books\").getSearchCutoffMs()" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update searchCutoffMs", - "description": "Update an index's user defined searchCutoffMs", - "operationId": "putsearchCutoffMs", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSearchCutoffMsAsync(150);" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateSearchCutoffMs(150)" - }, - { - "lang": "JS", - "source": "client.index('movies').updateSearchCutoffMs(150)" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateSearchCutoffMsSettings(150);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateSearchCutoffMs(150);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_search_cutoff_ms(150)" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_search_cutoff_ms(150)" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .set_search_cutoff_ms(Some(150))\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let task = try await self.client.index(\"books\").updateSearchCutoffMs(150)" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '150'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset searchCutoffMs", - "description": "Reset an index's searchCutoffMs to its default value", - "operationId": "deletesearchCutoffMs", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSearchCutoffMsAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetSearchCutoffMs()" - }, - { - "lang": "JS", - "source": "client.index('movies').resetSearchCutoffMs()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetSearchCutoffMsSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetSearchCutoffMs();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_search_cutoff_ms()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_search_cutoff_ms" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_search_cutoff_ms()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let task = try await self.client.index(\"books\").resetSearchCutoffMs()" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" - } - ] - } - }, - "/indexes/{indexUid}/settings/searchable-attributes": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get searchableAttributes", - "description": "Get an user defined searchableAttributes", - "operationId": "getsearchableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "searchableAttributes is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSearchableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getSearchableAttributes();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSearchableAttributes()" - }, - { - "lang": "JS", - "source": "client.index('movies').getSearchableAttributes()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getSearchableAttributesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getSearchableAttributes();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_searchable_attributes()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').searchable_attributes" - }, - { - "lang": "Rust", - "source": "let searchable_attributes: Vec = client\n .index(\"movies\")\n .get_searchable_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getSearchableAttributes { (result) in\n switch result {\n case .success(let searchableAttributes):\n print(searchableAttributes)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update searchableAttributes", - "description": "Update an index's user defined searchableAttributes", - "operationId": "putsearchableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSearchableAttributesAsync(new[] {\"title\", \"overview\", \"genres\"});" - }, - { - "lang": "Go", - "source": "searchableAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n}\nclient.Index(\"movies\").UpdateSearchableAttributes(&searchableAttributes)" - }, - { - "lang": "JS", - "source": "client.index('movies').updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n])" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateSearchableAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\"\n});" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" - }, - { - "lang": "Rust", - "source": "let searchable_attributes = [\n \"title\",\n \"overview\",\n \"genres\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_searchable_attributes(&searchable_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let searchableAttributes: [String] = [\"title\", \"overview\", \"genres\"]\nclient.index(\"movies\").updateSearchableAttributes(searchableAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\"\n ]'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset searchableAttributes", - "description": "Reset an index's searchableAttributes to its default value", - "operationId": "deletesearchableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSearchableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetSearchableAttributes();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetSearchableAttributes()" - }, - { - "lang": "JS", - "source": "client.index('movies').resetSearchableAttributes()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetSearchableAttributesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetSearchableAttributes();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_searchable_attributes()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_searchable_attributes" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_searchable_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").resetSearchableAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" - } - ] - } - }, - "/indexes/{indexUid}/settings/separator-tokens": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get separatorTokens", - "description": "Get an user defined separatorTokens", - "operationId": "getseparatorTokens", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "separatorTokens is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSeparatorTokensAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").GetSeparatorTokens()" - }, - { - "lang": "JS", - "source": "client.index('books').getSeparatorTokens()" - }, - { - "lang": "Java", - "source": "client.index(\"articles\").getSeparatorTokensSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('articles')->getSeparatorTokens();" - }, - { - "lang": "Python", - "source": "client.index('articles').get_separator_tokens()" - }, - { - "lang": "Ruby", - "source": "client.index('articles').separator_tokens" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('articles')\n .get_separator_tokens()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").getSeparatorTokens { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update separatorTokens", - "description": "Update an index's user defined separatorTokens", - "operationId": "putseparatorTokens", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSeparatorTokensAsync(new[] { \"|\", \"…\" });" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").UpdateSeparatorTokens([]string{\n \"|\",\n \"…\",\n})" - }, - { - "lang": "JS", - "source": "client.index('books').updateSeparatorTokens(['|', '…'])" - }, - { - "lang": "Java", - "source": "String[] newSeparatorTokens = { \"|\", \"…\" };\nclient.index(\"articles\").updateSeparatorTokensSettings(newSeparatorTokens);" - }, - { - "lang": "PHP", - "source": "$client->index('articles')->updateSeparatorTokens(['|', '…']);" - }, - { - "lang": "Python", - "source": "client.index('articles').update_separator_tokens([\"|\", \"…\"])" - }, - { - "lang": "Ruby", - "source": "client.index('articles').update_separator_tokens(['|', '…'])" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('articles')\n .set_separator_tokens(&vec!['|'.to_string(), '…'.to_string()])\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").updateSeparatorTokens([\"|\", \"…\"]) { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"|\", \"…\"]'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset separatorTokens", - "description": "Reset an index's separatorTokens to its default value", - "operationId": "deleteseparatorTokens", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSeparatorTokensAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").ResetSeparatorTokens()" - }, - { - "lang": "JS", - "source": "client.index('books').resetSeparatorTokens()" - }, - { - "lang": "Java", - "source": "client.index(\"articles\").resetSeparatorTokensSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('articles')->resetSeparatorTokens();" - }, - { - "lang": "Python", - "source": "client.index('articles').reset_separator_tokens()" - }, - { - "lang": "Ruby", - "source": "client.index('articles').reset_separator_tokens" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('articles')\n .reset_separator_tokens()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").resetSeparatorTokens { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" - } - ] - } - }, - "/indexes/{indexUid}/settings/sortable-attributes": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get sortableAttributes", - "description": "Get an user defined sortableAttributes", - "operationId": "getsortableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "sortableAttributes is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"books\").GetSortableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('books').getSortableAttributes();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetSortableAttributes()" - }, - { - "lang": "JS", - "source": "client.index('books').getSortableAttributes()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").getSortableAttributesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->getSortableAttributes();" - }, - { - "lang": "Python", - "source": "client.index('books').get_sortable_attributes()" - }, - { - "lang": "Ruby", - "source": "client.index('books').sortable_attributes" - }, - { - "lang": "Rust", - "source": "let sortable_attributes: Vec = client\n .index(\"books\")\n .get_sortable_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").getSortableAttributes { (result: Result, Swift.Error>) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update sortableAttributes", - "description": "Update an index's user defined sortableAttributes", - "operationId": "putsortableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"books\").UpdateSortableAttributesAsync(new [] { \"price\", \"author\" });" - }, - { - "lang": "Go", - "source": "sortableAttributes := []string{\n \"price\",\n \"author\",\n}\nclient.Index(\"books\").UpdateSortableAttributes(&sortableAttributes)" - }, - { - "lang": "JS", - "source": "client.index('books')\n .updateSortableAttributes([\n 'price',\n 'author'\n ])" - }, - { - "lang": "Java", - "source": "client.index(\"books\").updateSortableAttributesSettings(new String[] {\"price\", \"author\"});" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateSortableAttributes([\n 'price',\n 'author'\n]);" - }, - { - "lang": "Python", - "source": "client.index('books').update_sortable_attributes([\n 'price',\n 'author'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('books').update_sortable_attributes([\n 'price',\n 'author'\n])" - }, - { - "lang": "Rust", - "source": "let sortable_attributes = [\n \"price\",\n \"author\"\n];\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_sortable_attributes(&sortable_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").updateSortableAttributes([\"price\", \"author\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"price\",\n \"author\"\n ]'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset sortableAttributes", - "description": "Reset an index's sortableAttributes to its default value", - "operationId": "deletesortableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"books\").ResetSortableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('books').resetSortableAttributes();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetSortableAttributes()" - }, - { - "lang": "JS", - "source": "client.index('books').resetSortableAttributes()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").resetSortableAttributesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->resetSortableAttributes();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_sortable_attributes()" - }, - { - "lang": "Ruby", - "source": "client.index('books').reset_sortable_attributes" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_sortable_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").resetSortableAttributes() { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" - } - ] - } - }, - "/indexes/{indexUid}/settings/stop-words": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get stopWords", - "description": "Get an user defined stopWords", - "operationId": "getstopWords", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "stopWords is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetStopWordsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getStopWords();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetStopWords()" - }, - { - "lang": "JS", - "source": "client.index('movies').getStopWords()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getStopWordsSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getStopWords();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_stop_words()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').stop_words" - }, - { - "lang": "Rust", - "source": "let stop_words: Vec = client\n .index(\"movies\")\n .get_stop_words()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getStopWords { (result) in\n switch result {\n case .success(let stopWords):\n print(stopWords)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update stopWords", - "description": "Update an index's user defined stopWords", - "operationId": "putstopWords", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateStopWordsAsync(new[] {\"of\", \"the\", \"to\"});" - }, - { - "lang": "Dart", - "source": "await client.index('movies').updateStopWords(['of', 'the', 'to']);" - }, - { - "lang": "Go", - "source": "stopWords := []string{\"of\", \"the\", \"to\"}\nclient.Index(\"movies\").UpdateStopWords(&stopWords)" - }, - { - "lang": "JS", - "source": "client.index('movies').updateStopWords(['of', 'the', 'to'])" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateStopWordsSettings(new String[] {\"of\", \"the\", \"to\"});" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateStopWords(['the', 'of', 'to']);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_stop_words(['of', 'the', 'to'])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_stop_words(['of', 'the', 'to'])" - }, - { - "lang": "Rust", - "source": "let stop_words = [\"of\", \"the\", \"to\"];\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_stop_words(&stop_words)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let stopWords: [String] = [\"of\", \"the\", \"to\"]\nclient.index(\"movies\").updateStopWords(stopWords) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/stop-words' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"the\",\n \"of\",\n \"to\"\n ]'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset stopWords", - "description": "Reset an index's stopWords to its default value", - "operationId": "deletestopWords", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetStopWordsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetStopWords();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetStopWords()" - }, - { - "lang": "JS", - "source": "client.index('movies').resetStopWords()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetStopWordsSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetStopWords();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_stop_words()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_stop_words" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_stop_words()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").resetStopWords { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" - } - ] - } - }, - "/indexes/{indexUid}/settings/synonyms": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get synonyms", - "description": "Get an user defined synonyms", - "operationId": "getsynonyms", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "synonyms is returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - } - }, - "example": {} - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSynonymsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getSynonyms();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSynonyms()" - }, - { - "lang": "JS", - "source": "client.index('movies').getSynonyms()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getSynonymsSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getSynonyms();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_synonyms()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').synonyms" - }, - { - "lang": "Rust", - "source": "let synonyms: HashMap> = client\n .index(\"movies\")\n .get_synonyms()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getSynonyms { (result) in\n switch result {\n case .success(let synonyms):\n print(synonyms)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update synonyms", - "description": "Update an index's user defined synonyms", - "operationId": "putsynonyms", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "var synonyms = new Dictionary>\n{\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\", \"xmen\" } },\n { \"wow\", new string[] { \"world of warcraft\" } }\n};\nawait client.Index(\"movies\").UpdateSynonymsAsync(synonyms);" - }, - { - "lang": "Go", - "source": "synonyms := map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\", \"xmen\"},\n \"wow\": []string{\"world of warcraft\"},\n}\nclient.Index(\"movies\").UpdateSynonyms(&synonyms)" - }, - { - "lang": "JS", - "source": "client.index('movies').updateSynonyms({\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine', 'xmen'],\n wow: ['world of warcraft']\n})" - }, - { - "lang": "Java", - "source": "HashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nclient.index(\"movies\").updateSynonymsSettings(synonyms);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateSynonyms([\n 'wolverine' => ['xmen', 'logan'],\n 'logan' => ['wolverine', 'xmen'],\n 'wow' => ['world of warcraft']\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_synonyms({\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine', 'xmen'],\n 'wow': ['world of warcraft']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_synonyms({\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine', 'xmen'],\n wow: ['world of warcraft']\n})" - }, - { - "lang": "Rust", - "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"wolverine\"), vec![String::from(\"xmen\"), String::from(\"logan\")]);\nsynonyms.insert(String::from(\"logan\"), vec![String::from(\"xmen\"), String::from(\"wolverine\")]);\nsynonyms.insert(String::from(\"wow\"), vec![String::from(\"world of warcraft\")]);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_synonyms(&synonyms)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let synonyms: [String: [String]] = [\n \"wolverine\": [\"xmen\", \"logan\"],\n \"logan\": [\"wolverine\", \"xmen\"],\n \"wow\": [\"world of warcraft\"]\n]\nclient.index(\"movies\").updateSynonyms(synonyms) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/synonyms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\n \"wolverine\",\n \"xmen\"\n ],\n \"wow\": [\"world of warcraft\"]\n }'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset synonyms", - "description": "Reset an index's synonyms to its default value", - "operationId": "deletesynonyms", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSynonymsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetSynonyms();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetSynonyms()" - }, - { - "lang": "JS", - "source": "client.index('movies').resetSynonyms()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetSynonymsSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetSynonyms();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_synonyms()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_synonyms" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_synonyms()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").resetSynonyms { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" - } - ] - } - }, - "/indexes/{indexUid}/settings/typo-tolerance": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get typoTolerance", - "description": "Get an user defined typoTolerance", - "operationId": "gettypoTolerance", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "typoTolerance is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TypoSettings" - }, - "example": {} - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "Dart", - "source": "await client.index('books').getTypoTolerance();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetTypoTolerance()" - }, - { - "lang": "JS", - "source": "client.index('books').getTypoTolerance()" - }, - { - "lang": "PHP", - "source": "$client->index('books')->getTypoTolerance();" - }, - { - "lang": "Python", - "source": "client.index('books').get_typo_tolerance()" - }, - { - "lang": "Ruby", - "source": "index('books').typo_tolerance" - }, - { - "lang": "Rust", - "source": "let typo_tolerance: TypoToleranceSettings = client\n .index(\"books\")\n .get_typo_tolerance()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset typoTolerance", - "description": "Reset an index's typoTolerance to its default value", - "operationId": "deletetypoTolerance", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TypoSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"books\").ResetTypoToleranceAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('books').resetTypoTolerance();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetTypoTolerance()" - }, - { - "lang": "JS", - "source": "client.index('books').resetTypoTolerance()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").resetTypoToleranceSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->resetTypoTolerance();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_typo_tolerance()" - }, - { - "lang": "Ruby", - "source": "index('books').reset_typo_tolerance" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_typo_tolerance()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" - } - ] - }, - "patch": { - "tags": [ - "Settings" - ], - "summary": "Update typoTolerance", - "description": "Update an index's user defined typoTolerance", - "operationId": "patchtypoTolerance", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TypoSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "var typoTolerance = new TypoTolerance {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeTypos = new TypoTolerance.TypoSize {\n OneTypo = 4,\n TwoTypos = 10\n }\n};\n\nawait client.Index(\"books\").UpdateTypoToleranceAsync(typoTolerance);" - }, - { - "lang": "Dart", - "source": "final toUpdate = TypoTolerance(\n minWordSizeForTypos: MinWordSizeForTypos(\n oneTypo: 4,\n twoTypos: 10,\n ),\n disableOnAttributes: ['title'],\n);\nawait client.index('books').updateTypoTolerance(toUpdate);" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 4,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n})" - }, - { - "lang": "JS", - "source": "client.index('books').updateTypoTolerance({\n minWordSizeForTypos: {\n oneTypo: 4,\n twoTypos: 10\n },\n disableOnAttributes: [\n 'title'\n ]\n})" - }, - { - "lang": "Java", - "source": "TypoTolerance typoTolerance = new TypoTolerance();\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 4);\n put(\"twoTypos\", 10);\n }\n };\n\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\ntypoTolerance.setDisableOnAttributes(new String[] {\"title\"});\n\nclient.index(\"books\").updateTypoToleranceSettings(typoTolerance);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateTypoTolerance([\n 'minWordSizeForTypos' => [\n 'oneTypo' => 4,\n 'twoTypos' => 10\n ],\n 'disableOnAttributes' => [\n 'title'\n ]\n]);" - }, - { - "lang": "Python", - "source": "client.index('books').update_typo_tolerance({\n 'minWordSizeForTypos': {\n 'oneTypo': 4,\n 'twoTypos': 10\n },\n 'disableOnAttributes': [\n 'title'\n ]\n})" - }, - { - "lang": "Ruby", - "source": "index('books').update_typo_tolerance({\n min_word_size_for_typos: {\n one_typo: 4,\n two_typos: 10\n },\n disable_on_attributes: ['title']\n})" - }, - { - "lang": "Rust", - "source": "let typo_tolerance = TypoToleranceSettings {\n enabled: Some(false),\n disable_on_attributes: None,\n disable_on_words: None,\n min_word_size_for_typos: None,\n};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"minWordSizeForTypos\": {\n \"oneTypo\": 4,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n }'" - } - ] - } - }, - "/indexes/{indexUid}/settings/vector-store": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get vectorStore", - "description": "Get an user defined vectorStore", - "operationId": "getvectorStore", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "vectorStore is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VectorStoreBackend" - }, - "example": "stable" - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset vectorStore", - "description": "Reset an index's vectorStore to its default value", - "operationId": "deletevectorStore", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VectorStoreBackend" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store'" - } - ] - }, - "patch": { - "tags": [ - "Settings" - ], - "summary": "Update vectorStore", - "description": "Update an index's user defined vectorStore", - "operationId": "patchvectorStore", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VectorStoreBackend" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"experimental\"'" - } - ] - } - }, - "/indexes/{indexUid}/similar": { - "get": { - "tags": [ - "Similar documents" - ], - "summary": "Get similar documents with GET", - "description": "Retrieve documents similar to a specific search result.", - "operationId": "similar_get", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - }, - { - "name": "id", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "offset", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "default": 0, - "minimum": 0 - } - }, - { - "name": "limit", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "default": 20, - "minimum": 0 - } - }, - { - "name": "attributes_to_retrieve", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "retrieve_vectors", - "in": "query", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "filter", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "show_ranking_score", - "in": "query", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "show_ranking_score_details", - "in": "query", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "ranking_score_threshold", - "in": "query", - "required": false, - "schema": { - "type": "number", - "format": "float" - } - }, - { - "name": "embedder", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The documents are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SimilarResult" - }, - "example": { - "hits": [ - { - "id": 2770, - "title": "American Pie 2", - "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", - "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", - "release_date": 997405200 - }, - { - "id": 190859, - "title": "American Sniper", - "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", - "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", - "release_date": 1418256000 - } - ], - "offset": 0, - "limit": 2, - "estimatedTotalHits": 976, - "processingTimeMs": 35, - "query": "american " - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/similar?id=TARGET_DOCUMENT_ID&embedder=EMBEDDER_NAME'" - } - ] - }, - "post": { - "tags": [ - "Similar documents" - ], - "summary": "Get similar documents with POST", - "description": "Retrieve documents similar to a specific search result.", - "operationId": "similar_post", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SimilarQuery" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "The documents are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SimilarResult" - }, - "example": { - "hits": [ - { - "id": 2770, - "title": "American Pie 2", - "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", - "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", - "release_date": 997405200 - }, - { - "id": 190859, - "title": "American Sniper", - "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", - "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", - "release_date": 1418256000 - } - ], - "offset": 0, - "limit": 2, - "estimatedTotalHits": 976, - "processingTimeMs": 35, - "query": "american " - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "resp := new(meilisearch.SimilarDocumentResult)\nclient.Index(\"INDEX_NAME\").SearchSimilarDocuments(&meilisearch.SimilarDocumentQuery{\n Id: \"TARGET_DOCUMENT_ID\",\n Embedder: \"default\",\n}, resp)" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').searchSimilarDocuments({ id: 'TARGET_DOCUMENT_ID', embedder: 'default' })" - }, - { - "lang": "PHP", - "source": "$similarQuery = new SimilarDocumentsQuery('TARGET_DOCUMENT_ID', 'default');\n$client->index('INDEX_NAME')->searchSimilarDocuments($similarQuery);" - }, - { - "lang": "Python", - "source": "client.index(\"INDEX_NAME\").get_similar_documents({\"id\": \"TARGET_DOCUMENT_ID\", \"embedder\": \"default\"})" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').search_similar_documents('TARGET_DOCUMENT_ID', embedder: 'default')" - }, - { - "lang": "Rust", - "source": "let results = index\n .similar_search(\"TARGET_DOCUMENT_ID\", \"EMBEDDER_NAME\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/similar' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"id\": TARGET_DOCUMENT_ID,\n \"embedder\": \"EMBEDDER_NAME\"\n }'" - } - ] - } - }, - "/indexes/{indexUid}/stats": { - "get": { - "tags": [ - "Stats" - ], - "summary": "Get stats of index", - "description": "Get the stats of an index.", - "operationId": "get_index_stats", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "The stats of the index", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IndexStats" - }, - "example": { - "numberOfDocuments": 10, - "rawDocumentDbSize": 10, - "avgDocumentSize": 10, - "numberOfEmbeddings": 10, - "numberOfEmbeddedDocuments": 10, - "isIndexing": true, - "fieldDistribution": { - "genre": 10, - "author": 9 - } - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "stats.get", - "stats.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetStatsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getStats();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetStats()" - }, - { - "lang": "JS", - "source": "client.index('movies').getStats()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getStats();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->stats();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_stats()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').stats" - }, - { - "lang": "Rust", - "source": "let stats: IndexStats = client\n .index(\"movies\")\n .get_stats()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").stats { (result) in\n switch result {\n case .success(let stats):\n print(stats)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/stats'" - } - ] - } - }, - "/indexes{indexUid}/compact": { - "post": { - "tags": [ - "Compact an index" - ], - "summary": "Compact an index", - "operationId": "compact", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "202": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentDeletion", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ] - } - }, - "/keys": { - "get": { - "tags": [ - "Keys" - ], - "summary": "Get API Keys", - "description": "List all API Keys", - "operationId": "list_api_keys", - "parameters": [ - { - "name": "offset", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "default": 0, - "minimum": 0 - } - }, - { - "name": "limit", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "default": 20, - "minimum": 0 - } - } - ], - "responses": { - "202": { - "description": "List of keys", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationView_KeyView" - }, - "example": { - "results": [ - { - "uid": "01b4bc42-eb33-4041-b481-254d00cce834", - "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", - "name": "An API Key", - "description": null, - "actions": [ - "documents.add" - ], - "indexes": [ - "movies" - ], - "expiresAt": "2022-11-12T10:00:00Z", - "createdAt": "2021-11-12T10:00:00Z", - "updatedAt": "2021-11-12T10:00:00Z" - } - ], - "limit": 20, - "offset": 0, - "total": 1 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "keys.get", - "keys.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "ResourceResults keyResult = await client.GetKeysAsync(new KeysQuery { Limit = 3 });" - }, - { - "lang": "Dart", - "source": "await client.getKeys(params: KeysQuery(limit: 3));" - }, - { - "lang": "Go", - "source": "client.GetKeys(&meilisearch.KeysQuery{\n Limit: 3\n});" - }, - { - "lang": "JS", - "source": "client.getKeys({ limit: 3 })" - }, - { - "lang": "Java", - "source": "KeysQuery query = new KeysQuery().setLimit(3);\nclient.getKeys(query);" - }, - { - "lang": "PHP", - "source": "$client->getKeys((new KeysQuery())->setLimit(3));" - }, - { - "lang": "Python", - "source": "client.get_keys({'limit': 3})" - }, - { - "lang": "Ruby", - "source": "client.keys(limit: 3)" - }, - { - "lang": "Rust", - "source": "let mut query = KeysQuery::new()\n .with_limit(3)\n .execute(&client)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.getKeys(params: KeysQuery(limit: 3)) { result in\n switch result {\n case .success(let keys):\n print(keys)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys?limit=3' \\\n -H 'Authorization: Bearer MASTER_KEY'" - } - ] - }, - "post": { - "tags": [ - "Keys" - ], - "summary": "Create an API Key", - "description": "Create an API Key.", - "operationId": "create_api_key", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateApiKey" - } - } - }, - "required": true - }, - "responses": { - "202": { - "description": "Key has been created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/KeyView" - }, - "example": { - "uid": "01b4bc42-eb33-4041-b481-254d00cce834", - "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", - "name": "Indexing Products API key", - "description": null, - "actions": [ - "documents.add" - ], - "indexes": [ - "products" - ], - "expiresAt": "2021-11-13T00:00:00Z", - "createdAt": "2021-11-12T10:00:00Z", - "updatedAt": "2021-11-12T10:00:00Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "keys.create", - "keys.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "Key keyOptions = new Key\n{\n Description = \"Add documents: Products API key\",\n Actions = new KeyAction[] { KeyAction.DocumentsAdd },\n Indexes = new string[] { \"products\" },\n ExpiresAt = DateTime.Parse(\"2042-04-02T00:42:42Z\")\n};\nKey createdKey = await this.client.CreateKeyAsync(keyOptions);" - }, - { - "lang": "Go", - "source": "client.CreateKey(&meilisearch.Key{\n Description: \"Add documents: Products API key\",\n Actions: []string{\"documents.add\"},\n Indexes: []string{\"products\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" - }, - { - "lang": "JS", - "source": "client.createKey({\n description: 'Add documents: Products API key',\n actions: ['documents.add'],\n indexes: ['products'],\n expiresAt: '2021-11-13T00:00:00Z'\n})" - }, - { - "lang": "Java", - "source": "SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\nDate dateParsed = format.parse(\"2042-04-02T00:42:42Z\");\n\nKey keyInfo = new Key();\n\nkeyInfo.setDescription(\"Add documents: Products API key\");\nkeyInfo.setActions(new String[] {\"documents.add\"});\nkeyInfo.setIndexes(new String[] {\"products\"});\nkeyInfo.setExpiresAt(dateParsed);\n\nclient.createKey(keyInfo);" - }, - { - "lang": "PHP", - "source": "$client->createKey([\n 'description' => 'Add documents: Products API key',\n 'actions' => ['documents.add'],\n 'indexes' => ['products'],\n 'expiresAt' => '2042-04-02T00:42:42Z',\n]);" - }, - { - "lang": "Python", - "source": "client.create_key(options={\n 'description': 'Add documents: Products API key',\n 'actions': ['documents.add'],\n 'indexes': ['products'],\n 'expiresAt': '2042-04-02T00:42:42Z'\n})" - }, - { - "lang": "Ruby", - "source": "client.create_key(\n description: 'Add documents: Products API key',\n actions: ['documents.add'],\n indexes: ['products'],\n expires_at: '2042-04-02T00:42:42Z'\n)" - }, - { - "lang": "Rust", - "source": "let mut key_options = KeyBuilder::new();\nkey_options\n .with_name(\"Add documents: Products API key\")\n .with_action(Action::DocumentsAdd)\n .with_expires_at(time::macros::datetime!(2042 - 04 - 02 00:42:42 UTC))\n .with_index(\"products\");\nlet new_key = client\n .create_key(key_options)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let keyParams = KeyParams(\n description: \"Add documents: Products API key\",\n actions: [\"documents.add\"],\n indexes: [\"products\"],\n expiresAt: \"2042-04-02T00:42:42Z\"\n)\nclient.createKey(keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/keys' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"description\": \"Add documents: Products API key\",\n \"actions\": [\"documents.add\"],\n \"indexes\": [\"products\"],\n \"expiresAt\": \"2042-04-02T00:42:42Z\"\n }'" - } - ] - } - }, - "/keys/{uidOrKey}": { - "get": { - "tags": [ - "Keys" - ], - "summary": "Get an API Key", - "description": "Get an API key from its `uid` or its `key` field.", - "operationId": "get_api_key", - "parameters": [ - { - "name": "uidOrKey", - "in": "path", - "description": "The `uid` or `key` field of an existing API key", - "required": true, - "schema": { - "type": "string", - "format": "password" - }, - "example": "7b198a7f-52a0-4188-8762-9ad93cd608b2" - } - ], - "responses": { - "200": { - "description": "The key is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/KeyView" - }, - "example": { - "uid": "01b4bc42-eb33-4041-b481-254d00cce834", - "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", - "name": "An API Key", - "description": null, - "actions": [ - "documents.add" - ], - "indexes": [ - "movies" - ], - "expiresAt": "2022-11-12T10:00:00Z", - "createdAt": "2021-11-12T10:00:00Z", - "updatedAt": "2021-11-12T10:00:00Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "keys.get", - "keys.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "Key key = await client.GetKeyAsync(\"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4\");" - }, - { - "lang": "Dart", - "source": "await client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" - }, - { - "lang": "Go", - "source": "client.GetKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" - }, - { - "lang": "JS", - "source": "client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" - }, - { - "lang": "Java", - "source": "client.getKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\");" - }, - { - "lang": "PHP", - "source": "$client->getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" - }, - { - "lang": "Python", - "source": "client.get_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" - }, - { - "lang": "Ruby", - "source": "client.key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" - }, - { - "lang": "Rust", - "source": "let key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.getKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" - } - ] - }, - "delete": { - "tags": [ - "Keys" - ], - "summary": "Delete a key", - "description": "Delete the specified API key.", - "operationId": "delete_api_key", - "parameters": [ - { - "name": "uidOrKey", - "in": "path", - "description": "The `uid` or `key` field of an existing API key", - "required": true, - "schema": { - "type": "string", - "format": "password" - }, - "example": "7b198a7f-52a0-4188-8762-9ad93cd608b2" - } - ], - "responses": { - "204": { - "description": "The key have been removed" - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "keys.delete", - "keys.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "client.DeleteKeyAsync(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" - }, - { - "lang": "Dart", - "source": "await client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" - }, - { - "lang": "Go", - "source": "client.DeleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" - }, - { - "lang": "JS", - "source": "client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" - }, - { - "lang": "Java", - "source": "client.deleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" - }, - { - "lang": "PHP", - "source": "$client->deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" - }, - { - "lang": "Python", - "source": "client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" - }, - { - "lang": "Ruby", - "source": "client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" - }, - { - "lang": "Rust", - "source": "let key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();\nclient\n .delete_key(&key)\n .await?;" - }, - { - "lang": "Swift", - "source": "client.deleteKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success:\n print(\"success\")\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" - } - ] - }, - "patch": { - "tags": [ - "Keys" - ], - "summary": "Update a Key", - "description": "Update the name and description of an API key.\nUpdates to keys are partial. This means you should provide only the fields you intend to update, as any fields not present in the payload will remain unchanged.", - "operationId": "patch_api_key", - "parameters": [ - { - "name": "uidOrKey", - "in": "path", - "description": "The `uid` or `key` field of an existing API key", - "required": true, - "schema": { - "type": "string", - "format": "password" - }, - "example": "7b198a7f-52a0-4188-8762-9ad93cd608b2" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchApiKey" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "The key have been updated", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/KeyView" - }, - "example": { - "uid": "01b4bc42-eb33-4041-b481-254d00cce834", - "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", - "name": "An API Key", - "description": null, - "actions": [ - "documents.add" - ], - "indexes": [ - "movies" - ], - "expiresAt": "2022-11-12T10:00:00Z", - "createdAt": "2021-11-12T10:00:00Z", - "updatedAt": "2021-11-12T10:00:00Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "keys.update", - "keys.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.UpdateKeyAsync(\n \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\",\n description: \"Manage documents: Products/Reviews API key\",\n name: \"Products/Reviews API key\"\n)" - }, - { - "lang": "Go", - "source": "client.UpdateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", &meilisearch.Key{\n Description: \"Manage documents: Products/Reviews API key\",\n Actions: []string{\"documents.add\", \"document.delete\"},\n Indexes: []string{\"products\", \"reviews\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" - }, - { - "lang": "JS", - "source": "client.updateKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d', {\n name: 'Products/Reviews API key',\n description: 'Manage documents: Products/Reviews API key',\n})" - }, - { - "lang": "Java", - "source": "KeyUpdate keyChanges = new KeyUpdate();\nkeyChanges.setName(\"Products/Reviews API key\");\nkeyChanges.setDescription(\"Manage documents: Products/Reviews API key\");\n\nclient.updateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", keyChanges);" - }, - { - "lang": "PHP", - "source": "$client->updateKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n [\n 'name' => 'Products/Reviews API key',\n 'description' => 'Manage documents: Products/Reviews API key'\n ]);" - }, - { - "lang": "Python", - "source": "client.update_key(key_or_uid='6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n options={\n 'name': 'Products/Reviews API key',\n 'description': 'Manage documents: Products/Reviews API key'\n})" - }, - { - "lang": "Ruby", - "source": "client.update_key(\n '6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n {\n description: 'Manage documents: Products/Reviews API key',\n name: 'Products/Reviews API key'\n }\n)" - }, - { - "lang": "Rust", - "source": "let mut key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();\nkey\n .with_description(\"Manage documents: Products/Reviews API key\".to_string())\n .with_name(\"Products/Reviews API key\".to_string())\n .update(&client)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let keyParams = KeyUpdateParams(\n description: \"Manage documents: Products/Reviews API key\",\n name: \"Products/Reviews API key\"\n)\n\nclient.updateKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", keyParams: keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"name\": \"Products/Reviews API key\",\n \"description\": \"Manage documents: Products/Reviews API key\"\n }'" - } - ] - } - }, - "/logs/stderr": { - "post": { - "tags": [ - "Logs" - ], - "summary": "Update target of the console logs", - "description": "This route lets you specify at runtime the level of the console logs outputted on stderr.", - "operationId": "update_stderr_target", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateStderrLogs" - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "The console logs have been updated" - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "metrics.get", - "metrics.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST MEILISEARCH_URL/logs/stderr \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"target\": \"milli=trace,index_scheduler=info,actix_web=off\"\n }'" - } - ] - } - }, - "/logs/stream": { - "post": { - "tags": [ - "Logs" - ], - "summary": "Retrieve logs", - "description": "Stream logs over HTTP. The format of the logs depends on the configuration specified in the payload.\nThe logs are sent as multi-part, and the stream never stops, so make sure your clients correctly handle that.\nTo make the server stop sending you logs, you can call the `DELETE /logs/stream` route.\n\nThere can only be one listener at a timeand an error will be returned if you call this route while it's being used by another client.", - "operationId": "get_logs", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetLogs" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Logs are being returned", - "content": { - "application/json": { - "schema": { - "type": "string" - }, - "example": "\n2024-10-08T13:35:02.643750Z WARN HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: tracing_actix_web::middleware: Error encountered while processing the incoming HTTP request: ResponseError { code: 400, message: \"Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625\", error_code: \"feature_not_enabled\", error_type: \"invalid_request\", error_link: \"https://docs.meilisearch.com/errors#feature_not_enabled\" }\n2024-10-08T13:35:02.644191Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: meilisearch: close time.busy=1.66ms time.idle=658µs\n2024-10-08T13:35:18.564152Z INFO HTTP request{method=PATCH host=\"localhost:7700\" route=/experimental-features query_parameters= user_agent=curl/8.6.0 status_code=200}: meilisearch: close time.busy=1.17ms time.idle=127µs\n2024-10-08T13:35:23.094987Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=200}: meilisearch: close time.busy=2.12ms time.idle=595µs\n" - } - } - }, - "400": { - "description": "The route is already being used", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The `/logs/stream` route is currently in use by someone else.", - "code": "bad_request", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#bad_request" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "metrics.get", - "metrics.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST MEILISEARCH_URL/logs/stream \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"mode\": \"human\",\n \"target\": \"index_scheduler=trace\"\n }'" - } - ] - }, - "delete": { - "tags": [ - "Logs" - ], - "summary": "Stop retrieving logs", - "description": "Call this route to make the engine stops sending logs through the `POST /logs/stream` route.", - "operationId": "cancel_logs", - "responses": { - "204": { - "description": "Logs are being returned" - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "metrics.get", - "metrics.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE MEILISEARCH_URL/logs/stream\n}'" - } - ] - } - }, - "/metrics": { - "get": { - "tags": [ - "Stats" - ], - "summary": "Get prometheus metrics", - "description": "Retrieve metrics on the engine. See https://www.meilisearch.com/docs/learn/experimental/metrics\nCurrently, [the feature is experimental](https://www.meilisearch.com/docs/learn/experimental/overview)\nwhich means it must be enabled.", - "operationId": "get_metrics", - "responses": { - "200": { - "description": "The metrics of the instance", - "content": { - "text/plain": { - "schema": { - "type": "string" - }, - "example": "\n# HELP meilisearch_db_size_bytes Meilisearch DB Size In Bytes\n# TYPE meilisearch_db_size_bytes gauge\nmeilisearch_db_size_bytes 1130496\n# HELP meilisearch_batch_running_progress_trace The currently running progress trace\n# TYPE meilisearch_batch_running_progress_trace gauge\nmeilisearch_batch_running_progress_trace{batch_uid=\"0\",step_name=\"document\"} 0.710618582519409\nmeilisearch_batch_running_progress_trace{batch_uid=\"0\",step_name=\"extracting word proximity\"} 0.2222222222222222\nmeilisearch_batch_running_progress_trace{batch_uid=\"0\",step_name=\"indexing\"} 0.6666666666666666\nmeilisearch_batch_running_progress_trace{batch_uid=\"0\",step_name=\"processing tasks\"} 0\n# HELP meilisearch_http_requests_total Meilisearch HTTP requests total\n# TYPE meilisearch_http_requests_total counter\nmeilisearch_http_requests_total{method=\"GET\",path=\"/metrics\",status=\"400\"} 1\nmeilisearch_http_requests_total{method=\"PATCH\",path=\"/experimental-features\",status=\"200\"} 1\n# HELP meilisearch_http_response_time_seconds Meilisearch HTTP response times\n# TYPE meilisearch_http_response_time_seconds histogram\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.005\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.01\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.025\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.05\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.075\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.25\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.75\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"2.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"7.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"10\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"+Inf\"} 0\nmeilisearch_http_response_time_seconds_sum{method=\"GET\",path=\"/metrics\"} 0\nmeilisearch_http_response_time_seconds_count{method=\"GET\",path=\"/metrics\"} 0\n# HELP meilisearch_last_finished_batches_progress_trace_ms The last few batches progress trace in milliseconds\n# TYPE meilisearch_last_finished_batches_progress_trace_ms gauge\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks\"} 19360\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks > computing document changes\"} 368\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks > computing document changes > preparing payloads\"} 367\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks > computing document changes > preparing payloads > payload\"} 367\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks > indexing\"} 18970\n# HELP meilisearch_index_count Meilisearch Index Count\n# TYPE meilisearch_index_count gauge\nmeilisearch_index_count 1\n# HELP meilisearch_index_docs_count Meilisearch Index Docs Count\n# TYPE meilisearch_index_docs_count gauge\nmeilisearch_index_docs_count{index=\"mieli\"} 2\n# HELP meilisearch_is_indexing Meilisearch Is Indexing\n# TYPE meilisearch_is_indexing gauge\nmeilisearch_is_indexing 0\n# HELP meilisearch_last_update Meilisearch Last Update\n# TYPE meilisearch_last_update gauge\nmeilisearch_last_update 1726675964\n# HELP meilisearch_nb_tasks Meilisearch Number of tasks\n# TYPE meilisearch_nb_tasks gauge\nmeilisearch_nb_tasks{kind=\"indexes\",value=\"mieli\"} 39\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"canceled\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"enqueued\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"failed\"} 4\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"processing\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"succeeded\"} 35\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentAdditionOrUpdate\"} 9\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentDeletion\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentEdition\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"dumpCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexDeletion\"} 8\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexSwap\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexUpdate\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"settingsUpdate\"} 22\nmeilisearch_nb_tasks{kind=\"types\",value=\"snapshotCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskCancelation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskDeletion\"} 0\n# HELP meilisearch_used_db_size_bytes Meilisearch Used DB Size In Bytes\n# TYPE meilisearch_used_db_size_bytes gauge\nmeilisearch_used_db_size_bytes 409600\n" - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "metrics.get", - "metrics.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/metrics'" - } - ] - } - }, - "/multi-search": { - "post": { - "tags": [ - "Multi-search" - ], - "summary": "Perform a multi-search", - "description": "Bundle multiple search queries in a single API request. Use this endpoint to search through multiple indexes at once.", - "operationId": "multi_search_with_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FederatedSearch" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Federated multi-search", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FederatedSearchResult" - }, - "example": { - "hits": [ - { - "id": 42, - "title": "Batman returns", - "overview": "The overview of batman returns", - "_federation": { - "indexUid": "movies", - "queriesPosition": 0 - } - }, - { - "comicsId": "batman-killing-joke", - "description": "This comic is really awesome", - "title": "Batman: the killing joke", - "_federation": { - "indexUid": "comics", - "queriesPosition": 1 - } - } - ], - "processingTimeMs": 0, - "limit": 20, - "offset": 0, - "estimatedTotalHits": 2, - "semanticHitCount": 0 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.MultiSearchAsync(new MultiSearchQuery()\n{\n Queries = new System.Collections.Generic.List()\n {\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"booh\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"nemo\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movie_ratings\",\n Q = \"us\",\n },\n }\n});" - }, - { - "lang": "Go", - "source": "client.MultiSearch(&MultiSearchRequest{\n Queries: []SearchRequest{\n {\n IndexUID: \"movies\",\n Query: \"pooh\",\n Limit: 5,\n },\n {\n IndexUID: \"movies\",\n Query: \"nemo\",\n Limit: 5,\n },\n {\n IndexUID: \"movie_ratings\",\n Query: \"us\",\n },\n },\n})" - }, - { - "lang": "JS", - "source": "client.multiSearch({ queries: [\n {\n indexUid: 'movies',\n q: 'pooh',\n limit: 5,\n },\n {\n indexUid: 'movies',\n q: 'nemo',\n limit: 5,\n },\n {\n indexUid: 'movie_ratings',\n q: 'us',\n },\n]})" - }, - { - "lang": "Java", - "source": "MultiSearchRequest multiSearchRequest = new MultiSearchRequest();\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"pooh\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"nemo\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movie_ratings\").setQuery(\"us\"));\n\nclient.multiSearch(multiSearchRequest);" - }, - { - "lang": "PHP", - "source": "$client->multiSearch([\n (new SearchQuery())\n ->setIndexUid('movies')\n ->setQuery('pooh')\n ->setLimit(5),\n (new SearchQuery())\n ->setIndexUid('movies')\n ->setQuery('nemo')\n ->setLimit(5),\n (new SearchQuery())\n ->setIndexUid('movie_ratings')\n ->setQuery('us')\n ]);" - }, - { - "lang": "Python", - "source": "client.multi_search(\n [\n {'indexUid': 'movies', 'q': 'pooh', 'limit': 5},\n {'indexUid': 'movies', 'q': 'nemo', 'limit': 5},\n {'indexUid': 'movie_ratings', 'q': 'us'}\n ]\n)" - }, - { - "lang": "Ruby", - "source": "client.multi_search([\n { index_uid: 'books', q: 'prince' },\n { index_uid: 'movies', q: 'pooh', limit: 5 }\n { index_uid: 'movies', q: 'nemo', limit: 5 }\n { index_uid: 'movie_ratings', q: 'us' }\n])" - }, - { - "lang": "Rust", - "source": "let movie = client.index(\"movie\");\nlet movie_ratings = client.index(\"movie_ratings\");\n\nlet search_query_1 = SearchQuery::new(&movie)\n .with_query(\"pooh\")\n .with_limit(5)\n .build();\nlet search_query_2 = SearchQuery::new(&movie)\n .with_query(\"nemo\")\n .with_limit(5)\n .build();\nlet search_query_3 = SearchQuery::new(&movie_ratings)\n .with_query(\"us\")\n .build();\n\nlet response = client\n .multi_search()\n .with_search_query(search_query_1)\n .with_search_query(search_query_2)\n .with_search_query(search_query_3)\n .execute::()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/multi-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"queries\": [\n {\n \"indexUid\": \"movies\",\n \"q\": \"pooh\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movies\",\n \"q\": \"nemo\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movie_ratings\",\n \"q\": \"us\"\n }\n ]\n }'" - } - ] - } - }, - "/network": { - "get": { - "tags": [ - "Network" - ], - "summary": "Get network topology", - "description": "Get a list of all Meilisearch instances currently known to this instance.", - "operationId": "get_network", - "responses": { - "200": { - "description": "Known nodes are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Network" - }, - "example": { - "self": "ms-0", - "remotes": { - "ms-0": { - "url": "http://localhost:7700", - "searchApiKey": null, - "writeApiKey": null - }, - "ms-1": { - "url": "http://localhost:7701", - "searchApiKey": "foo", - "writeApiKey": "bar" - }, - "ms-2": { - "url": "http://localhost:7702", - "searchApiKey": "bar", - "writeApiKey": "foo" - } - } - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "network.get", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/network'" - } - ] - }, - "patch": { - "tags": [ - "Network" - ], - "summary": "Configure Network", - "description": "Add or remove nodes from network.", - "operationId": "patch_network", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Network" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "New network state is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Network" - }, - "example": { - "self": "ms-0", - "remotes": { - "ms-0": { - "url": "http://localhost:7700", - "searchApiKey": null, - "writeApiKey": null - }, - "ms-1": { - "url": "http://localhost:7701", - "searchApiKey": "foo", - "writeApiKey": "bar" - }, - "ms-2": { - "url": "http://localhost:7702", - "searchApiKey": "bar", - "writeApiKey": "foo" - } - } - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "network.update", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/network' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"self\": \"ms-00\",\n \"remotes\": {\n \"ms-00\": {\n \"url\": \"http://INSTANCE_URL\",\n \"searchApiKey\": \"INSTANCE_API_KEY\"\n },\n \"ms-01\": {\n \"url\": \"http://ANOTHER_INSTANCE_URL\",\n \"searchApiKey\": \"ANOTHER_INSTANCE_API_KEY\"\n }\n }\n }'" - } - ] - } - }, - "/snapshots": { - "post": { - "tags": [ - "Snapshots" - ], - "summary": "Create a snapshot", - "description": "Triggers a snapshot creation process. Once the process is complete, a snapshot is created in the snapshot directory. If the snapshot directory does not exist yet, it will be created.", - "operationId": "create_snapshot", - "responses": { - "202": { - "description": "Snapshot is being created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 0, - "indexUid": null, - "status": "enqueued", - "type": "snapshotCreation", - "enqueuedAt": "2021-01-01T09:39:00.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "snapshots.create", - "snapshots.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.CreateSnapshotAsync();" - }, - { - "lang": "Go", - "source": "client.CreateSnapshot()" - }, - { - "lang": "JS", - "source": "client.createSnapshot()" - }, - { - "lang": "Java", - "source": "client.createSnapshot();" - }, - { - "lang": "PHP", - "source": "$client->createSnapshot();" - }, - { - "lang": "Python", - "source": "client.create_snapshot()" - }, - { - "lang": "Ruby", - "source": "client.create_snapshot" - }, - { - "lang": "Rust", - "source": "client\n .create_snapshot()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let task = try await self.client.createSnapshot()" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/snapshots'" - } - ] - } - }, - "/stats": { - "get": { - "tags": [ - "Stats" - ], - "summary": "Get stats of all indexes.", - "description": "Get stats of all indexes.", - "operationId": "get_stats", - "responses": { - "200": { - "description": "The stats of the instance", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Stats" - }, - "example": { - "databaseSize": 567, - "usedDatabaseSize": 456, - "lastUpdate": "2019-11-20T09:40:33.711324Z", - "indexes": { - "movies": { - "numberOfDocuments": 10, - "rawDocumentDbSize": 100, - "maxDocumentSize": 16, - "avgDocumentSize": 10, - "isIndexing": true, - "fieldDistribution": { - "genre": 10, - "author": 9 - } - } - } - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "stats.get", - "stats.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.GetStatsAsync();" - }, - { - "lang": "Dart", - "source": "await client.getStats();" - }, - { - "lang": "Go", - "source": "client.GetStats()" - }, - { - "lang": "JS", - "source": "client.getStats()" - }, - { - "lang": "Java", - "source": "client.getStats();" - }, - { - "lang": "PHP", - "source": "$client->stats();" - }, - { - "lang": "Python", - "source": "client.get_all_stats()" - }, - { - "lang": "Ruby", - "source": "client.stats" - }, - { - "lang": "Rust", - "source": "let stats: ClientStats = client\n .get_stats()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.allStats { (result) in\n switch result {\n case .success(let stats):\n print(stats)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/stats'" - } - ] - } - }, - "/swap-indexes": { - "post": { - "tags": [ - "Indexes" - ], - "summary": "Swap indexes", - "description": "Swap the documents, settings, and task history of two or more indexes. You can only swap indexes in pairs. However, a single request can swap as many index pairs as you wish.\nSwapping indexes is an atomic transaction: either all indexes are successfully swapped, or none are.\nSwapping indexA and indexB will also replace every mention of indexA by indexB and vice-versa in the task history. enqueued tasks are left unmodified.", - "operationId": "swap_indexes", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SwapIndexesPayload" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 3, - "indexUid": null, - "status": "enqueued", - "type": "indexSwap", - "enqueuedAt": "2021-08-12T10:00:00.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.SwapIndexesAsync(new List { new IndexSwap(\"indexA\", \"indexB\"), new IndexSwap(\"indexX\", \"indexY\") } });" - }, - { - "lang": "Go", - "source": "client.SwapIndexes([]SwapIndexesParams{\n {Indexes: []string{\"indexA\", \"indexB\"}},\n {Indexes: []string{\"indexX\", \"indexY\"}},\n})" - }, - { - "lang": "JS", - "source": "client.swapIndexes([\n { 'indexes': ['indexA', 'indexB'] },\n { 'indexes': ['indexX', 'indexY'] }\n])" - }, - { - "lang": "Java", - "source": "SwapIndexesParams[] params =\n new SwapIndexesParams[] {\n new SwapIndexesParams().setIndexes(new String[] {\"indexA\", \"indexB\"}),\n new SwapIndexesParams().setIndexes(new String[] {\"indexX\", \"indexY\"})\n };\nTaskInfo task = client.swapIndexes(params);" - }, - { - "lang": "PHP", - "source": "$client->swapIndexes([['indexA', 'indexB'], ['indexX', 'indexY']]);" - }, - { - "lang": "Python", - "source": "client.swap_indexes([{'indexes': ['indexA', 'indexB']}, {'indexes': ['indexX', 'indexY']}])" - }, - { - "lang": "Ruby", - "source": "client.swap_indexes(['indexA', 'indexB'], ['indexX', 'indexY'])" - }, - { - "lang": "Rust", - "source": "client.swap_indexes([\n &SwapIndexes {\n indexes: (\n \"indexA\".to_string(),\n \"indexB\".to_string(),\n ),\n }, &SwapIndexes {\n indexes: (\n \"indexX\".to_string(),\n \"indexY\".to_string(),\n ),\n}])" - }, - { - "lang": "Swift", - "source": "let task = try await self.client.swapIndexes([\n (\"indexA\", \"indexB\"),\n (\"indexX\", \"indexY\")\n])" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/swap-indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"indexes\": [\n \"indexA\",\n \"indexB\"\n ]\n },\n {\n \"indexes\": [\n \"indexX\",\n \"indexY\"\n ]\n }\n ]'" - } - ] - } - }, - "/tasks": { - "get": { - "tags": [ - "Tasks" - ], - "summary": "Get all tasks", - "description": "Get all [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)", - "operationId": "get_tasks", - "parameters": [ - { - "name": "limit", - "in": "query", - "description": "Maximum number of results to return.", - "required": false, - "schema": { - "type": "integer", - "format": "u-int32", - "default": 20, - "minimum": 0 - }, - "example": 12 - }, - { - "name": "from", - "in": "query", - "description": "Fetch the next set of results from the given uid.", - "required": false, - "schema": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "example": 12421 - }, - { - "name": "reverse", - "in": "query", - "description": "The order you want to retrieve the objects.", - "required": false, - "schema": { - "type": "boolean" - }, - "example": true - }, - { - "name": "batchUids", - "in": "query", - "description": "Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "example": 12421 - }, - { - "name": "uids", - "in": "query", - "description": "Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 231, - 423, - 598, - "*" - ] - }, - { - "name": "canceledBy", - "in": "query", - "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 374, - "*" - ] - }, - { - "name": "types", - "in": "query", - "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [ - "documentAdditionOrUpdate", - "*" - ] - }, - { - "name": "statuses", - "in": "query", - "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Status" - } - }, - "example": [ - "succeeded", - "failed", - "canceled", - "enqueued", - "processing", - "*" - ] - }, - { - "name": "indexUids", - "in": "query", - "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [ - "movies", - "theater", - "*" - ] - }, - { - "name": "afterEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "afterStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "afterFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - } - ], - "responses": { - "200": { - "description": "Get all tasks", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AllTasks" - }, - "example": { - "results": [ - { - "uid": 144, - "indexUid": "mieli", - "status": "succeeded", - "type": "settingsUpdate", - "canceledBy": null, - "details": { - "settings": { - "filterableAttributes": [ - "play_count" - ] - } - }, - "error": null, - "duration": "PT0.009330S", - "enqueuedAt": "2024-08-08T09:01:13.348471Z", - "startedAt": "2024-08-08T09:01:13.349442Z", - "finishedAt": "2024-08-08T09:01:13.358772Z" - } - ], - "total": 1, - "limit": 1, - "from": 144, - "next": null - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "tasks.get", - "tasks.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "Dart", - "source": "await client.getTasks();" - }, - { - "lang": "Go", - "source": "client.GetTasks(nil);" - }, - { - "lang": "JS", - "source": "client.tasks.getTasks()" - }, - { - "lang": "Java", - "source": "client.getTasks();" - }, - { - "lang": "PHP", - "source": "$client->getTasks();" - }, - { - "lang": "Python", - "source": "client.get_tasks()" - }, - { - "lang": "Ruby", - "source": "client.tasks" - }, - { - "lang": "Rust", - "source": "let tasks: TasksResults = client\n .get_tasks()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.getTasks { (result) in\n switch result {\n case .success(let tasks):\n print(tasks)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks'" - } - ] - }, - "delete": { - "tags": [ - "Tasks" - ], - "summary": "Delete tasks", - "description": "Delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) on filter", - "operationId": "delete_tasks", - "parameters": [ - { - "name": "uids", - "in": "query", - "description": "Permits to filter tasks by their uid. By default, when the `uids` query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 231, - 423, - 598, - "*" - ] - }, - { - "name": "batchUids", - "in": "query", - "description": "Lets you filter tasks by their `batchUid`.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 231, - 423, - 598, - "*" - ] - }, - { - "name": "canceledBy", - "in": "query", - "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 374, - "*" - ] - }, - { - "name": "types", - "in": "query", - "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Kind" - } - }, - "example": [ - "documentDeletion", - "*" - ] - }, - { - "name": "statuses", - "in": "query", - "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Status" - } - }, - "example": [ - "succeeded", - "failed", - "canceled", - "*" - ] - }, - { - "name": "indexUids", - "in": "query", - "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [ - "movies", - "theater", - "*" - ] - }, - { - "name": "afterEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "afterStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "afterFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - } - ], - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "taskDeletion", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "400": { - "description": "A filter is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Query parameters to filter the tasks to delete are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.", - "code": "missing_task_filters", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#missing_task_filters" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "The task uid does not exist", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Task :taskUid not found.", - "code": "task_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors/#task_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "tasks.delete", - "tasks.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.DeleteTasksAsync(new DeleteTasksQuery { Uids = new List { 1, 2 } });" - }, - { - "lang": "Dart", - "source": "await client.deleteTasks(params: DeleteTasksQuery(uids: [1, 2]));" - }, - { - "lang": "Go", - "source": "client.DeleteTaks(&meilisearch.DeleteTasksQuery{\n UIDS: []int64{1, 2},\n});" - }, - { - "lang": "JS", - "source": "client.tasks.deleteTasks({ uids: [1, 2] })" - }, - { - "lang": "Java", - "source": "DeleteTasksQuery query = new DeleteTasksQuery().setUids(new int[] {1, 2})\nclient.deleteTasks(query);" - }, - { - "lang": "PHP", - "source": "$client->deleteTasks((new DeleteTasksQuery())->setUids([1, 2]));" - }, - { - "lang": "Python", - "source": "client.delete_tasks({'uids': ['1', '2']})" - }, - { - "lang": "Ruby", - "source": "client.delete_tasks(uids: [1, 2])" - }, - { - "lang": "Rust", - "source": "let mut query = tasks::TasksDeleteQuery::new(&client);\nquery.with_uids([1, 2]);\n\nlet res = client.delete_tasks_with(&query).await.unwrap();" - }, - { - "lang": "Swift", - "source": "client.deleteTasks(filter: DeleteTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/tasks?uids=1,2'" - } - ] - } - }, - "/tasks/cancel": { - "post": { - "tags": [ - "Tasks" - ], - "summary": "Cancel tasks", - "description": "Cancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", - "operationId": "cancel_tasks", - "parameters": [ - { - "name": "uids", - "in": "query", - "description": "Permits to filter tasks by their uid. By default, when the `uids` query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 231, - 423, - 598, - "*" - ] - }, - { - "name": "batchUids", - "in": "query", - "description": "Lets you filter tasks by their `batchUid`.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 231, - 423, - 598, - "*" - ] - }, - { - "name": "canceledBy", - "in": "query", - "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 374, - "*" - ] - }, - { - "name": "types", - "in": "query", - "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Kind" - } - }, - "example": [ - "documentDeletion", - "*" - ] - }, - { - "name": "statuses", - "in": "query", - "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Status" - } - }, - "example": [ - "succeeded", - "failed", - "canceled", - "*" - ] - }, - { - "name": "indexUids", - "in": "query", - "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [ - "movies", - "theater", - "*" - ] - }, - { - "name": "afterEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "afterStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "afterFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - } - ], - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "taskCancelation", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "400": { - "description": "A filter is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Query parameters to filter the tasks to cancel are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.", - "code": "missing_task_filters", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#missing_task_filters" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "The task uid does not exist", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Task :taskUid not found.", - "code": "task_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors/#task_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "tasks.cancel", - "tasks.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.CancelTasksAsync(new CancelTasksQuery { Uids = new List { 1, 2 } });" - }, - { - "lang": "Dart", - "source": "await client.cancelTasks(params: CancelTasksQuery(uids: [1, 2]));" - }, - { - "lang": "Go", - "source": "client.CancelTasks(&meilisearch.CancelTasksQuery{\n UIDS: []int64{1, 2},\n});" - }, - { - "lang": "JS", - "source": "client.tasks.cancelTasks({ uids: [1, 2] })" - }, - { - "lang": "Java", - "source": "CancelTasksQuery query = new CancelTasksQuery().setUids(new int[] {1, 2})\nclient.cancelTasks(query);" - }, - { - "lang": "PHP", - "source": "$client->cancelTasks((new CancelTasksQuery())->setUids([1, 2]));" - }, - { - "lang": "Python", - "source": "client.cancel_tasks({'uids': ['1', '2']})" - }, - { - "lang": "Ruby", - "source": "client.cancel_tasks(uids: [1, 2])" - }, - { - "lang": "Rust", - "source": "let mut query = tasks::TasksCancelQuery::new(&client);\nquery.with_uids([1, 2]);\n\nlet res = client.cancel_task_with(&query).await.unwrap();" - }, - { - "lang": "Swift", - "source": "client.cancelTasks(filter: CancelTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/tasks/cancel?uids=1,2'" - } - ] - } - }, - "/tasks/{taskUid}": { - "get": { - "tags": [ - "Tasks" - ], - "summary": "Get a task", - "description": "Get a [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", - "operationId": "get_task", - "parameters": [ - { - "name": "taskUid", - "in": "path", - "description": "The task identifier", - "required": true, - "schema": { - "type": "string", - "format": "u-int32" - }, - "example": 0 - } - ], - "responses": { - "200": { - "description": "Task successfully retrieved", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TaskView" - }, - "example": { - "uid": 1, - "indexUid": "movies", - "status": "succeeded", - "type": "documentAdditionOrUpdate", - "canceledBy": null, - "details": { - "receivedDocuments": 79000, - "indexedDocuments": 79000 - }, - "error": null, - "duration": "PT1S", - "enqueuedAt": "2021-01-01T09:39:00.000000Z", - "startedAt": "2021-01-01T09:39:01.000000Z", - "finishedAt": "2021-01-01T09:39:02.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "The task uid does not exist", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Task :taskUid not found.", - "code": "task_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors/#task_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "tasks.get", - "tasks.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "ResourceResults taskResult = await client.GetTasksAsync(new TasksQuery { Limit = 2, From = 10 });" - }, - { - "lang": "C#", - "source": "ResourceResults taskResult = await client.GetTasksAsync(new TasksQuery { Limit = 2, From = 8 });" - }, - { - "lang": "Dart", - "source": "await client.getTask(1);" - }, - { - "lang": "Dart", - "source": "await client.getTasks(params: TasksQuery(limit: 2, from: 10));" - }, - { - "lang": "Dart", - "source": "await client.getTasks(params: TasksQuery(limit: 2, from: 8));" - }, - { - "lang": "Go", - "source": "client.GetTask(1);" - }, - { - "lang": "Go", - "source": "client.GetTasks(&meilisearch.TasksQuery{\n Limit: 2,\n From: 10,\n});" - }, - { - "lang": "Go", - "source": "client.GetTasks(&meilisearch.TasksQuery{\n Limit: 2,\n From: 8,\n});" - }, - { - "lang": "JS", - "source": "client.tasks.getTask(1)" - }, - { - "lang": "JS", - "source": "client.tasks.getTasks({ limit: 2, from: 10 })" - }, - { - "lang": "JS", - "source": "client.tasks.getTasks({ limit: 2, from: 8 })" - }, - { - "lang": "Java", - "source": "client.getTask(1);" - }, - { - "lang": "Java", - "source": "TasksQuery query = new TasksQuery()\n .setLimit(2)\n .setFrom(10);\n\nclient.index(\"movies\").getTasks(query);" - }, - { - "lang": "Java", - "source": "TasksQuery query = new TasksQuery()\n .setLimit(2)\n .setFrom(8);\n\nclient.index(\"movies\").getTasks(query);" - }, - { - "lang": "PHP", - "source": "$client->getTask(1);" - }, - { - "lang": "PHP", - "source": "$taskQuery = (new TasksQuery())->setLimit(2)->setFrom(10));\n$client->getTasks($taskQuery);" - }, - { - "lang": "PHP", - "source": "$taskQuery = (new TasksQuery())->setLimit(2)->setFrom(8));\n$client->getTasks($taskQuery);" - }, - { - "lang": "Python", - "source": "client.get_task(1)" - }, - { - "lang": "Python", - "source": "client.get_tasks({\n 'limit': 2,\n 'from': 10\n})" - }, - { - "lang": "Python", - "source": "client.get_tasks({\n 'limit': 2,\n 'from': 8\n})" - }, - { - "lang": "Ruby", - "source": "client.task(1)" - }, - { - "lang": "Ruby", - "source": "client.tasks(limit: 2, from: 10)" - }, - { - "lang": "Ruby", - "source": "client.tasks(limit: 2, from: 8)" - }, - { - "lang": "Rust", - "source": "let task: Task = client\n .get_task(1)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let mut query = TasksSearchQuery::new(&client)\n .with_limit(2)\n .with_from(10)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let mut query = TasksSearchQuery::new(&client)\n .with_limit(2)\n .from(8)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.getTask(taskUid: 1) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" - }, - { - "lang": "Swift", - "source": "client.getTasks(params: TasksQuery(limit: 2, from: 10)) { result in\n switch result {\n case .success(let taskResult):\n print(taskResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.getTasks(params: TasksQuery(limit: 2, from: 8)) { result in\n switch result {\n case .success(let taskResult):\n print(taskResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks/1'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks?limit=2&from=10" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks?limit=2&from=8" - } - ] - } - }, - "/version": { - "get": { - "tags": [ - "Version" - ], - "summary": "Get version", - "description": "Current version of Meilisearch.", - "operationId": "get_version", - "responses": { - "200": { - "description": "Instance is healthy", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VersionResponse" - }, - "example": { - "commitSha": "b46889b5f0f2f8b91438a08a358ba8f05fc09fc1", - "commitDate": "2021-07-08", - "pkgVersion": "0.23.0" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "version", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.GetVersionAsync();" - }, - { - "lang": "C#", - "source": "await client.Index(\"jackets\").UpdateDistinctAttributeAsync(\"product_id\");" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSearchableAttributesAsync(new[]\n{\n \"title\",\n \"overview\",\n \"genres\"\n});" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateDisplayedAttributesAsync(new[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" - }, - { - "lang": "C#", - "source": "SearchQuery filters = new SearchQuery() { Filter = \"release_date > \\\"795484800\\\"\" };\nvar movies = await client.Index(\"movie_ratings\").SearchAsync(\"Avengers\", filters);" - }, - { - "lang": "C#", - "source": "SearchQuery filters = new SearchQuery() { Filter = \"release_date > 795484800 AND (director =\n\\\"Tim Burton\\\" OR director = \\\"Christopher Nolan\\\")\" };\nvar movies = await client.Index(\"movie_ratings\").SearchAsync(\"Batman\", filters);" - }, - { - "lang": "C#", - "source": "SearchQuery filters = new SearchQuery() { Filter = \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\" };\nvar movies = await client.Index(\"movie_ratings\").SearchAsync(\"Planet of the Apes\", filters);" - }, - { - "lang": "C#", - "source": "var filters = new SearchQuery() { Filter = \"rating.users >= 90\" };\nvar movies = await client.Index(\"movie_ratings\").SearchAsync(\"thriller\", filters);" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").SearchAsync(\"shifu\");" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n Offset = 1\n};\nvar result = await client.Index(\"movies\").SearchAsync(\"shifu\", sq);\nif(result is SearchResult pagedResults)\n{\n}" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n Limit = 2\n};\nvar result = await client.Index(\"movies\").SearchAsync(\"shifu\", sq);\nif(result is SearchResult pagedResults)\n{\n}" - }, - { - "lang": "C#", - "source": "var result = await client.Index(\"movies\").SearchAsync(\"\", new SearchQuery { HitsPerPage = 15 });\nif(result is PaginatedSearchResult pagedResults)\n{\n}" - }, - { - "lang": "C#", - "source": "var result = await client.Index(\"movies\").SearchAsync(\"\", new SearchQuery { Page = 2 });\nif(result is PaginatedSearchResult pagedResults)\n{\n}" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n AttributesToRetrieve = new[] {\"overview\", \"title\"}\n};\nawait client.Index(\"movies\").SearchAsync(\"shifu\", sq);" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n AttributesToCrop = new[] {\"overview\"},\n CropLength = 5\n};\nawait client.Index(\"movies\").SearchAsync(\"shifu\", sq);" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n AttributesToCrop = new[] {\"overview\"},\n CropMarker = \"[...]\"\n};\nawait client.Index(\"movies\").SearchAsync(\"shifu\", sq);" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n AttributesToHighlight = new[] {\"overview\"}\n};\nawait client.Index(\"movies\").SearchAsync(\"winter feast\", sq);" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n AttributesToHighlight = new[] {\"overview\"},\n HighlightPreTag = \"\",\n HighlightPostTag = \"\"\n};\nawait client.Index(\"movies\").SearchAsync(\"winter feast\", sq);" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").SearchAsync(\n \"winter feast\",\n new SearchQuery\n {\n ShowMatchesPosition = True,\n });" - }, - { - "lang": "C#", - "source": "// Make sure to add this using to your code\nusing System.IO;\n\nvar jsonDocuments = await File.ReadAllTextAsync(\"movies.json\");\nawait client.Index(\"movies\").AddDocumentsJsonAsync(jsonDocuments);" - }, - { - "lang": "C#", - "source": "// In the command line:\n// dotnet add package Meilisearch\n\n// In your .cs file:\nusing System.IO;\nusing System.Text.Json;\nusing Meilisearch;\nusing System.Threading.Tasks;\nusing System.Collections.Generic;\n\nnamespace Meilisearch_demo\n{\n public class Movie\n {\n public string Id { get; set; }\n public string Title { get; set; }\n public string Poster { get; set; }\n public string Overview { get; set; }\n public IEnumerable Genres { get; set; }\n }\n\n internal class Program\n {\n static async Task Main(string[] args)\n {\n MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"aSampleMasterKey\");\n var options = new JsonSerializerOptions\n {\n PropertyNameCaseInsensitive = true\n };\n\n string jsonString = await File.ReadAllTextAsync(\"movies.json\");\n var movies = JsonSerializer.Deserialize>(jsonString, options);\n\n var index = client.Index(\"movies\");\n await index.AddDocumentsAsync(movies);\n }\n }\n}" - }, - { - "lang": "C#", - "source": "TaskInfo task = await client.GetTaskAsync(0);" - }, - { - "lang": "C#", - "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nvar index = client.Index(\"movies\");\n\nvar movies = await index.SearchAsync(\"botman\");\nforeach (var movie in movies.Hits)\n{\n Console.WriteLine(movie.Title);\n}" - }, - { - "lang": "C#", - "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nvar options = new JsonSerializerOptions\n{\n PropertyNameCaseInsensitive = true\n};\n\nstring jsonString = await File.ReadAllTextAsync(\"meteorites.json\");\nvar meteorites = JsonSerializer.Deserialize>(jsonString, options);\n\nvar index = client.Index(\"meteorites\");\nawait index.AddDocumentsAsync(meteorites);" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateRankingRulesAsync(new string[] {\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\"\n});" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateDisplayedAttributesAsync(new string[] {\n \"title\",\n \"overview\",\n \"poster\"\n});" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSearchableAttributesAsync(new string[] {\n \"title\"\n});" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateStopWordsAsync(new string[] {\n \"the\"\n});" - }, - { - "lang": "C#", - "source": "var newSynonyms = new Dictionary>\n{\n { \"winnie\", new string[] { \"piglet\" } },\n { \"piglet\", new string[] { \"winnie\" } },\n};\nawait client.Index(\"movies\").UpdateSynonymsAsync(newSynonyms);" - }, - { - "lang": "C#", - "source": "SearchQuery filter = new SearchQuery() { Filter = \"mass < 200\" };\nawait client.Index(\"meteorites\").SearchAsync(\"\", filter);" - }, - { - "lang": "C#", - "source": "SearchQuery filter = new SearchQuery() { Filter = \"_geoRadius(46.9480, 7.4474, 210000)\" };\nawait client.Index(\"meteorites\").SearchAsync(\"\", filter);" - }, - { - "lang": "C#", - "source": "SearchQuery sort = new SearchQuery() { Sort = new string[] { \"_geoPoint(48.8583701,2.2922926):asc\" }};\nawait client.Index(\"meteorites\").SearchAsync(\"\", sort);" - }, - { - "lang": "C#", - "source": "SearchQuery searchQuery = new SearchQuery() {\n Sort = new string[] { \"mass:asc\" },\n Filter = \"mass < 200\",\n};\nawait client.Index(\"meteorites\").SearchAsync(\"\", searchQuery);" - }, - { - "lang": "C#", - "source": "var newSettings = new Settings\n{\n FilterableAttributes = new string[] { \"mass\", \"_geo\" },\n SortableAttributes = new string[] { \"mass\", \"_geo\" },\n};\nawait client.Index(\"meteorites\").UpdateSettingsAsync(newSettings);" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n Filter = \"(genre = 'Horror' AND genre = 'Mystery') OR director = 'Jordan Peele'\"\n};\nawait client.Index(\"movies\").SearchAsync(\"thriller\", sq);" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").SearchAsync(\"\\\"african american\\\" horror\");" - }, - { - "lang": "C#", - "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nvar keys = await client.GetKeysAsync();" - }, - { - "lang": "C#", - "source": "await client.Index(\"books\").UpdateSortableAttributesAsync(new [] { \"price\", \"author\" });" - }, - { - "lang": "C#", - "source": "await client.Index(\"books\").UpdateRankingRulesAsync(new[]\n{\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\"\n});" - }, - { - "lang": "C#", - "source": "SearchQuery sort = new SearchQuery() { Sort = new string[] { \"rating.users:asc\" }};\nawait client.Index(\"books\").SearchAsync(\"science fiction\", sort);" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n Sort = new[] { \"price:asc\" },\n};\nawait client.Index(\"books\").SearchAsync(\"science fiction\", sq);" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n Sort = new[] { \"author:desc\" },\n};\nawait client.Index(\"books\").SearchAsync(\"butler\", sq);" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n Sort = new[] { \"price:asc\" },\n};\nawait client.Index(\"books\").SearchAsync(\"science fiction\", sq);" - }, - { - "lang": "C#", - "source": "List attributes = new() { \"_geo\" };\nTaskInfo result = await client.Index(\"movies\").UpdateFilterableAttributesAsync(attributes);" - }, - { - "lang": "C#", - "source": "SearchQuery filters = new SearchQuery() { Filter = \"_geoRadius(45.472735, 9.184019, 2000)\" };\nvar restaurants = await client.Index(\"restaurants\").SearchAsync(\"\", filters);" - }, - { - "lang": "C#", - "source": "SearchQuery filters = new SearchQuery()\n{\n Filter = new string[] { \"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\" }\n};\n\nvar restaurants = await client.Index(\"restaurants\").SearchAsync(\"restaurants\", filters);" - }, - { - "lang": "C#", - "source": "SearchQuery filters = new SearchQuery()\n{\n Filter = \"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\"\n};\nvar restaurants = await client.Index(\"restaurants\").SearchAsync(\"restaurants\", filters);" - }, - { - "lang": "C#", - "source": "List attributes = new() { \"_geo\" };\nTaskInfo result = await client.Index(\"restaurants\").UpdateSortableAttributesAsync(attributes);" - }, - { - "lang": "C#", - "source": "SearchQuery filters = new SearchQuery()\n{\n Sort = new string[] { \"_geoPoint(48.8561446,2.2978204):asc\" }\n};\n\nvar restaurants = await client.Index(\"restaurants\").SearchAsync(\"\", filters);" - }, - { - "lang": "C#", - "source": "SearchQuery filters = new SearchQuery()\n{\n Sort = new string[] {\n \"_geoPoint(48.8561446,2.2978204):asc\",\n \"rating:desc\"\n }\n};\n\nvar restaurants = await client.Index(\"restaurants\").SearchAsync(\"restaurants\", filters);" - }, - { - "lang": "C#", - "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"apiKey\");\nvar searchResult = await client.Index(\"patient_medical_records\").SearchAsync();" - }, - { - "lang": "C#", - "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nawait client.UpdateKeyAsync(\"74c9c733-3368-4738-bbe5-1d18a5fecb37\", description: \"Default Search API Key\");" - }, - { - "lang": "C#", - "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nKey keyOptions = new Key\n{\n Description = \"Search patient records key\",\n Actions = new string[] { \"search\" },\n Indexes = new string[] { \"patient_medical_records\" },\n ExpiresAt = DateTime.Parse(\"2023-01-01T00:00:00Z\")\n};\nKey createdKey = await this.client.CreateKeyAsync(keyOptions);" - }, - { - "lang": "C#", - "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nResourceResults keyResult = await client.GetKeysAsync();\nvar keys = keyResult.Result;" - }, - { - "lang": "C#", - "source": "MeilisearchClient client = new MeilisearchClient(\"http://localhost:7700\", \"masterKey\");\nclient.DeleteKeyAsync(\"ac5cd97d-5a4b-4226-a868-2d0eb6d197ab\")" - }, - { - "lang": "C#", - "source": "TaskInfo task = await client.CreateIndexAsync(\"books\", \"reference_number\");" - }, - { - "lang": "C#", - "source": "await index.AddDocumentsAsync(\n new[] {\n new Book {\n ReferenceNumber = 287947,\n Title = \"Diary of a Wimpy Kid\",\n Author = \"Jeff Kinney\",\n Genres = new string[] { \"comedy\", \"humor\" },\n Price = 5.00\n }\n },\n \"reference_number\");" - }, - { - "lang": "C#", - "source": "TaskInfo task = await client.UpdateIndexAsync(\"books\", \"title\");" - }, - { - "lang": "C#", - "source": "var typoTolerance = new TypoTolerance {\n Enabled = false\n};\nawait client.Index(\"movies\").UpdateTypoToleranceAsync(typoTolerance);" - }, - { - "lang": "C#", - "source": "var typoTolerance = new TypoTolerance {\n DisableOnAttributes = new string[] { \"title\" }\n};\nawait client.Index(\"movies\").UpdateTypoToleranceAsync(typoTolerance);" - }, - { - "lang": "C#", - "source": "var typoTolerance = new TypoTolerance {\n DisableOnWords = new string[] { \"shrek\" }\n};\nawait client.Index(\"movies\").UpdateTypoToleranceAsync(typoTolerance);" - }, - { - "lang": "C#", - "source": "var typoTolerance = new TypoTolerance {\n MinWordSizeTypos = new TypoTolerance.TypoSize {\n OneTypo = 4,\n TwoTypos = 10\n }\n};\n\nawait client.Index(\"movies\").UpdateTypoToleranceAsync(typoTolerance);" - }, - { - "lang": "C#", - "source": "var typoTolerance = new TypoTolerance {\n MinWordSizeTypos = new TypoTolerance.TypoSize {\n OneTypo = 4\n }\n};\n\nawait client.Index(\"movies\").UpdateTypoToleranceAsync(typoTolerance);" - }, - { - "lang": "C#", - "source": "var synonyms = new Dictionary>\n{\n { \"great\", new string[] { \"fantastic\" } },\n { \"fantastic\", new string[] { \"great\" } }\n};\nawait client.Index(\"movies\").UpdateSynonymsAsync(synonyms);" - }, - { - "lang": "C#", - "source": "var faceting = new Faceting\n{\n MaxValuesPerFacet = 2,\n SortFacetValuesBy = new Dictionary\n {\n [\"*\"] = SortFacetValuesByType.Count\n }\n};\nawait client.Index(\"movies\").UpdateFacetingAsync(faceting);" - }, - { - "lang": "C#", - "source": "var pagination = new Pagination {\n MaxTotalHits = 500\n};\nawait client.Index(\"movies\").UpdatePaginationAsync(pagination);" - }, - { - "lang": "C#", - "source": "SearchQuery params = new SearchQuery() { MatchingStrategy = \"last\" };\nawait client.Index(\"movies\").SearchAsync(\"big fat liar\", params);" - }, - { - "lang": "C#", - "source": "SearchQuery params = new SearchQuery() { MatchingStrategy = \"all\" };\nawait client.Index(\"movies\").SearchAsync(\"big fat liar\", params);" - }, - { - "lang": "C#", - "source": "string jsonString = await File.ReadAllTextAsync(\"games.json\");\nvar games = JsonSerializer.Deserialize>(jsonString, options);\nvar index = client.Index(\"games\");\nawait index.AddDocumentsAsync(games);" - }, - { - "lang": "C#", - "source": "await client.Index(\"games\").UpdateFilterableAttributesAsync(new string[] { \"release_timestamp\" });" - }, - { - "lang": "C#", - "source": "var filters = new SearchQuery() { Filter = \"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\" };\nvar games = await client.Index(\"games\").SearchAsync(\"\", filters);" - }, - { - "lang": "C#", - "source": "await client.Index(\"games\").UpdateSortableAttributesAsync(new string[] { \"release_timestamp\" });" - }, - { - "lang": "C#", - "source": "SearchQuery sort = new SearchQuery() { Sort = new string[] { \"release_timestamp:desc\" }};\nawait client.Index(\"games\").SearchAsync(\"\", sort);" - }, - { - "lang": "C#", - "source": "await client.GetTasksAsync(new TasksQuery { Statuses = new List { TaskInfoStatus.Failed, TaskInfoStatus.Canceled } });" - }, - { - "lang": "C#", - "source": "var query = new TasksQuery { IndexUids = new List { \"movies\" }, Types = new List { TaskInfo.DocumentAdditionOrUpdate, TaskInfo.DocumentDeletion }, Statuses = new List { TaskInfoStatus.Processing } };\n\nawait client.GetTasksAsync(query);" - }, - { - "lang": "C#", - "source": "List attributes = new() { \"genres\", \"rating\", \"language\" };\nTaskInfo result = await client.Index(\"movie_ratings\").UpdateFilterableAttributesAsync(attributes);" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n Facets = new string[] { \"genres\", \"rating\", \"language\" }\n};\nawait client.Index(\"books\").SearchAsync(\"classic\", sq);" - }, - { - "lang": "C#", - "source": "var sq = new SearchQuery\n{\n Facets = new string[] { \"genres\", \"rating\" }\n};\nawait client.Index(\"movie_ratings\").SearchAsync(\"Batman\", sq);" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateFilterableAttributesAsync(new [] { \"director\", \"genres\" });" - }, - { - "lang": "C#", - "source": "var newFaceting = new Faceting\n{\n SortFacetValuesBy = new Dictionary\n {\n [\"genres\"] = SortFacetValuesByType.Count\n }\n};\nawait client.Index(\"books\").UpdateFacetingAsync(newFaceting);" - }, - { - "lang": "C#", - "source": "var query = new SearchFacetsQuery()\n{\n FacetQuery = \"c\",\n ExhaustiveFacetCount: true\n};\nawait client.Index(\"books\").FacetSearchAsync(\"genres\", query);" - }, - { - "lang": "C#", - "source": "var params = new SearchQuery()\n{\n ShowRankingScore = true\n};\nawait client.Index(\"movies\").SearchAsync(\"dragon\", params);" - }, - { - "lang": "C#", - "source": "var params = new SearchQuery()\n{\n ShowRankingScoreDetails = true\n};\nawait client.Index(\"movies\").SearchAsync(\"dragon\", params);" - }, - { - "lang": "C#", - "source": "var searchQuery = new SearchQuery\n{\n AttributesToSearchOn = new[] { \"overview\" }\n};\nawait client.Index(\"movies\").SearchAsync(\"adventure\", searchQuery);" - }, - { - "lang": "C#", - "source": "var params = new SearchQuery()\n{\n Distinct = \"ATTRIBUTE_A\"\n};\nawait client.Index(\"INDEX_NAME\").SearchAsync(\"QUERY TERMS\", params);" - }, - { - "lang": "C#", - "source": "List attributes = new() { \"product_id\", \"sku\", \"url\" };\nTaskInfo result = await client.Index(\"products\").UpdateFilterableAttributesAsync(attributes);" - }, - { - "lang": "C#", - "source": "var params = new SearchQuery()\n{\n Distinct = \"sku\"\n};\nawait client.Index(\"products\").SearchAsync(\"white shirt\", params);" - }, - { - "lang": "Dart", - "source": "await client.getVersion();" - }, - { - "lang": "Dart", - "source": "await client.index('jackets').updateDistinctAttribute('product_id');" - }, - { - "lang": "Dart", - "source": "await client.index('movies').search('shifu');" - }, - { - "lang": "Dart", - "source": "await client.index('movies').search('shifu', SearchQuery(offset: 1));" - }, - { - "lang": "Dart", - "source": "await client.index('movies').search('shifu', SearchQuery(limit: 2));" - }, - { - "lang": "Dart", - "source": "await client.getTask(0);" - }, - { - "lang": "Dart", - "source": "await client.index('movies').search('botman');" - }, - { - "lang": "Dart", - "source": "await client.index('movies').updateStopWords(['the']);" - }, - { - "lang": "Dart", - "source": "await client.index('movies').search('\"african american\" horror');" - }, - { - "lang": "Dart", - "source": "var client = MeiliSearchClient('http://localhost:7700', 'masterKey');\nawait client.getKeys();" - }, - { - "lang": "Dart", - "source": "await client.index('books').updateSortableAttributes(['author', 'price']);" - }, - { - "lang": "Dart", - "source": "await client.index('restaurants').updateFilterableAttributes(['_geo']);" - }, - { - "lang": "Dart", - "source": "await client.index('restaurants').updateSortableAttributes(['_geo']);" - }, - { - "lang": "Dart", - "source": "var client = MeiliSearchClient('http://localhost:7700', 'apiKey');\nawait client.index('patient_medical_records').search('');" - }, - { - "lang": "Dart", - "source": "var client = MeiliSearchClient('http://localhost:7700', 'masterKey');\nawait client.createKey(\n description: 'Search patient records key',\n actions: ['search'],\n indexes: ['patient_medical_records'],\n expiresAt: DateTime(2023, 01, 01),\n);" - }, - { - "lang": "Dart", - "source": "var client = MeiliSearchClient('http://localhost:7700', 'masterKey');\nawait client.getKeys();" - }, - { - "lang": "Dart", - "source": "var client = MeiliSearchClient('http://localhost:7700', 'masterKey');\nawait client.deleteKey('ac5cd97d-5a4b-4226-a868-2d0eb6d197ab');" - }, - { - "lang": "Dart", - "source": "await client.createIndex('books', primaryKey: 'reference_number');" - }, - { - "lang": "Dart", - "source": "await client.index('movies').addDocuments([\n {\n 'reference_number': 287947,\n 'title': 'Diary of a Wimpy Kid',\n 'author': 'Jeff Kinney',\n 'genres': ['comedy', 'humor'],\n 'price': 5.00\n }\n], primaryKey: 'reference_number');" - }, - { - "lang": "Dart", - "source": "await client.updateIndex('books', 'title');" - }, - { - "lang": "Dart", - "source": "final toUpdate = TypoTolerance(enabled: false);\nawait client.index('movies').updateTypoTolerance(toUpdate);" - }, - { - "lang": "Dart", - "source": "final toUpdate = TypoTolerance(\n disableOnAttributes: ['title'],\n);\nawait client.index('movies').updateTypoTolerance(toUpdate);" - }, - { - "lang": "Dart", - "source": "final toUpdate = TypoTolerance(\n disableOnWords: ['shrek'],\n);\nawait client.index('movies').updateTypoTolerance(toUpdate);" - }, - { - "lang": "Dart", - "source": "final toUpdate = TypoTolerance(\n minWordSizeForTypos: MinWordSizeForTypos(\n oneTypo: 4,\n twoTypos: 10,\n ),\n);\nawait client.index('movies').updateTypoTolerance(toUpdate);" - }, - { - "lang": "Dart", - "source": "final toUpdate = TypoTolerance(\n minWordSizeForTypos: MinWordSizeForTypos(oneTypo: 4),\n);\nawait client.index('movies').updateTypoTolerance(toUpdate);" - }, - { - "lang": "Dart", - "source": "await client.index('movies').updateFilterableAttributes([\n 'director',\n 'genres',\n]);" - }, - { - "lang": "Go", - "source": "client.GetVersion()" - }, - { - "lang": "Go", - "source": "client.Index(\"jackets\").UpdateDistinctAttribute(\"product_id\")" - }, - { - "lang": "Go", - "source": "searchableAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n}\nclient.Index(\"movies\").UpdateSearchableAttributes(&searchableAttributes)" - }, - { - "lang": "Go", - "source": "displayedAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n}\nclient.Index(\"movies\").UpdateDisplayedAttributes(&displayedAttributes)" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movie_ratings\").Search(\"Avengers\", &meilisearch.SearchRequest{\n Filter: \"release_date > \\\"795484800\\\"\",\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movie_ratings\").Search(\"Batman\", &meilisearch.SearchRequest{\n Filter: \"release_date > 795484800 AND (director = \\\"Tim Burton\\\" OR director = \\\"Christopher Nolan\\\")\",\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movie_ratings\").Search(\"Planet of the Apes\", &meilisearch.SearchRequest{\n Filter: \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\",\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movie_ratings\").Search(\"thriller\", &meilisearch.SearchRequest{\n Filter: \"rating.users >= 90\",\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{\n Offset: 1,\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{\n Limit: 2,\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").Search(\"\", &meilisearch.SearchRequest{\n HitsPerPage: 15,\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").Search(\"\", &meilisearch.SearchRequest{\n Page: 2,\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{\n AttributesToRetrieve: []string{\"overview\", \"title\"},\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{\n AttributesToCrop: []string{\"overview\"},\n CropLength: 5,\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"shifu\", &meilisearch.SearchRequest{\n AttributesToCrop: []string{\"overview\"},\n CropMarker: \"[…]\",\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"winter feast\", &meilisearch.SearchRequest{\n AttributesToHighlight: []string{\"overview\"},\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"winter feast\", &meilisearch.SearchRequest{\n AttributesToHighlight: []string{\"overview\"},\n HighlightPreTag: \"\",\n HighlightPostTag: \"\",\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"winter feast\", &meilisearch.SearchRequest{\n ShowMatchesPosition: true,\n})" - }, - { - "lang": "Go", - "source": "import (\n \"encoding/json\"\n \"os\"\n)\n\nfile, _ := os.ReadFile(\"movies.json\")\n\nvar movies interface{}\njson.Unmarshal([]byte(file), &movies)\n\nclient.Index(\"movies\").AddDocuments(&movies, nil)" - }, - { - "lang": "Go", - "source": "// In the command line:\n// go get -u github.com/meilisearch/meilisearch-go\n\n// In your .go file:\npackage main\n\nimport (\n \"os\"\n \"encoding/json\"\n \"io\"\n\n \"github.com/meilisearch/meilisearch-go\"\n)\n\nfunc main() {\n client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\n\n jsonFile, _ := os.Open(\"movies.json\")\n defer jsonFile.Close()\n\n byteValue, _ := io.ReadAll(jsonFile)\n var movies []map[string]interface{}\n json.Unmarshal(byteValue, &movies)\n\n _, err := client.Index(\"movies\").AddDocuments(movies, nil)\n if err != nil {\n panic(err)\n }\n}" - }, - { - "lang": "Go", - "source": "client.GetTask(0)" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").Search(\"botman\", &meilisearch.SearchRequest{})" - }, - { - "lang": "Go", - "source": "client := meilisearch.New(\"http://localhost:7700\")\n\njsonFile, _ := os.Open(\"meteorites.json\")\ndefer jsonFile.Close()\n\nbyteValue, _ := io.ReadAll(jsonFile)\nvar meteorites []map[string]interface{}\njson.Unmarshal(byteValue, &meteorites)\n\nclient.Index(\"meteorites\").AddDocuments(meteorites, nil)" - }, - { - "lang": "Go", - "source": "rankingRules := []string{\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\",\n}\nclient.Index(\"movies\").UpdateRankingRules(&rankingRules)" - }, - { - "lang": "Go", - "source": "displayedAttributes := []string{\n \"title\",\n \"overview\",\n \"poster\",\n}\nclient.Index(\"movies\").UpdateDisplayedAttributes(&displayedAttributes)" - }, - { - "lang": "Go", - "source": "searchableAttributes := []string{\n \"title\",\n}\nclient.Index(\"movies\").UpdateSearchableAttributes(&searchableAttributes)" - }, - { - "lang": "Go", - "source": "stopWords := []string{\"the\"}\nclient.Index(\"movies\").UpdateStopWords(&stopWords)" - }, - { - "lang": "Go", - "source": "synonyms := map[string][]string{\n \"winnie\": []string{\"piglet\"},\n \"piglet\": []string{\"winnie\"},\n}\nclient.Index(\"movies\").UpdateSynonyms(&synonyms)" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"meteorites\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"mass < 200\",\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"meteorites\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"_geoRadius(46.9480, 7.4474, 210000)\",\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"meteorites\").Search(\"\", &meilisearch.SearchRequest{\n Sort: []string{\n \"_geoPoint(48.8583701,2.2922926):asc\",\n },\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"meteorites\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"mass < 200\",\n Sort: []string{\n \"mass:asc\",\n },\n})" - }, - { - "lang": "Go", - "source": "settings := meilisearch.Settings{\n FilterableAttributes: []string{\n \"mass\",\n \"_geo\",\n },\n SortableAttributes: []string{\n \"mass\",\n \"_geo\",\n },\n}\nclient.Index(\"meteorites\").UpdateSettings(&settings)" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"thriller\", &meilisearch.SearchRequest{\n Filter: [][]string{\n []string{\"genres = Horror\", \"genres = Mystery\"},\n []string{\"director = \\\"Jordan Peele\\\"\"},\n },\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"\\\"african american\\\" horror\", &meilisearch.SearchRequest{})" - }, - { - "lang": "Go", - "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\nclient.GetKeys(nil);" - }, - { - "lang": "Go", - "source": "sortableAttributes := []string{\n \"author\",\n \"price\",\n}\nclient.Index(\"books\").UpdateSortableAttributes(&sortableAttributes)" - }, - { - "lang": "Go", - "source": "rankingRules := []string{\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\",\n}\nclient.Index(\"books\").UpdateRankingRules(&rankingRules)" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"books\").Search(\"science fiction\", &meilisearch.SearchRequest{\n Sort: []string{\n \"rating.users:asc\",\n },\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"books\").Search(\"science fiction\", &meilisearch.SearchRequest{\n Sort: []string{\n \"price:asc\",\n },\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"books\").Search(\"butler\", &meilisearch.SearchRequest{\n Sort: []string{\n \"author:desc\",\n },\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"books\").Search(\"science fiction\", &meilisearch.SearchRequest{\n Sort: []string{\n \"price:asc\",\n },\n})" - }, - { - "lang": "Go", - "source": "filterableAttributes := []interface{}{\n \"_geo\",\n}\nclient.Index(\"restaurants\").UpdateFilterableAttributes(&filterableAttributes)" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"restaurants\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"_geoRadius(45.472735, 9.184019, 2000)\",\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"restaurants\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\",\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"restaurants\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\",\n})" - }, - { - "lang": "Go", - "source": "sortableAttributes := []string{\n \"_geo\",\n}\nclient.Index(\"restaurants\").UpdateSortableAttributes(&sortableAttributes)" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"restaurants\").Search(\"\", &meilisearch.SearchRequest{\n Sort: []string{\n \"_geoPoint(48.8561446,2.2978204):asc\",\n },\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"restaurants\").Search(\"\", &meilisearch.SearchRequest{\n Sort: []string{\n \"_geoPoint(48.8561446,2.2978204):asc\",\n \"rating:desc\",\n },\n})" - }, - { - "lang": "Go", - "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\nclient.Index(\"patient_medical_records\").Search();" - }, - { - "lang": "Go", - "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\n\nclient.UpdateKey(\"74c9c733-3368-4738-bbe5-1d18a5fecb37\", &meilisearch.Key{\n Indexes: []string{\"doctors\"},\n})" - }, - { - "lang": "Go", - "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\n\nclient.CreateKey(&meilisearch.Key{\n Description: \"Search patient records key\",\n Actions: []string{\"search\"},\n Indexes: []string{\"patient_medical_records\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" - }, - { - "lang": "Go", - "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\nclient.GetKeys(nil);" - }, - { - "lang": "Go", - "source": "client := meilisearch.New(\"http://localhost:7700\", meilisearch.WithAPIKey(\"masterKey\"))\nclient.DeleteKey(\"74c9c733-3368-4738-bbe5-1d18a5fecb37\");" - }, - { - "lang": "Go", - "source": "client.CreateIndex(&meilisearch.IndexConfig{\n Uid: \"books\",\n PrimaryKey: \"reference_number\",\n})" - }, - { - "lang": "Go", - "source": "documents := []map[string]interface{}{\n {\n \"reference_number\": 287947,\n \"title\": \"Diary of a Wimpy Kid\",\n \"author\": \"Jeff Kinney\",\n \"genres\": []string{\"comedy\", \"humor\"},\n \"price\": 5.00,\n },\n}\nrefrenceNumber := \"reference_number\"\nclient.Index(\"books\").AddDocuments(documents, &refrenceNumber)" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateIndex(&meilisearch.UpdateIndexRequestParams{\n PrimaryKey: \"title\",\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n Enabled: false,\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n DisableOnAttributes: []string{\"title\"},\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n DisableOnWords: []string{\"shrek\"},\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 4,\n TwoTypos: 10,\n },\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n DisableOnNumbers: true\n})" - }, - { - "lang": "Go", - "source": "client.index(\"movies\").UpdateTypoTolerance({\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 4,\n },\n})" - }, - { - "lang": "Go", - "source": "synonyms := map[string][]string{\n \"great\": []string{\"fantastic\"},\n \"fantastic\": []string{\"great\"},\n}\nclient.Index(\"movies\").UpdateSynonyms(&synonyms)" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateFaceting(&meilisearch.Faceting{\n MaxValuesPerFacet: 2,\n SortFacetValuesBy: {\n \"*\": SortFacetTypeCount,\n }\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdatePagination(&meilisearch.Pagination{\n MaxTotalHits: 500,\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"big fat liar\", &meilisearch.SearchRequest{\n MatchingStrategy: Last,\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"big fat liar\", &meilisearch.SearchRequest{\n MatchingStrategy: All,\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").Search(\"white shirt\", &meilisearch.SearchRequest{\n MatchingStrategy: Frequency,\n})" - }, - { - "lang": "Go", - "source": "jsonFile, _ := os.Open(\"games.json\")\ndefer jsonFile.Close()\n\nbyteValue, _ := io.ReadAll(jsonFile)\nvar games []map[string]interface{}\njson.Unmarshal(byteValue, &games)\n\nclient.Index(\"games\").AddDocuments(games, nil)" - }, - { - "lang": "Go", - "source": "filterableAttributes := []interface{}{\"release_timestamp\"}\nclient.Index(\"games\").UpdateFilterableAttributes(&filterableAttributes)" - }, - { - "lang": "Go", - "source": "client.Index(\"games\").Search(\"\", &meilisearch.SearchRequest{\n Filter: \"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\",\n})" - }, - { - "lang": "Go", - "source": "sortableAttributes := []string{\"release_timestamp\",\"author\"}\nclient.Index(\"games\").UpdateSortableAttributes(&sortableAttributes)" - }, - { - "lang": "Go", - "source": "client.Index(\"games\").Search(\"\", &meilisearch.SearchRequest{\n Sort: []string{\n \"release_timestamp:desc\",\n },\n})" - }, - { - "lang": "Go", - "source": "client.GetTasks(&meilisearch.TasksQuery{\n Statuses: []meilisearch.TaskStatus{\n meilisearch.TaskStatusFailed,\n meilisearch.TaskStatusCanceled,\n },\n})" - }, - { - "lang": "Go", - "source": "client.GetTasks(&meilisearch.TasksQuery{\n IndexUIDS: []string{\"movie\"},\n Types: []meilisearch.TaskType{\n meilisearch.TaskTypeDocumentAdditionOrUpdate,\n meilisearch.TaskTypeDocumentDeletion,\n },\n Statuses: []meilisearch.TaskStatus{\n meilisearch.TaskStatusProcessing,\n },\n})" - }, - { - "lang": "Go", - "source": "filterableAttributes := []interface{}{\n \"genres\",\n \"rating\",\n \"language\",\n}\nclient.Index(\"movie_ratings\").UpdateFilterableAttributes(&filterableAttributes)" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"books\").Search(\"classic\", &meilisearch.SearchRequest{\n Facets: []string{\n \"genres\",\n \"rating\",\n \"language\",\n },\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"movie_ratings\").Search(\"Batman\", &meilisearch.SearchRequest{\n Facets: []string{\n \"genres\",\n \"rating\",\n },\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").UpdateFilterableAttributes(&[]interface{}{\n \"director\",\n \"genres\",\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateFaceting(&meilisearch.Faceting{\n SortFacetValuesBy: {\n \"genres\": SortFacetTypeCount,\n }\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").FacetSearch(&meilisearch.FacetSearchRequest{\n FacetQuery: \"c\",\n FacetName: \"genres\",\n ExhaustiveFacetCount: true\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"dragon\", &meilisearch.SearchRequest{\n showRankingScore: true,\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"dragon\", &meilisearch.SearchRequest{\n showRankingScoreDetails: true,\n})" - }, - { - "lang": "Go", - "source": "resp, err := client.Index(\"movies\").Search(\"adventure\", &meilisearch.SearchRequest{\n AttributesToSearchOn: []string{\"overview\"},\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"INDEX_NAME\").Search(\"QUERY TERMS\", &meilisearch.SearchRequest{\n Distinct: \"ATTRIBUTE_A\",\n})" - }, - { - "lang": "Go", - "source": "filterableAttributes := []interface{}{\n \"product_id\",\n \"sku\",\n \"url\",\n}\nclient.Index(\"products\").UpdateFilterableAttributes(&filterableAttributes)" - }, - { - "lang": "Go", - "source": "client.Index(\"products\").Search(\"white shirt\", &meilisearch.SearchRequest{\n Distinct: \"sku\",\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"INDEX_NAME\").Search(\"badman\", &meilisearch.SearchRequest{\n RankingScoreThreshold: 0.2,\n})" - }, - { - "lang": "Go", - "source": "client.index(\"INDEX_NAME\").Search(\"QUERY TEXT IN JAPANESE\", &meilisearch.SearchRequest{\n Locales: []string{\"jpn\"}\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"INDEX_NAME\").Search(\"\", &meilisearch.SearchRequest{\n Hybrid: &meilisearch.SearchRequestHybrid{\n Embedder: \"EMBEDDER_NAME\",\n },\n Media: map[string]any{\n \"FIELD_A\": \"VALUE_A\",\n \"FIELD_B\": map[string]any{\n \"FIELD_C\": \"VALUE_B\",\n \"FIELD_D\": \"VALUE_C\",\n },\n },\n});" - }, - { - "lang": "JS", - "source": "client.getVersion()" - }, - { - "lang": "JS", - "source": "client.index('jackets').updateDistinctAttribute('product_id')" - }, - { - "lang": "JS", - "source": "client.index('movies').updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres',\n ]\n)" - }, - { - "lang": "JS", - "source": "client.index('movies').updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date',\n ]\n)" - }, - { - "lang": "JS", - "source": "client.index('movie_ratings').search('Avengers', {\n filter: 'release_date > 795484800'\n})" - }, - { - "lang": "JS", - "source": "client.index('movie_ratings').search('Batman', {\n filter: 'release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")'\n})" - }, - { - "lang": "JS", - "source": "client.index('movie_ratings').search('Planet of the Apes', {\n filter: \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\"\n})" - }, - { - "lang": "JS", - "source": "client.index('movie_ratings').search('thriller', {\n filter: 'rating.users >= 90'\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('shifu')" - }, - { - "lang": "JS", - "source": "client.index('movies').search('shifu', {\n offset: 1\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('shifu', {\n limit: 2\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('', {\n hitsPerPage: 15\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('', {\n page: 2\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('shifu', {\n attributesToRetrieve: ['overview', 'title']\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('shifu', {\n attributesToCrop: ['overview'],\n cropLength: 5\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('shifu', {\n attributesToCrop: ['overview'],\n cropMarker: '[…]'\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('winter feast', {\n attributesToHighlight: ['overview']\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('winter feast', {\n attributesToHighlight: ['overview'],\n highlightPreTag: '',\n highlightPostTag: ''\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('winter feast', {\n showMatchesPosition: true\n})" - }, - { - "lang": "JS", - "source": "const movies = require('./movies.json')\nclient.index('movies').addDocuments(movies).then((res) => console.log(res))" - }, - { - "lang": "JS", - "source": "// With npm:\n// npm install meilisearch\n\n// Or with yarn:\n// yarn add meilisearch\n\n// In your .js file:\n// With the `require` syntax:\nconst { MeiliSearch } = require('meilisearch')\nconst movies = require('./movies.json')\n// With the `import` syntax:\nimport { MeiliSearch } from 'meilisearch'\nimport movies from './movies.json'\n\nconst client = new MeiliSearch({\n host: 'http://localhost:7700',\n apiKey: 'aSampleMasterKey'\n})\nclient.index('movies').addDocuments(movies)\n .then((res) => console.log(res))" - }, - { - "lang": "JS", - "source": "client.tasks.getTask(0)" - }, - { - "lang": "JS", - "source": "client.index('movies').search('botman').then((res) => console.log(res))" - }, - { - "lang": "JS", - "source": "const meteorites = require('./meteorites.json')\n\nclient.index('meteorites').addDocuments(meteorites)" - }, - { - "lang": "JS", - "source": "client.index('movies').updateRankingRules([\n 'exactness',\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'release_date:asc',\n 'rank:desc'\n])" - }, - { - "lang": "JS", - "source": "client.index('movies').updateDisplayedAttributes([\n 'title',\n 'overview',\n 'poster'\n])" - }, - { - "lang": "JS", - "source": "client.index('movies').updateSearchableAttributes([\n 'title'\n])" - }, - { - "lang": "JS", - "source": "client.index('movies').updateStopWords(['the'])" - }, - { - "lang": "JS", - "source": "client.index('movies').updateSynonyms({\n winnie: ['piglet'],\n piglet: ['winnie']\n})" - }, - { - "lang": "JS", - "source": "client.index('meteorites').search('', { filter: 'mass < 200' })" - }, - { - "lang": "JS", - "source": "client.index('meteorites').search('', { filter: '_geoRadius(46.9480, 7.4474, 210000)' })" - }, - { - "lang": "JS", - "source": "client.index('meteorites').search('', { sort: ['_geoPoint(48.8583701, 2.2922926):asc'] })" - }, - { - "lang": "JS", - "source": "client.index('meteorites').search('', {\n sort: ['mass:asc'],\n filter: 'mass < 200'\n})" - }, - { - "lang": "JS", - "source": "client.index('meteorites').updateSettings({\n filterableAttributes: ['mass', '_geo'],\n sortableAttributes: ['mass', '_geo']\n})" - }, - { - "lang": "JS", - "source": "client.index('movies')\n .search('thriller', {\n filter: [['genres = Horror', 'genres = Mystery'], 'director = \"Jordan Peele\"']\n })" - }, - { - "lang": "JS", - "source": "client.index('movies')\n .search('\"african american\" horror')" - }, - { - "lang": "JS", - "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'masterKey' })\nclient.getKeys()" - }, - { - "lang": "JS", - "source": "client.index('books').updateSortableAttributes([\n 'author',\n 'price'\n ])" - }, - { - "lang": "JS", - "source": "client.index('books').updateRankingRules([\n 'words',\n 'sort',\n 'typo',\n 'proximity',\n 'attribute',\n 'exactness'\n])" - }, - { - "lang": "JS", - "source": "client.index('books').search('science fiction', {\n 'sort': ['rating.users:asc'],\n})" - }, - { - "lang": "JS", - "source": "client.index('books').search('science fiction', {\n sort: ['price:asc'],\n})" - }, - { - "lang": "JS", - "source": "client.index('books').search('butler', {\n sort: ['author:desc'],\n})" - }, - { - "lang": "JS", - "source": "client.index('books').search('science fiction', {\n sort: ['price:asc'],\n})" - }, - { - "lang": "JS", - "source": "client.index('restaurants')\n.updateFilterableAttributes([\n '_geo'\n])" - }, - { - "lang": "JS", - "source": "client.index('restaurants').search('', {\n filter: ['_geoRadius(45.472735, 9.184019, 2000)'],\n})" - }, - { - "lang": "JS", - "source": "client.index('restaurants').search('', {\n filter: ['_geoRadius(45.472735, 9.184019, 2000) AND type = pizza'],\n})" - }, - { - "lang": "JS", - "source": "client.index('restaurants').search('', {\n filter: ['_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])'],\n})" - }, - { - "lang": "JS", - "source": "client.index('restaurants').updateSortableAttributes([\n '_geo'\n])" - }, - { - "lang": "JS", - "source": "client.index('restaurants').search('', {\n sort: ['_geoPoint(48.8561446, 2.2978204):asc'],\n})" - }, - { - "lang": "JS", - "source": "client.index('restaurants').search('', {\n sort: ['_geoPoint(48.8561446, 2.2978204):asc', 'rating:desc'],\n})" - }, - { - "lang": "JS", - "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'apiKey' })\nclient.index('patient_medical_records').search()" - }, - { - "lang": "JS", - "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'masterKey' })\nclient.updateKey('74c9c733-3368-4738-bbe5-1d18a5fecb37', {\n description: 'Default Search API Key'\n})" - }, - { - "lang": "JS", - "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'masterKey' })\nclient.createKey({\n description: 'Search patient records key',\n actions: ['search'],\n indexes: ['patient_medical_records'],\n expiresAt: '2023-01-01T00:00:00Z'\n})" - }, - { - "lang": "JS", - "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'masterKey' })\nclient.getKeys()" - }, - { - "lang": "JS", - "source": "const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: 'masterKey' })\nclient.deleteKey('ac5cd97d-5a4b-4226-a868-2d0eb6d197ab')" - }, - { - "lang": "JS", - "source": "client.createIndex('books', { primaryKey: 'reference_number' })" - }, - { - "lang": "JS", - "source": "client.index('books').addDocuments([\n {\n reference_number: 287947,\n title: 'Diary of a Wimpy Kid',\n author: 'Jeff Kinney',\n genres: ['comedy','humor'],\n price: 5.00\n }\n], { primaryKey: 'reference_number' })" - }, - { - "lang": "JS", - "source": "client.updateIndex('books', {\n primaryKey: 'title'\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').updateTypoTolerance({\n enabled: false\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').updateTypoTolerance({\n disableOnAttributes: ['title']\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').updateTypoTolerance({\n disableOnWords: ['shrek']\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').updateTypoTolerance({\n minWordSizeForTypos: {\n oneTypo: 4,\n twoTypos: 10\n }\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').updateTypoTolerance({\n disableOnNumbers: true\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').updateTypoTolerance({\n minWordSizeForTypos: {\n oneTypo: 4\n }\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').updateSynonyms({\n 'great': ['fantastic'],\n 'fantastic': ['great']\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').updateFaceting({\n maxValuesPerFacet: 2,\n sortFacetValuesBy: {\n '*': 'count'\n }\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').updatePagination({ maxTotalHits: 500 })" - }, - { - "lang": "JS", - "source": "client.index('movies').search('big fat liar', {\n matchingStrategy: 'last'\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('big fat liar', {\n matchingStrategy: 'all'\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('white shirt', {\n matchingStrategy: 'frequency'\n})" - }, - { - "lang": "JS", - "source": "const games = require('./games.json')\nclient.index('games').addDocuments(games).then((res) => console.log(res))" - }, - { - "lang": "JS", - "source": "client.index('games').updateFilterableAttributes(['release_timestamp'])" - }, - { - "lang": "JS", - "source": "client.index('games').search('', {\n filter: 'release_timestamp >= 1514761200 AND release_timestamp < 1672527600'\n})" - }, - { - "lang": "JS", - "source": "client.index('games').updateSortableAttributes(['release_timestamp'])" - }, - { - "lang": "JS", - "source": "client.index('games').search('', {\n sort: ['release_timestamp:desc'],\n})" - }, - { - "lang": "JS", - "source": "client.tasks.getTasks({ statuses: ['failed', 'canceled'] })" - }, - { - "lang": "JS", - "source": "client.tasks.getTasks({\n indexUids: ['movies'],\n types: ['documentAdditionOrUpdate','documentDeletion'],\n statuses: ['processing']\n})" - }, - { - "lang": "JS", - "source": "client.multiSearch({\n federation: {},\n queries: [\n {\n indexUid: 'movies',\n q: 'batman',\n },\n {\n indexUid: 'comics',\n q: 'batman',\n },\n ]\n})" - }, - { - "lang": "JS", - "source": "client.index('movie_ratings').updateFilterableAttributes(['genres', 'rating', 'language'])" - }, - { - "lang": "JS", - "source": "client.index('books').search('classic', { facets: ['genres', 'rating', 'language'] })" - }, - { - "lang": "JS", - "source": "client.index('movie_ratings').search('Batman', { facets: ['genres', 'rating'] })" - }, - { - "lang": "JS", - "source": "client.index('movies')\n .updateFilterableAttributes([\n 'director',\n 'genres'\n ])" - }, - { - "lang": "JS", - "source": "client.index('books').updateFaceting({\n sortFacetValuesBy: {\n genres: 'count'\n }\n})" - }, - { - "lang": "JS", - "source": "client.index('books').searchForFacetValues({\n facetQuery: 'c',\n facetName: 'genres'\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('dragon', {\n showRankingScore: true\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('dragon', { showRankingScoreDetails: true })" - }, - { - "lang": "JS", - "source": "client.index('movies').search('adventure', {\n attributesToSearchOn: ['overview']\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('-escape')" - }, - { - "lang": "JS", - "source": "client.index('movies').search('-\"escape\"')" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').search('QUERY TERMS', { distinct: 'ATTRIBUTE_A' })" - }, - { - "lang": "JS", - "source": "client.index('products').updateFilterableAttributes(['product_id', 'sku', 'url'])" - }, - { - "lang": "JS", - "source": "client.index('products').search('white shirt', { distinct: 'sku' })" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').search('badman', { rankingScoreThreshold: 0.2 })" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').search('QUERY TEXT IN JAPANESE', { locales: ['jpn'] })" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').search('kitchen utensils', {\n hybrid: {\n semanticRatio: 0.9,\n embedder: 'EMBEDDER_NAME'\n }\n})" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').search('kitchen utensils', {\n retrieveVectors: true,\n hybrid: {\n embedder: 'EMBEDDER_NAME'\n }\n})" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').search('a futuristic movie', {\n hybrid: {\n embedder: 'EMBEDDER_NAME'\n },\n media: {\n textAndPoster: {\n text: 'a futuristic movie',\n image: {\n mime: 'image/jpeg',\n data: 'base64EncodedImageData'\n }\n }\n }\n})" - }, - { - "lang": "Java", - "source": "client.getVersion();" - }, - { - "lang": "Java", - "source": "client.index(\"jackets\").updateDistinctAttributeSettings(\"product_id\");" - }, - { - "lang": "Java", - "source": "String[] attributes = {\"title\", \"overview\", \"genres\"}\nclient.index(\"movies\").updateSearchableAttributesSettings(attributes);" - }, - { - "lang": "Java", - "source": "String[] attributes = {\"title\", \"overview\", \"genres\", \"release_date\"}\nclient.index(\"movies\").updateDisplayedAttributesSettings(attributes);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"Avengers\").filter(new String[] {\"release_date > \\\"795484800\\\"\"}).build();\nclient.index(\"movie_ratings\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"Batman\").filter(new String[] {\"release_date > 795484800 AND (director = \\\"Tim Burton\\\" OR director = \\\"Christopher Nolan\\\")\"}).build();\nclient.index(\"movie_ratings\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"Planet of the Apes\").filter(new String[] {\"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\"}).build();\nclient.index(\"movie_ratings\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"thriller\").filter(new String[] {\"rating.users >= 90\"}).build();\nclient.index(\"movie_ratings\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").search(\"shifu\");" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"shifu\").offset(1).build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"shifu\").limit(2).build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").hitsPerPage(15).build();\nSearchResultPaginated searchResult = client.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").page(15).build();\nSearchResultPaginated searchResult = client.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"a\").attributesToRetrieve(new String[] {\"overview\", \"title\"}).build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest =\n SearchRequest.builder()\n .q(\"shifu\")\n .attributesToCrop(new String[] {\"overview\"})\n .cropLength(5)\n .build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest =\n SearchRequest.builder()\n .q(\"shifu\")\n .attributesToCrop(new String[] {\"overview\"})\n .cropMarker(\"[…]\")\n .build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest =\n new SearchRequest(\"winter feast\").setAttributesToHighlight(new String[] {\"overview\"});\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest =\n SearchRequest.builder()\n .q(\"winter feast\")\n .attributesToHighlight(new String[] {\"overview\"})\n .highlightPreTag(\"\")\n .highlightPostTag(\"\")\n .build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"winter feast\").showMatchesPosition(true).build();\nSearchResultPaginated searchResult = client.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "import com.meilisearch.sdk;\nimport org.json.JSONArray;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\nPath fileName = Path.of(\"movies.json\");\nString moviesJson = Files.readString(fileName);\nClient client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\nIndex index = client.index(\"movies\");\nindex.addDocuments(moviesJson);" - }, - { - "lang": "Java", - "source": "// For Maven:\n// Add the following code to the `` section of your project:\n//\n// \n// com.meilisearch.sdk\n// meilisearch-java\n// 0.17.1\n// pom\n// \n\n// For Gradle\n// Add the following line to the `dependencies` section of your `build.gradle`:\n//\n// implementation 'com.meilisearch.sdk:meilisearch-java:0.17.1'\n\n// In your .java file:\nimport com.meilisearch.sdk;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\nPath fileName = Path.of(\"movies.json\");\nString moviesJson = Files.readString(fileName);\nClient client = new Client(new Config(\"http://localhost:7700\", \"aSampleMasterKey\"));\nIndex index = client.index(\"movies\");\nindex.addDocuments(moviesJson);" - }, - { - "lang": "Java", - "source": "client.getTask(0);" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").search(\"botman\");" - }, - { - "lang": "Java", - "source": "import com.meilisearch.sdk;\nimport org.json.JSONArray;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\nPath fileName = Path.of(\"meteorites.json\");\nString meteoritesJson = Files.readString(fileName);\nClient client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\n\nclient.index(\"meteorites\").addDocuments(meteoritesJson);" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setRankingRules(new String[]\n{\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\"\n});\nclient.index(\"movies\").updateSettings(settings);" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setDisplayedAttributes(new String[]\n{\n \"title\",\n \"overview\",\n \"poster\"\n});\nclient.index(\"movies\").updateSettings(settings);" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setSearchableAttributes(new String[]\n{\n \"title\"\n});" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setStopWords(new String[]\n{\n \"the\"\n});\nclient.index(\"movies\").updateSettings(settings);" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nHashMap synonyms = new HashMap();\nsynonyms.put(\"winnie\", new String[] {\"piglet\"});\nsynonyms.put(\"piglet\", new String[] {\"winnie\"});\nsettings.setSynonyms(synonyms);\nclient.index(\"movies\").updateSettings(settings);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"mass < 200\"}).build();\nclient.index(\"meteorites\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"_geoRadius(46.9480, 7.4474, 210000)\"}).build();\nclient.index(\"meteorites\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").sort(new String[] {\"_geoPoint(48.8583701,2.2922926):asc\"}).build();\nclient.index(\"meteorites\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"mass < 200\"}).sort(new String[] {\"mass:asc\"}).build();\nclient.index(\"meteorites\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setFilterableAttributes(new String[] {\"mass\", \"_geo\"});\nsettings.setSortableAttributes(new String[] {\"mass\", \"_geo\"});\nclient.index(\"meteorites\").updateSettings(settings);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest =\n SearchRequest.builder().q(\"thriller\").filterArray(new String[][] {\n new String[] {\"genres = Horror\", \"genres = Mystery\"},\n new String[] {\"director = \\\"Jordan Peele\\\"\"}}).build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").search(\"\\\"african american\\\" horror\");" - }, - { - "lang": "Java", - "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\nclient.getKeys();" - }, - { - "lang": "Java", - "source": "client.index(\"books\").updateSortableAttributesSettings(new String[] {\"price\", \"author\"});" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setRankingRules(new String[]\n{\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\"\n});\nclient.index(\"books\").updateSettings(settings);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"science fiction\").sort(new String[] {\"rating.users:asc\"}).build();\nclient.index(\"books\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"science fiction\").sort(new String[] {\"price:asc\"}).build();\nclient.index(\"books\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"butler\").sort(new String[] {\"author:desc\"}).build();\nclient.index(\"books\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"science fiction\").sort(new String[] {\"price:asc\"}).build();\nclient.index(\"search_parameter_guide_sort_1\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setFilterableAttributes(new String[] {\"_geo\"});\nclient.index(\"restaurants\").updateSettings(settings);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"_geoRadius(45.472735, 9.184019, 2000)\"}).build();\nclient.index(\"restaurants\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\"}).build();\nclient.index(\"restaurants\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q()(\"\").filter(new String[] {\n \"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\"\n }).build();\nclient.index(\"restaurants\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "client.index(\"restaurants\").updateSortableAttributesSettings(new String[] {\"_geo\"});" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").sort(new String[] {\"_geoPoint(48.8561446,2.2978204):asc\"}).build();\nclient.index(\"restaurants\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q()(\"\").sort(new String[] {\n \"_geoPoint(48.8561446,2.2978204):asc\",\n \"rating:desc\",\n }).build();\nclient.index(\"restaurants\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"apiKey\"));\nclient.index(\"patient_medical_records\").search();" - }, - { - "lang": "Java", - "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\nclient.updateKey(\"74c9c733-3368-4738-bbe5-1d18a5fecb37\", new KeyUpdate().setDescription(\"Default Search API Key\"));" - }, - { - "lang": "Java", - "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\n\nSimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\nDate dateParsed = format.parse(\"2023-01-01T00:00:00Z\");\n\nKey keyInfo = new Key();\n\nkeyInfo.setDescription(\"Search patient records key\");\nkeyInfo.setActions(new String[] {\"search\"});\nkeyInfo.setIndexes(new String[] {\"patient_medical_records\"});\nkeyInfo.setExpiresAt(dateParsed);\n\nclient.createKey(keyInfo);" - }, - { - "lang": "Java", - "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\nclient.getKeys();" - }, - { - "lang": "Java", - "source": "Client client = new Client(new Config(\"http://localhost:7700\", \"masterKey\"));\nclient.deleteKey(\"c5cd97d-5a4b-4226-a868-2d0eb6d197ab\");" - }, - { - "lang": "Java", - "source": "client.createIndex(\"books\", \"reference_number\");" - }, - { - "lang": "Java", - "source": "client.index(\"books\").addDocuments(\"[{\"\n + \"\\\"reference_number\\\": 2879,\"\n + \"\\\"title\\\": \\\"Diary of a Wimpy Kid\\\",\"\n + \"\\\"author\\\": \\\"Jeff Kinney\\\",\"\n + \"\\\"genres\\\": [\\\"comedy\\\", \\\"humor\\\"],\"\n + \"\\\"price\\\": 5.00\"\n + \"}]\"\n, \"reference_number\");" - }, - { - "lang": "Java", - "source": "client.updateIndex(\"books\", \"title\");" - }, - { - "lang": "Java", - "source": "TypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setEnabled(false);\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" - }, - { - "lang": "Java", - "source": "TypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setDisableOnAttributes(new String[] {\"title\"});\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" - }, - { - "lang": "Java", - "source": "TypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setDisableOnWords(new String[] {\"shrek\"});\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" - }, - { - "lang": "Java", - "source": "TypoTolerance typoTolerance = new TypoTolerance();\n HashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 4);\n put(\"twoTypos\", 10);\n }\n };\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" - }, - { - "lang": "Java", - "source": "TypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setDisableOnNumbers(true);\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" - }, - { - "lang": "Java", - "source": "HashMap minWordSizeTypos =\nnew HashMap() {\n {\n put(\"oneTypo\", 4);\n }\n};\n\nTypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\n\nclient.index(\"movies\").updateTypoToleranceSettings(typoTolerance);" - }, - { - "lang": "Java", - "source": "HashMap synonyms = new HashMap();\nsynonyms.put(\"great\", new String[] {\"fantastic\"});\nsynonyms.put(\"fantastic\", new String[] {\"great\"});\n\nclient.index(\"movies\").updateSynonymsSettings(synonyms);" - }, - { - "lang": "Java", - "source": "Faceting newFaceting = new Faceting();\nnewFaceting.setMaxValuesPerFacet(2);\nHashMap facetSortValues = new HashMap<>();\nfacetSortValues.put(\"*\", FacetSortValue.COUNT);\nnewFaceting.setSortFacetValuesBy(facetSortValues);\nclient.index(\"movies\").updateFacetingSettings(newFaceting);" - }, - { - "lang": "Java", - "source": "Pagination newPagination = new Pagination();\nnewPagination.setMaxTotalHits(500);\nclient.index(\"movies\").updatePaginationSettings(newPagination);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"big fat liar\").matchingStrategy(MatchingStrategy.LAST).build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"big fat liar\").matchingStrategy(MatchingStrategy.ALL).build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"white shirt\").matchingStrategy(MatchingStrategy.FREQUENCY).build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "import com.meilisearch.sdk;\nimport org.json.JSONArray;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\nPath fileName = Path.of(\"games.json\");\nString gamesJson = Files.readString(fileName);\nIndex index = client.index(\"games\");\nindex.addDocuments(gamesJson);" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateFilterableAttributesSettings(new String[] { \"release_timestamp\" });" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").filter(new String[] {\"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\"}).build();\nclient.index(\"games\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setSortableAttributes(new String[] {\"release_timestamp\"});\nclient.index(\"games\").updateSettings(settings);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"\").sort(new String[] {\"release_timestamp:desc\"}).build();\nclient.index(\"games\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "TasksQuery query = new TasksQuery().setStatuses(new String[] {\"failed\", \"canceled\"});\nclient.getTasks(query);" - }, - { - "lang": "Java", - "source": "TasksQuery query =\n new TasksQuery()\n .setStatuses(new String[] {\"processing\"})\n .setTypes(new String[] {\"documentAdditionOrUpdate\", \"documentDeletion\"})\n .setIndexUids(new String[] {\"movies\"});\n\nclient.getTasks(query);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"classic\").facets(new String[]\n{\n \"genres\",\n \"rating\",\n \"language\"\n}).build();\nclient.index(\"books\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"Batman\").facets(new String[]\n{\n \"genres\",\n \"rating\"\n}).build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateFilterableAttributesSettings(new String[]\n{\n \"genres\",\n \"director\"\n});" - }, - { - "lang": "Java", - "source": "Faceting newFaceting = new Faceting();\nHashMap facetSortValues = new HashMap<>();\nfacetSortValues.put(\"genres\", FacetSortValue.COUNT);\nnewFaceting.setSortFacetValuesBy(facetSortValues);\nclient.index(\"books\").updateFacetingSettings(newFaceting);" - }, - { - "lang": "Java", - "source": "FacetSearchRequest fsr = FacetSearchRequest.builder().facetName(\"genres\").facetQuery(\"c\").build();\nclient.index(\"books\").facetSearch(fsr);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"dragon\").showRankingScore(true).build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"dragon\").showRankingScoreDetails(true).build();\nclient.index(\"movies\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"adventure\").attributesToSearchOn(new String[] {\"overview\"});\nclient.index(\"movies\").searchRequest(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"QUERY TERMS\").distinct(\"ATTRIBUTE_A\").build();\nclient.index(\"INDEX_NAME\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setFilterableAttributes(new String[] {\"product_id\", \"SKU\", \"url\"});\nclient.index(\"products\").updateSettings(settings);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"white shirt\").distinct(\"sku\").build();\nclient.index(\"products\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"badman\").rankingScoreThreshold(0.2).build();\nclient.index(\"INDEX_NAME\").search(searchRequest);" - }, - { - "lang": "Java", - "source": "SearchRequest searchRequest = SearchRequest.builder().q(\"QUERY TEXT IN JAPANESE\").locales(new String[]{\"jpn\"}).build();\nclient.index(\"INDEX_NAME\").search(searchRequest);" - }, - { - "lang": "PHP", - "source": "$client->version();" - }, - { - "lang": "PHP", - "source": "$client->index('jackets')->updateDistinctAttribute('product_id');" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movie_ratings')->search('Avengers', [\n 'filter' => 'release_date > 795484800'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movie_ratings')->search('Batman', [\n 'filter' => 'release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movie_ratings')->search('Planet of the Apes', [\n 'filter' => 'release_date > 1577884550 AND (NOT director = \"Tim Burton\")'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movie_ratings')->search('thriller', [\n 'filter' => 'rating.users >= 90'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('shifu');" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('shifu', ['offset' => 1]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('shifu', ['limit' => 2]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('', ['hitsPerPage' => 15]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('', ['page' => 2]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('shifu', [\n 'attributesToRetrieve' => ['overview', 'title']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('shifu', [\n 'attributesToCrop' => ['overview'],\n 'cropLength' => 5\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('shifu', [\n 'attributesToCrop' => ['overview'],\n 'cropMarker' => '[…]'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('winter feast', [\n 'attributesToHighlight' => ['overview']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('winter feast', [\n 'attributesToHighlight' => ['overview'],\n 'highlightPreTag' => '',\n 'highlightPostTag' => ''\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('winter feast', [\n 'attributesToHighlight' => ['overview'],\n 'showMatchesPosition' => true\n]);" - }, - { - "lang": "PHP", - "source": "$moviesJson = file_get_contents('movies.json');\n$movies = json_decode($moviesJson);\n\n$client->index('movies')->addDocuments($movies);" - }, - { - "lang": "PHP", - "source": "/**\n * Using `meilisearch-php` with the Guzzle HTTP client, in the command line:\n * composer require meilisearch/meilisearch-php \\\n * guzzlehttp/guzzle \\\n * http-interop/http-factory-guzzle:^1.0\n */\n\n/**\n * In your PHP file:\n */\nindex('movies')->addDocuments($movies);" - }, - { - "lang": "PHP", - "source": "$client->getTask(0);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('botman');" - }, - { - "lang": "PHP", - "source": "$client = new Client('http://localhost:7700');\n\n$meteorites_json = file_get_contents('meteorites.json');\n$meteorites = json_decode($meteorites_json);\n\n$client->index('meteorites')->addDocuments($meteorites);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateRankingRules([\n 'exactness',\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'release_date:asc',\n 'rank:desc'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateDisplayedAttributes([\n 'title',\n 'overview',\n 'poster'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateSearchableAttributes(['title']);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateStopWords(['the']);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateSynonyms([\n 'winnie' => ['piglet'],\n 'piglet' => ['winnie']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('meteorites')->search('', [\n 'filter' => 'mass < 200'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('meteorites')->search('', [\n 'filter' => '_geoRadius(46.9480, 7.4474, 210000)'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('meteorites')->search('', [\n 'sort' => ['_geoPoint(48.8583701,2.2922926):asc']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('meteorites')->search('', [\n 'filter' => 'mass < 200',\n 'sort' => ['mass:asc']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('meteorites')->updateSettings([\n 'filterableAttributes' => [\n 'mass',\n '_geo'\n ],\n 'sortableAttributes' => [\n 'mass',\n '_geo'\n ]\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('thriller', [\n 'filter' => [['genres = Horror', 'genres = Mystery'], 'director = \"Jordan Peele\"']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('\"african american\" horror');" - }, - { - "lang": "PHP", - "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->getKeys();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateSortableAttributes([\n 'author',\n 'price'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateRankingRules([\n 'words',\n 'sort',\n 'typo',\n 'proximity',\n 'attribute',\n 'exactness'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->search('science fiction', ['sort' => ['rating.users:asc']]);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->search('science fiction', ['sort' => ['price:asc']]);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->search('butler', ['sort' => ['author:desc']]);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->search('science fiction', ['sort' => ['price:asc']]);" - }, - { - "lang": "PHP", - "source": "$client->index('restaurants')->updateFilterableAttributes([\n '_geo'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('restaurants')->search('', [\n 'filter' => '_geoRadius(45.472735, 9.184019, 2000)'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('restaurants')->search('', [\n 'filter' => '_geoRadius(45.472735, 9.184019, 2000) AND type = pizza'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('restaurants')->search('', [\n 'filter' => '_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('restaurants')->updateSortableAttributes([\n '_geo'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('restaurants')->search('', [\n 'sort' => ['_geoPoint(48.8561446,2.2978204):asc']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('restaurants')->search('', [\n 'sort' => ['_geoPoint(48.8561446,2.2978204):asc', 'rating:desc']\n]);" - }, - { - "lang": "PHP", - "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->index('patient_medical_records')->search();" - }, - { - "lang": "PHP", - "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->updateKey('74c9c733-3368-4738-bbe5-1d18a5fecb37',\n ['description' => 'Default Search API Key']\n);" - }, - { - "lang": "PHP", - "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->createKey([\n 'description' => 'Search patient records key',\n 'actions' => ['search'],\n 'indexes' => ['patient_medical_records'],\n 'expiresAt' => '2023-01-01T00:00:00Z',\n]);" - }, - { - "lang": "PHP", - "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->getKeys();" - }, - { - "lang": "PHP", - "source": "$client = new Client('http://localhost:7700', 'masterKey');\n$client->deleteKey('ac5cd97d-5a4b-4226-a868-2d0eb6d197ab');" - }, - { - "lang": "PHP", - "source": "$client->createIndex('books', ['primaryKey' => 'reference_number']);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->addDocuments([\n [\n 'reference_number' => 287947,\n 'title' => 'Diary of a Wimpy Kid',\n 'author' => 'Jeff Kinney',\n 'genres' => ['comedy', 'humor'],\n 'price' => 5.00\n ]\n], 'reference_number');" - }, - { - "lang": "PHP", - "source": "$client->updateIndex('books', ['primaryKey' => 'title']);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateTypoTolerance([\n 'enabled' => false\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateTypoTolerance([\n 'disableOnAttributes' => ['title']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateTypoTolerance([\n 'disableOnWords' => ['shrek']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateTypoTolerance([\n 'minWordSizeForTypos' => [\n 'oneTypo' => 4,\n 'twoTypos' => 10\n ]\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateTypoTolerance([\n 'disableOnNumbers' => true\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateTypoTolerance([\n 'minWordSizeForTypos' => [\n 'oneTypo' => 4\n ]\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateSynonyms([\n 'great' => ['fantastic'],\n 'fantastic' => ['great'],\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')\n ->updateFaceting([\n 'maxValuesPerFacet' => 2,\n 'sortFacetValuesBy' => ['*' => 'count']\n ]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updatePagination(['maxTotalHits' => 500]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('big fat liar', ['matchingStrategy' => 'last']);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('big fat liar', ['matchingStrategy' => 'all']);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('white shirt', ['matchingStrategy' => 'frequency']);" - }, - { - "lang": "PHP", - "source": "$gamesJson = file_get_contents('games.json');\n$games = json_decode($gamesJson);\n\n$client->index('games')->addDocuments($games);" - }, - { - "lang": "PHP", - "source": "$client->index('games')->updateFilterableAttributes(['release_timestamp']);" - }, - { - "lang": "PHP", - "source": "$client->index('games')->search('', [\n 'filter' => ['release_timestamp >= 1514761200 AND release_timestamp < 1672527600']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('games')->updateSortableAttributes(['release_timestamp']);" - }, - { - "lang": "PHP", - "source": "$client->index('games')->search('', ['sort' => ['release_timestamp:desc']]);" - }, - { - "lang": "PHP", - "source": "$client->getTasks((new TasksQuery())->setStatuses(['failed', 'canceled']));" - }, - { - "lang": "PHP", - "source": "$client->getTasks(\n (new TasksQuery())\n ->setStatuses(['processing'])\n ->setUids(['movies'])\n ->setTypes(['documentAdditionOrUpdate', 'documentDeletion'])\n);" - }, - { - "lang": "PHP", - "source": "$client->multiSearch([\n (new SearchQuery())\n ->setIndexUid('movies'))\n ->setQuery('batman'),\n (new SearchQuery())\n ->setIndexUid('comics')\n ->setQuery('batman'),\n ],\n (new MultiSearchFederation())\n);" - }, - { - "lang": "PHP", - "source": "$client->index('movie_ratings')->updateFilterableAttributes(['genres', 'rating', 'language']);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->search('classic', [\n 'facets' => ['genres', 'rating', 'language']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movie_ratings')->search('Batman', [\n 'facets' => ['genres', 'rating']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateFilterableAttributes(['director', 'genres']);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateFaceting(['sortFacetValuesBy' => ['genres' => 'count']]);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->facetSearch(\n (new FacetSearchQuery())\n ->setFacetQuery('c')\n ->setFacetName('genres')\n);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('dragon', [\n 'showRankingScore' => true\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('dragon', [\n 'showRankingScoreDetails' => true\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('adventure', [\n 'attributesToSearchOn' => ['overview']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('-escape');" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('-\"escape\"');" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->search('QUERY TERMS', [\n 'distinct' => 'ATTRIBUTE_A'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('products')->updateFilterableAttributes(['product_id', 'sku', 'url']);" - }, - { - "lang": "PHP", - "source": "$client->index('products')->search('white shirt', [\n 'distinct' => 'sku'\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->search('badman', [\n 'rankingScoreThreshold' => 0.2\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->search('QUERY TEXT IN JAPANESE', [\n 'locales' => ['jpn']\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->search('kitchen utensils', [\n 'hybrid' => [\n 'semanticRatio' => 0.9,\n 'embedder' => 'EMBEDDER_NAME'\n ]\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->search('kitchen utensils', [\n 'retrieveVectors' => true,\n 'hybrid' => [\n 'embedder': 'EMBEDDER_NAME'\n ]\n]);" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->search('a futuristic movie', [\n 'hybrid' => [\n 'embedder' => 'EMBEDDER_NAME'\n ],\n 'media' => [\n 'textAndPoster' => [\n 'text' => 'a futuristic movie',\n 'image' => [\n 'mime' => 'image/jpeg',\n 'data' => 'base64EncodedImageData'\n ]\n ]\n ]\n]);" - }, - { - "lang": "Python", - "source": "client.get_version()" - }, - { - "lang": "Python", - "source": "client.index('jackets').update_distinct_attribute('product_id')" - }, - { - "lang": "Python", - "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" - }, - { - "lang": "Python", - "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" - }, - { - "lang": "Python", - "source": "client.index('movie_ratings').search('Avengers', {\n 'filter': 'release_date > 795484800'\n})" - }, - { - "lang": "Python", - "source": "client.index('movie_ratings').search('Batman', {\n 'filter': 'release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")'\n})" - }, - { - "lang": "Python", - "source": "client.index('movie_ratings').search('Planet of the Apes', {\n 'filter': 'release_date > 1577884550 AND (NOT director = \"Tim Burton\"))'\n})" - }, - { - "lang": "Python", - "source": "client.index('movie_ratings').search('thriller', {\n 'filter': 'rating.users >= 90'\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('shifu')" - }, - { - "lang": "Python", - "source": "client.index('movies').search('shifu', {\n 'offset': 1\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('shifu', {\n 'limit': 2\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('', {'hitsPerPage': 15})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('', {'page': 2})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('shifu', {\n 'attributesToRetrieve': ['overview', 'title']\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('shifu', {\n 'attributesToCrop': ['overview'],\n 'cropLength': 5\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('shifu', {\n 'attributesToCrop': ['overview'],\n 'cropMarker': '[…]'\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('winter feast', {\n 'attributesToHighlight': ['overview']\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('winter feast', {\n 'attributesToHighlight': ['overview'],\n 'highlightPreTag': '',\n 'highlightPostTag': ''\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('winter feast', {\n 'showMatchesPosition': True\n})" - }, - { - "lang": "Python", - "source": "import json\n\njson_file = open('movies.json', encoding='utf-8')\nmovies = json.load(json_file)\nclient.index('movies').add_documents(movies)" - }, - { - "lang": "Python", - "source": "# In the command line:\n# pip3 install meilisearch\n\n# In your .py file:\nimport meilisearch\nimport json\n\nclient = meilisearch.Client('http://localhost:7700', 'aSampleMasterKey')\n\njson_file = open('movies.json', encoding='utf-8')\nmovies = json.load(json_file)\nclient.index('movies').add_documents(movies)" - }, - { - "lang": "Python", - "source": "client.get_task(0)" - }, - { - "lang": "Python", - "source": "client.index('movies').search('botman')" - }, - { - "lang": "Python", - "source": "import json\n\njson_file = open('meteorites.json', encoding='utf-8')\nmeteorites = json.load(json_file)\nclient.index('meteorites').add_documents(meteorites)" - }, - { - "lang": "Python", - "source": "client.index('movies').update_ranking_rules([\n 'exactness',\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'release_date:asc',\n 'rank:desc'\n])" - }, - { - "lang": "Python", - "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'poster'\n])" - }, - { - "lang": "Python", - "source": "client.index('movies').update_searchable_attributes([\n 'title'\n])" - }, - { - "lang": "Python", - "source": "client.index('movies').update_stop_words(['the'])" - }, - { - "lang": "Python", - "source": "client.index('movies').update_synonyms({\n 'winnie': ['piglet'],\n 'piglet': ['winnie']\n})" - }, - { - "lang": "Python", - "source": "client.index('meteorites').search('', {\n 'filter': 'mass < 200'\n})" - }, - { - "lang": "Python", - "source": "client.index('meteorites').search('', {\n 'filter': '_geoRadius(46.9480, 7.4474, 210000)'\n})" - }, - { - "lang": "Python", - "source": "client.index('meteorites').search('', {\n 'sort': ['_geoPoint(48.8583701,2.2922926):asc']\n})" - }, - { - "lang": "Python", - "source": "client.index('meteorites').search('', {\n 'filter': 'mass < 200',\n 'sort': ['mass:asc']\n})" - }, - { - "lang": "Python", - "source": "client.index('meteorites').update_settings({\n 'filterableAttributes': [\n 'mass',\n '_geo'\n ],\n 'sortableAttributes': [\n 'mass',\n '_geo'\n ]\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('thriller', {\n 'filter': [['genres = Horror', 'genres = Mystery'], 'director = \"Jordan Peele\"']\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('\"african american\" horror')" - }, - { - "lang": "Python", - "source": "client = Client('http://localhost:7700', 'masterKey')\nclient.get_keys()" - }, - { - "lang": "Python", - "source": "client.index('books').update_sortable_attributes([\n 'author',\n 'price'\n])" - }, - { - "lang": "Python", - "source": "client.index('books').update_ranking_rules([\n 'words',\n 'sort',\n 'typo',\n 'proximity',\n 'attribute',\n 'exactness'\n])" - }, - { - "lang": "Python", - "source": "client.index('books').search('science fiction', {\n 'sort': ['rating.users:asc']\n})" - }, - { - "lang": "Python", - "source": "client.index('books').search('science fiction', {\n 'sort': ['price:asc']\n})" - }, - { - "lang": "Python", - "source": "client.index('books').search('butler', {\n 'sort': ['author:desc']\n})" - }, - { - "lang": "Python", - "source": "client.index('books').search('science fiction', {\n 'sort': ['price:asc']\n})" - }, - { - "lang": "Python", - "source": "client.index('restaurants').update_filterable_attributes([\n '_geo'\n])" - }, - { - "lang": "Python", - "source": "client.index('restaurants').search('', {\n 'filter': '_geoRadius(45.472735, 9.184019, 2000)'\n})" - }, - { - "lang": "Python", - "source": "client.index('restaurants').search('', {\n 'filter': '_geoRadius(45.472735, 9.184019, 2000) AND type = pizza'\n})" - }, - { - "lang": "Python", - "source": "client.index('restaurants').search('Batman', {\n 'filter': '_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])'\n})" - }, - { - "lang": "Python", - "source": "client.index('restaurants').update_sortable_attributes([\n '_geo'\n])" - }, - { - "lang": "Python", - "source": "client.index('restaurants').search('', {\n 'sort': ['_geoPoint(48.8561446,2.2978204):asc']\n})" - }, - { - "lang": "Python", - "source": "client.index('restaurants').search('', {\n 'sort': ['_geoPoint(48.8561446,2.2978204):asc', 'rating:desc']\n})" - }, - { - "lang": "Python", - "source": "client = Client('http://localhost:7700', 'apiKey')\nclient.index('patient_medical_records').search()" - }, - { - "lang": "Python", - "source": "client = Client('http://localhost:7700', 'masterKey')\nclient.update_key(key_or_uid='74c9c733-3368-4738-bbe5-1d18a5fecb37', options={\n 'description': 'Default Search API Key'\n})" - }, - { - "lang": "Python", - "source": "client = Client('http://localhost:7700', 'masterKey')\n client.create_key(options={\n 'description': 'Search patient records key',\n 'actions': ['search'],\n 'indexes': ['patient_medical_records'],\n 'expiresAt': '2023-01-01T00:00:00Z'\n})" - }, - { - "lang": "Python", - "source": "client = Client('http://localhost:7700', 'masterKey')\nclient.get_keys()" - }, - { - "lang": "Python", - "source": "client = Client('http://localhost:7700', 'masterKey')\nclient.delete_key('ac5cd97d-5a4b-4226-a868-2d0eb6d197ab')" - }, - { - "lang": "Python", - "source": "client.create_index('books', {'primaryKey': 'reference_number'})" - }, - { - "lang": "Python", - "source": "client.index('books').add_documents([{\n 'reference_number': 287947,\n 'title': 'Diary of a Wimpy Kid',\n 'author': 'Jeff Kinney',\n 'genres': ['comedy', 'humor'],\n 'price': 5.00\n}], 'reference_number')" - }, - { - "lang": "Python", - "source": "client.index('books').update(primary_key='title')" - }, - { - "lang": "Python", - "source": "client.index('movies').update_typo_tolerance({\n 'enabled': False\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').update_typo_tolerance({\n 'disableOnAttributes': ['title']\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').update_typo_tolerance({\n 'disableOnWords': ['shrek']\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').update_typo_tolerance({\n 'minWordSizeForTypos': {\n 'oneTypo': 4,\n 'twoTypos': 10\n }\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').update_typo_tolerance({\n 'disableOnNumbers': True\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').update_typo_tolerance({\n 'minWordSizeForTypos': {\n 'oneTypo': 4\n }\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').update_synonyms({\n 'great': ['fantastic'],\n 'fantastic': ['great']\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').update_faceting_settings({\n 'maxValuesPerFacet': 2,\n 'sortFacetValuesBy': {\n '*': 'count'\n }\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').update_pagination_settings({'maxTotalHits': 500})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('big fat liar', {\n 'matchingStrategy': 'last'\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('big fat liar', {\n 'matchingStrategy': 'all'\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('big fat liar', {\n 'matchingStrategy': 'frequency'\n})" - }, - { - "lang": "Python", - "source": "import json\n\njson_file = open('./games.json', encoding='utf-8')\ngames = json.load(json_file)\nclient.index('games').add_documents(games)" - }, - { - "lang": "Python", - "source": "client.index('games').update_filterable_attributes(['release_timestamp'])" - }, - { - "lang": "Python", - "source": "client.index('games').search('', {\n 'filter': 'release_timestamp >= 1514761200 AND release_timestamp < 1672527600'\n})" - }, - { - "lang": "Python", - "source": "client.index('games').update_sortable_attributes(['release_timestamp'])" - }, - { - "lang": "Python", - "source": "client.index('games').search('', {\n 'sort': ['release_timestamp:desc']\n})" - }, - { - "lang": "Python", - "source": "client.get_tasks({'statuses': ['failed', 'canceled']})" - }, - { - "lang": "Python", - "source": "client.get_tasks(\n {\n 'indexUids': 'movies',\n 'types': ['documentAdditionOrUpdate', 'documentDeletion'],\n 'statuses': ['processing'],\n }\n)" - }, - { - "lang": "Python", - "source": "client.multi_search(\n [{\"indexUid\": \"movies\", \"q\": \"batman\"}, {\"indexUid\": \"comics\", \"q\": \"batman\"}],\n {}\n)" - }, - { - "lang": "Python", - "source": "client.index('movie_ratings').update_filterable_attributes([\n 'genres',\n 'director',\n 'language'\n])" - }, - { - "lang": "Python", - "source": "client.index('books').search('classic', {\n 'facets': ['genres', 'rating', 'language']\n})" - }, - { - "lang": "Python", - "source": "client.index('movie_ratings').search('Batman', {\n 'facets': ['genres', 'rating']\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').update_filterable_attributes([\n 'director',\n 'genres',\n])" - }, - { - "lang": "Python", - "source": "client.index('books').update_faceting_settings({ 'sortFacetValuesBy': { 'genres': 'count' } })" - }, - { - "lang": "Python", - "source": "client.index('books').facet_search('genres', 'c')" - }, - { - "lang": "Python", - "source": "client.index('movies').search('dragon', {\n 'showRankingScore': True\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('dragon', {\n 'showRankingScoreDetails': True\n})" - }, - { - "lang": "Python", - "source": "client.index('movies').search('adventure', {\n 'attributesToSearchOn': ['overview']\n})" - }, - { - "lang": "Python", - "source": "client.index('INDEX_NAME').search('QUERY_TERMS', { distinct: 'ATTRIBUTE_A' })" - }, - { - "lang": "Python", - "source": "client.index('products').update_filterable_attributes(['product_id', 'sku', 'url'])" - }, - { - "lang": "Python", - "source": "client.index('products').search('white shirt', { distinct: 'sku' })" - }, - { - "lang": "Python", - "source": "client.index('INDEX_NAME').search('badman', { 'rankingScoreThreshold': 0.2 })" - }, - { - "lang": "Python", - "source": "client.index('INDEX_NAME').search('進撃の巨人', { 'locales': ['jpn'] })" - }, - { - "lang": "Ruby", - "source": "client.version" - }, - { - "lang": "Ruby", - "source": "client.index('jackets').update_distinct_attribute('product_id')" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_settings({\n displayed_attributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ]\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movie_ratings').search('Avengers', { filter: 'release_date > 795484800' })" - }, - { - "lang": "Ruby", - "source": "client.index('movie_ratings').search('Batman', {\n filter: 'release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")'\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movie_ratings').search('Planet of the Apes', {\n filter: \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\"\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies_ratings').search('thriller', {\n filter: 'rating.users >= 90'\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('shifu')" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('shifu', {\n offset: 1\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('shifu', {\n limit: 2\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('', hits_per_page: 15)" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('', page: 2)" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('shifu', {\n attributes_to_retrieve: ['overview', 'title']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('shifu', {\n attributes_to_crop: ['overview'],\n crop_length: 5\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('shifu', {\n attributes_to_crop: ['overview'],\n crop_marker: '[…]'\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('winter feast', {\n attributes_to_highlight: ['overview']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('winter feast', {\n attributes_to_highlight: ['overview'],\n highlight_pre_tag: '',\n highlight_post_tag: ''\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('winter feast', {\n show_matches_position: true\n})" - }, - { - "lang": "Ruby", - "source": "require 'json'\n\nmovies_json = File.read('movies.json')\nmovies = JSON.parse(movies_json)\nclient.index('movies').add_documents(movies)" - }, - { - "lang": "Ruby", - "source": "# In the command line:\n# bundle add meilisearch\n\n# In your .rb file:\nrequire 'json'\nrequire 'meilisearch'\n\nclient = MeiliSearch::Client.new('http://localhost:7700', 'aSampleMasterKey')\n\nmovies_json = File.read('movies.json')\nmovies = JSON.parse(movies_json)\n\nclient.index('movies').add_documents(movies)" - }, - { - "lang": "Ruby", - "source": "client.task(0)" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('botman')" - }, - { - "lang": "Ruby", - "source": "file = File.read('meteorites.json')\njson = JSON.parse(file)\n\nclient.index('meteorites').add_documents(json)" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_ranking_rules([\n 'exactness',\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'release_date:asc',\n 'rank:desc'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'poster'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_searchable_attributes([\n 'title'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_stop_words(['the'])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_synonyms({\n winnie: ['piglet'],\n piglet: ['winnie']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('meteorites').search('', { filter: 'mass < 200' })" - }, - { - "lang": "Ruby", - "source": "client.index('meteorites').search('', { filter: '_geoRadius(46.9480, 7.4474, 210000)' })" - }, - { - "lang": "Ruby", - "source": "client.index('meteorites').search('', { sort: ['_geoPoint(48.8583701, 2.2922926):asc'] })" - }, - { - "lang": "Ruby", - "source": "client.index('meteorites').search('', {\n sort: ['mass:asc'],\n filter: 'mass < 200'\n})" - }, - { - "lang": "Ruby", - "source": "client.index('meteorites').update_settings({\n filterable_attributes: ['mass', '_geo'],\n sortable_attributes: ['mass', '_geo']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('thriller', {\n filter: [['genres = Horror', 'genres = Mystery'], 'director = \"Jordan Peele\"']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('\"african american\" horror')" - }, - { - "lang": "Ruby", - "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'masterKey')\nclient.keys" - }, - { - "lang": "Ruby", - "source": "client.index('books').update_sortable_attributes(['author', 'price'])" - }, - { - "lang": "Ruby", - "source": "client.index('books').update_ranking_rules([\n 'words',\n 'sort',\n 'typo',\n 'proximity',\n 'attribute',\n 'exactness'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('books').search('science fiction', { sort: ['rating.users:asc'] })" - }, - { - "lang": "Ruby", - "source": "client.index('books').search('science fiction', { sort: ['price:asc'] })" - }, - { - "lang": "Ruby", - "source": "client.index('books').search('butler', { sort: ['author:desc'] })" - }, - { - "lang": "Ruby", - "source": "client.index('books').search('science fiction', { sort: ['price:asc'] })" - }, - { - "lang": "Ruby", - "source": "client.index('restaurants').update_filterable_attributes(['_geo'])" - }, - { - "lang": "Ruby", - "source": "client.index('restaurants').search('', { filter: '_geoRadius(45.472735, 9.184019, 2000)' })" - }, - { - "lang": "Ruby", - "source": "client.index('restaurants').search('', { filter: '_geoRadius(45.472735, 9.184019, 2000) AND type = pizza' })" - }, - { - "lang": "Ruby", - "source": "client.index('restaurants').search('', { filter: ['_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])'] })" - }, - { - "lang": "Ruby", - "source": "client.index('restaurants').update_sortable_attributes(['_geo'])" - }, - { - "lang": "Ruby", - "source": "client.index('restaurants').search('', { sort: ['_geoPoint(48.8561446, 2.2978204):asc'] })" - }, - { - "lang": "Ruby", - "source": "client.index('restaurants').search('', { sort: ['_geoPoint(48.8561446, 2.2978204):asc', 'rating:desc'] })" - }, - { - "lang": "Ruby", - "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'apiKey')\nclient.index('patient_medical_records').search" - }, - { - "lang": "Ruby", - "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'masterKey')\nclient.update_key('74c9c733-3368-4738-bbe5-1d18a5fecb37', description: 'Default Search API Key')" - }, - { - "lang": "Ruby", - "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'masterKey')\nclient.create_key(\n description: 'Search patient records key',\n actions: ['search'],\n indexes: ['patient_medical_records'],\n expires_at: '2023-01-01T00:00:00Z'\n)" - }, - { - "lang": "Ruby", - "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'masterKey')\nclient.keys" - }, - { - "lang": "Ruby", - "source": "client = MeiliSearch::Client.new('http://localhost:7700', 'masterKey')\nclient.delete_key('ac5cd97d-5a4b-4226-a868-2d0eb6d197ab')" - }, - { - "lang": "Ruby", - "source": "client.create_index('books', primary_key: 'reference_number')" - }, - { - "lang": "Ruby", - "source": "client.index('books').add_documents([\n {\n reference_number: 287947,\n title: 'Diary of a Wimpy Kid',\n author: 'Jeff Kinney',\n genres: ['comedy', 'humor'],\n price: 5.00\n }\n], 'reference_number')" - }, - { - "lang": "Ruby", - "source": "client.index('books').update(primary_key: 'title')" - }, - { - "lang": "Ruby", - "source": "index('books').update_typo_tolerance({ enabled: false })" - }, - { - "lang": "Ruby", - "source": "index('books').update_typo_tolerance({ disable_on_attributes: ['title'] })" - }, - { - "lang": "Ruby", - "source": "index('books').update_typo_tolerance({ disable_on_words: ['shrek'] })" - }, - { - "lang": "Ruby", - "source": "index('books').update_typo_tolerance({\n min_word_size_for_typos: {\n one_typo: 4,\n two_typos: 10\n }\n})" - }, - { - "lang": "Ruby", - "source": "index('books').update_typo_tolerance({ disable_on_numbers: true })" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_typo_tolerance({ min_word_size_for_typos: { one_typo: 4 } })" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_synonyms({\n great: ['fantastic'],\n fantastic: ['great']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_faceting({\n max_values_per_facet: 2,\n sort_facet_values_by: {\n genres: 'count'\n }\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_pagination(max_total_hits: 500)" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('big fat liar', {\n matching_strategy: 'last'\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('big fat liar', {\n matching_strategy: 'all'\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('white shirt', {\n matching_strategy: 'frequency'\n})" - }, - { - "lang": "Ruby", - "source": "require 'json'\n\ngames = JSON.parse(File.read('games.json'))\nclient.index('games').add_documents(games)" - }, - { - "lang": "Ruby", - "source": "client.index('games').update_filterable_attributes(['release_timestamp'])" - }, - { - "lang": "Ruby", - "source": "client.index('games').search('', {\n filter: 'release_timestamp >= 1514761200 AND release_timestamp < 1672527600'\n})" - }, - { - "lang": "Ruby", - "source": "client.index('games').update_sortable_attributes(['release_timestamp'])" - }, - { - "lang": "Ruby", - "source": "client.index('games').search('', sort: ['release_timestamp:desc'])" - }, - { - "lang": "Ruby", - "source": "client.get_tasks(statuses: ['failed', 'canceled'])" - }, - { - "lang": "Ruby", - "source": "client.get_tasks(index_uids: ['movies'], types: ['documentAdditionOrUpdate', 'documentDeletion'], statuses: ['processing'])" - }, - { - "lang": "Ruby", - "source": "client.multi_search(\n queries: [{ index_uid: 'movies', q: 'batman' }, { index_uid: 'comics', q: 'batman' }],\n federation: {}\n)" - }, - { - "lang": "Ruby", - "source": "client.index('movie_ratings').update_filterable_attributes(['genres', 'rating', 'language'])" - }, - { - "lang": "Ruby", - "source": "client.index('books').search('classic', {\n facets: ['genres', 'rating', 'language']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movie_ratings').search('Batman', {\n facets: ['genres', 'rating']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_filterable_attributes([\n 'director',\n 'genres'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('books').update_faceting(\n sort_facet_values_by: {\n genres: 'count'\n }\n)" - }, - { - "lang": "Ruby", - "source": "client.index('books').facet_search('genres', 'c')" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('dragon', {\n show_ranking_score: true\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('dragon', {\n show_ranking_score_details: true\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('adventure', {\n attributes_to_search_on: ['overview']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').search('QUERY TERMS', {\n distinct: 'ATTRIBUTE_A'\n})" - }, - { - "lang": "Ruby", - "source": "client.index('products').update_filterable_attributes([\n 'product_id',\n 'sku',\n 'url'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('products').search('white shirt', {\n distinct: 'sku'\n})" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').search('badman', {\n rankingScoreThreshold: 0.2\n})" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').search('進撃の巨人', { locales: ['jpn'] })" - }, - { - "lang": "Rust", - "source": "let version: Version = client\n .get_version()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"jackets\")\n .set_distinct_attribute(\"product_id\")\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let searchable_attributes = [\n \"title\",\n \"overview\",\n \"genres\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_searchable_attributes(&searchable_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let displayed_attributes = [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_displayed_attributes(&displayed_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movie_ratings\")\n .search()\n .with_query(\"Avengers\")\n .with_filter(\"release_date > 795484800\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movie_ratings\")\n .search()\n .with_query(\"Batman\")\n .with_filter(r#\"release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")\"#)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movie_ratings\")\n .search()\n .with_query(\"Planet of the Apes\")\n .with_filter(r#\"release_date > 1577884550 AND (NOT director = \"Tim Burton\")\"#)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movie_rating\")\n .search()\n .with_query(\"thriller\")\n .with_filter(\"rating.users >= 90\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .with_offset(1)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .with_limit(2)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "client.index(\"movies\").search().with_hits_per_page(15).execute().await?;" - }, - { - "lang": "Rust", - "source": "client.index(\"movies\").search().with_page(2).execute().await?;" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .with_attributes_to_retrieve(Selectors::Some(&[\"overview\", \"title\"]))\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .with_attributes_to_crop(Selectors::Some(&[(\"overview\", None)]))\n .with_crop_length(5)\n .execute()\n .await\n .unwrap();\n\n// Get the formatted results\nlet formatted_results: Vec<&Movie> = results\n .hits\n .iter()\n .map(|r| r.formatted_result.as_ref().unwrap())\n .collect();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"shifu\")\n .with_attributes_to_crop(Selectors::Some(&[(\"overview\", None)]))\n .with_crop_marker(\"[…]\")\n .execute()\n .await\n .unwrap();\n\n// Get the formatted results\nlet formatted_results: Vec<&Movie> = results\n .hits\n .iter()\n .map(|r| r.formatted_result.as_ref().unwrap())\n .collect();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"winter feast\")\n .with_attributes_to_highlight(Selectors::Some(&[\"overview\"]))\n .execute()\n .await\n .unwrap();\n\n// Get the formatted results\nlet formatted_results: Vec<&Movie> = results\n .hits\n .iter()\n .map(|r| r.formatted_result.as_ref().unwrap())\n .collect();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"winter feast\")\n .with_attributes_to_highlight(Selectors::Some(&[\"overview\"]))\n .with_highlight_pre_tag(\"\")\n .with_highlight_post_tag(\"\")\n .execute()\n .await\n .unwrap();\n\n// Get the formatted results\nlet formatted_results: Vec<&Movie> = results\n .hits\n .iter()\n .map(|r| r.formatted_result.as_ref().unwrap())\n .collect();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"winter feast\")\n .with_show_matches_position(true)\n .execute()\n .await\n .unwrap();\n\n// Get the matches info\nlet matches_position: Vec<&HashMap>> = results\n .hits\n .iter()\n .map(|r| r.matches_position.as_ref().unwrap())\n .collect();" - }, - { - "lang": "Rust", - "source": "use meilisearch_sdk::{\n indexes::*,\n client::*,\n search::*,\n settings::*\n};\nuse serde::{Serialize, Deserialize};\nuse std::{io::prelude::*, fs::File};\nuse futures::executor::block_on;\n\nfn main() { block_on(async move {\n let client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\n\n // reading and parsing the file\n let mut file = File::open(\"movies.json\")\n .unwrap();\n let mut content = String::new();\n file\n .read_to_string(&mut content)\n .unwrap();\n let movies_docs: Vec = serde_json::from_str(&content)\n .unwrap();\n\n // adding documents\n client\n .index(\"movies\")\n .add_documents(&movies_docs, None)\n .await\n .unwrap();\n})}" - }, - { - "lang": "Rust", - "source": "// In your .toml file:\n [dependencies]\n meilisearch-sdk = \"0.31.0\"\n # futures: because we want to block on futures\n futures = \"0.3\"\n # serde: required if you are going to use documents\n serde = { version=\"1.0\", features = [\"derive\"] }\n # serde_json: required in some parts of this guide\n serde_json = \"1.0\"\n```\n\n// In your .rs file:\n// Documents in the Rust library are strongly typed\n#[derive(Serialize, Deserialize)]\nstruct Movie {\n id: i64,\n title: String,\n poster: String,\n overview: String,\n release_date: i64,\n genres: Vec\n}\n\n// You will often need this `Movie` struct in other parts of this documentation. (you will have to change it a bit sometimes)\n// You can also use schemaless values, by putting a `serde_json::Value` inside your own struct like this:\n#[derive(Serialize, Deserialize)]\nstruct Movie {\n id: i64,\n #[serde(flatten)]\n value: serde_json::Value,\n}\n\n// Then, add documents into the index:\nuse meilisearch_sdk::{\n indexes::*,\n client::*,\n search::*,\n settings::*\n};\nuse serde::{Serialize, Deserialize};\nuse std::{io::prelude::*, fs::File};\nuse futures::executor::block_on;\n\nfn main() { block_on(async move {\n let client = Client::new(\"http://localhost:7700\", Some(\"aSampleMasterKey\"));\n\n // Reading and parsing the file\n let mut file = File::open(\"movies.json\")\n .unwrap();\n let mut content = String::new();\n file\n .read_to_string(&mut content)\n .unwrap();\n let movies_docs: Vec = serde_json::from_str(&content)\n .unwrap();\n\n // Adding documents\n client\n .index(\"movies\")\n .add_documents(&movies_docs, None)\n .await\n .unwrap();\n})}" - }, - { - "lang": "Rust", - "source": "client\n .get_task(0)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "// You can build a `SearchQuery` and execute it later:\nlet query: SearchQuery = SearchQuery::new(&movies)\n .with_query(\"botman\")\n .build();\n\nlet results: SearchResults = client\n .index(\"movies\")\n .execute_query(&query)\n .await\n .unwrap();\n\n// You can build a `SearchQuery` and execute it directly:\nlet results: SearchResults = SearchQuery::new(&movies)\n .with_query(\"botman\")\n .execute()\n .await\n .unwrap();\n\n// You can search in an index directly:\nlet results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"botman\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "use serde::{Serialize, Deserialize};\nuse std::fs::File;\n\n#[derive(Serialize, Deserialize)]\nstruct Geo {\n lat: f64,\n lon: f64\n}\n\nstruct Meteorite {\n name: String,\n id: String,\n nametype: String,\n recclass: String,\n mass: i64,\n fall: String,\n _geo: Geo\n}\n\nlet mut file = File::open(\"meteorites.json\")?;\nlet meteorites: Vec = serde_json::from_reader(file)?;\n\nclient\n .index(\"meteorites\")\n .add_documents(&meteorites, None)\n .await?;" - }, - { - "lang": "Rust", - "source": "let ranking_rules = [\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\"\n];\n\nclient\n .index(\"movies\")\n .set_ranking_rules(&ranking_rules)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let displayed_attributes = [\n \"title\",\n \"overview\",\n \"poster\",\n];\n\nclient\n .index(\"movies\")\n .set_displayed_attributes(&displayed_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let searchable_attributes = [\n \"title\"\n];\n\nclient\n .index(\"movies\")\n .set_searchable_attributes(&searchable_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let stop_words = [\"the\"];\nclient\n .index(\"movies\")\n .set_stop_words(&stop_words)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"winnie\"), vec![String::from(\"piglet\")]);\nsynonyms.insert(String::from(\"piglet\"), vec![String::from(\"winnie\")]);\n\nclient\n .index(\"movies\")\n .set_synonyms(&synonyms)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"meteorites\")\n .search()\n .with_filter(\"mass < 200\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"meteorites\")\n .search()\n .with_filter(\"_geoRadius(46.9480, 7.4474, 210000)\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"meteorites\")\n .search()\n .with_sort(&[\"_geoPoint(48.8583701, 2.2922926):asc\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"meteorites\")\n .search()\n .with_filter(\"mass < 200\")\n .with_sort(&[\"mass:asc\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let settings = Settings::new()\n .with_filterable_attributes([\n \"mass\",\n \"_geo\"\n ])\n .with_sortable_attributes([\n \"mass\",\n \"_geo\"\n ])\nlet task: TaskInfo = client\n .index(\"meteorites\")\n .set_settings(&settings)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"thriller\")\n .with_filter(\"(genres = Horror AND genres = Mystery) OR director = \\\"Jordan Peele\\\"\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"\\\"african american\\\" horror\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let sortable_attributes = [\n \"author\",\n \"price\"\n];\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_sortable_attributes(&sortable_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let ranking_rules = [\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\"\n];\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_ranking_rules(&ranking_rules)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"books\")\n .search()\n .with_query(\"science fiction\")\n .with_sort(&[\"rating.users:asc\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"books\")\n .search()\n .with_query(\"science fiction\")\n .with_sort(&[\"price:asc\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"books\")\n .search()\n .with_query(\"butler\")\n .with_sort(&[\"author:desc\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"books\")\n .search()\n .with_query(\"science fiction\")\n .with_sort(&[\"price:asc\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"restaurants\")\n .set_filterable_attributes(&[\"_geo\"])\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"restaurants\")\n .search()\n .with_filter(\"_geoRadius(45.472735, 9.184019, 2000)\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"restaurants\")\n .search()\n .with_filter(\"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"restaurants\")\n .search()\n .with_filter(\"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"restaurants\")\n .set_sortable_attributes(&[\"_geo\"])\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"restaurants\")\n .search()\n .with_sort(&[\"_geoPoint(48.8561446, 2.2978204):asc\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"restaurants\")\n .search()\n .with_sort(&[\"_geoPoint(48.8561446, 2.2978204):asc\", \"rating:desc\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"MASTER_KEY\"));\nclient\n .get_keys()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"DEFAULT_ADMIN_API_KEY\"));\nlet task = client\n .create_index(\"medical_records\", Some(\"id\"))\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"DEFAULT_SEARCH_API_KEY\"));\nlet index = client.index(\"medical_records\");\nindex\n .search()\n .with_query(\"appointments\")\n .execute::()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet result = client.index(\"patient_medical_records\")\n .search()\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet mut key = client\n .get_key(\"74c9c733-3368-4738-bbe5-1d18a5fecb37\")\n .await\n .unwrap();\nkey\n .with_description(\"Default Search API key\".to_string())\n .update(&client);" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet mut key_options = KeyBuilder::new();\nkey_options\n .with_name(\"Search patient records key\")\n .with_action(Action::Search)\n .with_expires_at(time::macros::datetime!(2023 - 01 - 01 00:00:00 UTC))\n .with_index(\"patient_medical_records\");\nlet new_key = client\n .create_key(key_options)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet keys = client\n .get_keys()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet key = client\n .get_key(\"ac5cd97d-5a4b-4226-a868-2d0eb6d197ab\")\n .await\n .unwrap();\nclient\n .delete_key(&key)\n .await?;" - }, - { - "lang": "Rust", - "source": "client\n .create_index(\"books\", Some(\"reference_number\"))\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "#[derive(Serialize, Deserialize)]\nstruct Book {\n reference_number: String,\n title: String,\n author: String,\n genres: Vec,\n price: f64\n}\n\nlet task: TaskInfo = client\n .index(\"books\")\n .add_documents(&[\n Book {\n reference_number: \"287947\".to_string(),\n title: \"Diary of a Wimpy Kid\".to_string(),\n author: \"Jeff Kinney\".to_string(),\n genres: vec![\"comedy\".to_string(),\"humor\".to_string()],\n price: 5.00\n }\n ], Some(\"reference_number\"))\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let task = IndexUpdater::new(\"books\", &client)\n .with_primary_key(\"title\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let typo_tolerance = TypoToleranceSettings {\n enabled: Some(false),\n disable_on_attributes: None,\n disable_on_words: None,\n min_word_size_for_typos: None,\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(5),\n two_typos: Some(12)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![\"title\".to_string()]),\n disable_on_words: None,\n min_word_size_for_typos: None,\n};\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(5),\n two_typos: Some(12)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: None,\n disable_on_words: Some(vec![\"shrek\".to_string()]),\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(4),\n two_typos: Some(12)\n};\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![]),\n disable_on_words: Some(vec![\"title\".to_string()]),\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "// Deactivate typo tolerance on numbers and other high entropy words\nlet typo_tolerance = TypoToleranceSettings {\n disable_on_numbers: Some(true),\n ..Default::default()\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(5),\n two_typos: Some(4)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![]),\n disable_on_words: Some(vec![\"title\".to_string()]),\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"great\"), vec![String::from(\"fantastic\")]);\nsynonyms.insert(String::from(\"fantastic\"), vec![String::from(\"great\")]);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_synonyms(&synonyms)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let mut facet_sort_setting = BTreeMap::new();\nfacet_sort_setting.insert(\"*\".to_string(), FacetSortValue::Count);\nlet mut faceting = FacetingSettings {\n max_values_per_facet: 2,\n sort_facet_values_by: Some(facet_sort_setting),\n};\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_faceting(&faceting)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let pagination = PaginationSetting {max_total_hits:500};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_pagination(pagination)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n.index(\"movies\")\n.search()\n.with_query(\"big fat liar\")\n.with_matching_strategy(MatchingStrategies::LAST)\n.execute()\n.await\n.unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n.index(\"movies\")\n.search()\n.with_query(\"big fat liar\")\n.with_matching_strategy(MatchingStrategies::ALL)\n.execute()\n.await\n.unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n.index(\"movies\")\n.search()\n.with_query(\"white shirt\")\n.with_matching_strategy(MatchingStrategies::FREQUENCY)\n.execute()\n.await\n.unwrap();" - }, - { - "lang": "Rust", - "source": "let mut file = File::open(\"games.json\")\n .unwrap();\nlet mut content = String::new();\nfile\n .read_to_string(&mut content)\n .unwrap();\nlet docs: Vec = serde_json::from_str(&content)\n .unwrap();\n\nclient\n .index(\"games\")\n .add_documents(&docs, None)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let settings = Settings::new()\n .with_filterable_attributes([\"release_timestamp\"]);\n\nlet task: TaskInfo = client\n .index(\"games\")\n .set_settings(&settings)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"games\")\n .search()\n .with_filter(\"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let settings = Settings::new()\n .with_sortable_attributes([\"release_timestamp\"]);\n\nlet task: TaskInfo = client\n .index(\"games\")\n .set_settings(&settings)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"games\")\n .search()\n .with_sort([\"release_timestamp:desc\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let mut query = TasksQuery::new(&client);\nlet tasks = query\n .with_statuses([\"failed\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let mut query = TasksQuery::new(&client);\nlet tasks = query\n .with_statuses([\"failed\", \"canceled\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let mut query = TasksQuery::new(&client);\nlet tasks = query\n .with_index_uids([\"movies\"])\n .with_types([\"documentAdditionOrUpdate\",\"documentDeletion\"])\n .with_statuses([\"processing\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movie_ratings\")\n .set_filterable_attributes(&[\"genres\", \"rating\", \"language\"])\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let books = client.index(\"books\");\n\nlet results: SearchResults = SearchQuery::new(&books)\n .with_query(\"classic\")\n .with_facets(Selectors::Some(&[\"genres\", \"rating\", \"language\"]))\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let books = client.index(\"movie_ratings\");\nlet results: SearchResults = SearchQuery::new(&books)\n .with_query(\"Batman\")\n .with_facets(Selectors::Some(&[\"genres\", \"rating\"))\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .set_filterable_attributes([\"director\", \"genres\"])\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let mut facet_sort_setting = BTreeMap::new();\nfacet_sort_setting.insert(\"genres\".to_string(), FacetSortValue::Count);\nlet faceting = FacetingSettings {\n max_values_per_facet: 100,\n sort_facet_values_by: Some(facet_sort_setting),\n};\n\nlet res = client.index(\"books\")\n .set_faceting(&faceting)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let res = client.index(\"books\")\n .facet_search(\"genres\")\n .with_facet_query(\"c\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"dragon\")\n .with_show_ranking_score(true)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"dragon\")\n .with_show_ranking_score_details(true)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"adventure\")\n .with_attributes_to_search_on(&[\"overview\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let searchable_attributes: Vec = index\n .get_searchable_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let task = index\n .set_searchable_attributes([\"title\", \"overview\"])\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let task_status = index.get_task(&task).await.unwrap();" - }, - { - "lang": "Rust", - "source": "let results = index.search()\n .with_query(\"-escape\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results = index.search()\n .with_query(\"-\\\"escape room\\\"\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let res = client\n .index(\"INDEX_NAME\")\n .search()\n .with_query(\"QUERY TERMS\")\n .with_distinct(\"ATTRIBUTE_A\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"products\")\n .settings()\n .set_filterable_attributes([\"product_id\", \"sku\", \"url\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let res = client\n .index(\"products\")\n .search()\n .with_query(\"white shirt\")\n .with_distinct(\"sku\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let res = client\n .index(\"INDEX_NAME\")\n .search()\n .with_query(\"badman\")\n .with_ranking_score_threshold(0.2)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let res = client\n .index(\"books\")\n .search()\n .with_query(\"進撃の巨人\")\n .with_locales(&[\"jpn\"])\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results = index\n .search()\n .with_query(\"kitchen utensils\")\n .with_hybrid(\"EMBEDDER_NAME\", 0.9)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results = index\n .search()\n .with_vector(&[0.0, 1.0, 2.0])\n .with_hybrid(\"EMBEDDER_NAME\", 1.0)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results = index\n .search()\n .with_query(\"kitchen utensils\")\n .with_retrieve_vectors(true)\n .with_hybrid(\"EMBEDDER_NAME\", 0.5)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let embedders = HashMap::from([(\n String::from(\"movies-text\"),\n Embedder {\n source: EmbedderSource::OpenAi,\n api_key: Some(String::from(\"OPENAI_API_KEY\")),\n model: Some(String::from(\"text-embedding-3-small\")),\n document_template: Some(String::from(\"A movie titled '{{doc.title}}' released in {{ doc.release_date }}. The movie genres are: {{doc.genres}}. The story is about: {{doc.overview|truncatewords: 20}}\")),\n ..Embedder::default()\n }\n)]);\nmovies.set_embedders(&embedders)\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results = movies.search()\n .with_query(\"batman\")\n .with_hybrid(\"EMBEDDER_NAME\", 0.5)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "let results = movies.similar_search(\"192\", \"EMBEDDER_NAME\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Rust", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_A' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"uid\": \"INDEX_B\" }'" - }, - { - "lang": "Rust", - "source": "let results = index\n .search()\n .with_hybrid(\"EMBEDDER_NAME\", 0.5)\n .with_media(json!({\n \"FIELD_A\": \"VALUE_A\",\n \"FIELD_B\": {\n \"FIELD_C\": \"VALUE_B\",\n \"FIELD_D\": \"VALUE_C\"\n }\n }))\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.version { (result) in\n switch result {\n case .success(let version):\n print(version)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.index(\"jackets\").updateDistinctAttribute(\"product_id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchableAttributes: [String] = [\n \"title\",\n \"overview\",\n \"genres\"\n]\nclient.index(\"movies\").updateSearchableAttributes(searchableAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let displayedAttributes: [String] = [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n]\nclient.index(\"movies\").updateDisplayedAttributes(displayedAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"Avengers\",\n filter: \"release_date > 795484800\"\n)\nclient.index(\"movie_ratings\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"Batman\",\n filter: \"release_date > 795484800 AND (director = \\\"Tim Burton\\\" OR director = \\\"Christopher Nolan\\\"\")\nclient.index(\"movie_ratings\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"Planet of the Apes\",\n filter: \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\"))\nclient.index(\"movie_ratings\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"thriller\",\n filter: \"rating.users >= 90\"\n)\nclient.index(\"movie_ratings\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").search(SearchParameters(query: \"shifu\")) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"shifu\",\n offset: 1)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"shifu\",\n limit: 2)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(query: \"\", hitsPerPage: 15)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(query: \"\", page: 15)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"shifu\",\n attributesToRetrieve: [\"overview\", \"title\"])\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"shifu\",\n attributesToCrop: [\"overview\"],\n cropLength: 5)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"shifu\",\n attributesToCrop: [\"overview\"],\n cropMarker: \"[…]\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"winter feast\",\n attributesToHighlight: [\"overview\"])\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"winter feast\",\n attributesToHighlight: [\"overview\"],\n highlightPreTag: \"\",\n highlightPostTag: \"\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"winter feast\",\n showMatchesPosition: true)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let path = Bundle.main.url(forResource: \"movies\", withExtension: \"json\")!\nlet documents: Data = try Data(contentsOf: path)\n\nclient.index(\"movies\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "// Add this to your `Package.swift`\ndependencies: [\n .package(url: \"https://github.com/meilisearch/meilisearch-swift.git\", from: \"0.17.0\")\n]\n\n// In your .swift file:\nlet path = Bundle.main.url(forResource: \"movies\", withExtension: \"json\")!\nlet documents: Data = try Data(contentsOf: path)\nlet client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"aSampleMasterKey\")\n\nclient.index(\"movies\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.getTask(taskUid: 0) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").search(SearchParameters(query: \"botman\")) { (result) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let file = \"meteorites.json\"\nlet path = URL(fileURLWithPath: file)\nlet documents: Data = try Data(contentsOf: path)\n\nclient.index(\"meteorites\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let rankingRules: [String] = [\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\"\n]\nclient.index(\"movies\").updateRankingRules(rankingRules) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let displayedAttributes: [String] = [\"title\", \"overview\", \"poster\"]\nclient.index(\"movies\").updateDisplayedAttributes(displayedAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" - }, - { - "lang": "Swift", - "source": "let searchableAttributes: [String] = [\"title\"]\nclient.index(\"movies\").updateSearchableAttributes(searchableAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let stopWords: [String] = [\"the\"]\nclient.index(\"movies\").updateStopWords(stopWords) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let synonyms: [String: [String]] = [\n \"winnie\": [\"piglet\"],\n \"piglet\": [\"winnie\"]\n]\n client.index(\"movies\").updateSynonyms(synonyms) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"\",\n filter: \"mass < 200\"\n )\n client.index(\"meteorites\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n }" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"\",\n filter: \"_geoRadius(46.9480, 7.4474, 210000)\"\n)\nclient.index(\"meteorites\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"\",\n sort: [\"_geoPoint(48.8583701, 2.2922926):asc\"]\n)\nclient.index(\"meteorites\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"\",\n filter: \"mass < 200\",\n sort: [\"mass:asc\"]\n)\nclient.index(\"meteorites\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let settings = Setting(\n filterableAttributes: [\"mass\", \"_geo\"],\n sortableAttributes: [\"mass\", \"_geo\"]\n)\nclient.index(\"meteorites\").updateSettings(settings) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"thriller\",\n filter: [\n [\n \"genres = Horror\",\n \"genres = Mystery\"\n ],\n \"director = \\\"Jordan Peele\\\"\"\n ])\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"\\\"african american\\\" horror\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"masterKey\")\nclient.getKeys { result in\n switch result {\n case .success(let keys):\n print(keys)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").updateSortableAttributes([\"price\", \"author\"]) { (result: Result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let rankingRules: [String] = [\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\"\n]\nclient.index(\"books\").updateRankingRules(rankingRules) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"science fiction\",\n sort: [\"rating.users:asc\"]\n)\nclient.index(\"books\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"science fiction\",\n sort: [\"price:asc\"]\n)\nclient.index(\"books\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"butler\",\n sort: [\"author:desc\"]\n)\nclient.index(\"books\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"science fiction\",\n sort: [\"price:asc\"]\n)\nclient.index(\"books\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.index(\"restaurants\").updateFilterableAttributes([\"_geo\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n filter: \"_geoRadius(45.472735, 9.184019, 2000)\"\n)\nclient.index(\"restaurants\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n filter: \"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\"\n)\nclient.index(\"restaurants\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n filter: \"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\"\n)\nclient.index(\"restaurants\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.index(\"restaurants\").updateSortableAttributes([\"_geo\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"\",\n sort: [\"_geoPoint(48.8561446, 2.2978204):asc\"]\n)\nclient.index(\"restaurants\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"\",\n sort: [\"_geoPoint(48.8561446, 2.2978204):asc\", \"rating:desc\"]\n)\nclient.index(\"restaurants\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"apiKey\")\nclient.index(\"patient_medical_records\")\n .search(SearchParameters(query: \"\")) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"masterKey\")\nlet keyParams = KeyUpdateParams(description: \"Default Search API Key\")\n\nclient.updateKey(key: \"74c9c733-3368-4738-bbe5-1d18a5fecb37\", keyParams: keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"masterKey\")\n\nlet keyParams = KeyParams(\n description: \"Search patient records key\",\n actions: [\"search\"],\n indexes: [\"patient_medical_records\"],\n expiresAt: \"2023-01-01T00:00:00Z\"\n)\nclient.createKey(keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"masterKey\")\n\nclient.getKeys() { result in\n switch result {\n case .success(let keys):\n print(keys)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let client = try MeiliSearch(host: \"http://localhost:7700\", apiKey: \"masterKey\")\n\nclient.deleteKey(keyOrUid: \"ac5cd97d-5a4b-4226-a868-2d0eb6d197ab\") { result in\n switch result {\n case .success:\n print(\"success\")\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.createIndex(uid: \"books\", primaryKey: \"reference_number\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let documents: Data = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Diary of a Wimpy Kid\",\n \"author\": \"Jeff Kinney\",\n \"genres\": [\"comedy\", \"humor\"],\n \"price\": 5\n }\n]\n\"\"\".data(using: .utf8)!\n\nclient.index(\"books\").addDocuments(documents: documents, primaryKey: \"reference_number\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.updateIndex(uid: \"movies\", primaryKey: \"title\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let synonyms: [String: [String]] = [\n \"great\": [\"fantastic\"],\n \"fantastic\": [\"great\"]\n]\n\nclient.index(\"movies\").updateSynonyms(synonyms) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").updateFaceting({ maxValuesPerFacet: 2 })" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").updatePagination({ maxTotalHits: 500 })" - }, - { - "lang": "Swift", - "source": "let path = Bundle.main.url(forResource: \"games\", withExtension: \"json\")!\nlet documents: Data = try Data(contentsOf: path)\n\nclient.index(\"games\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.index(\"games\").updateFilterableAttributes([\"release_timestamp\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"\",\n filter: \"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\"\n)\nclient.index(\"games\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.index(\"games\").updateSortableAttributes([\"release_timestamp\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(\n query: \"\",\n sort: [\"release_timestamp:desc\"],\n)\n\nclient.index(\"games\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.getTasks(params: TasksQuery(statuses: [.failed, .canceled])) { result in\n switch result {\n case .success(let taskResult):\n print(taskResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.getTasks(params: TasksQuery(indexUids: \"movies\", types: [\"documentAdditionOrUpdate\", \"documentDeletion\"], statuses: [\"processing\"])) { result in\n switch result {\n case .success(let taskResult):\n print(taskResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").updateFilterableAttributes([\"genre\", \"director\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(query: \"dragon\", showRankingScore: true)\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult.rankingScore)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(query: \"dragon\", showRankingScoreDetails: true)\nlet movies: Searchable = try await client.index(\"movies\").search(searchParameters)" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(query: \"adventure\", attributesToSearchOn: [\"overview\"])\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/version'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/jackets/settings/distinct-attribute' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"product_id\"'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movie_ratings/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"Avengers\",\n \"filter\": \"release_date > 795484800\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movie_ratings/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"Batman\",\n \"filter\": \"release_date > 795484800 AND (director = \\\"Tim Burton\\\" OR director = \\\"Christopher Nolan\\\")\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movie_ratings/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"Planet of the Apes\",\n \"filter\": \"release_date > 1577884550 AND (NOT director = \\\"Tim Burton\\\")\"\n }' \\" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movie_ratings/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"thriller\",\n \"filter\": \"rating.users >= 90\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"shifu\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"shifu\",\n \"offset\": 1\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"shifu\",\n \"limit\": 2\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"\",\n \"hitsPerPage\": 15\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"\",\n \"page\": 2\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"shifu\",\n \"attributesToRetrieve\": [\n \"overview\",\n \"title\"\n ]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"shifu\",\n \"attributesToCrop\": [\"overview\"],\n \"cropLength\": 5\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"shifu\",\n \"cropMarker\": \"[…]\",\n \"attributesToCrop\": [\"overview\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"winter feast\",\n \"attributesToHighlight\": [\"overview\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"winter feast\",\n \"attributesToHighlight\": [\"overview\"],\n \"highlightPreTag\": \"\",\n \"highlightPostTag\": \"\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"winter feast\",\n \"showMatchesPosition\": true\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents'\\\n -H 'Content-Type: application/json' \\\n --data-binary @movies.json" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents?primaryKey=id' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer aSampleMasterKey' \\\n --data-binary @movies.json" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks/0' \\\n -H 'Authorization: Bearer aSampleMasterKey'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer aSampleMasterKey' \\\n --data-binary '{ \"q\": \"botman\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/meteorites/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary @meteorites.json" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"exactness\",\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"release_date:asc\",\n \"rank:desc\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"poster\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"title\"]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/stop-words' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"the\"]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/synonyms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"winnie\": [\"piglet\"],\n \"piglet\": [\"winnie\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/meteorites/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"filter\": \"mass < 200\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/meteorites/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"filter\": \"_geoRadius(46.9480, 7.4474, 210000)\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/meteorites/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"sort\": [\"_geoPoint(48.8583701,2.2922926):asc\"] }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/meteorites/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"mass < 200\",\n \"sort\": [\"mass:asc\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/meteorites/settings' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filterableAttributes\": [\n \"mass\",\n \"_geo\"\n ],\n \"sortableAttributes\": [\n \"mass\",\n \"_geo\"\n ]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"thriller\",\n \"filter\": [\n [\n \"genres = Horror\",\n \"genres = Mystery\"\n ],\n \"director = \\\"Jordan Peele\\\"\"\n ]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n--data-binary '{ \"q\": \"\\\"african american\\\" horror\" }'" - }, - { - "lang": "cURL", - "source": "# replace the MASTER_KEY placeholder with your master key\ncurl \\\n -X GET 'MEILISEARCH_URL/keys' \\\n -H 'Authorization: Bearer MASTER_KEY'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"author\",\n \"price\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/ranking-rules' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"words\",\n \"sort\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"exactness\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"science fiction\",\n \"sort\": [\"rating.users:asc\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"science fiction\",\n \"sort\": [\"price:asc\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"butler\",\n \"sort\": [\"author:desc\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"science fiction\",\n \"sort\": [\"price:asc\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/restaurants/settings/filterable-attributes' \\\n -H 'Content-type:application/json' \\\n --data-binary '[\"_geo\"]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"filter\": \"_geoRadius(45.472735, 9.184019, 2000)\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"filter\": \"_geoRadius(45.472735, 9.184019, 2000) AND type = pizza\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"filter\": \"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"filter\": \"_geoPolygon([45.494181, 9.214024], [45.449484, 9.179175], [45.449486, 9.179177])\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/restaurants/settings/sortable-attributes' \\\n -H 'Content-type:application/json' \\\n --data-binary '[\"_geo\"]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{ \"sort\": [\"_geoPoint(48.8561446,2.2978204):asc\"] }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/restaurants/search' \\\n -H 'Content-type:application/json' \\\n --data-binary '{\n \"sort\": [\n \"_geoPoint(48.8561446,2.2978204):asc\",\n \"rating:desc\"\n ]\n }'" - }, - { - "lang": "cURL", - "source": "curl -X GET 'MEILISEARCH_URL/keys' \\\n-H 'Authorization: Bearer MASTER_KEY'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_ADMIN_API_KEY' \\\n --data-binary '{\n \"uid\": \"medical_records\",\n \"primaryKey\": \"id\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/medical_records/search' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{ \"q\": \"appointments\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/patient_medical_records/search' \\\n -H 'Authorization: Bearer API_KEY'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/keys/74c9c733-3368-4738-bbe5-1d18a5fecb37' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"description\": \"Default Search API Key\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/keys' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n --data-binary '{\n \"description\": \"Search patient records key\",\n \"actions\": [\"search\"],\n \"indexes\": [\"patient_medical_records\"],\n \"expiresAt\": \"2023-01-01T00:00:00Z\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys' \\\n -H 'Authorization: Bearer MASTER_KEY'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/keys/ac5cd97d-5a4b-4226-a868-2d0eb6d197ab' \\\n -H 'Authorization: Bearer MASTER_KEY'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"uid\": \"books\",\n \"primaryKey\": \"reference_number\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/documents?primaryKey=reference_number' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"reference_number\": 287947,\n \"title\": \"Diary of a Wimpy Kid\",\n \"author\": \"Jeff Kinney\",\n \"genres\": [\n \"comedy\",\n \"humor\"\n ],\n \"price\": 5.00\n }\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"primaryKey\": \"title\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/patient_medical_records/search' \\\n -H 'Authorization: Bearer TENANT_TOKEN'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"enabled\": false }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"disableOnAttributes\": [\"title\"] }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"disableOnWords\": [\n \"shrek\"\n ]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"minWordSizeForTypos\": {\n \"oneTypo\": 4,\n \"twoTypos\": 10\n }\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"disableOnNumbers\": true\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'http:///version' \\\n -H 'Authorization: Bearer API_KEY'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'http:///version' \\\n -H 'X-Meili-API-Key: API_KEY'" - }, - { - "lang": "cURL", - "source": "# whenever you see {index_uid}, replace it with your index's unique id\ncurl \\\n -X GET 'http:///indexes/{index_uid}/settings/displayed-attributes' \\\n -H 'X-Meili-API-Key: API_KEY'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'http:///indexes/{index_uid}/settings/displayed-attributes' \\\n -H 'X-Meili-API-Key: API_KEY'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'http:///dumps' \\\n -H 'Authorization: Bearer API_KEY'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"minWordSizeForTypos\": { \"oneTypo\": 4 }\n}'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/synonyms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"great\": [\"fantastic\"], \"fantastic\": [\"great\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/faceting' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxValuesPerFacet\": 2,\n \"sortFacetValuesBy\": {\n \"*\": \"count\"\n }\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/pagination' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxTotalHits\": 500\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"big fat liar\",\n \"matchingStrategy\": \"last\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"big fat liar\",\n \"matchingStrategy\": \"all\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"white shirt\",\n \"matchingStrategy\": \"frequency\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -x POST 'MEILISEARCH_URL/indexes/games/documents' \\\n -h 'content-type: application/json' \\\n --data-binary @games.json" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/games/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"release_timestamp\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/games/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"\",\n \"filter\": \"release_timestamp >= 1514761200 AND release_timestamp < 1672527600\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/games/settings/sortable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"release_timestamp\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/games/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"\",\n \"sort\": [\"release_timestamp:desc\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks?statuses=failed'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks?statuses=failed,canceled'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks?indexUids=movies&types=documentAdditionOrUpdate,documentDeletion&statuses=processing'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/multi-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"federation\": {},\n \"queries\": [\n {\n \"indexUid\": \"movies\",\n \"q\": \"batman\"\n },\n {\n \"indexUid\": \"comics\",\n \"q\": \"batman\"\n }\n ]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"genres\", \"rating\", \"language\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"classic\",\n \"facets\": [\n \"genres\", \"rating\", \"language\"\n ]\n}'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movie_ratings/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"Batman\",\n \"facets\": [\"genres\", \"rating\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movie_ratings/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"genres\",\n \"director\",\n \"release_date\",\n \"ratings\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/faceting' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"sortFacetValuesBy\": {\n \"genres\": \"count\"\n }\n}'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"facetQuery\": \"c\",\n \"facetName\": \"genres\"\n}'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"dragon\",\n \"showRankingScore\": true\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"dragon\",\n \"showRankingScoreDetails\": true\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"adventure\",\n \"attributesToSearchOn\": [\"overview\"]\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/searchable-attributes'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks/TASK_UID'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"-escape\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"-\\\"escape room\\\"\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'https://PROJECT_URL/events' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"eventType\": \"click\",\n \"eventName\": \"Search Result Clicked\",\n \"indexUid\": \"products\",\n \"userId\": \"SEARCH_USER_ID\",\n \"queryUid\": \"019a01b7-a1c2-7782-a410-bb1274c81393\",\n \"objectId\": \"0\",\n \"objectName\": \"DOCUMENT_DESCRIPTION\",\n \"position\": 0\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'https://PROJECT_URL/events' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"eventType\": \"conversion\",\n \"eventName\": \"Product Added To Cart\",\n \"indexUid\": \"products\",\n \"userId\": \"SEARCH_USER_ID\",\n \"objectId\": \"0\",\n \"objectName\": \"DOCUMENT_DESCRIPTION\",\n \"position\": 0\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n -H 'X-MS-USER-ID: MEILISEARCH_USER_ID' \\\n --data-binary '{}'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'https://PROJECT_URL/events' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n -H 'X-MS-USER-ID: SEARCH_USER_ID' \\\n --data-binary '{\n \"eventType\": \"click\",\n \"eventName\": \"Search Result Clicked\",\n \"indexUid\": \"products\",\n \"objectId\": \"0\",\n \"position\": 0\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'https://PROJECT_URL/events' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"eventType\": \"click\",\n \"userId\": \"SEARCH_USER_ID\",\n \"eventName\": \"Search Result Clicked\",\n \"indexUid\": \"products\",\n \"objectId\": \"0\",\n \"position\": 0\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"QUERY TERMS\",\n \"distinct\": \"ATTRIBUTE_A\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/products/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"product_id\",\n \"sku\",\n \"url\"\n ]'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/products/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"q\": \"white shirt\",\n \"distinct\": \"sku\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n-X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n-H 'Content-Type: application/json' \\\n--data-binary '{\n \"q\": \"badman\",\n \"rankingScoreThreshold\": 0.2\n}'" - }, - { - "lang": "cURL", - "source": "curl \\\n-X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n-H 'Content-Type: application/json' \\\n--data-binary '{\n \"q\": \"QUERY TEXT IN JAPANESE\",\n \"locales\": [\"jpn\"]\n}'" - }, - { - "lang": "cURL", - "source": "curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'content-type: application/json' \\\n --data-binary '{\n \"q\": \"kitchen utensils\",\n \"hybrid\": {\n \"semanticRatio\": 0.9,\n \"embedder\": \"EMBEDDER_NAME\"\n }\n }'" - }, - { - "lang": "cURL", - "source": "curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'content-type: application/json' \\\n --data-binary '{\n \"vector\": [0, 1, 2],\n \"hybrid\": {\n \"embedder\": \"EMBEDDER_NAME\"\n }\n }'" - }, - { - "lang": "cURL", - "source": "curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'content-type: application/json' \\\n --data-binary '{\n \"q\": \"kitchen utensils\",\n \"retrieveVectors\": true,\n \"hybrid\": {\n \"embedder\": \"EMBEDDER_NAME\"\n }\n }'" - }, - { - "lang": "cURL", - "source": "curl -X PATCH 'MEILISEARCH_URL/indexes/movies/settings'\n -H 'Content-Type: application/json'\n -H 'Authorization: Bearer MEILISEARCH_API_KEY'\n --data-binary '{\n \"embedders\": {\n \"movies-text\": {\n \"source\": \"openAi\",\n \"apiKey\": \"OPENAI_API_KEY\",\n \"model\": \"text-embedding-3-small\",\n \"documentTemplate\": \"A movie titled '{{doc.title}}' released in {{ doc.release_date }}. The movie genres are: {{doc.genres}}. The story is about: {{doc.overview|truncatewords: 20}}\"\n }\n }\n }'" - }, - { - "lang": "cURL", - "source": "curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n -H 'content-type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"q\": \"batman\",\n \"hybrid\": {\n \"embedder\": \"EMBEDDER_NAME\"\n }\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/similar' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"id\": 192,\n \"embedder\": \"EMBEDDER_NAME\"\n }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_A' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"uid\": \"INDEX_B\" }'" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/multi-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"federation\": {},\n \"queries\": [\n {\n \"indexUid\": \"movies\",\n \"q\": \"batman\",\n \"federationOptions\": {\n \"remote\": \"ms-00\"\n }\n },\n {\n \"indexUid\": \"movies\",\n \"q\": \"batman\",\n \"federationOptions\": {\n \"remote\": \"ms-01\"\n }\n }\n ]" - }, - { - "lang": "cURL", - "source": "curl \\\n-X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \\\n-H 'Content-Type: application/json' \\\n--data-binary '{\n \"hybrid\": {\n \"embedder\": \"EMBEDDER_NAME\"\n },\n \"media\": {\n \"FIELD_A\": \"VALUE_A\",\n \"FIELD_B\" : {\n \"FIELD_C\": \"VALUE_B\"\n \"FIELD_D\": \"VALUE_C\"\n }\n }\n}'" - } - ] - } - }, - "/webhooks": { - "get": { - "tags": [ - "Webhooks" - ], - "operationId": "get_webhooks", - "responses": { - "200": { - "description": "Webhooks are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookResults" - }, - "example": { - "results": [ - { - "uuid": "550e8400-e29b-41d4-a716-446655440000", - "url": "https://your.site/on-tasks-completed", - "headers": { - "Authorization": "Bearer a-secret-token" - }, - "isEditable": true - }, - { - "uuid": "550e8400-e29b-41d4-a716-446655440001", - "url": "https://another.site/on-tasks-completed", - "isEditable": true - } - ] - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "webhooks.get", - "webhooks.*", - "*.get", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.ListWebhooks();" - }, - { - "lang": "JS", - "source": "client.getWebhooks()" - }, - { - "lang": "Python", - "source": "client.get_webhooks()" - }, - { - "lang": "Rust", - "source": "let webhooks = client.get_webhooks().await.unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks'" - } - ] - }, - "post": { - "tags": [ - "Webhooks" - ], - "operationId": "post_webhook", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookSettings" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Webhook created successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" - }, - "example": { - "uuid": "550e8400-e29b-41d4-a716-446655440000", - "url": "https://your.site/on-tasks-completed", - "headers": { - "Authorization": "Bearer a-secret-token" - }, - "isEditable": true - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "webhooks.create", - "webhooks.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.AddWebhook(&meilisearch.AddWebhookRequest{\n URL: \"WEBHOOK_TARGET_URL\",\n Headers: map[string]string{\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n },\n});" - }, - { - "lang": "JS", - "source": "client.createWebhook({\n url: 'WEBHOOK_TARGET_URL',\n headers: {\n authorization: 'SECURITY_KEY',\n referer: 'https://example.com'\n }\n})" - }, - { - "lang": "Python", - "source": "client.create_webhook({\n 'url': 'https://example.com/webhook',\n 'headers': {\"Authorization\":\"\", \"X-Custom-Header\":\"test\"},\n})" - }, - { - "lang": "Rust", - "source": "let mut payload = meilisearch_sdk::webhooks::WebhookCreate::new(\"WEBHOOK_TARGET_URL\");\npayload\n .insert_header(\"authorization\", \"SECURITY_KEY\")\n .insert_header(\"referer\", \"https://example.com\");\nlet webhook = client.create_webhook(&payload).await.unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/webhooks' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"WEBHOOK_TARGET_URL\",\n \"headers\": {\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n }\n }'" - } - ] - } - }, - "/webhooks/{uuid}": { - "get": { - "tags": [ - "Webhooks" - ], - "operationId": "get_webhook", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "The universally unique identifier of the webhook", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Webhook found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" - }, - "example": { - "uuid": "550e8400-e29b-41d4-a716-446655440000", - "url": "https://your.site/on-tasks-completed", - "headers": { - "Authorization": "Bearer a-secret" - }, - "isEditable": true - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - }, - "404": { - "description": "Webhook not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "webhooks.get", - "webhooks.*", - "*.get", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Webhooks" - ], - "operationId": "delete_webhook", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "The universally unique identifier of the webhook", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "Webhook deleted successfully" - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - }, - "404": { - "description": "Webhook not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "webhooks.delete", - "webhooks.*", - "*" - ] - } - ] - }, - "patch": { - "tags": [ - "Webhooks" - ], - "operationId": "patch_webhook", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "The universally unique identifier of the webhook", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Webhook updated successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" - }, - "example": { - "uuid": "550e8400-e29b-41d4-a716-446655440000", - "url": "https://your.site/on-tasks-completed", - "headers": { - "Authorization": "Bearer a-secret-token" - }, - "isEditable": true - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "webhooks.update", - "webhooks.*", - "*" - ] - } - ] - } - } - }, - "components": { - "schemas": { - "Action": { - "type": "string", - "enum": [ - "*", - "search", - "documents.*", - "documents.add", - "documents.get", - "documents.delete", - "indexes.*", - "indexes.create", - "indexes.get", - "indexes.update", - "indexes.delete", - "indexes.swap", - "tasks.*", - "tasks.cancel", - "tasks.delete", - "tasks.get", - "settings.*", - "settings.get", - "settings.update", - "stats.*", - "stats.get", - "metrics.*", - "metrics.get", - "dumps.*", - "dumps.create", - "snapshots.*", - "snapshots.create", - "version", - "keys.create", - "keys.get", - "keys.update", - "keys.delete", - "experimental.get", - "experimental.update", - "export", - "network.get", - "network.update", - "chatCompletions", - "chats.*", - "chats.get", - "chats.delete", - "chatsSettings.*", - "chatsSettings.get", - "chatsSettings.update", - "*.get", - "webhooks.get", - "webhooks.update", - "webhooks.delete", - "webhooks.create", - "webhooks.*", - "indexes.compact" - ] - }, - "AllBatches": { - "type": "object", - "required": [ - "results", - "total", - "limit" - ], - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BatchView" - } - }, - "total": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - }, - "limit": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "from": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "minimum": 0 - }, - "next": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "minimum": 0 - } - } - }, - "AllTasks": { - "type": "object", - "required": [ - "results", - "total", - "limit" - ], - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TaskView" - }, - "description": "The list of tasks that matched the filter." - }, - "total": { - "type": "integer", - "format": "u-int64", - "description": "Total number of browsable results using offset/limit parameters for the given resource.", - "minimum": 0 - }, - "limit": { - "type": "integer", - "format": "u-int32", - "description": "Limit given for the query. If limit is not provided as a query parameter, this parameter displays the default limit value.", - "minimum": 0 - }, - "from": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "description": "The first task uid returned.", - "minimum": 0 - }, - "next": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "description": "Represents the value to send in from to fetch the next slice of the results. The first item for the next slice starts at this exact number. When the returned value is null, it means that all the data have been browsed in the given order.", - "minimum": 0 - } - } - }, - "AttributePatterns": { - "type": "object", - "required": [ - "patterns" - ], - "properties": { - "patterns": { - "type": "array", - "items": { - "type": "string" - }, - "example": [ - "title", - "overview_*", - "release_date" - ] - } - } - }, - "BTreeMap": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "object", - "required": [ - "start", - "length" - ], - "properties": { - "start": { - "type": "integer", - "minimum": 0 - }, - "length": { - "type": "integer", - "minimum": 0 - }, - "indices": { - "type": [ - "array", - "null" - ], - "items": { - "type": "integer", - "minimum": 0 - } - } - } - } - }, - "propertyNames": { - "type": "string" - } - }, - "BatchStats": { - "type": "object", - "required": [ - "totalNbTasks", - "status", - "types", - "indexUids" - ], - "properties": { - "totalNbTasks": { - "$ref": "#/components/schemas/u32" - }, - "status": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "propertyNames": { - "type": "string", - "description": "The status of a task.", - "enum": [ - "enqueued", - "processing", - "succeeded", - "failed", - "canceled" - ], - "example": "processing" - } - }, - "types": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "propertyNames": { - "type": "string", - "description": "The type of the task.", - "enum": [ - "documentAdditionOrUpdate", - "documentEdition", - "documentDeletion", - "settingsUpdate", - "indexCreation", - "indexDeletion", - "indexUpdate", - "indexSwap", - "taskCancelation", - "taskDeletion", - "dumpCreation", - "snapshotCreation", - "export", - "upgradeDatabase", - "indexCompaction" - ], - "example": [ - "documentAdditionOrUpdate", - "documentEdition", - "documentDeletion", - "settingsUpdate", - "indexCreation", - "indexDeletion", - "indexUpdate", - "indexSwap", - "taskCancelation", - "taskDeletion", - "dumpCreation", - "snapshotCreation", - "export", - "upgradeDatabase", - "indexCompaction" - ] - } - }, - "indexUids": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "propertyNames": { - "type": "string" - } - }, - "progressTrace": { - "type": "object", - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - }, - "writeChannelCongestion": { - "type": [ - "object", - "null" - ], - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - }, - "internalDatabaseSizes": { - "type": "object", - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - } - } - }, - "BatchStatsView": { - "allOf": [ - { - "$ref": "#/components/schemas/BatchStats" - }, - { - "type": "object", - "properties": { - "embedderRequests": { - "$ref": "#/components/schemas/EmbedderStatsView" - } - } - } - ] - }, - "BatchView": { - "type": "object", - "required": [ - "uid", - "details", - "stats" - ], - "properties": { - "uid": { - "$ref": "#/components/schemas/u32" - }, - "progress": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ProgressView" - } - ] - }, - "details": { - "$ref": "#/components/schemas/DetailsView" - }, - "stats": { - "$ref": "#/components/schemas/BatchStatsView" - }, - "duration": { - "type": [ - "string", - "null" - ] - }, - "startedAt": { - "type": "string", - "format": "date-time" - }, - "finishedAt": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "batchStrategy": { - "type": "string" - } - } - }, - "BrowseQuery": { - "type": "object", - "required": [ - "offset", - "limit", - "retrieveVectors" - ], - "properties": { - "offset": { - "type": "integer", - "example": 150, - "minimum": 0 - }, - "limit": { - "type": "integer", - "default": 20, - "example": 1, - "minimum": 0 - }, - "fields": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "example": [ - "title, description" - ] - }, - "retrieveVectors": { - "type": "boolean", - "example": true - }, - "ids": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "example": [ - "cody", - "finn", - "brandy", - "gambit" - ] - }, - "filter": {}, - "sort": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "example": [ - "title:asc", - "rating:desc" - ] - } - } - }, - "ChatSearchParams": { - "type": "object", - "properties": { - "hybrid": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/HybridQuery" - } - ] - }, - "limit": { - "type": [ - "integer", - "null" - ], - "minimum": 0 - }, - "sort": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "distinct": { - "type": [ - "string", - "null" - ] - }, - "matchingStrategy": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/MatchingStrategy" - } - ] - }, - "attributesToSearchOn": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "rankingScoreThreshold": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/RankingScoreThreshold" - } - ] - } - }, - "additionalProperties": false - }, - "ChatSettings": { - "type": "object", - "properties": { - "description": { - "type": [ - "string", - "null" - ] - }, - "documentTemplate": { - "type": [ - "string", - "null" - ], - "description": "A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text." - }, - "documentTemplateMaxBytes": { - "type": [ - "integer", - "null" - ], - "description": "Rendered texts are truncated to this size. Defaults to 400.", - "minimum": 0 - }, - "searchParameters": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ChatSearchParams", - "description": "The search parameters to use for the LLM." - } - ] - } - }, - "additionalProperties": false - }, - "Code": { - "type": "string", - "enum": [ - "api_key_already_exists", - "api_key_not_found", - "bad_parameter", - "bad_request", - "database_size_limit_reached", - "document_not_found", - "dump_already_processing", - "dump_not_found", - "dump_process_failed", - "duplicate_index_found", - "immutable_api_key_actions", - "immutable_api_key_created_at", - "immutable_api_key_expires_at", - "immutable_api_key_indexes", - "immutable_api_key_key", - "immutable_api_key_uid", - "immutable_api_key_updated_at", - "immutable_index_created_at", - "immutable_index_updated_at", - "index_already_exists", - "index_creation_failed", - "index_not_found", - "index_primary_key_already_exists", - "index_primary_key_multiple_candidates_found", - "index_primary_key_no_candidate_found", - "internal", - "invalid_api_key", - "invalid_api_key_actions", - "invalid_api_key_description", - "invalid_api_key_expires_at", - "invalid_api_key_indexes", - "invalid_api_key_limit", - "invalid_api_key_name", - "invalid_api_key_offset", - "invalid_api_key_uid", - "invalid_content_type", - "invalid_document_csv_delimiter", - "invalid_document_fields", - "invalid_document_retrieve_vectors", - "missing_document_filter", - "missing_document_edition_function", - "inconsistent_document_change_headers", - "invalid_document_filter", - "invalid_document_sort", - "invalid_document_geo_field", - "invalid_document_geojson_field", - "invalid_header_value", - "invalid_vector_dimensions", - "invalid_vectors_type", - "invalid_document_id", - "invalid_document_ids", - "invalid_document_limit", - "invalid_document_offset", - "invalid_search_embedder", - "invalid_similar_embedder", - "invalid_search_hybrid_query", - "invalid_index_limit", - "invalid_index_offset", - "invalid_index_primary_key", - "invalid_index_custom_metadata", - "invalid_index_uid", - "invalid_multi_search_facets", - "invalid_multi_search_facets_by_index", - "invalid_multi_search_facet_order", - "invalid_multi_search_query_personalization", - "invalid_multi_search_federated", - "invalid_multi_search_federation_options", - "invalid_multi_search_max_values_per_facet", - "invalid_multi_search_merge_facets", - "invalid_multi_search_query_facets", - "invalid_multi_search_query_pagination", - "invalid_multi_search_query_ranking_rules", - "invalid_multi_search_query_position", - "invalid_multi_search_remote", - "invalid_multi_search_weight", - "invalid_network_remotes", - "invalid_network_self", - "invalid_network_sharding", - "invalid_network_search_api_key", - "invalid_network_write_api_key", - "invalid_network_url", - "invalid_search_attributes_to_search_on", - "invalid_search_attributes_to_crop", - "invalid_search_attributes_to_highlight", - "invalid_similar_attributes_to_retrieve", - "invalid_similar_retrieve_vectors", - "invalid_search_attributes_to_retrieve", - "invalid_search_ranking_score_threshold", - "invalid_similar_ranking_score_threshold", - "invalid_search_retrieve_vectors", - "invalid_search_crop_length", - "invalid_search_crop_marker", - "invalid_search_facets", - "invalid_search_semantic_ratio", - "invalid_search_locales", - "invalid_facet_search_exhaustive_facet_count", - "invalid_facet_search_facet_name", - "invalid_similar_id", - "invalid_search_filter", - "invalid_similar_filter", - "invalid_search_highlight_post_tag", - "invalid_search_highlight_pre_tag", - "invalid_search_hits_per_page", - "invalid_similar_limit", - "invalid_search_limit", - "invalid_search_matching_strategy", - "invalid_similar_offset", - "invalid_search_offset", - "invalid_search_page", - "invalid_search_q", - "invalid_facet_search_query", - "invalid_facet_search_name", - "facet_search_disabled", - "invalid_search_vector", - "invalid_search_media", - "invalid_search_show_matches_position", - "invalid_search_show_ranking_score", - "invalid_similar_show_ranking_score", - "invalid_search_show_ranking_score_details", - "invalid_similar_show_ranking_score_details", - "invalid_search_sort", - "invalid_search_distinct", - "invalid_search_personalize", - "invalid_search_personalize_user_context", - "invalid_search_media_and_vector", - "invalid_settings_displayed_attributes", - "invalid_settings_distinct_attribute", - "invalid_settings_proximity_precision", - "invalid_settings_facet_search", - "invalid_settings_prefix_search", - "invalid_settings_faceting", - "invalid_settings_filterable_attributes", - "invalid_settings_pagination", - "invalid_settings_search_cutoff_ms", - "invalid_settings_embedders", - "invalid_settings_ranking_rules", - "invalid_settings_searchable_attributes", - "invalid_settings_sortable_attributes", - "invalid_settings_stop_words", - "invalid_settings_non_separator_tokens", - "invalid_settings_separator_tokens", - "invalid_settings_dictionary", - "invalid_settings_synonyms", - "invalid_settings_typo_tolerance", - "invalid_settings_localized_attributes", - "invalid_state", - "invalid_store_file", - "invalid_swap_duplicate_index_found", - "invalid_swap_indexes", - "invalid_swap_rename", - "invalid_task_after_enqueued_at", - "invalid_task_after_finished_at", - "invalid_task_after_started_at", - "invalid_task_before_enqueued_at", - "invalid_task_before_finished_at", - "invalid_task_before_started_at", - "invalid_task_canceled_by", - "invalid_task_from", - "invalid_task_limit", - "invalid_task_reverse", - "invalid_task_statuses", - "invalid_task_types", - "invalid_task_uids", - "invalid_batch_uids", - "io_error", - "feature_not_enabled", - "malformed_payload", - "max_fields_limit_exceeded", - "missing_api_key_actions", - "missing_api_key_expires_at", - "missing_api_key_indexes", - "missing_authorization_header", - "missing_content_type", - "missing_document_id", - "missing_facet_search_facet_name", - "missing_index_uid", - "missing_master_key", - "missing_network_url", - "missing_payload", - "missing_search_hybrid", - "missing_swap_indexes", - "missing_task_filters", - "no_space_left_on_device", - "payload_too_large", - "remote_bad_response", - "remote_bad_request", - "remote_could_not_send_request", - "remote_invalid_api_key", - "remote_remote_error", - "remote_timeout", - "too_many_search_requests", - "task_not_found", - "task_file_not_found", - "batch_not_found", - "too_many_open_files", - "too_many_vectors", - "unretrievable_document", - "unretrievable_error_code", - "unsupported_media_type", - "invalid_s3_snapshot_request", - "invalid_s3_snapshot_parameters", - "s3_snapshot_server_error", - "vector_embedding_error", - "not_found_similar_id", - "invalid_document_edition_context", - "invalid_document_edition_function_filter", - "edit_documents_by_function_error", - "invalid_settings_index_chat", - "invalid_settings_vector_store", - "invalid_export_url", - "invalid_export_api_key", - "invalid_export_payload_size", - "invalid_export_indexes_patterns", - "invalid_export_index_filter", - "invalid_export_index_override_settings", - "unimplemented_external_function_calling", - "unimplemented_non_streaming_chat_completions", - "unimplemented_multi_choice_chat_completions", - "chat_not_found", - "invalid_chat_setting_document_template", - "invalid_chat_completion_org_id", - "invalid_chat_completion_project_id", - "invalid_chat_completion_api_version", - "invalid_chat_completion_deployment_id", - "invalid_chat_completion_source", - "invalid_chat_completion_base_api", - "invalid_chat_completion_api_key", - "invalid_chat_completion_prompts", - "invalid_chat_completion_system_prompt", - "invalid_chat_completion_search_description_prompt", - "invalid_chat_completion_search_query_param_prompt", - "invalid_chat_completion_search_filter_param_prompt", - "invalid_chat_completion_search_index_uid_param_prompt", - "invalid_chat_completion_pre_query_prompt", - "requires_enterprise_edition", - "invalid_webhooks", - "invalid_webhook_url", - "invalid_webhook_headers", - "immutable_webhook", - "invalid_webhook_uuid", - "webhook_not_found", - "immutable_webhook_uuid", - "immutable_webhook_is_editable" - ] - }, - "ComputedFacets": { - "type": "object", - "required": [ - "distribution", - "stats" - ], - "properties": { - "distribution": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - }, - "propertyNames": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - } - }, - "stats": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FacetStats" - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "CreateApiKey": { - "type": "object", - "required": [ - "uid", - "actions", - "indexes" - ], - "properties": { - "description": { - "type": [ - "string", - "null" - ], - "description": "A description for the key. `null` if empty.", - "example": null - }, - "name": { - "type": [ - "string", - "null" - ], - "description": "A human-readable name for the key. `null` if empty.", - "example": "Indexing Products API key" - }, - "uid": { - "type": "string", - "format": "uuid", - "description": "A uuid v4 to identify the API Key. If not specified, it's generated by Meilisearch.", - "example": null - }, - "actions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Action" - }, - "description": "A list of actions permitted for the key. `[\"*\"]` for all actions. The `*` character can be used as a wildcard when located at the last position. e.g. `documents.*` to authorize access on all documents endpoints.", - "example": [ - "documents.add" - ] - }, - "indexes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of accessible indexes permitted for the key. `[\"*\"]` for all indexes. The `*` character can be used as a wildcard when located at the last position. e.g. `products_*` to allow access to all indexes whose names start with `products_`.", - "example": [ - "products" - ] - }, - "expiresAt": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Represent the expiration date and time as RFC 3339 format. `null` equals to no expiration time." - } - } - }, - "DetailsExportIndexSettings": { - "allOf": [ - { - "$ref": "#/components/schemas/ExportIndexSettings" - }, - { - "type": "object", - "properties": { - "matchedDocuments": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "minimum": 0 - } - } - } - ] - }, - "DetailsView": { - "allOf": [ - { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/Settings_Unchecked", - "description": "[Learn more about the settings in this guide](https://www.meilisearch.com/docs/reference/api/settings)." - } - ] - }, - { - "type": "object", - "properties": { - "receivedDocuments": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Number of documents received for documentAdditionOrUpdate task.", - "minimum": 0 - }, - "indexedDocuments": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Number of documents finally indexed for documentAdditionOrUpdate task or a documentAdditionOrUpdate batch of tasks.", - "minimum": 0 - }, - "editedDocuments": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Number of documents edited for editDocumentByFunction task.", - "minimum": 0 - }, - "primaryKey": { - "type": [ - "string", - "null" - ], - "description": "Value for the primaryKey field encountered if any for indexCreation or indexUpdate task." - }, - "providedIds": { - "type": [ - "integer", - "null" - ], - "description": "Number of provided document ids for the documentDeletion task.", - "minimum": 0 - }, - "deletedDocuments": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Number of documents finally deleted for documentDeletion and indexDeletion tasks.", - "minimum": 0 - }, - "matchedTasks": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Number of tasks that match the request for taskCancelation or taskDeletion tasks.", - "minimum": 0 - }, - "canceledTasks": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Number of tasks canceled for taskCancelation.", - "minimum": 0 - }, - "deletedTasks": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Number of tasks deleted for taskDeletion.", - "minimum": 0 - }, - "originalFilter": { - "type": [ - "string", - "null" - ], - "description": "Original filter query for taskCancelation or taskDeletion tasks." - }, - "dumpUid": { - "type": [ - "string", - "null" - ], - "description": "Identifier generated for the dump for dumpCreation task." - }, - "context": { - "type": [ - "object", - "null" - ] - }, - "function": { - "type": [ - "string", - "null" - ] - }, - "swaps": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/IndexSwap" - } - }, - "upgradeFrom": { - "type": [ - "string", - "null" - ] - }, - "upgradeTo": { - "type": [ - "string", - "null" - ] - }, - "url": { - "type": [ - "string", - "null" - ] - }, - "apiKey": { - "type": [ - "string", - "null" - ] - }, - "payloadSize": { - "type": [ - "string", - "null" - ] - }, - "indexes": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "$ref": "#/components/schemas/DetailsExportIndexSettings" - }, - "propertyNames": { - "type": "string" - } - }, - "oldIndexUid": { - "type": [ - "string", - "null" - ] - }, - "newIndexUid": { - "type": [ - "string", - "null" - ] - }, - "preCompactionSize": { - "type": [ - "string", - "null" - ] - }, - "postCompactionSize": { - "type": [ - "string", - "null" - ] - } - } - } - ] - }, - "DistributionShift": { - "type": "object", - "description": "Describes the mean and sigma of distribution of embedding similarity in the embedding space.\n\nThe intended use is to make the similarity score more comparable to the regular ranking score.\nThis allows to correct effects where results are too \"packed\" around a certain value.", - "required": [ - "current_mean", - "current_sigma" - ], - "properties": { - "current_mean": { - "type": "number", - "format": "float", - "description": "Value where the results are \"packed\".\n\nSimilarity scores are translated so that they are packed around 0.5 instead" - }, - "current_sigma": { - "type": "number", - "format": "float", - "description": "standard deviation of a similarity score.\n\nSet below 0.4 to make the results less packed around the mean, and above 0.4 to make them more packed." - } - } - }, - "DocumentDeletionByFilter": { - "type": "object", - "required": [ - "filter" - ], - "properties": { - "filter": {} - } - }, - "DocumentEditionByFunction": { - "type": "object", - "required": [ - "function" - ], - "properties": { - "filter": { - "description": "A string containing a RHAI function." - }, - "context": { - "description": "A string containing a filter expression." - }, - "function": { - "type": "string", - "description": "An object with data Meilisearch should make available for the editing function." - } - } - }, - "EmbedderSource": { - "type": "string", - "enum": [ - "openAi", - "huggingFace", - "ollama", - "userProvided", - "rest", - "composite" - ] - }, - "EmbedderStatsView": { - "type": "object", - "required": [ - "total", - "failed" - ], - "properties": { - "total": { - "type": "integer", - "minimum": 0 - }, - "failed": { - "type": "integer", - "minimum": 0 - }, - "lastError": { - "type": [ - "string", - "null" - ] - } - } - }, - "ErrorType": { - "type": "string", - "enum": [ - "internal", - "invalid_request", - "auth", - "system" - ] - }, - "Export": { - "type": "object", - "properties": { - "url": { - "type": [ - "string", - "null" - ], - "example": "https://ms-1234.heaven.meilisearch.com" - }, - "apiKey": { - "type": [ - "string", - "null" - ], - "example": "1234abcd" - }, - "payloadSize": { - "type": [ - "string", - "null" - ], - "example": "24MiB" - }, - "indexes": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "$ref": "#/components/schemas/ExportIndexSettings" - }, - "propertyNames": { - "type": "string" - }, - "example": { - "*": { - "filter": null - } - } - } - } - }, - "ExportIndexSettings": { - "type": "object", - "properties": { - "filter": { - "type": [ - "string", - "null" - ], - "example": "genres = action" - }, - "overrideSettings": { - "type": [ - "boolean", - "null" - ], - "example": true - } - } - }, - "FacetSearchQuery": { - "type": "object", - "required": [ - "facet_name", - "matching_strategy" - ], - "properties": { - "facet_query": { - "type": [ - "string", - "null" - ] - }, - "facet_name": { - "type": "string" - }, - "q": { - "type": [ - "string", - "null" - ] - }, - "vector": { - "type": [ - "array", - "null" - ], - "items": { - "type": "number", - "format": "float" - } - }, - "media": {}, - "hybrid": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/HybridQuery" - } - ] - }, - "filter": {}, - "matching_strategy": { - "$ref": "#/components/schemas/MatchingStrategy" - }, - "attributes_to_search_on": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "ranking_score_threshold": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/RankingScoreThreshold" - } - ] - }, - "locales": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/Locale" - } - }, - "exhaustive_facet_count": { - "type": [ - "boolean", - "null" - ] - } - } - }, - "FacetStats": { - "type": "object", - "required": [ - "min", - "max" - ], - "properties": { - "min": { - "type": "number", - "format": "double" - }, - "max": { - "type": "number", - "format": "double" - } - } - }, - "FacetValuesSort": { - "type": "string", - "enum": [ - "alpha", - "count" - ] - }, - "FacetingSettings": { - "type": "object", - "properties": { - "maxValuesPerFacet": { - "type": [ - "integer", - "null" - ], - "example": 10, - "minimum": 0 - }, - "sortFacetValuesBy": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "$ref": "#/components/schemas/FacetValuesSort" - }, - "propertyNames": { - "type": "string" - }, - "example": { - "genre": "count" - } - } - }, - "additionalProperties": false - }, - "FederatedFacets": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ComputedFacets" - }, - "propertyNames": { - "type": "string" - } - }, - "FederatedSearch": { - "type": "object", - "required": [ - "queries" - ], - "properties": { - "queries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SearchQueryWithIndex" - } - }, - "federation": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/Federation" - } - ] - } - } - }, - "FederatedSearchResult": { - "allOf": [ - { - "$ref": "#/components/schemas/HitsInfo" - }, - { - "type": "object", - "required": [ - "hits", - "processingTimeMs" - ], - "properties": { - "hits": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SearchHit" - } - }, - "processingTimeMs": { - "type": "integer", - "minimum": 0 - }, - "queryVectors": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "$ref": "#/components/schemas/Vec" - }, - "propertyNames": { - "type": "integer", - "minimum": 0 - } - }, - "semanticHitCount": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "minimum": 0 - }, - "facetDistribution": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - }, - "propertyNames": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - } - }, - "facetStats": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "$ref": "#/components/schemas/FacetStats" - }, - "propertyNames": { - "type": "string" - } - }, - "facetsByIndex": { - "$ref": "#/components/schemas/FederatedFacets" - }, - "requestUid": { - "type": [ - "string", - "null" - ], - "format": "uuid" - }, - "metadata": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/SearchMetadata" - } - }, - "remoteErrors": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "$ref": "#/components/schemas/ResponseError" - }, - "propertyNames": { - "type": "string" - } - } - } - } - ] - }, - "Federation": { - "type": "object", - "required": [ - "limit", - "offset", - "facetsByIndex" - ], - "properties": { - "limit": { - "type": "integer", - "minimum": 0 - }, - "offset": { - "type": "integer", - "minimum": 0 - }, - "facetsByIndex": { - "type": "object", - "additionalProperties": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "propertyNames": { - "type": "string", - "description": "An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long", - "example": "movies" - } - }, - "mergeFacets": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/MergeFacets" - } - ] - } - } - }, - "FederationOptions": { - "type": "object", - "required": [ - "weight" - ], - "properties": { - "weight": { - "type": "number", - "format": "double" - }, - "remote": { - "type": [ - "string", - "null" - ] - }, - "queryPosition": { - "type": [ - "integer", - "null" - ], - "minimum": 0 - } - } - }, - "FilterFeatures": { - "type": "object", - "properties": { - "equality": { - "type": "boolean" - }, - "comparison": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "FilterableAttributesFeatures": { - "type": "object", - "properties": { - "facetSearch": { - "type": "boolean" - }, - "filter": { - "$ref": "#/components/schemas/FilterFeatures" - } - }, - "additionalProperties": false - }, - "FilterableAttributesPatterns": { - "type": "object", - "required": [ - "attributePatterns" - ], - "properties": { - "attributePatterns": { - "$ref": "#/components/schemas/AttributePatterns" - }, - "features": { - "$ref": "#/components/schemas/FilterableAttributesFeatures" - } - }, - "additionalProperties": false - }, - "FilterableAttributesRule": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/FilterableAttributesPatterns" - } - ] - }, - "GetLogs": { - "type": "object", - "required": [ - "target", - "mode", - "profileMemory" - ], - "properties": { - "target": { - "type": "string", - "description": "Lets you specify which parts of the code you want to inspect and is formatted like that: code_part=log_level,code_part=log_level\n- If the `code_part` is missing, then the `log_level` will be applied to everything.\n- If the `log_level` is missing, then the `code_part` will be selected in `info` log level.", - "default": "info", - "example": "milli=trace,index_scheduler,actix_web=off" - }, - "mode": { - "oneOf": [ - { - "$ref": "#/components/schemas/LogMode", - "description": "Lets you customize the format of the logs." - } - ], - "default": "Human" - }, - "profileMemory": { - "type": "boolean", - "description": "A boolean to indicate if you want to profile the memory as well. This is only useful while using the `profile` mode.\nBe cautious, though; it slows down the engine a lot.", - "default": false - } - } - }, - "HealthResponse": { - "type": "object", - "required": [ - "status" - ], - "properties": { - "status": { - "$ref": "#/components/schemas/HealthStatus", - "description": "The status of the instance." - } - } - }, - "HealthStatus": { - "type": "string", - "enum": [ - "available" - ] - }, - "HitsInfo": { - "oneOf": [ - { - "type": "object", - "required": [ - "hitsPerPage", - "page", - "totalPages", - "totalHits" - ], - "properties": { - "hitsPerPage": { - "type": "integer", - "minimum": 0 - }, - "page": { - "type": "integer", - "minimum": 0 - }, - "totalPages": { - "type": "integer", - "minimum": 0 - }, - "totalHits": { - "type": "integer", - "minimum": 0 - } - } - }, - { - "type": "object", - "required": [ - "limit", - "offset", - "estimatedTotalHits" - ], - "properties": { - "limit": { - "type": "integer", - "minimum": 0 - }, - "offset": { - "type": "integer", - "minimum": 0 - }, - "estimatedTotalHits": { - "type": "integer", - "minimum": 0 - } - } - } - ] - }, - "HybridQuery": { - "type": "object", - "required": [ - "embedder" - ], - "properties": { - "semanticRatio": { - "type": "number", - "format": "float" - }, - "embedder": { - "type": "string" - } - } - }, - "IndexCreateRequest": { - "type": "object", - "required": [ - "uid" - ], - "properties": { - "uid": { - "$ref": "#/components/schemas/IndexUid", - "description": "The name of the index" - }, - "primaryKey": { - "type": [ - "string", - "null" - ], - "description": "The primary key of the index", - "example": "id" - } - } - }, - "IndexStats": { - "type": "object", - "description": "Stats of an `Index`, as known to the `stats` route.", - "required": [ - "numberOfDocuments", - "rawDocumentDbSize", - "avgDocumentSize", - "isIndexing", - "fieldDistribution" - ], - "properties": { - "numberOfDocuments": { - "type": "integer", - "format": "u-int64", - "description": "Number of documents in the index", - "minimum": 0 - }, - "rawDocumentDbSize": { - "type": "integer", - "format": "u-int64", - "description": "Size of the documents database, in bytes.", - "minimum": 0 - }, - "avgDocumentSize": { - "type": "integer", - "format": "u-int64", - "description": "Average size of a document in the documents database.", - "minimum": 0 - }, - "isIndexing": { - "type": "boolean", - "description": "Whether or not the index is currently ingesting document" - }, - "numberOfEmbeddings": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Number of embeddings in the index", - "minimum": 0 - }, - "numberOfEmbeddedDocuments": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Number of embedded documents in the index", - "minimum": 0 - }, - "fieldDistribution": { - "type": "object", - "description": "Association of every field name with the number of times it occurs in the documents.", - "additionalProperties": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "IndexSwap": { - "type": "object", - "required": [ - "indexes" - ], - "properties": { - "indexes": { - "type": "array", - "items": false, - "prefixItems": [ - { - "type": "string" - }, - { - "type": "string" - } - ] - }, - "rename": { - "type": "boolean" - } - } - }, - "IndexUid": { - "type": "string", - "description": "An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long", - "example": "movies" - }, - "IndexView": { - "type": "object", - "required": [ - "uid", - "createdAt", - "updatedAt" - ], - "properties": { - "uid": { - "type": "string", - "description": "Unique identifier for the index" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "An `RFC 3339` format for date/time/duration." - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "description": "An `RFC 3339` format for date/time/duration." - }, - "primaryKey": { - "type": [ - "string", - "null" - ], - "description": "Custom primaryKey for documents" - } - } - }, - "KeyView": { - "type": "object", - "required": [ - "key", - "uid", - "actions", - "indexes", - "createdAt", - "updatedAt" - ], - "properties": { - "name": { - "type": [ - "string", - "null" - ], - "description": "The name of the API Key if any" - }, - "description": { - "type": [ - "string", - "null" - ], - "description": "The description of the API Key if any" - }, - "key": { - "type": "string", - "description": "The actual API Key you can send to Meilisearch" - }, - "uid": { - "type": "string", - "format": "uuid", - "description": "The `Uuid` specified while creating the key or autogenerated by Meilisearch." - }, - "actions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Action" - }, - "description": "The actions accessible with this key." - }, - "indexes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The indexes accessible with this key." - }, - "expiresAt": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "The expiration date of the key. Once this timestamp is exceeded the key is not deleted but cannot be used anymore." - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The date of creation of this API Key.", - "readOnly": true - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "description": "The date of the last update made on this key.", - "readOnly": true - } - } - }, - "Kind": { - "type": "string", - "description": "The type of the task.", - "enum": [ - "documentAdditionOrUpdate", - "documentEdition", - "documentDeletion", - "settingsUpdate", - "indexCreation", - "indexDeletion", - "indexUpdate", - "indexSwap", - "taskCancelation", - "taskDeletion", - "dumpCreation", - "snapshotCreation", - "export", - "upgradeDatabase", - "indexCompaction" - ], - "example": [ - "documentAdditionOrUpdate", - "documentEdition", - "documentDeletion", - "settingsUpdate", - "indexCreation", - "indexDeletion", - "indexUpdate", - "indexSwap", - "taskCancelation", - "taskDeletion", - "dumpCreation", - "snapshotCreation", - "export", - "upgradeDatabase", - "indexCompaction" - ] - }, - "Locale": { - "type": "string", - "enum": [ - "af", - "ak", - "am", - "ar", - "az", - "be", - "bn", - "bg", - "ca", - "cs", - "da", - "de", - "el", - "en", - "eo", - "et", - "fi", - "fr", - "gu", - "he", - "hi", - "hr", - "hu", - "hy", - "id", - "it", - "jv", - "ja", - "kn", - "ka", - "km", - "ko", - "la", - "lv", - "lt", - "ml", - "mr", - "mk", - "my", - "ne", - "nl", - "nb", - "or", - "pa", - "fa", - "pl", - "pt", - "ro", - "ru", - "si", - "sk", - "sl", - "sn", - "es", - "sr", - "sv", - "ta", - "te", - "tl", - "th", - "tk", - "tr", - "uk", - "ur", - "uz", - "vi", - "yi", - "zh", - "zu", - "afr", - "aka", - "amh", - "ara", - "aze", - "bel", - "ben", - "bul", - "cat", - "ces", - "dan", - "deu", - "ell", - "eng", - "epo", - "est", - "fin", - "fra", - "guj", - "heb", - "hin", - "hrv", - "hun", - "hye", - "ind", - "ita", - "jav", - "jpn", - "kan", - "kat", - "khm", - "kor", - "lat", - "lav", - "lit", - "mal", - "mar", - "mkd", - "mya", - "nep", - "nld", - "nob", - "ori", - "pan", - "pes", - "pol", - "por", - "ron", - "rus", - "sin", - "slk", - "slv", - "sna", - "spa", - "srp", - "swe", - "tam", - "tel", - "tgl", - "tha", - "tuk", - "tur", - "ukr", - "urd", - "uzb", - "vie", - "yid", - "zho", - "zul", - "cmn" - ] - }, - "LocalizedAttributesRuleView": { - "type": "object", - "required": [ - "attributePatterns", - "locales" - ], - "properties": { - "attributePatterns": { - "$ref": "#/components/schemas/AttributePatterns" - }, - "locales": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Locale" - } - } - } - }, - "LogMode": { - "type": "string", - "enum": [ - "human", - "json", - "profile" - ] - }, - "MatchingStrategy": { - "type": "string", - "description": "This is unfortunately a duplication of the struct in .\nThe reason why it is duplicated is because milli cannot depend on meilisearch. It would be cyclic imports.", - "enum": [ - "last", - "all", - "frequency" - ] - }, - "MergeFacets": { - "type": "object", - "properties": { - "maxValuesPerFacet": { - "type": [ - "integer", - "null" - ], - "minimum": 0 - } - } - }, - "MinWordSizeTyposSetting": { - "type": "object", - "properties": { - "oneTypo": { - "type": [ - "integer", - "null" - ], - "format": "u-int8", - "example": 5, - "minimum": 0 - }, - "twoTypos": { - "type": [ - "integer", - "null" - ], - "format": "u-int8", - "example": 9, - "minimum": 0 - } - }, - "additionalProperties": false - }, - "Network": { - "type": "object", - "properties": { - "remotes": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "$ref": "#/components/schemas/Remote" - }, - "propertyNames": { - "type": "string" - }, - "example": "http://localhost:7700" - }, - "self": { - "type": [ - "string", - "null" - ], - "example": "ms-00" - }, - "sharding": { - "type": [ - "boolean", - "null" - ], - "example": true - } - } - }, - "Origin": { - "type": "object", - "required": [ - "remoteName", - "taskUid" - ], - "properties": { - "remoteName": { - "type": "string" - }, - "taskUid": { - "type": "integer", - "minimum": 0 - } - } - }, - "OverridePooling": { - "type": "string", - "enum": [ - "useModel", - "forceCls", - "forceMean" - ] - }, - "PaginationSettings": { - "type": "object", - "properties": { - "maxTotalHits": { - "type": [ - "integer", - "null" - ], - "example": 250, - "minimum": 0 - } - }, - "additionalProperties": false - }, - "PaginationView_IndexView": { - "type": "object", - "required": [ - "results", - "offset", - "limit", - "total" - ], - "properties": { - "results": { - "type": "array", - "items": { - "type": "object", - "required": [ - "uid", - "createdAt", - "updatedAt" - ], - "properties": { - "uid": { - "type": "string", - "description": "Unique identifier for the index" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "An `RFC 3339` format for date/time/duration." - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "description": "An `RFC 3339` format for date/time/duration." - }, - "primaryKey": { - "type": [ - "string", - "null" - ], - "description": "Custom primaryKey for documents" - } - } - } - }, - "offset": { - "type": "integer", - "minimum": 0 - }, - "limit": { - "type": "integer", - "minimum": 0 - }, - "total": { - "type": "integer", - "minimum": 0 - } - } - }, - "PaginationView_KeyView": { - "type": "object", - "required": [ - "results", - "offset", - "limit", - "total" - ], - "properties": { - "results": { - "type": "array", - "items": { - "type": "object", - "required": [ - "key", - "uid", - "actions", - "indexes", - "createdAt", - "updatedAt" - ], - "properties": { - "name": { - "type": [ - "string", - "null" - ], - "description": "The name of the API Key if any" - }, - "description": { - "type": [ - "string", - "null" - ], - "description": "The description of the API Key if any" - }, - "key": { - "type": "string", - "description": "The actual API Key you can send to Meilisearch" - }, - "uid": { - "type": "string", - "format": "uuid", - "description": "The `Uuid` specified while creating the key or autogenerated by Meilisearch." - }, - "actions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Action" - }, - "description": "The actions accessible with this key." - }, - "indexes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The indexes accessible with this key." - }, - "expiresAt": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "The expiration date of the key. Once this timestamp is exceeded the key is not deleted but cannot be used anymore." - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The date of creation of this API Key.", - "readOnly": true - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "description": "The date of the last update made on this key.", - "readOnly": true - } - } - } - }, - "offset": { - "type": "integer", - "minimum": 0 - }, - "limit": { - "type": "integer", - "minimum": 0 - }, - "total": { - "type": "integer", - "minimum": 0 - } - } - }, - "PaginationView_Value": { - "type": "object", - "required": [ - "results", - "offset", - "limit", - "total" - ], - "properties": { - "results": { - "type": "array", - "items": {} - }, - "offset": { - "type": "integer", - "minimum": 0 - }, - "limit": { - "type": "integer", - "minimum": 0 - }, - "total": { - "type": "integer", - "minimum": 0 - } - } - }, - "PatchApiKey": { - "type": "object", - "properties": { - "description": { - "type": [ - "string", - "null" - ], - "example": "This key is used to update documents in the products index" - }, - "name": { - "type": [ - "string", - "null" - ], - "example": "Indexing Products API key" - } - } - }, - "Personalize": { - "type": "object", - "required": [ - "user_context" - ], - "properties": { - "user_context": { - "type": "string" - } - } - }, - "PrefixSearchSettings": { - "type": "string", - "enum": [ - "indexingTime", - "disabled" - ] - }, - "ProgressStepView": { - "type": "object", - "required": [ - "currentStep", - "finished", - "total" - ], - "properties": { - "currentStep": { - "type": "string" - }, - "finished": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "total": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - } - }, - "ProgressView": { - "type": "object", - "required": [ - "steps", - "percentage" - ], - "properties": { - "steps": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProgressStepView" - } - }, - "percentage": { - "type": "number", - "format": "float" - } - } - }, - "ProximityPrecisionView": { - "type": "string", - "enum": [ - "byWord", - "byAttribute" - ] - }, - "RankingRuleView": { - "oneOf": [ - { - "type": "string", - "description": "Sorted by decreasing number of matched query terms.\nQuery words at the front of an attribute is considered better than if it was at the back.", - "enum": [ - "Words" - ] - }, - { - "type": "string", - "description": "Sorted by increasing number of typos.", - "enum": [ - "Typo" - ] - }, - { - "type": "string", - "description": "Sorted by increasing distance between matched query terms.", - "enum": [ - "Proximity" - ] - }, - { - "type": "string", - "description": "Documents with quey words contained in more important\nattributes are considered better.", - "enum": [ - "Attribute" - ] - }, - { - "type": "string", - "description": "Dynamically sort at query time the documents. None, one or multiple Asc/Desc sortable\nattributes can be used in place of this criterion at query time.", - "enum": [ - "Sort" - ] - }, - { - "type": "string", - "description": "Sorted by the similarity of the matched words with the query words.", - "enum": [ - "Exactness" - ] - }, - { - "type": "object", - "description": "Sorted by the increasing value of the field specified.", - "required": [ - "Asc" - ], - "properties": { - "Asc": { - "type": "string", - "description": "Sorted by the increasing value of the field specified." - } - } - }, - { - "type": "object", - "description": "Sorted by the decreasing value of the field specified.", - "required": [ - "Desc" - ], - "properties": { - "Desc": { - "type": "string", - "description": "Sorted by the decreasing value of the field specified." - } - } - } - ] - }, - "RankingScoreThreshold": { - "type": "number", - "format": "double" - }, - "Remote": { - "type": "object", - "properties": { - "url": { - "type": [ - "string", - "null" - ], - "example": { - "ms-0": { - "url": "http://localhost:7700", - "searchApiKey": null, - "writeApiKey": null - }, - "ms-1": { - "url": "http://localhost:7701", - "searchApiKey": "foo", - "writeApiKey": "bar" - }, - "ms-2": { - "url": "http://localhost:7702", - "searchApiKey": "bar", - "writeApiKey": "foo" - } - } - }, - "searchApiKey": { - "type": [ - "string", - "null" - ], - "example": "XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU" - }, - "writeApiKey": { - "type": [ - "string", - "null" - ], - "example": "XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU" - } - } - }, - "RemoteTask": { - "type": "object", - "properties": { - "taskUid": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/u32" - } - ] - }, - "error": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ResponseError" - } - ] - } - } - }, - "ResponseError": { - "type": "object", - "required": [ - "message", - "code", - "type", - "link" - ], - "properties": { - "message": { - "type": "string", - "description": "The error message." - }, - "code": { - "$ref": "#/components/schemas/Code", - "description": "The error code." - }, - "type": { - "$ref": "#/components/schemas/ErrorType", - "description": "The error type." - }, - "link": { - "type": "string", - "description": "A link to the documentation about this specific error." - } - } - }, - "RuntimeTogglableFeatures": { - "type": "object", - "properties": { - "metrics": { - "type": [ - "boolean", - "null" - ] - }, - "logsRoute": { - "type": [ - "boolean", - "null" - ] - }, - "editDocumentsByFunction": { - "type": [ - "boolean", - "null" - ] - }, - "containsFilter": { - "type": [ - "boolean", - "null" - ] - }, - "network": { - "type": [ - "boolean", - "null" - ] - }, - "getTaskDocumentsRoute": { - "type": [ - "boolean", - "null" - ] - }, - "compositeEmbedders": { - "type": [ - "boolean", - "null" - ] - }, - "chatCompletions": { - "type": [ - "boolean", - "null" - ] - }, - "multimodal": { - "type": [ - "boolean", - "null" - ] - }, - "vectorStoreSetting": { - "type": [ - "boolean", - "null" - ] - } - } - }, - "SearchHit": { - "type": "object", - "properties": { - "_formatted": { - "type": "object", - "additionalProperties": true - }, - "_matchesPosition": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/BTreeMap" - } - ] - }, - "_rankingScore": { - "type": [ - "number", - "null" - ], - "format": "double" - }, - "_rankingScoreDetails": { - "type": [ - "object", - "null" - ], - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - } - }, - "additionalProperties": {} - }, - "SearchMetadata": { - "type": "object", - "required": [ - "queryUid", - "indexUid" - ], - "properties": { - "queryUid": { - "type": "string", - "format": "uuid" - }, - "indexUid": { - "type": "string" - }, - "primaryKey": { - "type": [ - "string", - "null" - ] - }, - "remote": { - "type": [ - "string", - "null" - ] - } - } - }, - "SearchQuery": { - "type": "object", - "required": [ - "offset", - "limit", - "retrieve_vectors", - "crop_length", - "show_matches_position", - "show_ranking_score", - "show_ranking_score_details", - "highlight_pre_tag", - "highlight_post_tag", - "crop_marker", - "matching_strategy" - ], - "properties": { - "q": { - "type": [ - "string", - "null" - ] - }, - "vector": { - "type": [ - "array", - "null" - ], - "items": { - "type": "number", - "format": "float" - } - }, - "media": {}, - "hybrid": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/HybridQuery" - } - ] - }, - "offset": { - "type": "integer", - "default": 0, - "minimum": 0 - }, - "limit": { - "type": "integer", - "default": 20, - "minimum": 0 - }, - "page": { - "type": [ - "integer", - "null" - ], - "minimum": 0 - }, - "hits_per_page": { - "type": [ - "integer", - "null" - ], - "minimum": 0 - }, - "attributes_to_retrieve": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "retrieve_vectors": { - "type": "boolean" - }, - "attributes_to_crop": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "crop_length": { - "type": "integer", - "default": 10, - "minimum": 0 - }, - "attributes_to_highlight": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "show_matches_position": { - "type": "boolean" - }, - "show_ranking_score": { - "type": "boolean" - }, - "show_ranking_score_details": { - "type": "boolean" - }, - "filter": {}, - "sort": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "distinct": { - "type": [ - "string", - "null" - ] - }, - "facets": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "highlight_pre_tag": { - "type": "string", - "default": "" - }, - "highlight_post_tag": { - "type": "string", - "default": "" - }, - "crop_marker": { - "type": "string", - "default": "…" - }, - "matching_strategy": { - "$ref": "#/components/schemas/MatchingStrategy" - }, - "attributes_to_search_on": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "ranking_score_threshold": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/RankingScoreThreshold" - } - ] - }, - "locales": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/Locale" - } - }, - "personalize": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/Personalize" - } - ] - } - } - }, - "SearchQueryWithIndex": { - "type": "object", - "description": "A `SearchQuery` + an index UID and optional FederationOptions.", - "required": [ - "indexUid", - "retrieveVectors", - "cropLength", - "showRankingScore", - "showRankingScoreDetails", - "showMatchesPosition", - "highlightPreTag", - "highlightPostTag", - "cropMarker", - "matchingStrategy" - ], - "properties": { - "indexUid": { - "$ref": "#/components/schemas/IndexUid" - }, - "q": { - "type": [ - "string", - "null" - ] - }, - "vector": { - "type": [ - "array", - "null" - ], - "items": { - "type": "number", - "format": "float" - } - }, - "media": {}, - "hybrid": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/HybridQuery" - } - ] - }, - "offset": { - "type": [ - "integer", - "null" - ], - "minimum": 0 - }, - "limit": { - "type": [ - "integer", - "null" - ], - "minimum": 0 - }, - "page": { - "type": [ - "integer", - "null" - ], - "minimum": 0 - }, - "hitsPerPage": { - "type": [ - "integer", - "null" - ], - "minimum": 0 - }, - "attributesToRetrieve": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "retrieveVectors": { - "type": "boolean" - }, - "attributesToCrop": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "cropLength": { - "type": "integer", - "minimum": 0 - }, - "attributesToHighlight": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "showRankingScore": { - "type": "boolean" - }, - "showRankingScoreDetails": { - "type": "boolean" - }, - "showMatchesPosition": { - "type": "boolean" - }, - "filter": {}, - "sort": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "distinct": { - "type": [ - "string", - "null" - ] - }, - "facets": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "highlightPreTag": { - "type": "string" - }, - "highlightPostTag": { - "type": "string" - }, - "cropMarker": { - "type": "string" - }, - "matchingStrategy": { - "$ref": "#/components/schemas/MatchingStrategy" - }, - "attributesToSearchOn": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "rankingScoreThreshold": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/RankingScoreThreshold" - } - ] - }, - "locales": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/Locale" - } - }, - "federationOptions": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/FederationOptions" - } - ] - } - } - }, - "SearchResult": { - "allOf": [ - { - "$ref": "#/components/schemas/HitsInfo" - }, - { - "type": "object", - "required": [ - "hits", - "query", - "processingTimeMs" - ], - "properties": { - "hits": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SearchHit" - } - }, - "query": { - "type": "string" - }, - "queryVector": { - "type": [ - "array", - "null" - ], - "items": { - "type": "number", - "format": "float" - } - }, - "processingTimeMs": { - "type": "integer", - "minimum": 0 - }, - "facetDistribution": { - "type": [ - "object", - "null" - ], - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - }, - "facetStats": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "$ref": "#/components/schemas/FacetStats" - }, - "propertyNames": { - "type": "string" - } - }, - "requestUid": { - "type": [ - "string", - "null" - ], - "format": "uuid" - }, - "metadata": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/SearchMetadata" - } - ] - }, - "semanticHitCount": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "minimum": 0 - } - } - } - ] - }, - "SearchResultWithIndex": { - "allOf": [ - { - "$ref": "#/components/schemas/SearchResult" - }, - { - "type": "object", - "required": [ - "indexUid" - ], - "properties": { - "indexUid": { - "type": "string" - } - } - } - ] - }, - "SearchResults": { - "type": "object", - "required": [ - "results" - ], - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SearchResultWithIndex" - } - } - } - }, - "SettingEmbeddingSettings": { - "type": "object", - "description": "\"Technical\" type that is required due to utoipa.\n\nWe did not find a way to implement [`utoipa::ToSchema`] for the [`Setting`] enum,\nbut most types can use the `value_type` macro parameter to workaround that issue.\n\nHowever that type is used in the settings route, including through the macro that auto-generate\nall the settings route, so we can't remap the `value_type`.", - "properties": { - "inner": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "object", - "properties": { - "source": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/EmbedderSource", - "description": "The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`" - } - ] - }, - "model": { - "type": [ - "string", - "null" - ], - "description": "The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`" - }, - "revision": { - "type": [ - "string", - "null" - ], - "description": "The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`" - }, - "pooling": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/OverridePooling", - "description": "The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior." - } - ] - }, - "apiKey": { - "type": [ - "string", - "null" - ], - "description": "The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings" - }, - "dimensions": { - "type": [ - "string", - "null" - ], - "description": "The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text." - }, - "binaryQuantized": { - "type": [ - "boolean", - "null" - ], - "description": "Whether to binary quantize the embeddings of this embedder.\n\nBinary quantized embeddings are smaller than regular embeddings, which improves\ndisk usage and retrieval speed, at the cost of relevancy.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🏗️ When set to `true`, embeddings are not regenerated, but they are binary quantized, which takes time.\n\n# Defaults\n\n- Defaults to `false`\n\n# Note\n\nAs binary quantization is a destructive operation, it is not possible to disable again this setting after\nfirst enabling it. If you are unsure of whether the performance-relevancy tradeoff is right for you,\nwe recommend to use this parameter on a test index first." - }, - "documentTemplate": { - "type": [ - "boolean", - "null" - ], - "description": "A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text." - }, - "documentTemplateMaxBytes": { - "type": [ - "integer", - "null" - ], - "description": "Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400", - "minimum": 0 - }, - "url": { - "type": [ - "string", - "null" - ], - "description": "URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated" - }, - "indexingFragments": { - "type": [ - "object", - "null" - ], - "description": "Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.", - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - }, - "searchFragments": { - "type": [ - "object", - "null" - ], - "description": "Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - }, - "request": { - "description": "Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" - }, - "response": { - "description": "Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" - }, - "headers": { - "type": [ - "object", - "null" - ], - "description": "Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", - "additionalProperties": { - "type": "string" - }, - "propertyNames": { - "type": "string" - } - }, - "searchEmbedder": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/SubEmbeddingSettings" - } - ] - }, - "indexingEmbedder": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/SubEmbeddingSettings" - } - ] - }, - "distribution": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/DistributionShift", - "description": "Affine transformation applied to the semantic score to make it more comparable to the ranking score.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings" - } - ] - } - }, - "additionalProperties": false - } - ] - } - } - }, - "Settings_Checked": { - "type": "object", - "description": "Holds all the settings for an index. `T` can either be `Checked` if they represents settings\nwhose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a\ncall to `check` will return a `Settings` from a `Settings`.", - "properties": { - "displayedAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Fields displayed in the returned documents.", - "example": [ - "id", - "title", - "description", - "url" - ] - }, - "searchableAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Fields in which to search for matching query words sorted by order of importance.", - "example": [ - "title", - "description" - ] - }, - "filterableAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/FilterableAttributesRule" - }, - "description": "Attributes to use for faceting and filtering. See [Filtering and Faceted Search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).", - "example": [ - "release_date", - "genre" - ] - }, - "sortableAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Attributes to use when sorting search results.", - "example": [ - "release_date" - ] - }, - "rankingRules": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of ranking rules sorted by order of importance. The order is customizable.\n[A list of ordered built-in ranking rules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).", - "example": [ - "words", - "typo", - "proximity", - "attribute", - "exactness" - ] - }, - "stopWords": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of words ignored when present in search queries.", - "example": [ - "the", - "a", - "them", - "their" - ] - }, - "nonSeparatorTokens": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of characters not delimiting where one term begins and ends.", - "example": [ - " ", - "\n" - ] - }, - "separatorTokens": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of characters delimiting where one term begins and ends.", - "example": [ - "S" - ] - }, - "dictionary": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of strings Meilisearch should parse as a single term.", - "example": [ - "iPhone pro" - ] - }, - "synonyms": { - "type": [ - "object", - "null" - ], - "description": "List of associated words treated similarly. A word associated to an array of word as synonyms.", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - }, - "example": { - "he": [ - "she", - "they", - "them" - ], - "phone": [ - "iPhone", - "android" - ] - } - }, - "distinctAttribute": { - "type": [ - "string", - "null" - ], - "description": "Search returns documents with distinct (different) values of the given field.", - "example": "sku" - }, - "proximityPrecision": { - "type": [ - "string", - "null" - ], - "description": "Precision level when calculating the proximity ranking rule.", - "example": "byAttribute" - }, - "typoTolerance": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/TypoSettings", - "description": "Customize typo tolerance feature." - } - ] - }, - "faceting": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/FacetingSettings", - "description": "Faceting settings." - } - ] - }, - "pagination": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/PaginationSettings", - "description": "Pagination settings." - } - ] - }, - "embedders": { - "type": [ - "object", - "null" - ], - "description": "Embedder required for performing semantic search queries.", - "additionalProperties": { - "$ref": "#/components/schemas/SettingEmbeddingSettings" - }, - "propertyNames": { - "type": "string" - } - }, - "searchCutoffMs": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Maximum duration of a search query.", - "example": 50, - "minimum": 0 - }, - "localizedAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/LocalizedAttributesRuleView" - }, - "example": 50 - }, - "facetSearch": { - "type": [ - "boolean", - "null" - ], - "example": true - }, - "prefixSearch": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/PrefixSearchSettings" - } - ] - }, - "chat": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ChatSettings", - "description": "Customize the chat prompting." - } - ] - }, - "vectorStore": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/VectorStoreBackend" - } - ] - } - }, - "additionalProperties": false - }, - "Settings_Unchecked": { - "type": "object", - "description": "Holds all the settings for an index. `T` can either be `Checked` if they represents settings\nwhose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a\ncall to `check` will return a `Settings` from a `Settings`.", - "properties": { - "displayedAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Fields displayed in the returned documents.", - "example": [ - "id", - "title", - "description", - "url" - ] - }, - "searchableAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Fields in which to search for matching query words sorted by order of importance.", - "example": [ - "title", - "description" - ] - }, - "filterableAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/FilterableAttributesRule" - }, - "description": "Attributes to use for faceting and filtering. See [Filtering and Faceted Search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).", - "example": [ - "release_date", - "genre" - ] - }, - "sortableAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Attributes to use when sorting search results.", - "example": [ - "release_date" - ] - }, - "rankingRules": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of ranking rules sorted by order of importance. The order is customizable.\n[A list of ordered built-in ranking rules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).", - "example": [ - "words", - "typo", - "proximity", - "attribute", - "exactness" - ] - }, - "stopWords": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of words ignored when present in search queries.", - "example": [ - "the", - "a", - "them", - "their" - ] - }, - "nonSeparatorTokens": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of characters not delimiting where one term begins and ends.", - "example": [ - " ", - "\n" - ] - }, - "separatorTokens": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of characters delimiting where one term begins and ends.", - "example": [ - "S" - ] - }, - "dictionary": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of strings Meilisearch should parse as a single term.", - "example": [ - "iPhone pro" - ] - }, - "synonyms": { - "type": [ - "object", - "null" - ], - "description": "List of associated words treated similarly. A word associated to an array of word as synonyms.", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - }, - "example": { - "he": [ - "she", - "they", - "them" - ], - "phone": [ - "iPhone", - "android" - ] - } - }, - "distinctAttribute": { - "type": [ - "string", - "null" - ], - "description": "Search returns documents with distinct (different) values of the given field.", - "example": "sku" - }, - "proximityPrecision": { - "type": [ - "string", - "null" - ], - "description": "Precision level when calculating the proximity ranking rule.", - "example": "byAttribute" - }, - "typoTolerance": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/TypoSettings", - "description": "Customize typo tolerance feature." - } - ] - }, - "faceting": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/FacetingSettings", - "description": "Faceting settings." - } - ] - }, - "pagination": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/PaginationSettings", - "description": "Pagination settings." - } - ] - }, - "embedders": { - "type": [ - "object", - "null" - ], - "description": "Embedder required for performing semantic search queries.", - "additionalProperties": { - "$ref": "#/components/schemas/SettingEmbeddingSettings" - }, - "propertyNames": { - "type": "string" - } - }, - "searchCutoffMs": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Maximum duration of a search query.", - "example": 50, - "minimum": 0 - }, - "localizedAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/LocalizedAttributesRuleView" - }, - "example": 50 - }, - "facetSearch": { - "type": [ - "boolean", - "null" - ], - "example": true - }, - "prefixSearch": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/PrefixSearchSettings" - } - ] - }, - "chat": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ChatSettings", - "description": "Customize the chat prompting." - } - ] - }, - "vectorStore": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/VectorStoreBackend" - } - ] - } - }, - "additionalProperties": false - }, - "SimilarQuery": { - "type": "object", - "required": [ - "id", - "offset", - "limit", - "embedder", - "retrieve_vectors", - "show_ranking_score", - "show_ranking_score_details", - "ranking_score_threshold" - ], - "properties": { - "id": { - "type": "string" - }, - "offset": { - "type": "integer", - "minimum": 0 - }, - "limit": { - "type": "integer", - "minimum": 0 - }, - "filter": {}, - "embedder": { - "type": "string" - }, - "attributes_to_retrieve": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "retrieve_vectors": { - "type": "boolean" - }, - "show_ranking_score": { - "type": "boolean" - }, - "show_ranking_score_details": { - "type": "boolean" - }, - "ranking_score_threshold": { - "type": "number", - "format": "double" - } - } - }, - "SimilarResult": { - "allOf": [ - { - "$ref": "#/components/schemas/HitsInfo" - }, - { - "type": "object", - "required": [ - "hits", - "id", - "processingTimeMs" - ], - "properties": { - "hits": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SearchHit" - } - }, - "id": { - "type": "string" - }, - "processingTimeMs": { - "type": "integer", - "minimum": 0 - } - } - } - ] - }, - "Stats": { - "type": "object", - "required": [ - "databaseSize", - "usedDatabaseSize", - "indexes" - ], - "properties": { - "databaseSize": { - "type": "integer", - "format": "u-int64", - "description": "The disk space used by the database, in bytes.", - "minimum": 0 - }, - "usedDatabaseSize": { - "type": "integer", - "format": "u-int64", - "description": "The size of the database, in bytes.", - "minimum": 0 - }, - "lastUpdate": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "The date of the last update in the RFC 3339 formats. Can be `null` if no update has ever been processed." - }, - "indexes": { - "type": "object", - "description": "The stats of every individual index your API key lets you access.", - "additionalProperties": { - "$ref": "#/components/schemas/IndexStats" - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "Status": { - "type": "string", - "description": "The status of a task.", - "enum": [ - "enqueued", - "processing", - "succeeded", - "failed", - "canceled" - ], - "example": "processing" - }, - "SubEmbeddingSettings": { - "type": "object", - "properties": { - "source": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/EmbedderSource", - "description": "The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`" - } - ] - }, - "model": { - "type": [ - "string", - "null" - ], - "description": "The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`" - }, - "revision": { - "type": [ - "string", - "null" - ], - "description": "The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`" - }, - "pooling": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/OverridePooling", - "description": "The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior." - } - ] - }, - "apiKey": { - "type": [ - "string", - "null" - ], - "description": "The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings" - }, - "dimensions": { - "type": [ - "string", - "null" - ], - "description": "The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text." - }, - "documentTemplate": { - "type": [ - "boolean", - "null" - ], - "description": "A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text." - }, - "documentTemplateMaxBytes": { - "type": [ - "integer", - "null" - ], - "description": "Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400", - "minimum": 0 - }, - "url": { - "type": [ - "string", - "null" - ], - "description": "URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated" - }, - "indexingFragments": { - "type": [ - "object", - "null" - ], - "description": "Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.", - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - }, - "searchFragments": { - "type": [ - "object", - "null" - ], - "description": "Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - }, - "request": { - "description": "Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" - }, - "response": { - "description": "Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" - }, - "headers": { - "type": [ - "object", - "null" - ], - "description": "Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", - "additionalProperties": { - "type": "string" - }, - "propertyNames": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "SummarizedTaskView": { - "type": "object", - "required": [ - "taskUid", - "status", - "type", - "enqueuedAt" - ], - "properties": { - "taskUid": { - "type": "integer", - "format": "u-int32", - "description": "The task unique identifier.", - "minimum": 0 - }, - "indexUid": { - "type": [ - "string", - "null" - ], - "description": "The index affected by this task. May be `null` if the task is not linked to any index." - }, - "status": { - "$ref": "#/components/schemas/Status", - "description": "The status of the task." - }, - "type": { - "$ref": "#/components/schemas/Kind", - "description": "The type of the task." - }, - "enqueuedAt": { - "type": "string", - "format": "date-time", - "description": "The date on which the task was enqueued." - }, - "customMetadata": { - "type": [ - "string", - "null" - ] - } - } - }, - "SwapIndexesPayload": { - "type": "object", - "required": [ - "indexes", - "rename" - ], - "properties": { - "indexes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IndexUid" - }, - "description": "Array of the two indexUids to be swapped" - }, - "rename": { - "type": "boolean", - "description": "If set to true, instead of swapping the left and right indexes it'll change the name of the first index to the second" - } - } - }, - "TaskNetwork": { - "oneOf": [ - { - "type": "object", - "required": [ - "origin" - ], - "properties": { - "origin": { - "$ref": "#/components/schemas/Origin" - } - } - }, - { - "type": "object", - "required": [ - "remote_tasks" - ], - "properties": { - "remote_tasks": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/RemoteTask" - }, - "propertyNames": { - "type": "string" - } - } - } - } - ] - }, - "TaskView": { - "type": "object", - "required": [ - "uid", - "status", - "type", - "enqueuedAt" - ], - "properties": { - "uid": { - "type": "integer", - "format": "u-int32", - "description": "The unique sequential identifier of the task.", - "example": 4312, - "minimum": 0 - }, - "batchUid": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "description": "The unique identifier of the index where this task is operated.", - "example": "movies", - "minimum": 0 - }, - "indexUid": { - "type": [ - "string", - "null" - ] - }, - "status": { - "$ref": "#/components/schemas/Status" - }, - "type": { - "$ref": "#/components/schemas/Kind", - "description": "The type of the task." - }, - "canceledBy": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "description": "The uid of the task that performed the taskCancelation if the task has been canceled.", - "example": 4326, - "minimum": 0 - }, - "details": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/DetailsView" - } - ] - }, - "error": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ResponseError" - } - ] - }, - "duration": { - "type": [ - "string", - "null" - ], - "description": "Total elasped time the engine was in processing state expressed as a `ISO-8601` duration format.", - "example": null - }, - "enqueuedAt": { - "type": "string", - "description": "An `RFC 3339` format for date/time/duration.", - "example": "2024-08-08_14:12:09.393Z" - }, - "startedAt": { - "type": "string", - "description": "An `RFC 3339` format for date/time/duration.", - "example": "2024-08-08_14:12:09.393Z" - }, - "finishedAt": { - "type": "string", - "description": "An `RFC 3339` format for date/time/duration.", - "example": "2024-08-08_14:12:09.393Z" - }, - "network": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/TaskNetwork" - } - ] - }, - "customMetadata": { - "type": [ - "string", - "null" - ] - } - } - }, - "TypoSettings": { - "type": "object", - "properties": { - "enabled": { - "type": [ - "boolean", - "null" - ], - "example": true - }, - "minWordSizeForTypos": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/MinWordSizeTyposSetting" - } - ] - }, - "disableOnWords": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "example": [ - "iPhone", - "phone" - ], - "uniqueItems": true - }, - "disableOnAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "example": [ - "uuid", - "url" - ], - "uniqueItems": true - }, - "disableOnNumbers": { - "type": [ - "boolean", - "null" - ], - "example": true - } - }, - "additionalProperties": false - }, - "Unchecked": { - "default": null - }, - "UpdateIndexRequest": { - "type": "object", - "properties": { - "primaryKey": { - "type": [ - "string", - "null" - ], - "description": "The new primary key of the index" - }, - "uid": { - "type": [ - "string", - "null" - ], - "description": "The new uid of the index (for renaming)" - } - } - }, - "UpdateStderrLogs": { - "type": "object", - "required": [ - "target" - ], - "properties": { - "target": { - "type": "string", - "description": "Lets you specify which parts of the code you want to inspect and is formatted like that: code_part=log_level,code_part=log_level\n- If the `code_part` is missing, then the `log_level` will be applied to everything.\n- If the `log_level` is missing, then the `code_part` will be selected in `info` log level.", - "default": "info", - "example": "milli=trace,index_scheduler,actix_web=off" - } - } - }, - "Vec": { - "type": "array", - "items": { - "type": "number", - "format": "float" - } - }, - "VectorStoreBackend": { - "type": "string", - "enum": [ - "stable", - "experimental" - ] - }, - "VersionResponse": { - "type": "object", - "required": [ - "commitSha", - "commitDate", - "pkgVersion" - ], - "properties": { - "commitSha": { - "type": "string", - "description": "The commit used to compile this build of Meilisearch." - }, - "commitDate": { - "type": "string", - "description": "The date of this build." - }, - "pkgVersion": { - "type": "string", - "description": "The version of Meilisearch." - } - } - }, - "WebhookResults": { - "type": "object", - "required": [ - "results" - ], - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" - } - } - } - }, - "WebhookSettings": { - "type": "object", - "properties": { - "url": { - "type": [ - "string", - "null" - ], - "example": "https://your.site/on-tasks-completed" - }, - "headers": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "type": "string" - }, - "propertyNames": { - "type": "string" - }, - "example": { - "Authorization": "Bearer a-secret-token" - } - } - } - }, - "WebhookWithMetadataRedactedAuthorization": { - "allOf": [ - { - "$ref": "#/components/schemas/WebhookSettings" - }, - { - "type": "object", - "required": [ - "uuid", - "isEditable" - ], - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - }, - "isEditable": { - "type": "boolean" - } - } - } - ] - }, - "u32": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "securitySchemes": { - "Bearer": { - "type": "http", - "scheme": "bearer", - "bearerFormat": "Uuidv4, string or JWT", - "description": "An API key is a token that you provide when making API calls. Include the token in a header parameter called `Authorization`.\nExample: `Authorization: Bearer 8fece4405662dd830e4cb265e7e047aab2e79672a760a12712d2a263c9003509`" - } - } - }, - "tags": [ - { - "name": "Stats", - "description": "Stats gives extended information and metrics about indexes and the Meilisearch database." - }, - { - "name": "Tasks", - "description": "The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html).", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/tasks", - "description": null - } - }, - { - "name": "Batches", - "description": "The /batches route gives information about the progress of batches of asynchronous operations.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/batches", - "description": null - } - }, - { - "name": "Indexes", - "description": "An index is an entity that gathers a set of [documents](https://www.meilisearch.com/docs/learn/getting_started/documents) with its own [settings](https://www.meilisearch.com/docs/reference/api/settings). Learn more about indexes.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/indexes", - "description": null - } - }, - { - "name": "Documents", - "description": "Documents are objects composed of fields that can store any type of data. Each field contains an attribute and its associated value. Documents are stored inside [indexes](https://www.meilisearch.com/docs/learn/getting_started/indexes).", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/learn/getting_started/documents", - "description": null - } - }, - { - "name": "Facet Search", - "description": "The `/facet-search` route allows you to search for facet values. Facet search supports prefix search and typo tolerance. The returned hits are sorted lexicographically in ascending order. You can configure how facets are sorted using the sortFacetValuesBy property of the faceting index settings.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/facet_search", - "description": null - } - }, - { - "name": "Similar documents", - "description": "The /similar route uses AI-powered search to return a number of documents similar to a target document.\n\nMeilisearch exposes two routes for retrieving similar documents: POST and GET. In the majority of cases, POST will offer better performance and ease of use.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/similar", - "description": null - } - }, - { - "name": "Settings", - "description": "Use the /settings route to customize search settings for a given index. You can either modify all index settings at once using the update settings endpoint, or use a child route to configure a single setting.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/settings", - "description": null - } - }, - { - "name": "Compact an index", - "description": "The /compact route uses compacts the database to reorganize and make it smaller and more efficient.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/compact", - "description": null - } - }, - { - "name": "Search", - "description": "Meilisearch exposes two routes to perform searches:\n\n- A POST route: this is the preferred route when using API authentication, as it allows [preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) caching and better performance.\n- A GET route: the usage of this route is discouraged, unless you have good reason to do otherwise (specific caching abilities for example)", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/search", - "description": null - } - }, - { - "name": "Snapshots", - "description": "The snapshots route allows the creation of database snapshots. Snapshots are .snapshot files that can be used to launch Meilisearch.\nCreating a snapshot is also referred to as exporting it, whereas launching Meilisearch with a snapshot is referred to as importing it.\nDuring a snapshot export, all indexes of the current instance are exported—together with their documents and settings—and saved as a single .snapshot file.\nDuring a snapshot import, all indexes contained in the indicated .snapshot file are imported along with their associated documents and settings.\nSnapshot imports are performed at launch using an option.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/snapshots", - "description": null - } - }, - { - "name": "Dumps", - "description": "The `dumps` route allows the creation of database dumps.\nDumps are `.dump` files that can be used to launch Meilisearch. Dumps are compatible between Meilisearch versions.\nCreating a dump is also referred to as exporting it, whereas launching Meilisearch with a dump is referred to as importing it.\nDuring a [dump export](https://www.meilisearch.com/docs/reference/api/dump#create-a-dump), all indexes of the current instance are\nexported—together with their documents and settings—and saved as a single `.dump` file. During a dump import,\nall indexes contained in the indicated `.dump` file are imported along with their associated documents and settings.\nAny existing index with the same uid as an index in the dump file will be overwritten.\nDump imports are [performed at launch](https://www.meilisearch.com/docs/learn/advanced/dumps#importing-a-dump) using an option.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/dump", - "description": null - } - }, - { - "name": "Keys", - "description": "Manage API `keys` for a Meilisearch instance. Each key has a given set of permissions.\nYou must have the master key or the default admin key to access the keys route. More information about the keys and their rights.\nAccessing any route under `/keys` without having set a master key will result in an error.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/keys", - "description": null - } - }, - { - "name": "Logs", - "description": "Everything about retrieving or customizing logs.\nCurrently [experimental](https://www.meilisearch.com/docs/learn/experimental/overview).", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/learn/experimental/log_customization", - "description": null - } - }, - { - "name": "Multi-search", - "description": "The `/multi-search` route allows you to perform multiple search queries on one or more indexes by bundling them into a single HTTP request. Multi-search is also known as federated search.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/multi_search", - "description": null - } - }, - { - "name": "Experimental features", - "description": "The `/experimental-features` route allows you to activate or deactivate some of Meilisearch's experimental features.\n\nThis route is **synchronous**. This means that no task object will be returned, and any activated or deactivated features will be made available or unavailable immediately.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/experimental_features", - "description": null - } - }, - { - "name": "Export", - "description": "The `/export` route allows you to trigger an export process to a remote Meilisearch instance.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/export", - "description": null - } - }, - { - "name": "Network", - "description": "The `/network` route allows you to describe the topology of a network of Meilisearch instances.\n\nThis route is **synchronous**. This means that no task object will be returned, and any change to the network will be made available immediately.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/network", - "description": null - } - }, - { - "name": "Webhooks", - "description": "The `/webhooks` route allows you to register endpoints to be called once tasks are processed.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/webhooks", - "description": null - } - } - ] -} \ No newline at end of file From a1d220c4fa51f0feb38907b071c470e279854f4f Mon Sep 17 00:00:00 2001 From: curquiza Date: Thu, 5 Feb 2026 22:50:54 +0100 Subject: [PATCH 10/45] New file for tests --- openapi-curqui.json | 5756 ++++++++----------------------------------- 1 file changed, 1018 insertions(+), 4738 deletions(-) diff --git a/openapi-curqui.json b/openapi-curqui.json index bbf23fa8a..5539f6fa8 100644 --- a/openapi-curqui.json +++ b/openapi-curqui.json @@ -11,7 +11,7 @@ "name": "MIT", "identifier": "MIT" }, - "version": "1.30.0" + "version": "1.35.0" }, "servers": [ { @@ -26,7 +26,7 @@ "Batches" ], "summary": "Get batches", - "description": "List all batches, regardless of index. The batch objects are contained in the results array.\nBatches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first.\nBatch results are paginated and can be filtered with query parameters.", + "description": "List all batches, regardless of index. The batch objects are contained in\nthe results array. Batches are always returned in descending order of uid.\nThis means that by default, the most recently created batch objects appear\nfirst. Batch results are paginated and can be filtered with query\nparameters.", "operationId": "get_batches", "parameters": [ { @@ -67,7 +67,7 @@ { "name": "batchUids", "in": "query", - "description": "Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character.", + "description": "Permits to filter tasks by their batch uid. By default, when the\n`batchUids` query parameter is not set, all task uids are returned.\nIt's possible to specify several batch uids by separating them with\nthe `,` character.", "required": false, "schema": { "type": "integer", @@ -79,7 +79,7 @@ { "name": "uids", "in": "query", - "description": "Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", + "description": "Permits to filter tasks by their uid. By default, when the uids query\nparameter is not set, all task uids are returned. It's possible to\nspecify several uids by separating them with the `,` character.", "required": false, "schema": { "type": "array", @@ -98,7 +98,7 @@ { "name": "canceledBy", "in": "query", - "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", + "description": "Permits to filter tasks using the uid of the task that canceled them.\nIt's possible to specify several task uids by separating them with\nthe `,` character.", "required": false, "schema": { "type": "array", @@ -115,7 +115,7 @@ { "name": "types", "in": "query", - "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", + "description": "Permits to filter tasks by their related type. By default, when `types`\nquery parameter is not set, all task types are returned. It's possible\nto specify several types by separating them with the `,` character.", "required": false, "schema": { "type": "array", @@ -130,7 +130,7 @@ { "name": "statuses", "in": "query", - "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", + "description": "Permits to filter tasks by their status. By default, when `statuses`\nquery parameter is not set, all task statuses are returned. It's\npossible to specify several statuses by separating them with the `,`\ncharacter.", "required": false, "schema": { "type": "array", @@ -149,7 +149,7 @@ { "name": "indexUids", "in": "query", - "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", + "description": "Permits to filter tasks by their related index. By default, when\n`indexUids` query parameter is not set, the tasks of all the indexes\nare returned. It is possible to specify several indexes by separating\nthem with the `,` character.", "required": false, "schema": { "type": "array", @@ -165,7 +165,7 @@ { "name": "afterEnqueuedAt", "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued after the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -175,7 +175,7 @@ { "name": "beforeEnqueuedAt", "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued before the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -185,7 +185,7 @@ { "name": "afterStartedAt", "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted after the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -195,7 +195,7 @@ { "name": "beforeStartedAt", "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted before the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -205,7 +205,7 @@ { "name": "afterFinishedAt", "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished after the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -215,7 +215,7 @@ { "name": "beforeFinishedAt", "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished before the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -292,36 +292,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.GetBatches();" - }, - { - "lang": "JS", - "source": "client.batches.getBatches();" - }, - { - "lang": "PHP", - "source": "$client->getBatches();" - }, - { - "lang": "Python", - "source": "client.get_batches()" - }, - { - "lang": "Ruby", - "source": "client.batches" - }, - { - "lang": "Rust", - "source": "let mut query = meilisearch_sdk::batches::BatchesQuery::new(&client);\nquery.with_limit(20);\nlet batches: meilisearch_sdk::batches::BatchesResults =\n client.get_batches_with(&query).await.unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches'" - } ] } }, @@ -355,7 +325,10 @@ }, "example": { "uid": 1, - "details": {}, + "details": { + "receivedDocuments": 1, + "indexedDocuments": 1 + }, "progress": null, "stats": { "totalNbTasks": 1, @@ -371,7 +344,8 @@ }, "duration": "PT0.364788S", "startedAt": "2024-12-10T15:48:49.672141Z", - "finishedAt": "2024-12-10T15:48:50.036929Z" + "finishedAt": "2024-12-10T15:48:50.036929Z", + "batchStrategy": "batched all enqueued tasks" } } } @@ -401,36 +375,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.GetBatch(BATCH_UID);" - }, - { - "lang": "JS", - "source": "client.batches.getBatch(BATCH_UID);" - }, - { - "lang": "PHP", - "source": "$client->getBatch(BATCH_UID);" - }, - { - "lang": "Python", - "source": "client.get_batch(BATCH_UID)" - }, - { - "lang": "Ruby", - "source": "client.batch(BATCH_UID)" - }, - { - "lang": "Rust", - "source": "let uid: u32 = 42;\nlet batch: meilisearch_sdk::batches::Batch = client\n .get_batch(uid)\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches/BATCH_UID'" - } ] } }, @@ -485,52 +429,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.CreateDumpAsync();" - }, - { - "lang": "Dart", - "source": "await client.createDump();" - }, - { - "lang": "Go", - "source": "resp, err := client.CreateDump()" - }, - { - "lang": "JS", - "source": "client.createDump()" - }, - { - "lang": "Java", - "source": "client.createDump();" - }, - { - "lang": "PHP", - "source": "$client->createDump();" - }, - { - "lang": "Python", - "source": "client.create_dump()" - }, - { - "lang": "Ruby", - "source": "client.create_dump" - }, - { - "lang": "Rust", - "source": "client\n .create_dump()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.createDump { result in\n switch result {\n case .success(let dumpStatus):\n print(dumpStatus)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/dumps'" - } ] } }, @@ -540,7 +438,7 @@ "Experimental features" ], "summary": "Get all experimental features", - "description": "Get a list of all experimental features that can be activated via the /experimental-features route and whether or not they are currently activated.", + "description": "Get a list of all experimental features that can be activated via the\n/experimental-features route and whether or not they are currently\nactivated.", "operationId": "get_features", "responses": { "200": { @@ -590,24 +488,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.ExperimentalFeatures().Get()" - }, - { - "lang": "Ruby", - "source": "client.experimental_features" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nlet res = features\n .get()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/experimental-features/'" - } ] }, "patch": { @@ -665,24 +545,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.ExperimentalFeatures().SetMetrics(true).Update()" - }, - { - "lang": "Ruby", - "source": "client.update_experimental_features(metrics: true)" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nfeatures.set_metrics(true)\nlet res = features\n .update()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/experimental-features/' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"metrics\": true\n }'" - } ] } }, @@ -694,6 +556,16 @@ "summary": "Export to a remote Meilisearch", "description": "Triggers an export process to a remote Meilisearch instance. This allows you to send\ndocuments and settings from the current instance to another Meilisearch server.", "operationId": "export", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Export" + } + } + }, + "required": true + }, "responses": { "202": { "description": "Export successfully enqueued", @@ -735,16 +607,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Java", - "source": "Map indexes = new HashMap<>();\nindexes.put(\"*\", ExportIndexFilter.builder().overrideSettings(true).build());\nExportRequest request = ExportRequest.builder().url(\"TARGET_INSTANCE_URL\").indexes(indexes).build();\nclient.export(request);" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/export' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"TARGET_INSTANCE_URL\",\n \"indexes\": {\n \"*\": {\n \"overrideSettings\": true\n }\n }\n }'" - } ] } }, @@ -754,7 +616,7 @@ "Health" ], "summary": "Get Health", - "description": "The health check endpoint enables you to periodically test the health of your Meilisearch instance.", + "description": "The health check endpoint enables you to periodically test the health of\nyour Meilisearch instance.", "operationId": "get_health", "responses": { "200": { @@ -770,53 +632,7 @@ } } } - }, - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.HealthAsync();" - }, - { - "lang": "Dart", - "source": "await client.health();" - }, - { - "lang": "Go", - "source": "client.Health()" - }, - { - "lang": "JS", - "source": "client.health()" - }, - { - "lang": "Java", - "source": "client.health();" - }, - { - "lang": "PHP", - "source": "$client->health();" - }, - { - "lang": "Python", - "source": "client.health()" - }, - { - "lang": "Ruby", - "source": "client.health" - }, - { - "lang": "Rust", - "source": "// health() return an Err() if the server is not healthy, so this example would panic due to the unwrap\nclient\n .health()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.health { (result) in\n switch result {\n case .success:\n print(\"Healthy!\")\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/health'" - } - ] + } } }, "/indexes": { @@ -901,52 +717,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.GetAllIndexesAsync(new IndexesQuery { Limit = 3 });" - }, - { - "lang": "Dart", - "source": "await client.getIndexes(params: IndexesQuery(limit: 3));" - }, - { - "lang": "Go", - "source": "client.GetIndexes(&meilisearch.IndexesQuery{\n Limit: 3,\n})" - }, - { - "lang": "JS", - "source": "client.getIndexes({ limit: 3 })" - }, - { - "lang": "Java", - "source": "IndexesQuery query = new IndexesQuery().setLimit(3);\nclient.getIndexes(query);" - }, - { - "lang": "PHP", - "source": "$client->getIndexes((new IndexesQuery())->setLimit(3));" - }, - { - "lang": "Python", - "source": "client.get_indexes({'limit': 3})" - }, - { - "lang": "Ruby", - "source": "client.indexes(limit: 3)" - }, - { - "lang": "Rust", - "source": "let mut indexes = IndexesQuery::new(&client)\n .with_limit(3)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.getIndexes { (result) in\n switch result {\n case .success(let indexes):\n print(indexes)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes?limit=3'" - } ] }, "post": { @@ -1009,52 +779,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "TaskInfo task = await client.CreateIndexAsync(\"movies\", \"id\");" - }, - { - "lang": "Dart", - "source": "await client.createIndex('movies', primaryKey: 'id');" - }, - { - "lang": "Go", - "source": "client.CreateIndex(&meilisearch.IndexConfig{\n Uid: \"movies\",\n PrimaryKey: \"id\",\n})" - }, - { - "lang": "JS", - "source": "client.createIndex('movies', { primaryKey: 'id' })" - }, - { - "lang": "Java", - "source": "client.createIndex(\"movies\", \"id\");" - }, - { - "lang": "PHP", - "source": "$client->createIndex('movies', ['primaryKey' => 'id']);" - }, - { - "lang": "Python", - "source": "client.create_index('movies', {'primaryKey': 'id'})" - }, - { - "lang": "Ruby", - "source": "client.create_index('movies', primary_key: 'id')" - }, - { - "lang": "Rust", - "source": "client.create_index(\"movies\", Some(\"id\"))\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.createIndex(uid: \"movies\", primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"uid\": \"movies\",\n \"primaryKey\": \"id\"\n }'" - } ] } }, @@ -1136,52 +860,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.GetIndexAsync(\"movies\");" - }, - { - "lang": "Dart", - "source": "await client.getIndex('movies');" - }, - { - "lang": "Go", - "source": "client.GetIndex(\"movies\")" - }, - { - "lang": "JS", - "source": "client.index('movies').getRawInfo()" - }, - { - "lang": "Java", - "source": "client.getIndex(\"movies\");" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->fetchRawInfo();" - }, - { - "lang": "Python", - "source": "client.get_index('movies')" - }, - { - "lang": "Ruby", - "source": "client.fetch_index('movies')" - }, - { - "lang": "Rust", - "source": "let movies: Index = client\n .get_index(\"movies\")\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.getIndex(\"movies\") { (result) in\n switch result {\n case .success(let index):\n print(index)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies'" - } ] }, "delete": { @@ -1246,52 +924,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.DeleteIndexAsync(\"movies\");" - }, - { - "lang": "Dart", - "source": "await client.index('movies').delete();\nt_one_document_1: \"await client.index('movies').getDocument(25684,\\n fields: ['id', 'title', 'poster', 'release_date']);\"" - }, - { - "lang": "Go", - "source": "client.DeleteIndex(\"movies\")\n// OR\nclient.Index(\"movies\").Delete()" - }, - { - "lang": "JS", - "source": "client.deleteIndex('movies')" - }, - { - "lang": "Java", - "source": "client.deleteIndex(\"movies\");" - }, - { - "lang": "PHP", - "source": "$client->deleteIndex('movies');" - }, - { - "lang": "Python", - "source": "client.delete_index('movies')\n// OR\nclient.index('movies').delete()" - }, - { - "lang": "Ruby", - "source": "client.delete_index('movies')" - }, - { - "lang": "Rust", - "source": "client.index(\"movies\")\n .delete()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").delete { (result) in\n switch result {\n case .success:\n print(\"Index deleted\")\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies'" - } ] }, "patch": { @@ -1299,7 +931,7 @@ "Indexes" ], "summary": "Update index", - "description": "Update the `primaryKey` of an index.\nReturn an error if the index doesn't exists yet or if it contains documents.", + "description": "Update the `primaryKey` of an index.\nReturn an error if the index doesn't exists yet or if it contains\ndocuments.", "operationId": "update_index", "parameters": [ { @@ -1366,52 +998,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "TaskInfo task = await client.UpdateIndexAsync(\"movies\", \"id\");" - }, - { - "lang": "Dart", - "source": "await client.index('movies').update(primaryKey: 'id');" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateIndex(&meilisearch.UpdateIndexRequestParams{\n PrimaryKey: \"id\",\n})" - }, - { - "lang": "JS", - "source": "client.updateIndex('movies', { primaryKey: 'id' })" - }, - { - "lang": "Java", - "source": "client.updateIndex(\"movies\", \"id\");" - }, - { - "lang": "PHP", - "source": "$client->updateIndex('movies', ['primaryKey' => 'id']);" - }, - { - "lang": "Python", - "source": "client.index('movies').update(primary_key='id')" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update(primary_key: 'movie_id')" - }, - { - "lang": "Rust", - "source": "let task = IndexUpdater::new(\"movies\", &client)\n .with_primary_key(\"movie_review_id\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").update(primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"primaryKey\": \"id\" }'" - } ] } }, @@ -1477,24 +1063,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Java", - "source": "client.index(\"INDEX_NAME\").compact();" - }, - { - "lang": "Python", - "source": "client.index('movies').compact()" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"INDEX_UID\")\n .compact()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_UID/compact'" - } ] } }, @@ -1520,6 +1088,7 @@ { "name": "offset", "in": "query", + "description": "Number of documents to skip in the response. Use this parameter\ntogether with `limit` to paginate through large document sets. For\nexample, to get documents 21-40, set `offset=20` and `limit=20`.\nDefaults to `0`.", "required": false, "schema": { "type": "integer", @@ -1529,6 +1098,7 @@ { "name": "limit", "in": "query", + "description": "Maximum number of documents to return in a single response. Use\ntogether with `offset` for pagination. Defaults to `20`.", "required": false, "schema": { "type": "integer", @@ -1538,6 +1108,7 @@ { "name": "fields", "in": "query", + "description": "Comma-separated list of document attributes to include in the\nresponse. Use `*` to retrieve all attributes. By default, all\nattributes are returned. Example: `title,description,price`.", "required": false, "schema": { "type": "array", @@ -1549,6 +1120,7 @@ { "name": "retrieveVectors", "in": "query", + "description": "When `true`, includes vector embeddings in the response for documents\nthat have them. This is useful when you need to inspect or export\nvector data. Defaults to `false`.", "required": false, "schema": { "type": "boolean" @@ -1557,6 +1129,7 @@ { "name": "ids", "in": "query", + "description": "Comma-separated list of document IDs to retrieve. Only documents with\nmatching IDs will be returned. If not specified, all documents\nmatching other criteria are returned.", "required": false, "schema": { "type": "array", @@ -1568,6 +1141,7 @@ { "name": "filter", "in": "query", + "description": "Filter expression to select which documents to return. Uses the same\nsyntax as search filters. Only documents matching the filter will be\nincluded in the response. Example: `genres = action AND rating > 4`.", "required": false, "schema": { "type": "string" @@ -1577,6 +1151,7 @@ { "name": "sort", "in": "query", + "description": "Attribute(s) to sort the documents by. Format: `attribute:asc` or\n`attribute:desc`. Multiple sort criteria can be comma-separated.\nExample: `price:asc,rating:desc`.", "required": false, "schema": { "type": "string" @@ -1656,48 +1231,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() { Limit = 2, Filter = \"genres = action\" });" - }, - { - "lang": "Go", - "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"movies\").GetDocuments(&meilisearch.DocumentsQuery{\n Limit: 2,\n Filter: \"genres = action\",\n}, &result)" - }, - { - "lang": "JS", - "source": "client.index('movies').getDocuments({\n limit: 2,\n filter: 'genres = action'\n})" - }, - { - "lang": "Java", - "source": "DocumentsQuery query = new DocumentsQuery().setLimit(2).setFilter(new String[] {\"genres = action\"});\nclient.index(\"movies\").getDocuments(query, TargetClassName.class);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getDocuments((new DocumentsQuery())->setFilter('genres = action')->setLimit(2));" - }, - { - "lang": "Python", - "source": "client.index('movies').get_documents({\n 'limit':2, 'filter': 'genres=action',\n 'sort': ['rating:desc', 'release_date:asc'] # list format\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').get_documents(limit: 2, filter: 'genres = action')" - }, - { - "lang": "Rust", - "source": "let index = client.index(\"movies\");\nlet documents: DocumentsResults = DocumentsQuery::new(&index)\n .with_filter(\"genres = action\")\n .with_limit(2)\n .execute::()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getDocuments(params: DocumentsQuery(limit: 2)) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let movies):\n print(movies)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents?limit=2&filter=genres=action'" - } ] }, "put": { @@ -1705,7 +1238,7 @@ "Documents" ], "summary": "Add or update documents", - "description": "Add a list of documents or update them if they already exist.\nIf you send an already existing document (same id) the old document will be only partially updated according to the fields of the new document. Thus, any fields not present in the new document are kept and remained unchanged.\nTo completely overwrite a document, see Add or replace documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document. `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved `_vectors` field in your documents.\n> It can accept an array of floats, multiple arrays of floats in an outer array or an object.\n> This object accepts keys corresponding to the different embedders defined your index settings.", + "description": "Add a list of documents or update them if they already exist.\nIf you send an already existing document (same id) the old document will\nbe only partially updated according to the fields of the new document.\nThus, any fields not present in the new document are kept and remained\nunchanged.\nTo completely overwrite a document, see Add or replace documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document.\n> `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved\n> `_vectors` field in your documents. It can accept an array of floats,\n> multiple arrays of floats in an outer array or an object. This object\n> accepts keys corresponding to the different embedders defined your index\n> settings.", "operationId": "update_documents", "parameters": [ { @@ -1721,7 +1254,7 @@ { "name": "primaryKey", "in": "query", - "description": "The primary key of the documents. primaryKey is optional. If you want to set the primary key of your index through this route,\nit only has to be done the first time you add documents to the index. After which it will be ignored if given.", + "description": "The primary key of the documents. primaryKey is optional. If you want\nto set the primary key of your index through this route, it only has\nto be done the first time you add documents to the index. After which\nit will be ignored if given.", "required": false, "schema": { "type": "string" @@ -1742,6 +1275,7 @@ { "name": "customMetadata", "in": "query", + "description": "A string that can be used to identify and filter tasks. This metadata\nis stored with the task and returned in task responses. Useful for\ntracking tasks from external systems or associating tasks with\nspecific operations in your application.", "required": false, "schema": { "type": "string" @@ -1751,7 +1285,7 @@ { "name": "skipCreation", "in": "query", - "description": "Only update documents if they already exist.", + "description": "When set to `true`, only updates existing documents and skips creating\nnew ones. Documents that don't already exist in the index will be\nignored. This is useful for partial updates where you only want to\nmodify existing records without adding new ones.", "required": false, "schema": { "type": "boolean" @@ -1810,48 +1344,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "var movie = new[]\n{\n new Movie { Id = \"287947\", Title = \"Shazam ⚡️\", Genres = \"comedy\" }\n};\nawait index.UpdateDocumentsAsync(movie);" - }, - { - "lang": "Go", - "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\",\n },\n}\nclient.Index(\"movies\").UpdateDocuments(documents, nil)" - }, - { - "lang": "JS", - "source": "client.index('movies').updateDocuments([{\n id: 287947,\n title: 'Shazam ⚡️',\n genres: 'comedy'\n}])" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateDocuments(\"[{\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam ⚡️\\\",\"\n + \"\\\"genres\\\": \\\"comedy\\\"\"\n + \"}]\"\n);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateDocuments([\n [\n 'id' => 287947,\n 'title' => 'Shazam ⚡️',\n 'genres' => 'comedy'\n ]\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_documents([{\n 'id': 287947,\n 'title': 'Shazam ⚡️',\n 'genres': 'comedy'\n}])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_documents([\n {\n id: 287947,\n title: 'Shazam ⚡️',\n genres: 'comedy'\n }\n])" - }, - { - "lang": "Rust", - "source": "// Define the type of our documents\n#[derive(Serialize, Deserialize)]\nstruct IncompleteMovie {\n id: usize,\n title: String,\n genres: String\n}\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .add_or_update(&[\n IncompleteMovie {\n id: 287947,\n title: \"Shazam ⚡️\".to_string(),\n genres: \"comedy\".to_string()\n }\n ], None)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let documentJsonString = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\"\n }\n]\n\"\"\"\nlet documents: Data = documentJsonString.data(using: .utf8)!\n\nclient.index(\"movies\").updateDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\"\n }\n ]'" - } ] }, "post": { @@ -1859,7 +1351,7 @@ "Documents" ], "summary": "Add or replace documents", - "description": "Add a list of documents or replace them if they already exist.\n\nIf you send an already existing document (same id) the whole existing document will be overwritten by the new document. Fields previously in the document not present in the new document are removed.\n\nFor a partial update of the document see Add or update documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document. `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved `_vectors` field in your documents.\n> It can accept an array of floats, multiple arrays of floats in an outer array or an object.\n> This object accepts keys corresponding to the different embedders defined your index settings.", + "description": "Add a list of documents or replace them if they already exist.\n\nIf you send an already existing document (same id) the whole existing\ndocument will be overwritten by the new document. Fields previously in the\ndocument not present in the new document are removed.\n\nFor a partial update of the document see Add or update documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document.\n> `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved\n> `_vectors` field in your documents. It can accept an array of floats,\n> multiple arrays of floats in an outer array or an object. This object\n> accepts keys corresponding to the different embedders defined your index\n> settings.", "operationId": "replace_documents", "parameters": [ { @@ -1875,7 +1367,7 @@ { "name": "primaryKey", "in": "query", - "description": "The primary key of the documents. primaryKey is optional. If you want to set the primary key of your index through this route,\nit only has to be done the first time you add documents to the index. After which it will be ignored if given.", + "description": "The primary key of the documents. primaryKey is optional. If you want\nto set the primary key of your index through this route, it only has\nto be done the first time you add documents to the index. After which\nit will be ignored if given.", "required": false, "schema": { "type": "string" @@ -1896,6 +1388,7 @@ { "name": "customMetadata", "in": "query", + "description": "A string that can be used to identify and filter tasks. This metadata\nis stored with the task and returned in task responses. Useful for\ntracking tasks from external systems or associating tasks with\nspecific operations in your application.", "required": false, "schema": { "type": "string" @@ -1905,7 +1398,7 @@ { "name": "skipCreation", "in": "query", - "description": "Only update documents if they already exist.", + "description": "When set to `true`, only updates existing documents and skips creating\nnew ones. Documents that don't already exist in the index will be\nignored. This is useful for partial updates where you only want to\nmodify existing records without adding new ones.", "required": false, "schema": { "type": "boolean" @@ -1964,52 +1457,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "var movie = new[]\n{\n new Movie\n {\n Id = \"287947\",\n Title = \"Shazam\",\n Poster = \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n Overview = \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n ReleaseDate = \"2019-03-23\"\n }\n};\nawait index.AddDocumentsAsync(movie);" - }, - { - "lang": "Dart", - "source": "await client.index('movies').addDocuments([\n {\n 'id': 287947,\n 'title': 'Shazam',\n 'poster':\n 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview':\n 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n }\n]);\nd_or_update_documents_1: \"await client.index('movies').updateDocuments([\\n {\\n 'id': 287947,\\n 'title': 'Shazam ⚡️',\\n 'genres': 'comedy',\\n }\\n]);\"" - }, - { - "lang": "Go", - "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\",\n },\n}\nclient.Index(\"movies\").AddDocuments(documents, nil)" - }, - { - "lang": "JS", - "source": "client.index('movies').addDocuments([{\n id: 287947,\n title: 'Shazam',\n poster: 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n overview: 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n release_date: '2019-03-23'\n}])" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").addDocuments(\"[{\"\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam\\\",\"\n + \"\\\"poster\\\": \\\"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\\\",\"\n + \"\\\"overview\\\": \\\"A boy is given the ability to become an adult superhero in times of need with a single magic word.\\\",\"\n + \"\\\"release_date\\\": \\\"2019-03-23\\\"\"\n + \"}]\"\n);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->addDocuments([\n [\n 'id' => 287947,\n 'title' => 'Shazam',\n 'poster' => 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview' => 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date' => '2019-03-23'\n ]\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').add_documents([{\n 'id': 287947,\n 'title': 'Shazam',\n 'poster': 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview': 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n}])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').add_documents([\n {\n id: 287947,\n title: 'Shazam',\n poster: 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n overview: 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n release_date: '2019-03-23'\n }\n])" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .add_or_replace(&[\n Movie {\n id: 287947,\n title: \"Shazam\".to_string(),\n poster: \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\".to_string(),\n overview: \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\".to_string(),\n release_date: \"2019-03-23\".to_string(),\n }\n ], None)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let documentJsonString = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n]\n\"\"\"\nlet documents: Data = documentJsonString.data(using: .utf8)!\n\nclient.index(\"movies\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n ]'" - } ] }, "delete": { @@ -2074,52 +1521,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteAllDocumentsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').deleteAllDocuments();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteAllDocuments()" - }, - { - "lang": "JS", - "source": "client.index('movies').deleteAllDocuments()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").deleteAllDocuments();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->deleteAllDocuments();" - }, - { - "lang": "Python", - "source": "client.index('movies').delete_all_documents()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').delete_all_documents" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_all_documents()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").deleteAllDocuments() { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/documents'" - } ] } }, @@ -2196,44 +1597,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new DeleteDocumentsQuery() { Filter = \"genres = action OR genres = adventure\" });" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteDocumentsByFilter(\"genres=action OR genres=adventure\")" - }, - { - "lang": "JS", - "source": "client.index('movies').deleteDocuments({\n filter: 'genres = action OR genres = adventure'\n})" - }, - { - "lang": "Java", - "source": "String filter = \"genres = action OR genres = adventure\";\nclient.index(\"movies\").deleteDocumentsByFilter(filter);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->deleteDocuments(['filter' => 'genres = action OR genres = adventure']);" - }, - { - "lang": "Python", - "source": "client.index('movies').delete_documents(filter='genres=action OR genres=adventure')" - }, - { - "lang": "Ruby", - "source": "client.index('movies').delete_documents(filter: 'genres = action OR genres = adventure')" - }, - { - "lang": "Rust", - "source": "let index = client.index(\"movies\");\nlet task = DocumentDeletionQuery::new(&index)\n .with_filter(\"genres = action OR genres = adventure\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/movies/documents/delete \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"genres = action OR genres = adventure\"\n }'" - } ] } }, @@ -2311,44 +1674,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new[] { \"23488\", \"153738\", \"437035\", \"363869\" });" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteDocuments([]string{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\",\n})" - }, - { - "lang": "JS", - "source": "client.index('movies').deleteDocuments([23488, 153738, 437035, 363869])" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").deleteDocuments(Arrays.asList(new String[]\n{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\"\n}));" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->deleteDocuments([23488, 153738, 437035, 363869]);" - }, - { - "lang": "Python", - "source": "client.index('movies').delete_documents([23488, 153738, 437035, 363869])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').delete_documents([23488, 153738, 437035, 363869])" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_documents(&[23488, 153738, 437035, 363869])\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents/delete-batch' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n 23488,\n 153738,\n 437035,\n 363869\n ]'" - } ] } }, @@ -2358,7 +1683,7 @@ "Documents" ], "summary": "Edit documents by function.", - "description": "Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to edit one or more documents directly in Meilisearch.", + "description": "Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to\nedit one or more documents directly in Meilisearch.", "operationId": "edit_documents_by_function", "parameters": [ { @@ -2520,44 +1845,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() {\n Limit = 3,\n Fields = new List { \"title\", \"genres\", \"rating\", \"language\"},\n Filter = \"(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English\"\n});" - }, - { - "lang": "Go", - "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"books\").GetDocuments(&meilisearch.DocumentsQuery{\n Fields: []string{\"title\", \"genres\", \"rating\", \"language\"},\n Filter: \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n}, &result)" - }, - { - "lang": "JS", - "source": "client.index('books').getDocuments({\n filter: '(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English',\n fields: ['title', 'genres', 'rating', 'language'],\n limit: 3\n})" - }, - { - "lang": "Java", - "source": "DocumentsQuery query = new DocumentsQuery()\n .setFilter(new String[] {\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\"})\n .setFields(new String[] {\"title\", \"genres\", \"rating\", \"language\"})\n .setLimit(3);\nclient.index(\"books\").getDocuments(query, TargetClassName.class);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->getDocuments(\n (new DocumentsQuery())\n ->setFilter('(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English')\n ->setLimit(3)\n ->setFields(['title', 'genres', 'rating', 'language'])\n);" - }, - { - "lang": "Python", - "source": "client.index('books').get_documents({\n 'limit':3,\n 'fields': ['title', 'genres', 'rating', 'language'],\n 'filter': '(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English',\n 'sort': 'rating:desc, title:asc' # comma-separated string format\n})" - }, - { - "lang": "Ruby", - "source": "client.index('books').get_documents(\n filter: '(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English',\n limit: 3,\n fields: ['title', 'genres', 'rating', 'language']\n)" - }, - { - "lang": "Rust", - "source": "let index = client.index(\"books\");\nlet documents: DocumentsResults = DocumentsQuery::new(&index)\n .with_filter(\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\")\n .with_fields([\"title\", \"genres\", \"rating\", \"language\"])\n .with_limit(2)\n .execute::()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/books/documents/fetch \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n \"fields\": [\"title\", \"genres\", \"rating\", \"language\"],\n \"limit\": 3\n }'" - } ] } }, @@ -2593,6 +1880,7 @@ { "name": "fields", "in": "query", + "description": "Comma-separated list of document attributes to include in the\nresponse. Use `*` to retrieve all attributes. By default, all\nattributes listed in the `displayedAttributes` setting are returned.\nExample: `title,description,price`.", "required": false, "schema": { "type": "array", @@ -2604,6 +1892,7 @@ { "name": "retrieveVectors", "in": "query", + "description": "When `true`, includes the vector embeddings in the response for this\ndocument. This is useful when you need to inspect or export vector\ndata. Note that this can significantly increase response size if the\ndocument has multiple embedders configured. Defaults to `false`.", "required": false, "schema": { "type": "boolean" @@ -2667,48 +1956,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDocumentAsync(25684, new List { \"id\", \"title\", \"poster\", \"release_date\" });" - }, - { - "lang": "Go", - "source": "var a interface{}\nclient.Index(\"movies\").GetDocument(\"25684\",&meilisearch.DocumentQuery{\n Fields: []string{\"id\", \"title\", \"poster\", \"release_date\"},\n}, &a)" - }, - { - "lang": "JS", - "source": "client\n .index('movies')\n .getDocument(25684, { fields: ['id', 'title', 'poster', 'release_date'] })" - }, - { - "lang": "Java", - "source": "DocumentQuery query = new DocumentQuery().setFields(new String[] {\"id\", \"title\", \"poster\", \"release_date\"});\nclient.index(\"movies\").getDocument(\"25684\", query);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getDocument(25684, ['id', 'title', 'poster', 'release_date']);" - }, - { - "lang": "Python", - "source": "client.index('movies').get_document(25684, {\n 'fields': ['id', 'title', 'poster', 'release_date']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').document(25684, fields: ['id', 'title', 'poster', 'release_date'])" - }, - { - "lang": "Rust", - "source": "let index = client\n .index(\"movies\");\nlet document = DocumentQuery::new(&index)\n .with_fields([\"id\", \"title\", \"poster\", \"release_date\"])\n .execute::(\"25684\")\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getDocument(25684) { (result: Result) in\n switch result {\n case .success(let movie):\n print(movie)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents/25684?fields=id,title,poster,release_date'" - } ] }, "delete": { @@ -2890,44 +2137,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "var query = new SearchFacetsQuery()\n{\n FacetQuery = \"fiction\",\n Filter = \"rating > 3\"\n};\nawait client.Index(\"books\").FacetSearchAsync(\"genres\", query);" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").FacetSearch(&meilisearch.FacetSearchRequest{\n FacetQuery: \"fiction\",\n FacetName: \"genres\",\n Filter: \"rating > 3\",\n})" - }, - { - "lang": "JS", - "source": "client.index('books').searchForFacetValues({\n facetQuery: 'fiction',\n facetName: 'genres'\n filter: 'rating > 3'\n})" - }, - { - "lang": "Java", - "source": "FacetSearchRequest fsr = FacetSearchRequest.builder().facetName(\"genres\").facetQuery(\"fiction\").filter(new String[]{\"rating > 3\"}).build();\nclient.index(\"books\").facetSearch(fsr);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->facetSearch(\n (new FacetSearchQuery())\n ->setFacetQuery('fiction')\n ->setFacetName('genres')\n ->setFilter(['rating > 3'])\n);" - }, - { - "lang": "Python", - "source": "client.index('books').facet_search('genres', 'fiction', {\n 'filter': 'rating > 3'\n})" - }, - { - "lang": "Ruby", - "source": "client.index('books').facet_search('genres', 'fiction', filter: 'rating > 3')" - }, - { - "lang": "Rust", - "source": "let res = client.index(\"books\")\n .facet_search(\"genres\")\n .with_facet_query(\"fiction\")\n .with_filter(\"rating > 3\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"facetQuery\": \"fiction\",\n \"facetName\": \"genres\",\n \"filter\": \"rating > 3\"\n }'" - } ] } }, @@ -2954,6 +2163,7 @@ { "name": "q", "in": "query", + "description": "The search query string. Meilisearch will return documents that match\nthis query. Supports prefix search (words matching the beginning of\nthe query) and typo tolerance. Leave empty to match all documents.", "required": false, "schema": { "type": "string" @@ -2962,6 +2172,7 @@ { "name": "vector", "in": "query", + "description": "A vector of floating-point numbers for semantic/vector search. The\ndimensions must match the embedder configuration. When provided,\ndocuments are ranked by vector similarity. Can be combined with `q`\nfor hybrid search.", "required": true, "schema": { "type": "array", @@ -2975,6 +2186,7 @@ { "name": "offset", "in": "query", + "description": "Number of search results to skip. Use together with `limit` for\npagination. For example, to get results 21-40, set `offset=20` and\n`limit=20`. Defaults to `0`. Cannot be used with `page`/`hitsPerPage`.", "required": true, "schema": { "type": "integer", @@ -2985,6 +2197,7 @@ { "name": "limit", "in": "query", + "description": "Maximum number of search results to return. Use together with `offset`\nfor pagination. Defaults to `20`. Cannot be used with\n`page`/`hitsPerPage`.", "required": true, "schema": { "type": "integer", @@ -2995,6 +2208,7 @@ { "name": "page", "in": "query", + "description": "Request a specific page of results (1-indexed). Use together with\n`hitsPerPage` for page-based pagination. Cannot be used with\n`offset`/`limit`.", "required": false, "schema": { "type": "integer", @@ -3004,6 +2218,7 @@ { "name": "hitsPerPage", "in": "query", + "description": "Number of results per page when using page-based pagination. Use\ntogether with `page`. Cannot be used with `offset`/`limit`.", "required": false, "schema": { "type": "integer", @@ -3013,6 +2228,7 @@ { "name": "attributesToRetrieve", "in": "query", + "description": "Comma-separated list of attributes to include in the returned\ndocuments. Use `*` to return all attributes. By default, returns\nattributes from the `displayedAttributes` setting.", "required": true, "schema": { "type": "array", @@ -3025,6 +2241,7 @@ { "name": "retrieveVectors", "in": "query", + "description": "When `true`, includes vector embeddings in the response for documents\nthat have them. Defaults to `false`.", "required": true, "schema": { "type": "boolean" @@ -3033,6 +2250,7 @@ { "name": "attributesToCrop", "in": "query", + "description": "Comma-separated list of attributes whose values should be cropped to\nfit within `cropLength`. Useful for displaying long text attributes\nin search results. Format: `attribute` or `attribute:length`.", "required": true, "schema": { "type": "array", @@ -3045,6 +2263,7 @@ { "name": "cropLength", "in": "query", + "description": "Maximum number of words to keep when cropping attribute values. The\ncropped text will be centered around the matching terms. Defaults to\n`10`.", "required": true, "schema": { "type": "integer", @@ -3055,6 +2274,7 @@ { "name": "attributesToHighlight", "in": "query", + "description": "Comma-separated list of attributes whose matching terms should be\nhighlighted with `highlightPreTag` and `highlightPostTag`. Use `*` to\nhighlight all searchable attributes.", "required": true, "schema": { "type": "array", @@ -3067,6 +2287,7 @@ { "name": "filter", "in": "query", + "description": "Filter expression to narrow down search results. Uses SQL-like syntax.\nExample: `genres = action AND rating > 4`. Only attributes in\n`filterableAttributes` can be used.", "required": false, "schema": { "type": "string" @@ -3075,6 +2296,7 @@ { "name": "sort", "in": "query", + "description": "Comma-separated list of attributes to sort by. Format: `attribute:asc`\nor `attribute:desc`. Only attributes in `sortableAttributes` can be\nused. Custom ranking rules can also affect sort order.", "required": false, "schema": { "type": "string" @@ -3083,6 +2305,7 @@ { "name": "distinct", "in": "query", + "description": "Attribute used to ensure only one document with each unique value is\nreturned. Useful for deduplication. Only attributes in\n`filterableAttributes` can be used.", "required": false, "schema": { "type": "string" @@ -3091,6 +2314,7 @@ { "name": "showMatchesPosition", "in": "query", + "description": "When `true`, returns the position (start and length) of each matched\nterm in the original document attributes. Useful for custom\nhighlighting implementations.", "required": true, "schema": { "type": "boolean" @@ -3099,6 +2323,7 @@ { "name": "showRankingScore", "in": "query", + "description": "When `true`, includes a `_rankingScore` field (0.0 to 1.0) in each\ndocument indicating how well it matches the query. Higher scores mean\nbetter matches.", "required": true, "schema": { "type": "boolean" @@ -3107,6 +2332,16 @@ { "name": "showRankingScoreDetails", "in": "query", + "description": "When `true`, includes a `_rankingScoreDetails` object showing the\ncontribution of each ranking rule to the final score. Useful for\ndebugging relevancy.", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "showPerformanceDetails", + "in": "query", + "description": "When `true`, includes a `_performanceDetails` object showing the\nperformance details of the search.", "required": true, "schema": { "type": "boolean" @@ -3115,6 +2350,7 @@ { "name": "facets", "in": "query", + "description": "Comma-separated list of attributes for which to return facet\ndistribution (value counts). Only attributes in `filterableAttributes`\ncan be used. Returns the count of documents matching each facet value.", "required": true, "schema": { "type": "array", @@ -3127,6 +2363,7 @@ { "name": "highlightPreTag", "in": "query", + "description": "HTML tag or string to insert before highlighted matching terms.\nDefaults to ``.", "required": true, "schema": { "type": "string", @@ -3136,6 +2373,7 @@ { "name": "highlightPostTag", "in": "query", + "description": "HTML tag or string to insert after highlighted matching terms.\nDefaults to ``.", "required": true, "schema": { "type": "string", @@ -3145,6 +2383,7 @@ { "name": "cropMarker", "in": "query", + "description": "String used to indicate truncated content when cropping. Defaults to\n`…` (ellipsis).", "required": true, "schema": { "type": "string", @@ -3154,6 +2393,7 @@ { "name": "matchingStrategy", "in": "query", + "description": "Strategy for matching query terms. `last` (default): all terms must\nmatch, removing terms from the end if needed. `all`: all terms must\nmatch exactly. `frequency`: prioritizes matching frequent terms.", "required": true, "schema": { "$ref": "#/components/schemas/MatchingStrategy" @@ -3162,6 +2402,7 @@ { "name": "attributesToSearchOn", "in": "query", + "description": "Comma-separated list of attributes to search in. By default, searches\nall `searchableAttributes`. Use this to restrict search to specific\nfields for better performance or relevance.", "required": true, "schema": { "type": "array", @@ -3174,6 +2415,7 @@ { "name": "hybridEmbedder", "in": "query", + "description": "Name of the embedder to use for hybrid/semantic search. Must match an\nembedder configured in the index settings.", "required": false, "schema": { "type": "string" @@ -3182,6 +2424,7 @@ { "name": "hybridSemanticRatio", "in": "query", + "description": "Balance between keyword search (0.0) and semantic/vector search (1.0)\nin hybrid search. A value of 0.5 gives equal weight to both. Defaults\nto `0.5`.", "required": true, "schema": { "type": "number", @@ -3191,6 +2434,7 @@ { "name": "rankingScoreThreshold", "in": "query", + "description": "Minimum ranking score (0.0 to 1.0) a document must have to be\nincluded in results. Documents with lower scores are excluded. Useful\nfor filtering out poor matches.", "required": true, "schema": { "type": "number", @@ -3200,6 +2444,7 @@ { "name": "locales", "in": "query", + "description": "Comma-separated list of language locales to use for tokenization and\nprocessing. Useful for multilingual content. Example: `en,fr,de`.", "required": true, "schema": { "type": "array", @@ -3212,10 +2457,19 @@ { "name": "personalizeUserContext", "in": "query", + "description": "User-specific context for personalized search results. The format\ndepends on your personalization configuration.", "required": false, "schema": { "type": "string" } + }, + { + "name": "useNetwork", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } } ], "responses": { @@ -3292,16 +2546,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "JS", - "source": "client.index('movies').searchGet('American ninja')" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/search?q=american%20ninja'" - } ] }, "post": { @@ -3408,52 +2652,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").SearchAsync(\"American ninja\");\nt_task_1: |\nTaskInfo task = await client.GetTaskAsync(1);\nt_all_tasks_1: |\nResourceResults taskResult = await client.GetTasksAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').search('American ninja');" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").Search(\"american ninja\", &meilisearch.SearchRequest{})" - }, - { - "lang": "JS", - "source": "client.index('movies').search('American ninja')" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").search(\"American ninja\");" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('american ninja');" - }, - { - "lang": "Python", - "source": "client.index('movies').search('American ninja')" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('american ninja')" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"american ninja\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(query: \"American ninja\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"american ninja\" }'" - } ] } }, @@ -3514,52 +2712,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSettingsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getSettings();\ndate_settings_1: \"await client.index('movies').updateSettings(\\n IndexSettings(\\n rankingRules: [\\n 'words',\\n 'typo',\\n 'proximity',\\n 'attribute',\\n 'sort',\\n 'exactness',\\n 'release_date:desc',\\n 'rank:desc'\\n ],\\n distinctAttribute: 'movie_id',\\n searchableAttributes: ['title', 'overview', 'genres'],\\n displayedAttributes: [\\n 'title',\\n 'overview',\\n 'genres',\\n 'release_date'\\n ],\\n stopWords: ['the', 'a', 'an'],\\n sortableAttributes: ['title', 'release_date'],\\n synonyms: {\\n 'wolverine': ['xmen', 'logan'],\\n 'logan': ['wolverine'],\\n },\\n ),\\n );\"" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSettings()" - }, - { - "lang": "JS", - "source": "client.index('movies').getSettings()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getSettings();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_settings()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').settings" - }, - { - "lang": "Rust", - "source": "let settings: Settings = client\n .index(\"movies\")\n .get_settings()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getSettings { (result) in\n switch result {\n case .success(let setting):\n print(setting)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings'" - } ] }, "delete": { @@ -3624,52 +2776,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSettingsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetSettings();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetSettings()" - }, - { - "lang": "JS", - "source": "client.index('movies').resetSettings()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetSettings();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_settings()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_settings" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_settings()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").resetSettings { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings'" - } ] }, "patch": { @@ -3744,48 +2850,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "Settings newSettings = new Settings\n{\n RankingRules = new string[]\n {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n },\n DistinctAttribute = \"movie_id\",\n SearchableAttributes = new string[] { \"title\", \"overview\", \"genres\" },\n DisplayedAttributes = new string[] { \"title\", \"overview\", \"genres\", \"release_date\" },\n SortableAttributes = new string[] { \"title\", \"release_date\" },\n StopWords = new string[] { \"the\", \"a\", \"an\" },\n Synonyms = new Dictionary>\n {\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\" } },\n },\n FilterableAttributes = new string[] { },\n TypoTolerance = new TypoTolerance\n {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeForTypos = new TypoTolerance.TypoSize\n {\n OneTypo = 8,\n TwoTypos = 10\n }\n },\n SearchCutoffMs = 150\n};\nTaskInfo task = await client.Index(\"movies\").UpdateSettingsAsync(newFilters);" - }, - { - "lang": "Go", - "source": "distinctAttribute := \"movie_id\"\nsettings := meilisearch.Settings{\n RankingRules: []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\",\n },\n DistinctAttribute: &distinctAttribute,\n SearchableAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n },\n DisplayedAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n },\n StopWords: []string{\n \"the\",\n \"a\",\n \"an\",\n },\n SortableAttributes: []string{\n \"title\",\n \"release_date\",\n },\n Synonyms: map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\"},\n },\n TypoTolerance: &meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 8,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n },\n Pagination: &meilisearch.Pagination{\n MaxTotalHits: 5000,\n },\n Faceting: &meilisearch.Faceting{\n MaxValuesPerFacet: 200,\n },\n SearchCutoffMs: 150,\n}\nclient.Index(\"movies\").UpdateSettings(&settings)" - }, - { - "lang": "JS", - "source": "client.index('movies').updateSettings({\n rankingRules: [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n distinctAttribute: 'movie_id',\n searchableAttributes: [\n 'title',\n 'overview',\n 'genres'\n ],\n displayedAttributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n stopWords: [\n 'the',\n 'a',\n 'an'\n ],\n sortableAttributes: [\n 'title',\n 'release_date'\n ],\n synonyms: {\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine']\n },\n typoTolerance: {\n 'minWordSizeForTypos': {\n 'oneTypo': 8,\n 'twoTypos': 10\n },\n 'disableOnAttributes': [\n 'title'\n ]\n },\n pagination: {\n maxTotalHits: 5000\n },\n faceting: {\n maxValuesPerFacet: 200\n },\n searchCutoffMs: 150\n})" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setRankingRules(\n new String[] {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n });\nsettings.setDistinctAttribute(\"movie_id\");\nsettings.setSearchableAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\"\n });\nsettings.setDisplayedAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n });\nsettings.setStopWords(\n new String[] {\n \"the\",\n \"a\",\n \"an\"\n });\nsettings.setSortableAttributes(\n new String[] {\n \"title\",\n \"release_date\"\n });\n\nHashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nsettings.setSynonyms(synonyms);\n\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 8);\n put(\"twoTypos\", 10);\n }\n };\nTypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\nsettings.setTypoTolerance(typoTolerance);\nsettings.setSearchCutoffMs(150);\nclient.index(\"movies\").updateSettings(settings);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateSettings([\n 'rankingRules' => [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n 'distinctAttribute' => 'movie_id',\n 'searchableAttributes' => [\n 'title',\n 'overview',\n 'genres'\n ],\n 'displayedAttributes' => [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n 'stopWords' => [\n 'the',\n 'a',\n 'an'\n ],\n 'sortableAttributes' => [\n 'title',\n 'release_date'\n ],\n 'synonyms' => [\n 'wolverine' => ['xmen', 'logan'],\n 'logan' => ['wolverine']\n ],\n 'typoTolerance' => [\n 'minWordSizeForTypos' => [\n 'oneTypo' => 8,\n 'twoTypos' => 10\n ],\n 'disableOnAttributes' => ['title']\n ],\n 'pagination' => [\n 'maxTotalHits' => 5000\n ],\n 'faceting' => [\n 'maxValuesPerFacet' => 200\n ],\n 'searchCutoffMs' => 150\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_settings({\n 'rankingRules': [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n 'distinctAttribute': 'movie_id',\n 'searchableAttributes': [\n 'title',\n 'overview',\n 'genres'\n ],\n 'displayedAttributes': [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n 'sortableAttributes': [\n 'title',\n 'release_date'\n ],\n 'stopWords': [\n 'the',\n 'a',\n 'an'\n ],\n 'synonyms': {\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine']\n },\n 'typoTolerance': {\n 'minWordSizeForTypos': {\n 'oneTypo': 8,\n 'twoTypos': 10\n },\n 'disableOnAttributes': ['title']\n },\n 'pagination': {\n 'maxTotalHits': 5000\n },\n 'faceting': {\n 'maxValuesPerFacet': 200\n },\n 'searchCutoffMs': 150\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_settings({\n ranking_rules: [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n distinct_attribute: 'movie_id',\n searchable_attributes: [\n 'title',\n 'overview',\n 'genres'\n ],\n displayed_attributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n stop_words: [\n 'the',\n 'a',\n 'an'\n ],\n sortable_attributes: [\n 'title',\n 'release_date'\n ],\n synonyms: {\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine']\n },\n pagination: {\n max_total_hits: 5000\n },\n faceting: {\n max_values_per_facet: 200\n },\n search_cutoff_ms: 150\n})" - }, - { - "lang": "Rust", - "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"wolverine\"), vec![\"xmen\", \"logan\"]);\nsynonyms.insert(String::from(\"logan\"), vec![\"wolverine\"]);\n\nlet min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(4),\n two_typos; Some(12)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![\"title\".to_string()]),\n disable_on_words: Some(vec![])\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet settings = Settings::new()\n .with_ranking_rules([\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ])\n .with_distinct_attribute(Some(\"movie_id\"))\n .with_searchable_attributes([\n \"title\",\n \"overview\",\n \"genres\"\n ])\n .with_displayed_attributes([\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ])\n .with_stop_words([\n \"the\",\n \"a\",\n \"an\"\n ])\n .with_sortable_attributes([\n \"title\",\n \"release_date\"\n ])\n .with_synonyms(synonyms)\n .with_typo_tolerance(typo_tolerance)\n .with_search_cutoff(150);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_settings(&settings)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let settings = Setting(rankingRules: [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n], searchableAttributes: [\n \"title\",\n \"overview\",\n \"genres\"\n], displayedAttributes: [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n], stopWords: [\n \"the\",\n \"a\",\n \"an\"\n], synonyms: [\n \"wolverine\": [\"xmen\", \"logan\"],\n \"logan\": [\"wolverine\"]\n], distinctAttribute: \"movie_id\",\nsortableAttributes: [\n \"title\",\n \"release_date\"\n])\nclient.index(\"movies\").updateSettings(settings) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"rankingRules\": [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ],\n \"distinctAttribute\": \"movie_id\",\n \"searchableAttributes\": [\n \"title\",\n \"overview\",\n \"genres\"\n ],\n \"displayedAttributes\": [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ],\n \"stopWords\": [\n \"the\",\n \"a\",\n \"an\"\n ],\n \"sortableAttributes\": [\n \"title\",\n \"release_date\"\n ],\n \"synonyms\": {\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\"wolverine\"]\n },\n \"typoTolerance\": {\n \"minWordSizeForTypos\": {\n \"oneTypo\": 8,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n },\n \"pagination\": {\n \"maxTotalHits\": 5000\n },\n \"faceting\": {\n \"maxValuesPerFacet\": 200\n },\n \"searchCutoffMs\": 150\n }'" - } ] } }, @@ -4058,48 +3122,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "var indexDictionary = await client.Index(\"books\").GetDictionaryAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetDictionary()" - }, - { - "lang": "JS", - "source": "client.index('books').getDictionary()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").getDictionarySettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->getDictionary();" - }, - { - "lang": "Python", - "source": "client.index('books').get_dictionary()" - }, - { - "lang": "Ruby", - "source": "client.index('books').dictionary" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('books')\n .get_dictionary()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").getDictionary { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/dictionary'" - } ] }, "put": { @@ -4178,48 +3200,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "var newDictionary = new string[] { \"J. R. R.\", \"W. E. B.\" };\nawait client.Index(\"books\").UpdateDictionaryAsync(newDictionary);" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateDictionary([]string{\n \"J. R. R.\",\n \"W. E. B.\",\n})" - }, - { - "lang": "JS", - "source": "client.index('books').updateDictionary(['J. R. R.', 'W. E. B.'])" - }, - { - "lang": "Java", - "source": "client.index(\"books\").updateDictionarySettings(new String[] {\"J. R. R.\", \"W. E. B.\"});" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateDictionary(['J. R. R.', 'W. E. B.']);" - }, - { - "lang": "Python", - "source": "client.index('books').update_dictionary([\"J. R. R.\", \"W. E. B.\"])" - }, - { - "lang": "Ruby", - "source": "client.index('books').update_dictionary(['J. R. R.', 'W. E. B.'])" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('books')\n .set_dictionary(['J. R. R.', 'W. E. B.'])\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").updateDictionary([\"J. R. R.\", \"W. E. B.\"]) { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/dictionary' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"J. R. R.\",\n \"W. E. B.\"\n ]'" - } ] }, "delete": { @@ -4298,48 +3278,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"books\").ResetDictionaryAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetDictionary()" - }, - { - "lang": "JS", - "source": "client.index('books').resetDictionary()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").resetDictionarySettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->resetDictionary();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_dictionary()" - }, - { - "lang": "Ruby", - "source": "client.index('books').reset_dictionary" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('books')\n .reset_dictionary()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").resetDictionary { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/dictionary'" - } ] } }, @@ -4403,52 +3341,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDisplayedAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getDisplayedAttributes();\ndate_displayed_attributes_1: \"await client.index('movies').updateDisplayedAttributes([\\n 'title',\\n 'overview',\\n 'genres',\\n 'release_date',\\n]);\"" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetDisplayedAttributes()" - }, - { - "lang": "JS", - "source": "client.index('movies').getDisplayedAttributes()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getDisplayedAttributesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getDisplayedAttributes();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_displayed_attributes()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').get_displayed_attributes" - }, - { - "lang": "Rust", - "source": "let displayed_attributes: Vec = client\n .index(\"movies\")\n .get_displayed_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getDisplayedAttributes { (result) in\n switch result {\n case .success(let displayedAttributes):\n print(displayedAttributes)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" - } ] }, "put": { @@ -4526,48 +3418,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateDisplayedAttributesAsync(new[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" - }, - { - "lang": "Go", - "source": "displayedAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n}\nclient.Index(\"movies\").UpdateDisplayedAttributes(&displayedAttributes)" - }, - { - "lang": "JS", - "source": "client.index('movies').updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateDisplayedAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" - }, - { - "lang": "Rust", - "source": "let displayed_attributes = [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_displayed_attributes(&displayed_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let displayedAttributes: [String] = [\"title\", \"overview\", \"genres\", \"release_date\"]\nclient.index(\"movies\").updateDisplayedAttributes(displayedAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ]'" - } ] }, "delete": { @@ -4645,52 +3495,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetDisplayedAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetDisplayedAttributes();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetDisplayedAttributes()" - }, - { - "lang": "JS", - "source": "client.index('movies').resetDisplayedAttributes()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetDisplayedAttributesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetDisplayedAttributes();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_displayed_attributes()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_displayed_attributes" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_displayed_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").resetDisplayedAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" - } ] } }, @@ -4751,52 +3555,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "string result = await client.Index(\"shoes\").GetDistinctAttributeAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('shoes').getDistinctAttribute();" - }, - { - "lang": "Go", - "source": "client.Index(\"shoes\").GetDistinctAttribute()" - }, - { - "lang": "JS", - "source": "client.index('shoes').getDistinctAttribute()" - }, - { - "lang": "Java", - "source": "client.index(\"shoes\").getDistinctAttributeSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('shoes')->getDistinctAttribute();" - }, - { - "lang": "Python", - "source": "client.index('shoes').get_distinct_attribute()" - }, - { - "lang": "Ruby", - "source": "client.index('shoes').distinct_attribute" - }, - { - "lang": "Rust", - "source": "let distinct_attribute: Option = client\n .index(\"shoes\")\n .get_distinct_attribute()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"shoes\").getDistinctAttribute { (result) in\n switch result {\n case .success(let distinctAttribute):\n print(distinctAttribute)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" - } ] }, "put": { @@ -4871,52 +3629,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "TaskInfo result = await client.Index(\"shoes\").UpdateDistinctAttributeAsync(\"skuid\");" - }, - { - "lang": "Dart", - "source": "await client.index('shoes').updateDistinctAttribute('skuid');" - }, - { - "lang": "Go", - "source": "client.Index(\"shoes\").UpdateDistinctAttribute(\"skuid\")" - }, - { - "lang": "JS", - "source": "client.index('shoes').updateDistinctAttribute('skuid')" - }, - { - "lang": "Java", - "source": "client.index(\"shoes\").updateDistinctAttributeSettings(\"skuid\");" - }, - { - "lang": "PHP", - "source": "$client->index('shoes')->updateDistinctAttribute('skuid');" - }, - { - "lang": "Python", - "source": "client.index('shoes').update_distinct_attribute('skuid')" - }, - { - "lang": "Ruby", - "source": "client.index('shoes').update_distinct_attribute('skuid')" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"shoes\")\n .set_distinct_attribute(\"skuid\")\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"shoes\").updateDistinctAttribute(\"skuid\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"skuid\"'" - } ] }, "delete": { @@ -4991,52 +3703,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "TaskInfo result = await client.Index(\"shoes\").ResetDistinctAttributeAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('shoes').resetDistinctAttribute();" - }, - { - "lang": "Go", - "source": "client.Index(\"shoes\").ResetDistinctAttribute()" - }, - { - "lang": "JS", - "source": "client.index('shoes').resetDistinctAttribute()" - }, - { - "lang": "Java", - "source": "client.index(\"shoes\").resetDistinctAttributeSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('shoes')->resetDistinctAttribute();" - }, - { - "lang": "Python", - "source": "client.index('shoes').reset_distinct_attribute()" - }, - { - "lang": "Ruby", - "source": "client.index('shoes').reset_distinct_attribute" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"shoes\")\n .reset_distinct_attribute()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"shoes\").resetDistinctAttribute { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" - } ] } }, @@ -5103,20 +3769,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').embedders" - }, - { - "lang": "Rust", - "source": "let embedders = index.get_embedders().await.unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" - } ] }, "delete": { @@ -5197,20 +3849,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').reset_embedders" - }, - { - "lang": "Rust", - "source": "index.reset_embedders().await.unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" - } ] }, "patch": { @@ -5291,28 +3929,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "JS", - "source": "client.index('INDEX_NAME').updateEmbedders({\n default: {\n source: 'openAi',\n apiKey: 'OPEN_AI_API_KEY',\n model: 'text-embedding-3-small',\n documentTemplate: 'A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}'\n }\n});" - }, - { - "lang": "PHP", - "source": "$client->updateEmbedders([\n 'default' => [\n 'source' => 'openAi',\n 'apiKey' => 'OPEN_AI_API_KEY',\n 'model' => 'text-embedding-3-small',\n 'documentTemplate' => 'A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}'\n ]\n]);" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').update_embedders(\n default: {\n source: 'openAi',\n api_key: 'OPEN_AI_API_KEY',\n model: 'text-embedding-3-small',\n document_template: \"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\"\n }\n)" - }, - { - "lang": "Rust", - "source": "let embedders = HashMap::from([(\n String::from(\"default\"),\n Embedder {\n source: EmbedderSource::OpenAi,\n api_key: Some(String::from(\"OPEN_AI_API_KEY\")),\n model: Some(String::from(\"text-embedding-3-small\")),\n document_template: Some(String::from(\"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\")),\n ..Embedder::default()\n }\n)]);\nlet task = index\n .set_embedders(&embedders)\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"default\": {\n \"source\": \"openAi\",\n \"apiKey\": \"OPEN_AI_API_KEY\",\n \"model\": \"text-embedding-3-small\",\n \"documentTemplate\": \"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\"\n }\n }'" - } ] } }, @@ -5373,36 +3989,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.Index(\"books\").GetFacetSearch()" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').getFacetSearch();" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->getFacetSearch();" - }, - { - "lang": "Python", - "source": "client.index('books').get_facet_search_settings()" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_UID').facet_search_setting" - }, - { - "lang": "Rust", - "source": "let facet_search: bool = client\n .index(INDEX_UID)\n .get_facet_search()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" - } ] }, "put": { @@ -5477,36 +4063,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateFacetSearch(false)" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').updateFacetSearch(false);" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->updateFacetSearch(false);" - }, - { - "lang": "Python", - "source": "client.index('books').update_facet_search_settings(False)" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_UID').update_facet_search_setting(false)" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_facet_search(false)\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary 'false'" - } ] }, "delete": { @@ -5581,36 +4137,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.Index(\"books\").ResetFacetSearch()" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').resetFacetSearch();" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->resetFacetSearch();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_facet_search_settings()" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_UID').reset_facet_search_setting" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_facet_search()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" - } ] } }, @@ -5671,48 +4197,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetFacetingAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getFaceting();\ndate_faceting_settings_1: \"await client.index('books').updateFaceting(Faceting(\\n maxValuesPerFacet: 2,\\n sortFacetValuesBy: {\\n '*': FacetingSortTypes.alpha,\\n 'genres': FacetingSortTypes.count\\n }));\"" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetFaceting()" - }, - { - "lang": "JS", - "source": "client.index('books').getFaceting()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").getFacetingSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->getFaceting();" - }, - { - "lang": "Python", - "source": "client.index('books').get_faceting_settings()" - }, - { - "lang": "Ruby", - "source": "client.index('books').faceting" - }, - { - "lang": "Rust", - "source": "let faceting: FacetingSettings = client\n .index(\"books\")\n .get_faceting()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/faceting'" - } ] }, "delete": { @@ -5787,48 +4271,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetFacetingAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetFaceting();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetFaceting()" - }, - { - "lang": "JS", - "source": "client.index('books').resetFaceting()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").resetFacetingSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->resetFaceting();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_faceting_settings()" - }, - { - "lang": "Ruby", - "source": "index('books').reset_faceting" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_faceting()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/faceting'" - } ] }, "patch": { @@ -5903,44 +4345,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "var faceting = new Faceting\n{\n MaxValuesPerFacet = 2,\n SortFacetValuesBy = new Dictionary\n {\n [\"*\"] = SortFacetValuesByType.Alpha,\n [\"genres\"] = SortFacetValuesByType.Count\n }\n};\nawait client.Index(\"books\").UpdateFacetingAsync(faceting);" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateFaceting(&meilisearch.Faceting{\n MaxValuesPerFacet: 2,\n SortFacetValuesBy: {\n \"*\": SortFacetTypeAlpha,\n \"genres\": SortFacetTypeCount,\n }\n})" - }, - { - "lang": "JS", - "source": "client.index('books').updateFaceting({\n maxValuesPerFacet: 2\n sortFacetValuesBy: {\n '*': 'alpha',\n genres: 'count'\n }\n})" - }, - { - "lang": "Java", - "source": "Faceting newFaceting = new Faceting();\nnewFaceting.setMaxValuesPerFacet(2);\nHashMap facetSortValues = new HashMap<>();\nfacetSortValues.put(\"*\", FacetSortValue.ALPHA);\nfacetSortValues.put(\"genres\", FacetSortValue.COUNT);\nnewFaceting.setSortFacetValuesBy(facetSortValues);\nclient.index(\"books\").updateFacetingSettings(newFaceting);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateFaceting([\n 'maxValuesPerFacet' => 2,\n 'sortFacetValuesBy' => ['*' => 'alpha', 'genres' => 'count']\n]);" - }, - { - "lang": "Python", - "source": "params = {\n 'maxValuesPerFacet': 2,\n 'sortFacetValuesBy': {\n '*': 'count',\n 'genres': 'count'\n }\n}\nclient.index('books').update_faceting_settings(params)" - }, - { - "lang": "Ruby", - "source": "client.index('books').update_faceting({\n max_values_per_facet: 2,\n sort_facet_values_by: {\n '*': 'alpha',\n genres: 'count'\n }\n})" - }, - { - "lang": "Rust", - "source": "let mut facet_sort_setting = BTreeMap::new();\nfacet_sort_setting.insert(String::from(\"*\"), FacetSortValue::Alpha);\nfacet_sort_setting.insert(String::from(\"genres\"), FacetSortValue::Count);\nlet mut faceting = FacetingSettings {\n max_values_per_facet: 2,\n sort_facet_values_by: Some(facet_sort_setting),\n};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_faceting(&faceting)\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/faceting' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxValuesPerFacet\": 2,\n \"sortFacetValuesBy\": {\n \"*\": \"alpha\",\n \"genres\": \"count\"\n }\n }'" - } ] } }, @@ -6004,52 +4408,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "IEnumerable attributes = await client.Index(\"movies\").GetFilterableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getFilterableAttributes();\ndate_filterable_attributes_1: \"await client\\n .index('movies')\\n .updateFilterableAttributes(['genres', 'director']);\"" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetFilterableAttributes()" - }, - { - "lang": "JS", - "source": "client.index('movies').getFilterableAttributes()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getFilterableAttributesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getFilterableAttributes();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_filterable_attributes()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').filterable_attributes" - }, - { - "lang": "Rust", - "source": "let filterable_attributes: Vec = client\n .index(\"movies\")\n .get_filterable_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" - } ] }, "put": { @@ -6127,48 +4485,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "List attributes = new() { \"genres\", \"director\" };\nTaskInfo result = await client.Index(\"movies\").UpdateFilterableAttributesAsync(attributes);" - }, - { - "lang": "Go", - "source": "filterableAttributes := []interface{}{\n \"genres\",\n \"director\",\n AttributeRule{\n AttributePatterns: []string{\"tag\"}\n Features: AttributeFeatures{\n FacetSearch: false,\n Filter: FilterFeatures{\n Equality: true,\n Comparison: false,\n }\n }\n },\n map[string]interface{}{\n \"attributePatterns\": []interface{}{\"year\"}\n \"features\": map[string]interface{}{\n \"facetSearch\": false,\n \"filter\": map[string]interface{}{\n \"equality\": true,\n \"comparison\": true,\n }\n }\n }\n}\nclient.Index(\"movies\").UpdateFilterableAttributes(&filterableAttributes)" - }, - { - "lang": "JS", - "source": "client.index('movies')\n .updateFilterableAttributes([\n \"genres\",\n {\n attributePatterns: [\"genre\"],\n features: {\n facetSearch: true,\n filter: { equality: true, comparison: false },\n },\n }\n ])" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setFilterableAttributes(new String[] {\"genres\", \"director\"});\nclient.index(\"movies\").updateSettings(settings);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateFilterableAttributes([\n 'author',\n [\n 'attributePatterns' => ['genres'],\n 'features' => [\n 'facetSearch' => true,\n 'filter' => [\n 'equality' => true,\n 'comparison' => false,\n ],\n ],\n ],\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_filterable_attributes([\n 'genres',\n 'director'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_filterable_attributes([\n 'genres',\n 'director'\n])" - }, - { - "lang": "Rust", - "source": "let filterable_attributes = [\n \"genres\",\n \"director\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_filterable_attributes(&filterable_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").updateFilterableAttributes([\"genre\", \"director\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"genres\",\n \"director\",\n {\n \"attributePatterns\": [\"*_ratings\"],\n \"features\": {\n \"facetSearch\": false,\n \"filter\": {\n \"equality\": true,\n \"comparison\": false\n }\n }\n }\n ]'" - } ] }, "delete": { @@ -6246,52 +4562,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "TaskInfo result = await client.Index(\"movies\").ResetFilterableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetFilterableAttributes();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetFilterableAttributes()" - }, - { - "lang": "JS", - "source": "client.index('movies').resetFilterableAttributes()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetFilterableAttributesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetFilterableAttributes();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_filterable_attributes()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_filterable_attributes" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_filterable_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").resetFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" - } ] } }, @@ -6355,40 +4625,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.index(\"INDEX_NAME\").GetLocalizedAttributes()" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').getLocalizedAttributes()" - }, - { - "lang": "Java", - "source": "client.index(\"INDEX_NAME\").getLocalizedAttributesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->getLocalizedAttributes();" - }, - { - "lang": "Python", - "source": "client.index('INDEX_NAME').get_localized_attributes()" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').localized_attributes" - }, - { - "lang": "Rust", - "source": "let localized_attributes: Option> = client\n .index(\"books\")\n .get_localized_attributes()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" - } ] }, "put": { @@ -6466,40 +4702,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.index(\"INDEX_NAME\").UpdateLocalizedAttributes([]*LocalizedAttributes{\n { AttributePatterns: [\"*_ja\"], Locales: [\"jpn\"] },\n})" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').updateLocalizedAttributes([\n { attributePatterns: ['*_ja'], locales: ['jpn'] },\n])" - }, - { - "lang": "Java", - "source": "LocalizedAttribute attribute = new LocalizedAttribute();\nattribute.setAttributePatterns(new String[] {\"jpn\"});\nattribute.setLocales(new String[] {\"*_ja\"});\n\nclient.index(\"INDEX_NAME\").updateLocalizedAttributesSettings(\n new LocalizedAttributes[] {attribute}\n);" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->updateLocalizedAttributes([\n 'locales' => ['jpn'],\n 'attributePatterns' => ['*_ja']\n]);" - }, - { - "lang": "Python", - "source": "client.index('INDEX_NAME').update_localized_attributes([\n {'attribute_patterns': ['*_ja'], 'locales': ['jpn']}\n])" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').update_localized_attributes([\n { attribute_patterns: ['*_ja'], locales: ['jpn'] },\n])" - }, - { - "lang": "Rust", - "source": "let localized_attributes = vec![LocalizedAttributes {\n locales: vec![\"jpn\".to_string()],\n attribute_patterns: vec![\"*_ja\".to_string()],\n}];\nlet task: TaskInfo = client\n .index(\"books\")\n .set_localized_attributes(&localizced_attributes)\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\"locales\": [\"jpn\"], \"attributePatterns\": [\"*_ja\"]}\n ]'" - } ] }, "delete": { @@ -6577,40 +4779,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.index(\"INDEX_NAME\").ResetLocalizedAttributes()" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').resetLocalizedAttributes()" - }, - { - "lang": "Java", - "source": "client.index(\"INDEX_NAME\").resetLocalizedAttributesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->resetLocalizedAttributes();" - }, - { - "lang": "Python", - "source": "client.index('INDEX_NAME').reset_localized_attributes()" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').reset_localized_attributes" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_localized_attributes()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" - } ] } }, @@ -6675,48 +4843,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetNonSeparatorTokensAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").GetNonSeparatorTokens()" - }, - { - "lang": "JS", - "source": "client.index('books').getNonSeparatorTokens()" - }, - { - "lang": "Java", - "source": "client.index(\"articles\").getNonSeparatorTokensSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('articles')->getNonSeparatorTokens();" - }, - { - "lang": "Python", - "source": "client.index('articles').get_non_separator_tokens()" - }, - { - "lang": "Ruby", - "source": "client.index('articles').non_separator_tokens" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('articles')\n .get_non_separator_tokens()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").getNonSeparatorTokens { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" - } ] }, "put": { @@ -6795,48 +4921,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateNonSeparatorTokensAsync(new[] { \"@\", \"#\" });" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").UpdateNonSeparatorTokens([]string{\n \"@\",\n \"#\",\n})" - }, - { - "lang": "JS", - "source": "client.index('books').updateNonSeparatorTokens(['@', '#'])" - }, - { - "lang": "Java", - "source": "String[] newSeparatorTokens = { \"@\", \"#\" };\nclient.index(\"articles\").updateNonSeparatorTokensSettings(newSeparatorTokens);" - }, - { - "lang": "PHP", - "source": "$client->index('articles')->updateNonSeparatorTokens(['@', '#']);" - }, - { - "lang": "Python", - "source": "client.index('articles').update_non_separator_tokens([\"@\", \"#\"])" - }, - { - "lang": "Ruby", - "source": "client.index('articles').update_non_separator_tokens(['@', '#'])" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('articles')\n .set_non_separator_tokens(&vec!['@'.to_string(), '#'.to_string()])\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").updateNonSeparatorTokens([\"@\", \"#\"]) { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"@\", \"#\"]'" - } ] }, "delete": { @@ -6915,48 +4999,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetNonSeparatorTokensAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").ResetNonSeparatorTokens()" - }, - { - "lang": "JS", - "source": "client.index('books').resetNonSeparatorTokens()" - }, - { - "lang": "Java", - "source": "client.index(\"articles\").resetNonSeparatorTokensSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('articles')->resetNonSeparatorTokens();" - }, - { - "lang": "Python", - "source": "client.index('articles').reset_non_separator_tokens()" - }, - { - "lang": "Ruby", - "source": "client.index('articles').reset_non_separator_tokens" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('articles')\n .reset_non_separator_tokens()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").resetNonSeparatorTokens { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" - } ] } }, @@ -7017,48 +5059,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetPaginationAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getPagination();\ndate_pagination_settings_1: \"await client\\n .index('books')\\n .updatePagination(Pagination(maxTotalHits: 100));\"" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetPagination()" - }, - { - "lang": "JS", - "source": "client.index('books').getPagination()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").getPaginationSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->getPagination();" - }, - { - "lang": "Python", - "source": "client.index('books').get_pagination_settings()" - }, - { - "lang": "Ruby", - "source": "index('books').pagination" - }, - { - "lang": "Rust", - "source": "let pagination: PaginationSetting = client\n .index(\"books\")\n .get_pagination()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/pagination'" - } ] }, "delete": { @@ -7133,48 +5133,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetPaginationAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetPagination();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetPagination()" - }, - { - "lang": "JS", - "source": "client.index('books').resetPagination()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").resetPaginationSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->resetPagination();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_pagination_settings()" - }, - { - "lang": "Ruby", - "source": "index('books').reset_pagination" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_pagination()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/pagination'" - } ] }, "patch": { @@ -7249,44 +5207,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "var pagination = new Pagination {\n MaxTotalHits = 20\n};\nawait client.Index(\"movies\").UpdatePaginationAsync(pagination);" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdatePagination(&meilisearch.Pagination{\n MaxTotalHits: 100,\n})" - }, - { - "lang": "JS", - "source": "client.index('books').updateSettings({ pagination: { maxTotalHits: 100 }})" - }, - { - "lang": "Java", - "source": "Pagination newPagination = new Pagination();\nnewPagination.setMaxTotalHits(100);\nclient.index(\"books\").updatePaginationSettings(newPagination);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateSettings([\n 'pagination' => [\n 'maxTotalHits' => 100\n ]\n]);" - }, - { - "lang": "Python", - "source": "client.index('books').update_pagination_settings({'maxTotalHits': 100})" - }, - { - "lang": "Ruby", - "source": "index('books').update_pagination({ max_total_hits: 100 })" - }, - { - "lang": "Rust", - "source": "let pagination = PaginationSetting {max_total_hits:100};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_pagination(pagination)\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/pagination' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxTotalHits\": 100\n }'" - } ] } }, @@ -7347,36 +5267,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.Index(\"books\").GetPrefixSearch()" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').getPrefixSearch();" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->getPrefixSearch();" - }, - { - "lang": "Python", - "source": "client.index('books').get_prefix_search()" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_UID').prefix_search" - }, - { - "lang": "Rust", - "source": "let prefix_search: PrefixSearchSettings = client\n .index(INDEX_UID)\n .get_prefix_search()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" - } ] }, "put": { @@ -7451,36 +5341,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.Index(\"books\").UpdatePrefixSearch(\"disabled\")" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').updatePrefixSearch('disabled');" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->updatePrefixSearch('disabled');" - }, - { - "lang": "Python", - "source": "client.index('books').update_prefix_search(PrefixSearch.DISABLED)" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_UID').update_prefix_search('disabled')" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_prefix_search(PrefixSearchSettings::Disabled)\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"disabled\"'" - } ] }, "delete": { @@ -7555,36 +5415,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.Index(\"books\").ResetPrefixSearch()" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').resetPrefixSearch();" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->resetPrefixSearch();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_prefix_search()" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_UID').reset_prefix_search" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_prefix_search()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" - } ] } }, @@ -7645,48 +5475,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"books\").GetProximityPrecisionAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetProximityPrecision()" - }, - { - "lang": "JS", - "source": "client.index('books').getProximityPrecision()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").getProximityPrecisionSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->getProximityPrecision();" - }, - { - "lang": "Python", - "source": "client.index('books').get_proximity_precision()" - }, - { - "lang": "Ruby", - "source": "client.index('books').proximity_precision" - }, - { - "lang": "Rust", - "source": "let proximity_precision: String = client\n .index(\"books\")\n .get_proximity_precision()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let precisionValue = try await self.client.index(\"books\").getProximityPrecision()" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" - } ] }, "put": { @@ -7761,48 +5549,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"books\").UpdateProximityPrecisionAsync(\"byAttribute\");" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateProximityPrecision(ByAttribute)" - }, - { - "lang": "JS", - "source": "client.index('books').updateProximityPrecision('byAttribute')" - }, - { - "lang": "Java", - "source": "client.index(\"books\").updateProximityPrecisionSettings(\"byAttribute\");" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateProximityPrecision('byAttribute');" - }, - { - "lang": "Python", - "source": "client.index('books').update_proximity_precision(ProximityPrecision.BY_ATTRIBUTE)" - }, - { - "lang": "Ruby", - "source": "client.index('books').update_proximity_precision('byAttribute')" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .set_proximity_precision(\"byAttribute\".to_string())\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let task = try await self.client.index(\"books\").updateProximityPrecision(.byWord)" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/proximity-precision' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"byAttribute\"'" - } ] }, "delete": { @@ -7877,48 +5623,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"books\").ResetProximityPrecisionAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetProximityPrecision()" - }, - { - "lang": "JS", - "source": "client.index('books').resetProximityPrecision()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").resetProximityPrecisionSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->resetProximityPrecision();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_proximity_precision()" - }, - { - "lang": "Ruby", - "source": "client.index('books').reset_proximity_precision" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_proximity_precision()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let task = try await self.client.index(\"books\").resetProximityPrecision()" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" - } ] } }, @@ -7982,52 +5686,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetRankingRulesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getRankingRules();\ndate_ranking_rules_1: \"await client.index('movies').updateRankingRules([\\n 'words',\\n 'typo',\\n 'proximity',\\n 'attribute',\\n 'sort',\\n 'exactness',\\n 'release_date:asc',\\n 'rank:desc',\\n]);\"" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetRankingRules()" - }, - { - "lang": "JS", - "source": "client.index('movies').getRankingRules()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getRankingRulesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getRankingRules();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_ranking_rules()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').ranking_rules" - }, - { - "lang": "Rust", - "source": "let ranking_rules: Vec = client\n .index(\"movies\")\n .get_ranking_rules()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getRankingRules { (result) in\n switch result {\n case .success(let rankingRules):\n print(rankingRules)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" - } ] }, "put": { @@ -8105,48 +5763,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateRankingRulesAsync(new[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});" - }, - { - "lang": "Go", - "source": "rankingRules := []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\",\n}\nclient.Index(\"movies\").UpdateRankingRules(&rankingRules)" - }, - { - "lang": "JS", - "source": "client.index('movies').updateRankingRules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setRankingRules(new String[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});\nclient.index(\"movies\").updateSettings(settings);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateRankingRules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_ranking_rules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_ranking_rules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" - }, - { - "lang": "Rust", - "source": "let ranking_rules = [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\",\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_ranking_rules(&ranking_rules)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let rankingRules: [String] = [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n]\nclient.index(\"movies\").updateRankingRules(rankingRules) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n ]'" - } ] }, "delete": { @@ -8224,52 +5840,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetRankingRulesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetRankingRules();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetRankingRules()" - }, - { - "lang": "JS", - "source": "client.index('movies').resetRankingRules()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetRankingRulesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetRankingRules();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_ranking_rules()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_ranking_rules" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_ranking_rules()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").resetRankingRules { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" - } ] } }, @@ -8332,48 +5902,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "var searchCutoff = await client.Index(\"movies\").GetSearchCutoffMsAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSearchCutoffMs()" - }, - { - "lang": "JS", - "source": "client.index('movies').getSearchCutoffMs()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getSearchCutoffMsSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getSearchCutoffMs();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_search_cutoff_ms()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search_cutoff_ms" - }, - { - "lang": "Rust", - "source": "let search_cutoff_ms: String = client\n .index(\"movies\")\n .get_search_cutoff_ms()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let precisionValue = try await self.client.index(\"books\").getSearchCutoffMs()" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" - } ] }, "put": { @@ -8450,48 +5978,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSearchCutoffMsAsync(150);" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateSearchCutoffMs(150)" - }, - { - "lang": "JS", - "source": "client.index('movies').updateSearchCutoffMs(150)" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateSearchCutoffMsSettings(150);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateSearchCutoffMs(150);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_search_cutoff_ms(150)" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_search_cutoff_ms(150)" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .set_search_cutoff_ms(Some(150))\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let task = try await self.client.index(\"books\").updateSearchCutoffMs(150)" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '150'" - } ] }, "delete": { @@ -8568,48 +6054,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSearchCutoffMsAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetSearchCutoffMs()" - }, - { - "lang": "JS", - "source": "client.index('movies').resetSearchCutoffMs()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetSearchCutoffMsSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetSearchCutoffMs();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_search_cutoff_ms()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_search_cutoff_ms" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_search_cutoff_ms()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let task = try await self.client.index(\"books\").resetSearchCutoffMs()" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" - } ] } }, @@ -8673,52 +6117,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSearchableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getSearchableAttributes();\ndate_searchable_attributes_1: \"await client\\n .index('movies')\\n .updateSearchableAttributes(['title', 'overview', 'genres']);\"" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSearchableAttributes()" - }, - { - "lang": "JS", - "source": "client.index('movies').getSearchableAttributes()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getSearchableAttributesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getSearchableAttributes();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_searchable_attributes()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').searchable_attributes" - }, - { - "lang": "Rust", - "source": "let searchable_attributes: Vec = client\n .index(\"movies\")\n .get_searchable_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getSearchableAttributes { (result) in\n switch result {\n case .success(let searchableAttributes):\n print(searchableAttributes)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" - } ] }, "put": { @@ -8796,48 +6194,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSearchableAttributesAsync(new[] {\"title\", \"overview\", \"genres\"});" - }, - { - "lang": "Go", - "source": "searchableAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n}\nclient.Index(\"movies\").UpdateSearchableAttributes(&searchableAttributes)" - }, - { - "lang": "JS", - "source": "client.index('movies').updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n])" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateSearchableAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\"\n});" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" - }, - { - "lang": "Rust", - "source": "let searchable_attributes = [\n \"title\",\n \"overview\",\n \"genres\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_searchable_attributes(&searchable_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let searchableAttributes: [String] = [\"title\", \"overview\", \"genres\"]\nclient.index(\"movies\").updateSearchableAttributes(searchableAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\"\n ]'" - } ] }, "delete": { @@ -8915,52 +6271,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSearchableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetSearchableAttributes();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetSearchableAttributes()" - }, - { - "lang": "JS", - "source": "client.index('movies').resetSearchableAttributes()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetSearchableAttributesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetSearchableAttributes();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_searchable_attributes()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_searchable_attributes" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_searchable_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").resetSearchableAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" - } ] } }, @@ -9025,48 +6335,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSeparatorTokensAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").GetSeparatorTokens()" - }, - { - "lang": "JS", - "source": "client.index('books').getSeparatorTokens()" - }, - { - "lang": "Java", - "source": "client.index(\"articles\").getSeparatorTokensSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('articles')->getSeparatorTokens();" - }, - { - "lang": "Python", - "source": "client.index('articles').get_separator_tokens()" - }, - { - "lang": "Ruby", - "source": "client.index('articles').separator_tokens" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('articles')\n .get_separator_tokens()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").getSeparatorTokens { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" - } ] }, "put": { @@ -9145,48 +6413,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSeparatorTokensAsync(new[] { \"|\", \"…\" });" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").UpdateSeparatorTokens([]string{\n \"|\",\n \"…\",\n})" - }, - { - "lang": "JS", - "source": "client.index('books').updateSeparatorTokens(['|', '…'])" - }, - { - "lang": "Java", - "source": "String[] newSeparatorTokens = { \"|\", \"…\" };\nclient.index(\"articles\").updateSeparatorTokensSettings(newSeparatorTokens);" - }, - { - "lang": "PHP", - "source": "$client->index('articles')->updateSeparatorTokens(['|', '…']);" - }, - { - "lang": "Python", - "source": "client.index('articles').update_separator_tokens([\"|\", \"…\"])" - }, - { - "lang": "Ruby", - "source": "client.index('articles').update_separator_tokens(['|', '…'])" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('articles')\n .set_separator_tokens(&vec!['|'.to_string(), '…'.to_string()])\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").updateSeparatorTokens([\"|\", \"…\"]) { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"|\", \"…\"]'" - } ] }, "delete": { @@ -9265,48 +6491,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSeparatorTokensAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").ResetSeparatorTokens()" - }, - { - "lang": "JS", - "source": "client.index('books').resetSeparatorTokens()" - }, - { - "lang": "Java", - "source": "client.index(\"articles\").resetSeparatorTokensSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('articles')->resetSeparatorTokens();" - }, - { - "lang": "Python", - "source": "client.index('articles').reset_separator_tokens()" - }, - { - "lang": "Ruby", - "source": "client.index('articles').reset_separator_tokens" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('articles')\n .reset_separator_tokens()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").resetSeparatorTokens { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" - } ] } }, @@ -9371,52 +6555,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"books\").GetSortableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('books').getSortableAttributes();\ndate_sortable_attributes_1: \"await client.index('books').updateSortableAttributes(['price', 'author']);\"" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetSortableAttributes()" - }, - { - "lang": "JS", - "source": "client.index('books').getSortableAttributes()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").getSortableAttributesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->getSortableAttributes();" - }, - { - "lang": "Python", - "source": "client.index('books').get_sortable_attributes()" - }, - { - "lang": "Ruby", - "source": "client.index('books').sortable_attributes" - }, - { - "lang": "Rust", - "source": "let sortable_attributes: Vec = client\n .index(\"books\")\n .get_sortable_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").getSortableAttributes { (result: Result, Swift.Error>) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" - } ] }, "put": { @@ -9495,48 +6633,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"books\").UpdateSortableAttributesAsync(new [] { \"price\", \"author\" });" - }, - { - "lang": "Go", - "source": "sortableAttributes := []string{\n \"price\",\n \"author\",\n}\nclient.Index(\"books\").UpdateSortableAttributes(&sortableAttributes)" - }, - { - "lang": "JS", - "source": "client.index('books')\n .updateSortableAttributes([\n 'price',\n 'author'\n ])" - }, - { - "lang": "Java", - "source": "client.index(\"books\").updateSortableAttributesSettings(new String[] {\"price\", \"author\"});" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateSortableAttributes([\n 'price',\n 'author'\n]);" - }, - { - "lang": "Python", - "source": "client.index('books').update_sortable_attributes([\n 'price',\n 'author'\n])" - }, - { - "lang": "Ruby", - "source": "client.index('books').update_sortable_attributes([\n 'price',\n 'author'\n])" - }, - { - "lang": "Rust", - "source": "let sortable_attributes = [\n \"price\",\n \"author\"\n];\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_sortable_attributes(&sortable_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").updateSortableAttributes([\"price\", \"author\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"price\",\n \"author\"\n ]'" - } ] }, "delete": { @@ -9615,52 +6711,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"books\").ResetSortableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('books').resetSortableAttributes();\narch_parameter_guide_sort_1: \"await client\\n .index('books')\\n .search('science fiction', SearchQuery(sort: ['price:asc']));\"" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetSortableAttributes()" - }, - { - "lang": "JS", - "source": "client.index('books').resetSortableAttributes()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").resetSortableAttributesSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->resetSortableAttributes();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_sortable_attributes()" - }, - { - "lang": "Ruby", - "source": "client.index('books').reset_sortable_attributes" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_sortable_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").resetSortableAttributes() { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" - } ] } }, @@ -9725,52 +6775,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetStopWordsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getStopWords();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetStopWords()" - }, - { - "lang": "JS", - "source": "client.index('movies').getStopWords()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getStopWordsSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getStopWords();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_stop_words()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').stop_words" - }, - { - "lang": "Rust", - "source": "let stop_words: Vec = client\n .index(\"movies\")\n .get_stop_words()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getStopWords { (result) in\n switch result {\n case .success(let stopWords):\n print(stopWords)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" - } ] }, "put": { @@ -9849,52 +6853,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateStopWordsAsync(new[] {\"of\", \"the\", \"to\"});" - }, - { - "lang": "Dart", - "source": "await client.index('movies').updateStopWords(['of', 'the', 'to']);" - }, - { - "lang": "Go", - "source": "stopWords := []string{\"of\", \"the\", \"to\"}\nclient.Index(\"movies\").UpdateStopWords(&stopWords)" - }, - { - "lang": "JS", - "source": "client.index('movies').updateStopWords(['of', 'the', 'to'])" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateStopWordsSettings(new String[] {\"of\", \"the\", \"to\"});" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateStopWords(['the', 'of', 'to']);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_stop_words(['of', 'the', 'to'])" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_stop_words(['of', 'the', 'to'])" - }, - { - "lang": "Rust", - "source": "let stop_words = [\"of\", \"the\", \"to\"];\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_stop_words(&stop_words)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let stopWords: [String] = [\"of\", \"the\", \"to\"]\nclient.index(\"movies\").updateStopWords(stopWords) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/stop-words' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"the\",\n \"of\",\n \"to\"\n ]'" - } ] }, "delete": { @@ -9973,52 +6931,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetStopWordsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetStopWords();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetStopWords()" - }, - { - "lang": "JS", - "source": "client.index('movies').resetStopWords()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetStopWordsSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetStopWords();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_stop_words()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_stop_words" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_stop_words()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").resetStopWords { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" - } ] } }, @@ -10088,52 +7000,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSynonymsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getSynonyms();\ndate_synonyms_1: \"await client.index('movies').updateSynonyms({\\n 'wolverine': ['xmen', 'logan'],\\n 'logan': ['wolverine', 'xmen'],\\n 'wow': ['world of warcraft'],\\n});\"" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSynonyms()" - }, - { - "lang": "JS", - "source": "client.index('movies').getSynonyms()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getSynonymsSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getSynonyms();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_synonyms()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').synonyms" - }, - { - "lang": "Rust", - "source": "let synonyms: HashMap> = client\n .index(\"movies\")\n .get_synonyms()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getSynonyms { (result) in\n switch result {\n case .success(let synonyms):\n print(synonyms)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" - } ] }, "put": { @@ -10211,53 +7077,11 @@ }, "security": [ { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "var synonyms = new Dictionary>\n{\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\", \"xmen\" } },\n { \"wow\", new string[] { \"world of warcraft\" } }\n};\nawait client.Index(\"movies\").UpdateSynonymsAsync(synonyms);" - }, - { - "lang": "Go", - "source": "synonyms := map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\", \"xmen\"},\n \"wow\": []string{\"world of warcraft\"},\n}\nclient.Index(\"movies\").UpdateSynonyms(&synonyms)" - }, - { - "lang": "JS", - "source": "client.index('movies').updateSynonyms({\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine', 'xmen'],\n wow: ['world of warcraft']\n})" - }, - { - "lang": "Java", - "source": "HashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nclient.index(\"movies\").updateSynonymsSettings(synonyms);" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateSynonyms([\n 'wolverine' => ['xmen', 'logan'],\n 'logan' => ['wolverine', 'xmen'],\n 'wow' => ['world of warcraft']\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_synonyms({\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine', 'xmen'],\n 'wow': ['world of warcraft']\n})" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_synonyms({\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine', 'xmen'],\n wow: ['world of warcraft']\n})" - }, - { - "lang": "Rust", - "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"wolverine\"), vec![String::from(\"xmen\"), String::from(\"logan\")]);\nsynonyms.insert(String::from(\"logan\"), vec![String::from(\"xmen\"), String::from(\"wolverine\")]);\nsynonyms.insert(String::from(\"wow\"), vec![String::from(\"world of warcraft\")]);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_synonyms(&synonyms)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let synonyms: [String: [String]] = [\n \"wolverine\": [\"xmen\", \"logan\"],\n \"logan\": [\"wolverine\", \"xmen\"],\n \"wow\": [\"world of warcraft\"]\n]\nclient.index(\"movies\").updateSynonyms(synonyms) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/synonyms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\n \"wolverine\",\n \"xmen\"\n ],\n \"wow\": [\"world of warcraft\"]\n }'" + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] } ] }, @@ -10342,52 +7166,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSynonymsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetSynonyms();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetSynonyms()" - }, - { - "lang": "JS", - "source": "client.index('movies').resetSynonyms()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetSynonymsSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetSynonyms();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_synonyms()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_synonyms" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_synonyms()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").resetSynonyms { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" - } ] } }, @@ -10448,40 +7226,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Dart", - "source": "await client.index('books').getTypoTolerance();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetTypoTolerance()" - }, - { - "lang": "JS", - "source": "client.index('books').getTypoTolerance()" - }, - { - "lang": "PHP", - "source": "$client->index('books')->getTypoTolerance();" - }, - { - "lang": "Python", - "source": "client.index('books').get_typo_tolerance()" - }, - { - "lang": "Ruby", - "source": "index('books').typo_tolerance" - }, - { - "lang": "Rust", - "source": "let typo_tolerance: TypoToleranceSettings = client\n .index(\"books\")\n .get_typo_tolerance()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" - } ] }, "delete": { @@ -10556,48 +7300,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"books\").ResetTypoToleranceAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('books').resetTypoTolerance();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetTypoTolerance()" - }, - { - "lang": "JS", - "source": "client.index('books').resetTypoTolerance()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").resetTypoToleranceSettings();" - }, - { - "lang": "PHP", - "source": "$client->index('books')->resetTypoTolerance();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_typo_tolerance()" - }, - { - "lang": "Ruby", - "source": "index('books').reset_typo_tolerance" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_typo_tolerance()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" - } ] }, "patch": { @@ -10672,48 +7374,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "var typoTolerance = new TypoTolerance {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeTypos = new TypoTolerance.TypoSize {\n OneTypo = 4,\n TwoTypos = 10\n }\n};\n\nawait client.Index(\"books\").UpdateTypoToleranceAsync(typoTolerance);" - }, - { - "lang": "Dart", - "source": "final toUpdate = TypoTolerance(\n minWordSizeForTypos: MinWordSizeForTypos(\n oneTypo: 4,\n twoTypos: 10,\n ),\n disableOnAttributes: ['title'],\n);\nawait client.index('books').updateTypoTolerance(toUpdate);" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 4,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n})" - }, - { - "lang": "JS", - "source": "client.index('books').updateTypoTolerance({\n minWordSizeForTypos: {\n oneTypo: 4,\n twoTypos: 10\n },\n disableOnAttributes: [\n 'title'\n ]\n})" - }, - { - "lang": "Java", - "source": "TypoTolerance typoTolerance = new TypoTolerance();\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 4);\n put(\"twoTypos\", 10);\n }\n };\n\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\ntypoTolerance.setDisableOnAttributes(new String[] {\"title\"});\n\nclient.index(\"books\").updateTypoToleranceSettings(typoTolerance);" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateTypoTolerance([\n 'minWordSizeForTypos' => [\n 'oneTypo' => 4,\n 'twoTypos' => 10\n ],\n 'disableOnAttributes' => [\n 'title'\n ]\n]);" - }, - { - "lang": "Python", - "source": "client.index('books').update_typo_tolerance({\n 'minWordSizeForTypos': {\n 'oneTypo': 4,\n 'twoTypos': 10\n },\n 'disableOnAttributes': [\n 'title'\n ]\n})" - }, - { - "lang": "Ruby", - "source": "index('books').update_typo_tolerance({\n min_word_size_for_typos: {\n one_typo: 4,\n two_typos: 10\n },\n disable_on_attributes: ['title']\n})" - }, - { - "lang": "Rust", - "source": "let typo_tolerance = TypoToleranceSettings {\n enabled: Some(false),\n disable_on_attributes: None,\n disable_on_words: None,\n min_word_size_for_typos: None,\n};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"minWordSizeForTypos\": {\n \"oneTypo\": 4,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n }'" - } ] } }, @@ -10774,12 +7434,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store'" - } ] }, "delete": { @@ -10854,12 +7508,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store'" - } ] }, "patch": { @@ -10934,12 +7582,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"experimental\"'" - } ] } }, @@ -10965,6 +7607,7 @@ { "name": "id", "in": "query", + "description": "The unique identifier (primary key value) of the target document.\nMeilisearch will find and return documents that are semantically\nsimilar to this document based on their vector embeddings. This is a\nrequired parameter.", "required": true, "schema": { "type": "string" @@ -10973,6 +7616,7 @@ { "name": "offset", "in": "query", + "description": "Number of similar documents to skip in the response. Use together with\n`limit` for pagination through large result sets. For example, to get\nsimilar documents 21-40, set `offset=20` and `limit=20`. Defaults to\n`0`.", "required": true, "schema": { "type": "integer", @@ -10983,6 +7627,7 @@ { "name": "limit", "in": "query", + "description": "Maximum number of similar documents to return in a single response. Use\ntogether with `offset` for pagination. Higher values return more\nresults but may increase response time. Defaults to `20`.", "required": true, "schema": { "type": "integer", @@ -10993,6 +7638,7 @@ { "name": "attributes_to_retrieve", "in": "query", + "description": "Comma-separated list of document attributes to include in the response.\nUse `*` to retrieve all attributes. By default, all attributes listed\nin the `displayedAttributes` setting are returned. Example:\n`title,description,price`.", "required": true, "schema": { "type": "array", @@ -11004,6 +7650,7 @@ { "name": "retrieve_vectors", "in": "query", + "description": "When `true`, includes the vector embeddings for each returned document.\nUseful for debugging or when you need to inspect the vector data. Note\nthat this can significantly increase response size. Defaults to\n`false`.", "required": true, "schema": { "type": "boolean" @@ -11012,6 +7659,7 @@ { "name": "filter", "in": "query", + "description": "Filter expression to narrow down which documents can be returned as\nsimilar. Uses the same syntax as search filters. Only documents\nmatching this filter will be considered when finding similar documents.\nExample: `genres = action AND year > 2000`.", "required": false, "schema": { "type": "string" @@ -11020,6 +7668,7 @@ { "name": "show_ranking_score", "in": "query", + "description": "When `true`, includes a global `_rankingScore` field in each document\nshowing how similar it is to the target document. The score is a value\nbetween 0 and 1, where higher values indicate greater similarity.\nDefaults to `false`.", "required": true, "schema": { "type": "boolean" @@ -11028,6 +7677,16 @@ { "name": "show_ranking_score_details", "in": "query", + "description": "When `true`, includes a detailed `_rankingScoreDetails` object in each\ndocument breaking down how the similarity score was calculated. Useful\nfor debugging and understanding why certain documents are considered\nmore similar. Defaults to `false`.", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "show_performance_details", + "in": "query", + "description": "When `true`, includes a `_performanceDetails` object showing the\nperformance details of the search.", "required": true, "schema": { "type": "boolean" @@ -11036,6 +7695,7 @@ { "name": "ranking_score_threshold", "in": "query", + "description": "Minimum ranking score threshold (between 0.0 and 1.0) that documents\nmust meet to be included in results. Documents with a similarity score\nbelow this threshold will be excluded. Useful for ensuring only highly\nsimilar documents are returned.", "required": false, "schema": { "type": "number", @@ -11045,6 +7705,7 @@ { "name": "embedder", "in": "query", + "description": "The name of the embedder to use for finding similar documents. This\nmust match one of the embedders configured in your index settings. The\nembedder determines how document similarity is calculated based on\nvector embeddings.", "required": true, "schema": { "type": "string" @@ -11125,12 +7786,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/similar?id=TARGET_DOCUMENT_ID&embedder=EMBEDDER_NAME'" - } ] }, "post": { @@ -11236,36 +7891,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "resp := new(meilisearch.SimilarDocumentResult)\nclient.Index(\"INDEX_NAME\").SearchSimilarDocuments(&meilisearch.SimilarDocumentQuery{\n Id: \"TARGET_DOCUMENT_ID\",\n Embedder: \"default\",\n}, resp)" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').searchSimilarDocuments({ id: 'TARGET_DOCUMENT_ID', embedder: 'default' })" - }, - { - "lang": "PHP", - "source": "$similarQuery = new SimilarDocumentsQuery('TARGET_DOCUMENT_ID', 'default');\n$client->index('INDEX_NAME')->searchSimilarDocuments($similarQuery);" - }, - { - "lang": "Python", - "source": "client.index(\"INDEX_NAME\").get_similar_documents({\"id\": \"TARGET_DOCUMENT_ID\", \"embedder\": \"default\"})" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').search_similar_documents('TARGET_DOCUMENT_ID', embedder: 'default')" - }, - { - "lang": "Rust", - "source": "let results = index\n .similar_search(\"TARGET_DOCUMENT_ID\", \"EMBEDDER_NAME\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/similar' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"id\": TARGET_DOCUMENT_ID,\n \"embedder\": \"EMBEDDER_NAME\"\n }'" - } ] } }, @@ -11353,52 +7978,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetStatsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getStats();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetStats()" - }, - { - "lang": "JS", - "source": "client.index('movies').getStats()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getStats();" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->stats();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_stats()" - }, - { - "lang": "Ruby", - "source": "client.index('movies').stats" - }, - { - "lang": "Rust", - "source": "let stats: IndexStats = client\n .index(\"movies\")\n .get_stats()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").stats { (result) in\n switch result {\n case .success(let stats):\n print(stats)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/stats'" - } ] } }, @@ -11414,6 +7993,7 @@ { "name": "offset", "in": "query", + "description": "Number of API keys to skip in the response. Use together with `limit`\nfor pagination through large sets of keys. For example, to get keys\n21-40, set `offset=20` and `limit=20`. Defaults to `0`.", "required": true, "schema": { "type": "integer", @@ -11424,6 +8004,7 @@ { "name": "limit", "in": "query", + "description": "Maximum number of API keys to return in a single response. Use together\nwith `offset` for pagination. Defaults to `20`.", "required": true, "schema": { "type": "integer", @@ -11490,52 +8071,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "ResourceResults keyResult = await client.GetKeysAsync(new KeysQuery { Limit = 3 });" - }, - { - "lang": "Dart", - "source": "await client.getKeys(params: KeysQuery(limit: 3));\neate_a_key_1: \"await client.createKey(\\n description: 'Add documents: Products API key',\\n actions: ['documents.add'],\\n indexes: ['products'],\\n expiresAt: DateTime(2042, 04, 02));\"\ndate_a_key_1: \"await client.updateKey(\\n '6062abda-a5aa-4414-ac91-ecd7944c0f8d',\\n description: 'Manage documents: Products\\/Reviews API key',\\n name: 'Products\\/Reviews API key',\\n);\"" - }, - { - "lang": "Go", - "source": "client.GetKeys(&meilisearch.KeysQuery{\n Limit: 3\n});" - }, - { - "lang": "JS", - "source": "client.getKeys({ limit: 3 })" - }, - { - "lang": "Java", - "source": "KeysQuery query = new KeysQuery().setLimit(3);\nclient.getKeys(query);" - }, - { - "lang": "PHP", - "source": "$client->getKeys((new KeysQuery())->setLimit(3));" - }, - { - "lang": "Python", - "source": "client.get_keys({'limit': 3})" - }, - { - "lang": "Ruby", - "source": "client.keys(limit: 3)" - }, - { - "lang": "Rust", - "source": "let mut query = KeysQuery::new()\n .with_limit(3)\n .execute(&client)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.getKeys(params: KeysQuery(limit: 3)) { result in\n switch result {\n case .success(let keys):\n print(keys)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys?limit=3' \\\n -H 'Authorization: Bearer MASTER_KEY'" - } ] }, "post": { @@ -11606,48 +8141,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "Key keyOptions = new Key\n{\n Description = \"Add documents: Products API key\",\n Actions = new KeyAction[] { KeyAction.DocumentsAdd },\n Indexes = new string[] { \"products\" },\n ExpiresAt = DateTime.Parse(\"2042-04-02T00:42:42Z\")\n};\nKey createdKey = await this.client.CreateKeyAsync(keyOptions);" - }, - { - "lang": "Go", - "source": "client.CreateKey(&meilisearch.Key{\n Description: \"Add documents: Products API key\",\n Actions: []string{\"documents.add\"},\n Indexes: []string{\"products\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" - }, - { - "lang": "JS", - "source": "client.createKey({\n description: 'Add documents: Products API key',\n actions: ['documents.add'],\n indexes: ['products'],\n expiresAt: '2021-11-13T00:00:00Z'\n})" - }, - { - "lang": "Java", - "source": "SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\nDate dateParsed = format.parse(\"2042-04-02T00:42:42Z\");\n\nKey keyInfo = new Key();\n\nkeyInfo.setDescription(\"Add documents: Products API key\");\nkeyInfo.setActions(new String[] {\"documents.add\"});\nkeyInfo.setIndexes(new String[] {\"products\"});\nkeyInfo.setExpiresAt(dateParsed);\n\nclient.createKey(keyInfo);" - }, - { - "lang": "PHP", - "source": "$client->createKey([\n 'description' => 'Add documents: Products API key',\n 'actions' => ['documents.add'],\n 'indexes' => ['products'],\n 'expiresAt' => '2042-04-02T00:42:42Z',\n]);" - }, - { - "lang": "Python", - "source": "client.create_key(options={\n 'description': 'Add documents: Products API key',\n 'actions': ['documents.add'],\n 'indexes': ['products'],\n 'expiresAt': '2042-04-02T00:42:42Z'\n})" - }, - { - "lang": "Ruby", - "source": "client.create_key(\n description: 'Add documents: Products API key',\n actions: ['documents.add'],\n indexes: ['products'],\n expires_at: '2042-04-02T00:42:42Z'\n)" - }, - { - "lang": "Rust", - "source": "let mut key_options = KeyBuilder::new();\nkey_options\n .with_name(\"Add documents: Products API key\")\n .with_action(Action::DocumentsAdd)\n .with_expires_at(time::macros::datetime!(2042 - 04 - 02 00:42:42 UTC))\n .with_index(\"products\");\nlet new_key = client\n .create_key(key_options)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let keyParams = KeyParams(\n description: \"Add documents: Products API key\",\n actions: [\"documents.add\"],\n indexes: [\"products\"],\n expiresAt: \"2042-04-02T00:42:42Z\"\n)\nclient.createKey(keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/keys' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"description\": \"Add documents: Products API key\",\n \"actions\": [\"documents.add\"],\n \"indexes\": [\"products\"],\n \"expiresAt\": \"2042-04-02T00:42:42Z\"\n }'" - } ] } }, @@ -11723,52 +8216,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "Key key = await client.GetKeyAsync(\"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4\");" - }, - { - "lang": "Dart", - "source": "await client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" - }, - { - "lang": "Go", - "source": "client.GetKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" - }, - { - "lang": "JS", - "source": "client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" - }, - { - "lang": "Java", - "source": "client.getKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\");" - }, - { - "lang": "PHP", - "source": "$client->getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" - }, - { - "lang": "Python", - "source": "client.get_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" - }, - { - "lang": "Ruby", - "source": "client.key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" - }, - { - "lang": "Rust", - "source": "let key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.getKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" - } ] }, "delete": { @@ -11796,75 +8243,29 @@ "description": "The key have been removed" }, "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "keys.delete", - "keys.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "client.DeleteKeyAsync(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" - }, - { - "lang": "Dart", - "source": "await client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" - }, - { - "lang": "Go", - "source": "client.DeleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" - }, - { - "lang": "JS", - "source": "client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" - }, - { - "lang": "Java", - "source": "client.deleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" - }, - { - "lang": "PHP", - "source": "$client->deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" - }, - { - "lang": "Python", - "source": "client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" - }, - { - "lang": "Ruby", - "source": "client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" - }, - { - "lang": "Rust", - "source": "let key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();\nclient\n .delete_key(&key)\n .await?;\nthorization_header_1:\nlet client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet keys = client\n.get_keys()\n.await\n.unwrap();" - }, - { - "lang": "Swift", - "source": "client.deleteKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success:\n print(\"success\")\n case .failure(let error):\n print(error)\n }\n}" - }, + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" + "Bearer": [ + "keys.delete", + "keys.*", + "*" + ] } ] }, @@ -11873,7 +8274,7 @@ "Keys" ], "summary": "Update a Key", - "description": "Update the name and description of an API key.\nUpdates to keys are partial. This means you should provide only the fields you intend to update, as any fields not present in the payload will remain unchanged.", + "description": "Update the name and description of an API key. Updates to keys are partial.\nThis means you should provide only the fields you intend to update, as any\nfields not present in the payload will remain unchanged.", "operationId": "patch_api_key", "parameters": [ { @@ -11949,48 +8350,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.UpdateKeyAsync(\n \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\",\n description: \"Manage documents: Products/Reviews API key\",\n name: \"Products/Reviews API key\"\n)" - }, - { - "lang": "Go", - "source": "client.UpdateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", &meilisearch.Key{\n Description: \"Manage documents: Products/Reviews API key\",\n Actions: []string{\"documents.add\", \"document.delete\"},\n Indexes: []string{\"products\", \"reviews\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" - }, - { - "lang": "JS", - "source": "client.updateKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d', {\n name: 'Products/Reviews API key',\n description: 'Manage documents: Products/Reviews API key',\n})" - }, - { - "lang": "Java", - "source": "KeyUpdate keyChanges = new KeyUpdate();\nkeyChanges.setName(\"Products/Reviews API key\");\nkeyChanges.setDescription(\"Manage documents: Products/Reviews API key\");\n\nclient.updateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", keyChanges);" - }, - { - "lang": "PHP", - "source": "$client->updateKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n [\n 'name' => 'Products/Reviews API key',\n 'description' => 'Manage documents: Products/Reviews API key'\n ]);" - }, - { - "lang": "Python", - "source": "client.update_key(key_or_uid='6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n options={\n 'name': 'Products/Reviews API key',\n 'description': 'Manage documents: Products/Reviews API key'\n})" - }, - { - "lang": "Ruby", - "source": "client.update_key(\n '6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n {\n description: 'Manage documents: Products/Reviews API key',\n name: 'Products/Reviews API key'\n }\n)" - }, - { - "lang": "Rust", - "source": "let mut key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();\nkey\n .with_description(\"Manage documents: Products/Reviews API key\".to_string())\n .with_name(\"Products/Reviews API key\".to_string())\n .update(&client)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let keyParams = KeyUpdateParams(\n description: \"Manage documents: Products/Reviews API key\",\n name: \"Products/Reviews API key\"\n)\n\nclient.updateKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", keyParams: keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"name\": \"Products/Reviews API key\",\n \"description\": \"Manage documents: Products/Reviews API key\"\n }'" - } ] } }, @@ -12000,7 +8359,7 @@ "Logs" ], "summary": "Update target of the console logs", - "description": "This route lets you specify at runtime the level of the console logs outputted on stderr.", + "description": "This route lets you specify at runtime the level of the console logs\noutputted on stderr.", "operationId": "update_stderr_target", "requestBody": { "content": { @@ -12041,12 +8400,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST MEILISEARCH_URL/logs/stderr \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"target\": \"milli=trace,index_scheduler=info,actix_web=off\"\n }'" - } ] } }, @@ -12056,7 +8409,7 @@ "Logs" ], "summary": "Retrieve logs", - "description": "Stream logs over HTTP. The format of the logs depends on the configuration specified in the payload.\nThe logs are sent as multi-part, and the stream never stops, so make sure your clients correctly handle that.\nTo make the server stop sending you logs, you can call the `DELETE /logs/stream` route.\n\nThere can only be one listener at a timeand an error will be returned if you call this route while it's being used by another client.", + "description": "Stream logs over HTTP. The format of the logs depends on the\nconfiguration specified in the payload. The logs are sent as multi-part,\nand the stream never stops, so make sure your clients correctly handle\nthat. To make the server stop sending you logs, you can call the `DELETE\n/logs/stream` route.\n\nThere can only be one listener at a timeand an error will be returned if\nyou call this route while it's being used by another client.", "operationId": "get_logs", "requestBody": { "content": { @@ -12121,12 +8474,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST MEILISEARCH_URL/logs/stream \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"mode\": \"human\",\n \"target\": \"index_scheduler=trace\"\n }'" - } ] }, "delete": { @@ -12134,7 +8481,7 @@ "Logs" ], "summary": "Stop retrieving logs", - "description": "Call this route to make the engine stops sending logs through the `POST /logs/stream` route.", + "description": "Call this route to make the engine stops sending logs through the `POST\n/logs/stream` route.", "operationId": "cancel_logs", "responses": { "204": { @@ -12165,12 +8512,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE MEILISEARCH_URL/logs/stream\n}'" - } ] } }, @@ -12219,12 +8560,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/metrics'" - } ] } }, @@ -12234,7 +8569,7 @@ "Multi-search" ], "summary": "Perform a multi-search", - "description": "Bundle multiple search queries in a single API request. Use this endpoint to search through multiple indexes at once.", + "description": "Bundle multiple search queries in a single API request. Use this endpoint\nto search through multiple indexes at once.", "operationId": "multi_search_with_post", "requestBody": { "content": { @@ -12308,44 +8643,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.MultiSearchAsync(new MultiSearchQuery()\n{\n Queries = new System.Collections.Generic.List()\n {\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"booh\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"nemo\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movie_ratings\",\n Q = \"us\",\n },\n }\n});" - }, - { - "lang": "Go", - "source": "client.MultiSearch(&MultiSearchRequest{\n Queries: []SearchRequest{\n {\n IndexUID: \"movies\",\n Query: \"pooh\",\n Limit: 5,\n },\n {\n IndexUID: \"movies\",\n Query: \"nemo\",\n Limit: 5,\n },\n {\n IndexUID: \"movie_ratings\",\n Query: \"us\",\n },\n },\n})" - }, - { - "lang": "JS", - "source": "client.multiSearch({ queries: [\n {\n indexUid: 'movies',\n q: 'pooh',\n limit: 5,\n },\n {\n indexUid: 'movies',\n q: 'nemo',\n limit: 5,\n },\n {\n indexUid: 'movie_ratings',\n q: 'us',\n },\n]})" - }, - { - "lang": "Java", - "source": "MultiSearchRequest multiSearchRequest = new MultiSearchRequest();\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"pooh\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"nemo\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movie_ratings\").setQuery(\"us\"));\n\nclient.multiSearch(multiSearchRequest);\nt_similar_post_1:\nSimilarDocumentRequest query = new SimilarDocumentRequest()\n .setId(\"143\")\n .setEmbedder(\"manual\");\nclient.index(\"movies\").searchSimilarDocuments(query)" - }, - { - "lang": "PHP", - "source": "$client->multiSearch([\n (new SearchQuery())\n ->setIndexUid('movies')\n ->setQuery('pooh')\n ->setLimit(5),\n (new SearchQuery())\n ->setIndexUid('movies')\n ->setQuery('nemo')\n ->setLimit(5),\n (new SearchQuery())\n ->setIndexUid('movie_ratings')\n ->setQuery('us')\n ]);" - }, - { - "lang": "Python", - "source": "client.multi_search(\n [\n {'indexUid': 'movies', 'q': 'pooh', 'limit': 5},\n {'indexUid': 'movies', 'q': 'nemo', 'limit': 5},\n {'indexUid': 'movie_ratings', 'q': 'us'}\n ]\n)" - }, - { - "lang": "Ruby", - "source": "client.multi_search([\n { index_uid: 'books', q: 'prince' },\n { index_uid: 'movies', q: 'pooh', limit: 5 }\n { index_uid: 'movies', q: 'nemo', limit: 5 }\n { index_uid: 'movie_ratings', q: 'us' }\n])" - }, - { - "lang": "Rust", - "source": "let movie = client.index(\"movie\");\nlet movie_ratings = client.index(\"movie_ratings\");\n\nlet search_query_1 = SearchQuery::new(&movie)\n .with_query(\"pooh\")\n .with_limit(5)\n .build();\nlet search_query_2 = SearchQuery::new(&movie)\n .with_query(\"nemo\")\n .with_limit(5)\n .build();\nlet search_query_3 = SearchQuery::new(&movie_ratings)\n .with_query(\"us\")\n .build();\n\nlet response = client\n .multi_search()\n .with_search_query(search_query_1)\n .with_search_query(search_query_2)\n .with_search_query(search_query_3)\n .execute::()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/multi-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"queries\": [\n {\n \"indexUid\": \"movies\",\n \"q\": \"pooh\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movies\",\n \"q\": \"nemo\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movie_ratings\",\n \"q\": \"us\"\n }\n ]\n }'" - } ] } }, @@ -12412,12 +8709,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/network'" - } ] }, "patch": { @@ -12492,12 +8783,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/network' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"self\": \"ms-00\",\n \"remotes\": {\n \"ms-00\": {\n \"url\": \"http://INSTANCE_URL\",\n \"searchApiKey\": \"INSTANCE_API_KEY\"\n },\n \"ms-01\": {\n \"url\": \"http://ANOTHER_INSTANCE_URL\",\n \"searchApiKey\": \"ANOTHER_INSTANCE_API_KEY\"\n }\n }\n }'" - } ] } }, @@ -12552,48 +8837,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.CreateSnapshotAsync();" - }, - { - "lang": "Go", - "source": "client.CreateSnapshot()" - }, - { - "lang": "JS", - "source": "client.createSnapshot()" - }, - { - "lang": "Java", - "source": "client.createSnapshot();" - }, - { - "lang": "PHP", - "source": "$client->createSnapshot();" - }, - { - "lang": "Python", - "source": "client.create_snapshot()" - }, - { - "lang": "Ruby", - "source": "client.create_snapshot" - }, - { - "lang": "Rust", - "source": "client\n .create_snapshot()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let task = try await self.client.createSnapshot()" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/snapshots'" - } ] } }, @@ -12659,52 +8902,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.GetStatsAsync();" - }, - { - "lang": "Dart", - "source": "await client.getStats();" - }, - { - "lang": "Go", - "source": "client.GetStats()" - }, - { - "lang": "JS", - "source": "client.getStats()" - }, - { - "lang": "Java", - "source": "client.getStats();" - }, - { - "lang": "PHP", - "source": "$client->stats();" - }, - { - "lang": "Python", - "source": "client.get_all_stats()" - }, - { - "lang": "Ruby", - "source": "client.stats" - }, - { - "lang": "Rust", - "source": "let stats: ClientStats = client\n .get_stats()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.allStats { (result) in\n switch result {\n case .success(let stats):\n print(stats)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/stats'" - } ] } }, @@ -12714,7 +8911,7 @@ "Indexes" ], "summary": "Swap indexes", - "description": "Swap the documents, settings, and task history of two or more indexes. You can only swap indexes in pairs. However, a single request can swap as many index pairs as you wish.\nSwapping indexes is an atomic transaction: either all indexes are successfully swapped, or none are.\nSwapping indexA and indexB will also replace every mention of indexA by indexB and vice-versa in the task history. enqueued tasks are left unmodified.", + "description": "Swap the documents, settings, and task history of two or more indexes.\nYou can only swap indexes in pairs. However, a single request can swap as\nmany index pairs as you wish. Swapping indexes is an atomic transaction:\neither all indexes are successfully swapped, or none are. Swapping indexA\nand indexB will also replace every mention of indexA by indexB and\nvice-versa in the task history. enqueued tasks are left unmodified.", "operationId": "swap_indexes", "requestBody": { "content": { @@ -12771,48 +8968,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.SwapIndexesAsync(new List { new IndexSwap(\"indexA\", \"indexB\"), new IndexSwap(\"indexX\", \"indexY\") } });" - }, - { - "lang": "Go", - "source": "client.SwapIndexes([]SwapIndexesParams{\n {Indexes: []string{\"indexA\", \"indexB\"}},\n {Indexes: []string{\"indexX\", \"indexY\"}},\n})" - }, - { - "lang": "JS", - "source": "client.swapIndexes([\n { 'indexes': ['indexA', 'indexB'] },\n { 'indexes': ['indexX', 'indexY'] }\n])" - }, - { - "lang": "Java", - "source": "SwapIndexesParams[] params =\n new SwapIndexesParams[] {\n new SwapIndexesParams().setIndexes(new String[] {\"indexA\", \"indexB\"}),\n new SwapIndexesParams().setIndexes(new String[] {\"indexX\", \"indexY\"})\n };\nTaskInfo task = client.swapIndexes(params);" - }, - { - "lang": "PHP", - "source": "$client->swapIndexes([['indexA', 'indexB'], ['indexX', 'indexY']]);" - }, - { - "lang": "Python", - "source": "client.swap_indexes([{'indexes': ['indexA', 'indexB']}, {'indexes': ['indexX', 'indexY']}])" - }, - { - "lang": "Ruby", - "source": "client.swap_indexes(['indexA', 'indexB'], ['indexX', 'indexY'])" - }, - { - "lang": "Rust", - "source": "client.swap_indexes([\n &SwapIndexes {\n indexes: (\n \"indexA\".to_string(),\n \"indexB\".to_string(),\n ),\n }, &SwapIndexes {\n indexes: (\n \"indexX\".to_string(),\n \"indexY\".to_string(),\n ),\n}])" - }, - { - "lang": "Swift", - "source": "let task = try await self.client.swapIndexes([\n (\"indexA\", \"indexB\"),\n (\"indexX\", \"indexY\")\n])" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/swap-indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"indexes\": [\n \"indexA\",\n \"indexB\"\n ]\n },\n {\n \"indexes\": [\n \"indexX\",\n \"indexY\"\n ]\n }\n ]'" - } ] } }, @@ -12863,7 +9018,7 @@ { "name": "batchUids", "in": "query", - "description": "Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character.", + "description": "Permits to filter tasks by their batch uid. By default, when the\n`batchUids` query parameter is not set, all task uids are returned.\nIt's possible to specify several batch uids by separating them with\nthe `,` character.", "required": false, "schema": { "type": "integer", @@ -12875,7 +9030,7 @@ { "name": "uids", "in": "query", - "description": "Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", + "description": "Permits to filter tasks by their uid. By default, when the uids query\nparameter is not set, all task uids are returned. It's possible to\nspecify several uids by separating them with the `,` character.", "required": false, "schema": { "type": "array", @@ -12894,7 +9049,7 @@ { "name": "canceledBy", "in": "query", - "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", + "description": "Permits to filter tasks using the uid of the task that canceled them.\nIt's possible to specify several task uids by separating them with\nthe `,` character.", "required": false, "schema": { "type": "array", @@ -12911,7 +9066,7 @@ { "name": "types", "in": "query", - "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", + "description": "Permits to filter tasks by their related type. By default, when `types`\nquery parameter is not set, all task types are returned. It's possible\nto specify several types by separating them with the `,` character.", "required": false, "schema": { "type": "array", @@ -12926,7 +9081,7 @@ { "name": "statuses", "in": "query", - "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", + "description": "Permits to filter tasks by their status. By default, when `statuses`\nquery parameter is not set, all task statuses are returned. It's\npossible to specify several statuses by separating them with the `,`\ncharacter.", "required": false, "schema": { "type": "array", @@ -12945,7 +9100,7 @@ { "name": "indexUids", "in": "query", - "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", + "description": "Permits to filter tasks by their related index. By default, when\n`indexUids` query parameter is not set, the tasks of all the indexes\nare returned. It is possible to specify several indexes by separating\nthem with the `,` character.", "required": false, "schema": { "type": "array", @@ -12961,7 +9116,7 @@ { "name": "afterEnqueuedAt", "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued after the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -12971,7 +9126,7 @@ { "name": "beforeEnqueuedAt", "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued before the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -12981,7 +9136,7 @@ { "name": "afterStartedAt", "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted after the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -12991,7 +9146,7 @@ { "name": "beforeStartedAt", "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted before the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -13001,7 +9156,7 @@ { "name": "afterFinishedAt", "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished after the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -13011,7 +9166,7 @@ { "name": "beforeFinishedAt", "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished before the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -13076,48 +9231,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Dart", - "source": "await client.getTasks();" - }, - { - "lang": "Go", - "source": "client.GetTasks(nil);" - }, - { - "lang": "JS", - "source": "client.tasks.getTasks()" - }, - { - "lang": "Java", - "source": "client.getTasks();" - }, - { - "lang": "PHP", - "source": "$client->getTasks();" - }, - { - "lang": "Python", - "source": "client.get_tasks()" - }, - { - "lang": "Ruby", - "source": "client.tasks" - }, - { - "lang": "Rust", - "source": "let tasks: TasksResults = client\n .get_tasks()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.getTasks { (result) in\n switch result {\n case .success(let tasks):\n print(tasks)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks'" - } ] }, "delete": { @@ -13131,7 +9244,7 @@ { "name": "uids", "in": "query", - "description": "Permits to filter tasks by their uid. By default, when the `uids` query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", + "description": "Permits to filter tasks by their uid. By default, when the `uids` query\nparameter is not set, all task uids are returned. It's possible to\nspecify several uids by separating them with the `,` character.", "required": false, "schema": { "type": "array", @@ -13169,7 +9282,7 @@ { "name": "canceledBy", "in": "query", - "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", + "description": "Permits to filter tasks using the uid of the task that canceled them.\nIt's possible to specify several task uids by separating them with\nthe `,` character.", "required": false, "schema": { "type": "array", @@ -13186,7 +9299,7 @@ { "name": "types", "in": "query", - "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", + "description": "Permits to filter tasks by their related type. By default, when `types`\nquery parameter is not set, all task types are returned. It's possible\nto specify several types by separating them with the `,` character.", "required": false, "schema": { "type": "array", @@ -13201,7 +9314,7 @@ { "name": "statuses", "in": "query", - "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", + "description": "Permits to filter tasks by their status. By default, when `statuses`\nquery parameter is not set, all task statuses are returned. It's\npossible to specify several statuses by separating them with the `,`\ncharacter.", "required": false, "schema": { "type": "array", @@ -13218,7 +9331,7 @@ { "name": "indexUids", "in": "query", - "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", + "description": "Permits to filter tasks by their related index. By default, when\n`indexUids` query parameter is not set, the tasks of all the indexes\nare returned. It is possible to specify several indexes by separating\nthem with the `,` character.", "required": false, "schema": { "type": "array", @@ -13234,7 +9347,7 @@ { "name": "afterEnqueuedAt", "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued after the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -13244,7 +9357,7 @@ { "name": "beforeEnqueuedAt", "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued before the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -13254,7 +9367,7 @@ { "name": "afterStartedAt", "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted after the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -13264,7 +9377,7 @@ { "name": "beforeStartedAt", "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted before the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -13274,7 +9387,7 @@ { "name": "afterFinishedAt", "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished after the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -13284,7 +9397,7 @@ { "name": "beforeFinishedAt", "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished before the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -13367,52 +9480,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.DeleteTasksAsync(new DeleteTasksQuery { Uids = new List { 1, 2 } });" - }, - { - "lang": "Dart", - "source": "await client.deleteTasks(params: DeleteTasksQuery(uids: [1, 2]));" - }, - { - "lang": "Go", - "source": "client.DeleteTaks(&meilisearch.DeleteTasksQuery{\n UIDS: []int64{1, 2},\n});" - }, - { - "lang": "JS", - "source": "client.tasks.deleteTasks({ uids: [1, 2] })" - }, - { - "lang": "Java", - "source": "DeleteTasksQuery query = new DeleteTasksQuery().setUids(new int[] {1, 2})\nclient.deleteTasks(query);" - }, - { - "lang": "PHP", - "source": "$client->deleteTasks((new DeleteTasksQuery())->setUids([1, 2]));" - }, - { - "lang": "Python", - "source": "client.delete_tasks({'uids': ['1', '2']})" - }, - { - "lang": "Ruby", - "source": "client.delete_tasks(uids: [1, 2])" - }, - { - "lang": "Rust", - "source": "let mut query = tasks::TasksDeleteQuery::new(&client);\nquery.with_uids([1, 2]);\n\nlet res = client.delete_tasks_with(&query).await.unwrap();" - }, - { - "lang": "Swift", - "source": "client.deleteTasks(filter: DeleteTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/tasks?uids=1,2'" - } ] } }, @@ -13428,7 +9495,7 @@ { "name": "uids", "in": "query", - "description": "Permits to filter tasks by their uid. By default, when the `uids` query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", + "description": "Permits to filter tasks by their uid. By default, when the `uids` query\nparameter is not set, all task uids are returned. It's possible to\nspecify several uids by separating them with the `,` character.", "required": false, "schema": { "type": "array", @@ -13466,7 +9533,7 @@ { "name": "canceledBy", "in": "query", - "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", + "description": "Permits to filter tasks using the uid of the task that canceled them.\nIt's possible to specify several task uids by separating them with\nthe `,` character.", "required": false, "schema": { "type": "array", @@ -13483,7 +9550,7 @@ { "name": "types", "in": "query", - "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", + "description": "Permits to filter tasks by their related type. By default, when `types`\nquery parameter is not set, all task types are returned. It's possible\nto specify several types by separating them with the `,` character.", "required": false, "schema": { "type": "array", @@ -13498,7 +9565,7 @@ { "name": "statuses", "in": "query", - "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", + "description": "Permits to filter tasks by their status. By default, when `statuses`\nquery parameter is not set, all task statuses are returned. It's\npossible to specify several statuses by separating them with the `,`\ncharacter.", "required": false, "schema": { "type": "array", @@ -13515,7 +9582,7 @@ { "name": "indexUids", "in": "query", - "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", + "description": "Permits to filter tasks by their related index. By default, when\n`indexUids` query parameter is not set, the tasks of all the indexes\nare returned. It is possible to specify several indexes by separating\nthem with the `,` character.", "required": false, "schema": { "type": "array", @@ -13531,7 +9598,7 @@ { "name": "afterEnqueuedAt", "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued after the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -13541,7 +9608,7 @@ { "name": "beforeEnqueuedAt", "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued before the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -13551,7 +9618,7 @@ { "name": "afterStartedAt", "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted after the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -13561,7 +9628,7 @@ { "name": "beforeStartedAt", "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted before the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -13571,7 +9638,7 @@ { "name": "afterFinishedAt", "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished after the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -13581,7 +9648,7 @@ { "name": "beforeFinishedAt", "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished before the given date. Supports RFC 3339 date format.", "required": false, "schema": { "type": "string" @@ -13664,52 +9731,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.CancelTasksAsync(new CancelTasksQuery { Uids = new List { 1, 2 } });" - }, - { - "lang": "Dart", - "source": "await client.cancelTasks(params: CancelTasksQuery(uids: [1, 2]));" - }, - { - "lang": "Go", - "source": "client.CancelTasks(&meilisearch.CancelTasksQuery{\n UIDS: []int64{1, 2},\n});" - }, - { - "lang": "JS", - "source": "client.tasks.cancelTasks({ uids: [1, 2] })" - }, - { - "lang": "Java", - "source": "CancelTasksQuery query = new CancelTasksQuery().setUids(new int[] {1, 2})\nclient.cancelTasks(query);" - }, - { - "lang": "PHP", - "source": "$client->cancelTasks((new CancelTasksQuery())->setUids([1, 2]));" - }, - { - "lang": "Python", - "source": "client.cancel_tasks({'uids': ['1', '2']})" - }, - { - "lang": "Ruby", - "source": "client.cancel_tasks(uids: [1, 2])" - }, - { - "lang": "Rust", - "source": "let mut query = tasks::TasksCancelQuery::new(&client);\nquery.with_uids([1, 2]);\n\nlet res = client.cancel_task_with(&query).await.unwrap();" - }, - { - "lang": "Swift", - "source": "client.cancelTasks(filter: CancelTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/tasks/cancel?uids=1,2'" - } ] } }, @@ -13799,48 +9820,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Dart", - "source": "await client.getTask(1);" - }, - { - "lang": "Go", - "source": "client.GetTask(1);" - }, - { - "lang": "JS", - "source": "client.tasks.getTask(1)" - }, - { - "lang": "Java", - "source": "client.getTask(1);" - }, - { - "lang": "PHP", - "source": "$client->getTask(1);" - }, - { - "lang": "Python", - "source": "client.get_task(1)" - }, - { - "lang": "Ruby", - "source": "client.task(1)" - }, - { - "lang": "Rust", - "source": "let task: Task = client\n .get_task(1)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.getTask(taskUid: 1) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks/1'" - } ] } }, @@ -13892,52 +9871,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "C#", - "source": "await client.GetVersionAsync();" - }, - { - "lang": "Dart", - "source": "await client.getVersion();" - }, - { - "lang": "Go", - "source": "client.GetVersion()" - }, - { - "lang": "JS", - "source": "client.getVersion()" - }, - { - "lang": "Java", - "source": "client.getVersion();" - }, - { - "lang": "PHP", - "source": "$client->version();" - }, - { - "lang": "Python", - "source": "client.get_version()" - }, - { - "lang": "Ruby", - "source": "client.version" - }, - { - "lang": "Rust", - "source": "let version: Version = client\n .get_version()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.version { (result) in\n switch result {\n case .success(let version):\n print(version)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/version'" - } ] } }, @@ -14003,28 +9936,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.ListWebhooks();" - }, - { - "lang": "JS", - "source": "client.getWebhooks()" - }, - { - "lang": "Python", - "source": "client.get_webhooks()" - }, - { - "lang": "Rust", - "source": "let webhooks = client.get_webhooks().await.unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks'" - } ] }, "post": { @@ -14092,28 +10003,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.AddWebhook(&meilisearch.AddWebhookRequest{\n URL: \"WEBHOOK_TARGET_URL\",\n Headers: map[string]string{\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n },\n});" - }, - { - "lang": "JS", - "source": "client.createWebhook({\n url: 'WEBHOOK_TARGET_URL',\n headers: {\n authorization: 'SECURITY_KEY',\n referer: 'https://example.com'\n }\n})" - }, - { - "lang": "Python", - "source": "client.create_webhook({\n 'url': 'https://example.com/webhook',\n 'headers': {\"Authorization\":\"\", \"X-Custom-Header\":\"test\"},\n})" - }, - { - "lang": "Rust", - "source": "let mut payload = meilisearch_sdk::webhooks::WebhookCreate::new(\"WEBHOOK_TARGET_URL\");\npayload\n .insert_header(\"authorization\", \"SECURITY_KEY\")\n .insert_header(\"referer\", \"https://example.com\");\nlet webhook = client.create_webhook(&payload).await.unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/webhooks' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"WEBHOOK_TARGET_URL\",\n \"headers\": {\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n }\n }'" - } ] } }, @@ -14186,28 +10075,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.GetWebhook(\"WEBHOOK_UUID\");" - }, - { - "lang": "JS", - "source": "client.getWebhook(WEBHOOK_UUID)" - }, - { - "lang": "Python", - "source": "client.get_webhook('WEBHOOK_UID')" - }, - { - "lang": "Rust", - "source": "let webhook = client.get_webhook(\"WEBHOOK_UUID\").await.unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID'" - } ] }, "delete": { @@ -14262,28 +10129,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.DeleteWebhook(\"WEBHOOK_UUID\");" - }, - { - "lang": "JS", - "source": "client.deleteWebhook(WEBHOOK_UUID)" - }, - { - "lang": "Python", - "source": "client.delete_webhook('WEBHOOK_UID')" - }, - { - "lang": "Rust", - "source": "client.delete_webhook(\"WEBHOOK_UUID\").await.unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID'" - } ] }, "patch": { @@ -14363,28 +10208,6 @@ "*" ] } - ], - "x-codeSamples": [ - { - "lang": "Go", - "source": "client.UpdateWebhook(\"WEBHOOK_UUID\", &meilisearch.UpdateWebhookRequest{\n Header: map[string]string{\n \"referer\": \"\"\n },\n});" - }, - { - "lang": "JS", - "source": "client.updateWebhook(WEBHOOK_UUID, {\n headers: {\n referer: null\n }\n})" - }, - { - "lang": "Python", - "source": "client.update_webhook('WEBHOOK_UID', {\n 'url': 'https://example.com/new-webhook',\n 'headers': {\"Authorization\":\"\", \"X-Custom-Header\":\"test\"},\n})" - }, - { - "lang": "Rust", - "source": "let mut update = meilisearch_sdk::webhooks::WebhookUpdate::new();\nupdate.remove_header(\"referer\");\nlet webhook = client\n .update_webhook(\"WEBHOOK_UUID\", &update)\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"header\": {\n \"referer\": null\n }\n }'" - } ] } } @@ -14444,11 +10267,13 @@ "webhooks.delete", "webhooks.create", "webhooks.*", - "indexes.compact" + "indexes.compact", + "fields.post" ] }, "AllBatches": { "type": "object", + "description": "Response containing a paginated list of batches", "required": [ "results", "total", @@ -14459,16 +10284,19 @@ "type": "array", "items": { "$ref": "#/components/schemas/BatchView" - } + }, + "description": "Array of batch objects" }, "total": { "type": "integer", "format": "u-int64", + "description": "Total number of batches", "minimum": 0 }, "limit": { "type": "integer", "format": "u-int32", + "description": "Maximum number of batches returned", "minimum": 0 }, "from": { @@ -14477,6 +10305,7 @@ "null" ], "format": "u-int32", + "description": "The first batch uid returned", "minimum": 0 }, "next": { @@ -14485,12 +10314,14 @@ "null" ], "format": "u-int32", + "description": "Value to send in from to fetch the next slice of results", "minimum": 0 } } }, "AllTasks": { "type": "object", + "description": "Response containing a paginated list of tasks", "required": [ "results", "total", @@ -14502,18 +10333,18 @@ "items": { "$ref": "#/components/schemas/TaskView" }, - "description": "The list of tasks that matched the filter." + "description": "Array of task objects matching the query" }, "total": { "type": "integer", "format": "u-int64", - "description": "Total number of browsable results using offset/limit parameters for the given resource.", + "description": "Total number of tasks matching the query", "minimum": 0 }, "limit": { "type": "integer", "format": "u-int32", - "description": "Limit given for the query. If limit is not provided as a query parameter, this parameter displays the default limit value.", + "description": "Maximum number of tasks returned", "minimum": 0 }, "from": { @@ -14522,7 +10353,7 @@ "null" ], "format": "u-int32", - "description": "The first task uid returned.", + "description": "The first task uid returned", "minimum": 0 }, "next": { @@ -14531,13 +10362,14 @@ "null" ], "format": "u-int32", - "description": "Represents the value to send in from to fetch the next slice of the results. The first item for the next slice starts at this exact number. When the returned value is null, it means that all the data have been browsed in the given order.", + "description": "Value to send in from to fetch the next slice of results. Null when all data has been browsed", "minimum": 0 } } }, "AttributePatterns": { "type": "object", + "description": "A collection of patterns used to match attribute names. Patterns can\ninclude wildcards (`*`) for flexible matching. For example, `title`\nmatches exactly, `overview_*` matches any attribute starting with\n`overview_`, and `*_date` matches any attribute ending with `_date`.", "required": [ "patterns" ], @@ -14547,6 +10379,7 @@ "items": { "type": "string" }, + "description": "An array of attribute name patterns. Each pattern can be an exact\nattribute name, or include wildcards (`*`) at the start, end, or\nboth. Examples: `[\"title\", \"description_*\", \"*_date\", \"*content*\"]`.", "example": [ "title", "overview_*", @@ -14555,44 +10388,9 @@ } } }, - "BTreeMap": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "object", - "required": [ - "start", - "length" - ], - "properties": { - "start": { - "type": "integer", - "minimum": 0 - }, - "length": { - "type": "integer", - "minimum": 0 - }, - "indices": { - "type": [ - "array", - "null" - ], - "items": { - "type": "integer", - "minimum": 0 - } - } - } - } - }, - "propertyNames": { - "type": "string" - } - }, "BatchStats": { "type": "object", + "description": "Statistics for a batch of tasks", "required": [ "totalNbTasks", "status", @@ -14601,10 +10399,12 @@ ], "properties": { "totalNbTasks": { - "$ref": "#/components/schemas/u32" + "$ref": "#/components/schemas/u32", + "description": "Total number of tasks in the batch" }, "status": { "type": "object", + "description": "Count of tasks by status", "additionalProperties": { "type": "integer", "format": "u-int32", @@ -14625,6 +10425,7 @@ }, "types": { "type": "object", + "description": "Count of tasks by type", "additionalProperties": { "type": "integer", "format": "u-int32", @@ -14656,6 +10457,7 @@ }, "indexUids": { "type": "object", + "description": "Count of tasks by index UID", "additionalProperties": { "type": "integer", "format": "u-int32", @@ -14667,6 +10469,7 @@ }, "progressTrace": { "type": "object", + "description": "Detailed progress trace information", "additionalProperties": {}, "propertyNames": { "type": "string" @@ -14677,6 +10480,7 @@ "object", "null" ], + "description": "Write channel congestion metrics", "additionalProperties": {}, "propertyNames": { "type": "string" @@ -14684,6 +10488,7 @@ }, "internalDatabaseSizes": { "type": "object", + "description": "Internal database size information", "additionalProperties": {}, "propertyNames": { "type": "string" @@ -14694,20 +10499,24 @@ "BatchStatsView": { "allOf": [ { - "$ref": "#/components/schemas/BatchStats" + "$ref": "#/components/schemas/BatchStats", + "description": "Core batch statistics including the total number of tasks, counts by\nstatus (succeeded, failed, canceled), task types included, and which\nindexes were affected by this batch." }, { "type": "object", "properties": { "embedderRequests": { - "$ref": "#/components/schemas/EmbedderStatsView" + "$ref": "#/components/schemas/EmbedderStatsView", + "description": "Statistics about AI embedder API requests made during batch processing.\nIncludes total requests, successful/failed counts, and response times.\nOnly present when the batch involved vector embedding operations." } } } - ] + ], + "description": "Provides comprehensive statistics about a batch's execution.\n\nIncludes task counts, status breakdowns, and AI embedder usage. This\ninformation is useful for monitoring system performance and understanding\nbatch composition." }, "BatchView": { "type": "object", + "description": "Represents a batch of tasks that were processed together.\n\nMeilisearch groups compatible tasks into batches for efficient processing.\nFor example, multiple document additions to the same index may be batched\ntogether. Use this view to monitor batch progress and performance.", "required": [ "uid", "details", @@ -14715,7 +10524,8 @@ ], "properties": { "uid": { - "$ref": "#/components/schemas/u32" + "$ref": "#/components/schemas/u32", + "description": "The unique sequential identifier assigned to this batch. Batch UIDs\nare assigned in order of creation and can be used to retrieve specific\nbatch information or correlate tasks that were processed together." }, "progress": { "oneOf": [ @@ -14723,40 +10533,48 @@ "type": "null" }, { - "$ref": "#/components/schemas/ProgressView" + "$ref": "#/components/schemas/ProgressView", + "description": "Real-time progress information for the batch if it's currently being\nprocessed. Contains details about which step is executing and the\npercentage of completion. This is `null` for completed batches." } ] }, "details": { - "$ref": "#/components/schemas/DetailsView" + "type": "object", + "description": "Aggregated details from all tasks in this batch. For example, if the\nbatch contains multiple document addition tasks, this will show the\ntotal number of documents received and indexed across all tasks." }, "stats": { - "$ref": "#/components/schemas/BatchStatsView" + "$ref": "#/components/schemas/BatchStatsView", + "description": "Statistical information about the batch, including the number of tasks\nby status, the types of tasks included, and the indexes affected.\nUseful for understanding the composition and outcome of the batch." }, "duration": { "type": [ "string", "null" - ] + ], + "description": "The total time spent processing this batch, formatted as an ISO-8601\nduration (e.g., `PT2.5S` for 2.5 seconds). This is `null` for batches\nthat haven't finished processing yet." }, "startedAt": { "type": "string", - "format": "date-time" + "format": "date-time", + "description": "The timestamp when Meilisearch began processing this batch, formatted\nas an RFC 3339 date-time string. All batches have a start time as it's\nset when processing begins." }, "finishedAt": { "type": [ "string", "null" ], - "format": "date-time" + "format": "date-time", + "description": "The timestamp when this batch finished processing, formatted as an\nRFC 3339 date-time string. This is `null` for batches that are still\nbeing processed." }, "batchStrategy": { - "type": "string" + "type": "string", + "description": "Explains why the batch was finalized and stopped accepting more tasks.\nCommon reasons include reaching the maximum batch size, encountering\nincompatible tasks, or processing being explicitly triggered." } } }, "BrowseQuery": { "type": "object", + "description": "Request body for browsing and retrieving documents from an index. Use\nthis to fetch documents with optional filtering, sorting, and pagination.\nThis is useful for displaying document lists, exporting data, or\ninspecting index contents.", "required": [ "offset", "limit", @@ -14765,11 +10583,13 @@ "properties": { "offset": { "type": "integer", + "description": "Number of documents to skip in the response. Use together with `limit`\nfor pagination through large document sets. For example, to get\ndocuments 151-170, set `offset=150` and `limit=20`. Defaults to `0`.", "example": 150, "minimum": 0 }, "limit": { "type": "integer", + "description": "Maximum number of documents to return in a single response. Use\ntogether with `offset` for pagination. Higher values return more\nresults but may increase response time and memory usage. Defaults to\n`20`.", "default": 20, "example": 1, "minimum": 0 @@ -14782,12 +10602,14 @@ "items": { "type": "string" }, + "description": "Array of document attributes to include in the response. If not\nspecified, all attributes listed in the `displayedAttributes` setting\nare returned. Use this to reduce response size by only requesting the\nfields you need. Example: `[\"title\", \"description\", \"price\"]`.", "example": [ "title, description" ] }, "retrieveVectors": { "type": "boolean", + "description": "When `true`, includes the vector embeddings in the response for\ndocuments that have them. This is useful when you need to inspect or\nexport vector data. Note that this can significantly increase response\nsize. Defaults to `false`.", "example": true }, "ids": { @@ -14798,6 +10620,7 @@ "items": { "type": "string" }, + "description": "Array of specific document IDs to retrieve. Only documents with\nmatching primary key values will be returned. If not specified, all\ndocuments matching other criteria are returned. This is useful for\nfetching specific known documents.", "example": [ "cody", "finn", @@ -14805,7 +10628,9 @@ "gambit" ] }, - "filter": {}, + "filter": { + "description": "Filter expression to select which documents to return. Uses the same\nsyntax as search filters. Only documents matching the filter will be\nincluded in the response. Example: `\"genres = action AND rating > 4\"`\nor as an array `[[\"genres = action\"], \"rating > 4\"]`." + }, "sort": { "type": [ "array", @@ -14814,6 +10639,7 @@ "items": { "type": "string" }, + "description": "Array of attributes to sort the documents by. Each entry should be in\nthe format `attribute:direction` where direction is either `asc`\n(ascending) or `desc` (descending). Example: `[\"price:asc\",\n\"rating:desc\"]` sorts by price ascending, then by rating descending.", "example": [ "title:asc", "rating:desc" @@ -14823,6 +10649,7 @@ }, "ChatSearchParams": { "type": "object", + "description": "Search parameters that control how the LLM queries this index.\n\nThese settings are applied automatically when the chat system\nperforms searches.", "properties": { "hybrid": { "oneOf": [ @@ -14830,7 +10657,8 @@ "type": "null" }, { - "$ref": "#/components/schemas/HybridQuery" + "$ref": "#/components/schemas/HybridQuery", + "description": "Configuration for hybrid search combining keyword and semantic search.\nSet the `semanticRatio` to balance between keyword matching (0.0) and\nsemantic similarity (1.0). Requires an embedder to be configured." } ] }, @@ -14839,6 +10667,7 @@ "integer", "null" ], + "description": "Maximum number of documents to return when the LLM queries this index.\nHigher values provide more context to the LLM but may increase\nresponse time and token usage.", "minimum": 0 }, "sort": { @@ -14848,13 +10677,15 @@ ], "items": { "type": "string" - } + }, + "description": "Sort criteria for ordering search results before presenting to the LLM.\nEach entry should be in the format `attribute:asc` or `attribute:desc`.\nExample: `[\"price:asc\", \"rating:desc\"]`." }, "distinct": { "type": [ "string", "null" - ] + ], + "description": "The attribute used for deduplicating results. When set, only one\ndocument per unique value of this attribute is returned. Useful for\navoiding duplicate content in LLM responses." }, "matchingStrategy": { "oneOf": [ @@ -14862,7 +10693,8 @@ "type": "null" }, { - "$ref": "#/components/schemas/MatchingStrategy" + "$ref": "#/components/schemas/MatchingStrategy", + "description": "Strategy for matching query terms. `last` (default) matches all words\nand returns documents matching at least the last word. `all` requires\nall words to match. `frequency` prioritizes less frequent words." } ] }, @@ -14873,7 +10705,8 @@ ], "items": { "type": "string" - } + }, + "description": "Restricts the search to only the specified attributes. If not set, all\nsearchable attributes are searched.\nExample: `[\"title\", \"description\"]` searches only these two fields." }, "rankingScoreThreshold": { "oneOf": [ @@ -14881,7 +10714,8 @@ "type": "null" }, { - "$ref": "#/components/schemas/RankingScoreThreshold" + "$ref": "#/components/schemas/RankingScoreThreshold", + "description": "Minimum ranking score (0.0 to 1.0) that documents must achieve to be\nincluded in results. Documents below this threshold are excluded.\nUseful for filtering out low-relevance results." } ] } @@ -14890,12 +10724,14 @@ }, "ChatSettings": { "type": "object", + "description": "Configuration settings for AI-powered chat and search functionality.\n\nThese settings control how documents are presented to the LLM and what\nsearch parameters are used when the LLM queries the index.", "properties": { "description": { "type": [ "string", "null" - ] + ], + "description": "A description of this index that helps the LLM understand its contents\nand purpose. This description is provided to the LLM to help it decide\nwhen and how to query this index.\nExample: \"Contains product catalog with prices and descriptions\"." }, "documentTemplate": { "type": [ @@ -14909,7 +10745,7 @@ "integer", "null" ], - "description": "Rendered texts are truncated to this size. Defaults to 400.", + "description": "Maximum size in bytes for the rendered document text. Texts longer than\nthis limit are truncated. This prevents very large documents from\nconsuming too much context in the LLM conversation.\nDefaults to `400` bytes.", "minimum": 0 }, "searchParameters": { @@ -14919,7 +10755,7 @@ }, { "$ref": "#/components/schemas/ChatSearchParams", - "description": "The search parameters to use for the LLM." + "description": "Default search parameters used when the LLM queries this index.\nThese settings control how search results are retrieved and ranked.\nIf not specified, standard search defaults are used." } ] } @@ -14998,6 +10834,7 @@ "invalid_multi_search_facets_by_index", "invalid_multi_search_facet_order", "invalid_multi_search_query_personalization", + "invalid_multi_search_query_show_performance_details", "invalid_multi_search_federated", "invalid_multi_search_federation_options", "invalid_multi_search_max_values_per_facet", @@ -15052,7 +10889,10 @@ "invalid_search_show_ranking_score", "invalid_similar_show_ranking_score", "invalid_search_show_ranking_score_details", + "invalid_search_show_performance_details", + "invalid_search_use_network", "invalid_similar_show_ranking_score_details", + "invalid_similar_show_performance_details", "invalid_search_sort", "invalid_search_distinct", "invalid_search_personalize", @@ -15172,6 +11012,14 @@ "invalid_chat_completion_search_filter_param_prompt", "invalid_chat_completion_search_index_uid_param_prompt", "invalid_chat_completion_pre_query_prompt", + "invalid_index_fields_filter", + "invalid_index_fields_filter_attribute_patterns", + "invalid_index_fields_filter_displayed", + "invalid_index_fields_filter_searchable", + "invalid_index_fields_filter_sortable", + "invalid_index_fields_filter_distinct", + "invalid_index_fields_filter_ranking_rule", + "invalid_index_fields_filter_filterable", "requires_enterprise_edition", "invalid_webhooks", "invalid_webhook_url", @@ -15185,6 +11033,7 @@ }, "ComputedFacets": { "type": "object", + "description": "Computed facet data from a search", "required": [ "distribution", "stats" @@ -15192,6 +11041,7 @@ "properties": { "distribution": { "type": "object", + "description": "Count of documents for each facet value", "additionalProperties": { "type": "object", "additionalProperties": { @@ -15209,6 +11059,7 @@ }, "stats": { "type": "object", + "description": "Numeric statistics for each facet", "additionalProperties": { "$ref": "#/components/schemas/FacetStats" }, @@ -15254,7 +11105,7 @@ "items": { "$ref": "#/components/schemas/Action" }, - "description": "A list of actions permitted for the key. `[\"*\"]` for all actions. The `*` character can be used as a wildcard when located at the last position. e.g. `documents.*` to authorize access on all documents endpoints.", + "description": "A list of actions permitted for the key. `[\"*\"]` for all actions. The\n`*` character can be used as a wildcard when located at the last\nposition. e.g. `documents.*` to authorize access on all documents\nendpoints.", "example": [ "documents.add" ] @@ -15264,7 +11115,7 @@ "items": { "type": "string" }, - "description": "A list of accessible indexes permitted for the key. `[\"*\"]` for all indexes. The `*` character can be used as a wildcard when located at the last position. e.g. `products_*` to allow access to all indexes whose names start with `products_`.", + "description": "A list of accessible indexes permitted for the key. `[\"*\"]` for all\nindexes. The `*` character can be used as a wildcard when located at\nthe last position. e.g. `products_*` to allow access to all indexes\nwhose names start with `products_`.", "example": [ "products" ] @@ -15275,7 +11126,7 @@ "null" ], "format": "date-time", - "description": "Represent the expiration date and time as RFC 3339 format. `null` equals to no expiration time." + "description": "Represent the expiration date and time as RFC 3339 format. `null`\nequals to no expiration time." } } }, @@ -15362,7 +11213,7 @@ }, { "$ref": "#/components/schemas/Settings_Unchecked", - "description": "[Learn more about the settings in this guide](https://www.meilisearch.com/docs/reference/api/settings)." + "description": "The complete settings object that was applied by a `settingsUpdate`\ntask. Only the settings that were modified are included in this\nobject." } ] }, @@ -15375,7 +11226,7 @@ "null" ], "format": "u-int64", - "description": "Number of documents received for documentAdditionOrUpdate task.", + "description": "The number of documents that were sent in the request payload for a\n`documentAdditionOrUpdate` task. This count is determined before any\nprocessing occurs.", "minimum": 0 }, "indexedDocuments": { @@ -15384,7 +11235,7 @@ "null" ], "format": "u-int64", - "description": "Number of documents finally indexed for documentAdditionOrUpdate task or a documentAdditionOrUpdate batch of tasks.", + "description": "The number of documents that were successfully indexed after\nprocessing a `documentAdditionOrUpdate` task. This may differ from\n`receivedDocuments` if some documents were invalid or duplicates.\nThe inner `null` indicates the task is still processing.", "minimum": 0 }, "editedDocuments": { @@ -15393,7 +11244,7 @@ "null" ], "format": "u-int64", - "description": "Number of documents edited for editDocumentByFunction task.", + "description": "The number of documents that were modified by an `documentEdition`\ntask using a RHAI function. The inner `null` indicates the task is\nstill processing.", "minimum": 0 }, "primaryKey": { @@ -15401,14 +11252,14 @@ "string", "null" ], - "description": "Value for the primaryKey field encountered if any for indexCreation or indexUpdate task." + "description": "The primary key attribute set for the index. For `indexCreation`\ntasks, this is the primary key that was specified. For `indexUpdate`\ntasks, this shows the new primary key if it was changed. The inner\n`null` means no primary key was specified and Meilisearch will infer\nit from documents." }, "providedIds": { "type": [ "integer", "null" ], - "description": "Number of provided document ids for the documentDeletion task.", + "description": "The number of document IDs that were provided in a `documentDeletion`\nrequest. This is the count before processing - the actual number\ndeleted may be lower if some IDs didn't exist.", "minimum": 0 }, "deletedDocuments": { @@ -15417,7 +11268,7 @@ "null" ], "format": "u-int64", - "description": "Number of documents finally deleted for documentDeletion and indexDeletion tasks.", + "description": "The number of documents that were actually removed from the index for\n`documentDeletion`, `documentDeletionByFilter`, or `indexDeletion`\ntasks. The inner `null` indicates the task is still processing.", "minimum": 0 }, "matchedTasks": { @@ -15426,7 +11277,7 @@ "null" ], "format": "u-int64", - "description": "Number of tasks that match the request for taskCancelation or taskDeletion tasks.", + "description": "The number of tasks that matched the filter criteria for a\n`taskCancelation` or `taskDeletion` request. This is determined when\nthe request is received, before any cancellation or deletion occurs.", "minimum": 0 }, "canceledTasks": { @@ -15435,7 +11286,7 @@ "null" ], "format": "u-int64", - "description": "Number of tasks canceled for taskCancelation.", + "description": "The number of tasks that were successfully canceled by a\n`taskCancelation` task. This may be less than `matchedTasks` if some\ntasks completed before they could be canceled. The inner `null`\nindicates the task is still processing.", "minimum": 0 }, "deletedTasks": { @@ -15444,7 +11295,7 @@ "null" ], "format": "u-int64", - "description": "Number of tasks deleted for taskDeletion.", + "description": "The number of tasks that were successfully deleted by a `taskDeletion`\ntask. The inner `null` indicates the task is still processing.", "minimum": 0 }, "originalFilter": { @@ -15452,26 +11303,28 @@ "string", "null" ], - "description": "Original filter query for taskCancelation or taskDeletion tasks." + "description": "The original filter query string that was used to select tasks for a\n`taskCancelation` or `taskDeletion` operation. Useful for\nunderstanding which tasks were targeted." }, "dumpUid": { "type": [ "string", "null" ], - "description": "Identifier generated for the dump for dumpCreation task." + "description": "The unique identifier assigned to the dump file created by a\n`dumpCreation` task. Use this UID to locate the dump file in the\ndumps directory. The inner `null` indicates the task is still\nprocessing or failed before generating a UID." }, "context": { "type": [ "object", "null" - ] + ], + "description": "The context object that was provided to the RHAI function for a\n`documentEdition` task. This object contains data that the function\ncan access during document processing." }, "function": { "type": [ "string", "null" - ] + ], + "description": "The RHAI function code that was executed for a `documentEdition`\ntask. This function is applied to each document matching the filter." }, "swaps": { "type": [ @@ -15480,43 +11333,50 @@ ], "items": { "$ref": "#/components/schemas/IndexSwap" - } + }, + "description": "The list of index swap operations that were performed by an\n`indexSwap` task. Each swap specifies two indexes that exchanged\ntheir contents." }, "upgradeFrom": { "type": [ "string", "null" - ] + ], + "description": "The Meilisearch version before a database upgrade was performed.\nFormatted as `vX.Y.Z`." }, "upgradeTo": { "type": [ "string", "null" - ] + ], + "description": "The Meilisearch version after a database upgrade was completed.\nFormatted as `vX.Y.Z`." }, "url": { "type": [ "string", "null" - ] + ], + "description": "The destination URL where data is being exported for an `export`\ntask. This is the endpoint that receives the exported index data." }, "apiKey": { "type": [ "string", "null" - ] + ], + "description": "The API key used for authentication when exporting data to a remote\nMeilisearch instance. This value is partially masked for security." }, "payloadSize": { "type": [ "string", "null" - ] + ], + "description": "The maximum payload size configured for an `export` task, formatted\nas a human-readable string (e.g., `100 MB`). This limits the size of\neach batch of documents sent during export." }, "indexes": { "type": [ "object", "null" ], + "description": "A map of index patterns to their export settings for an `export`\ntask. The keys are index patterns (which may include wildcards) and\nthe values contain the specific export configuration for matching\nindexes.", "additionalProperties": { "$ref": "#/components/schemas/DetailsExportIndexSettings" }, @@ -15528,25 +11388,29 @@ "type": [ "string", "null" - ] + ], + "description": "The original unique identifier of the index before an `indexRename`\noperation. This is the name the index had before it was renamed." }, "newIndexUid": { "type": [ "string", "null" - ] + ], + "description": "The new unique identifier assigned to the index after an `indexRename`\noperation. This is the name the index has after being renamed." }, "preCompactionSize": { "type": [ "string", "null" - ] + ], + "description": "The size of the index before an `indexCompaction` task was performed,\nformatted as a human-readable string (e.g., `1.5 GB`). Compare with\n`postCompactionSize` to see how much space was reclaimed." }, "postCompactionSize": { "type": [ "string", "null" - ] + ], + "description": "The size of the index after an `indexCompaction` task completed,\nformatted as a human-readable string (e.g., `1.2 GB`). This should\nbe smaller than or equal to `preCompactionSize`." }, "movedDocuments": { "type": [ @@ -15554,17 +11418,20 @@ "null" ], "format": "u-int64", + "description": "The number of documents that were redistributed during a\n`networkTopologyChange` task in a distributed deployment. This\noccurs when the cluster configuration changes.", "minimum": 0 }, "message": { "type": [ "string", "null" - ] + ], + "description": "A human-readable message providing additional information about the\ntask, such as status updates or explanatory text about what occurred\nduring processing." } } } - ] + ], + "description": "Contains type-specific details about a task's execution.\n\nThe fields present depend on the task type. For example, document addition\ntasks will have `receivedDocuments` and `indexedDocuments`, while settings\nupdate tasks will have the applied settings." }, "DistributionShift": { "type": "object", @@ -15588,28 +11455,32 @@ }, "DocumentDeletionByFilter": { "type": "object", + "description": "Request body for deleting documents by filter", "required": [ "filter" ], "properties": { - "filter": {} + "filter": { + "description": "Filter expression to match documents for deletion" + } } }, "DocumentEditionByFunction": { "type": "object", + "description": "Request body for editing documents using a JavaScript function", "required": [ "function" ], "properties": { "filter": { - "description": "A string containing a RHAI function." + "description": "Filter expression to select which documents to edit" }, "context": { - "description": "A string containing a filter expression." + "description": "Data to make available for the editing function" }, "function": { "type": "string", - "description": "An object with data Meilisearch should make available for the editing function." + "description": "RHAI function to apply to each document" } } }, @@ -15626,6 +11497,7 @@ }, "EmbedderStatsView": { "type": "object", + "description": "Statistics for embedder requests", "required": [ "total", "failed" @@ -15633,17 +11505,20 @@ "properties": { "total": { "type": "integer", + "description": "Total number of embedder requests", "minimum": 0 }, "failed": { "type": "integer", + "description": "Number of failed embedder requests", "minimum": 0 }, "lastError": { "type": [ "string", "null" - ] + ], + "description": "Last error message from the embedder" } } }, @@ -15658,12 +11533,14 @@ }, "Export": { "type": "object", + "description": "Request body for exporting data to a remote Meilisearch instance", "properties": { "url": { "type": [ "string", "null" ], + "description": "URL of the destination Meilisearch instance", "example": "https://ms-1234.heaven.meilisearch.com" }, "apiKey": { @@ -15671,6 +11548,7 @@ "string", "null" ], + "description": "API key for authenticating with the destination instance", "example": "1234abcd" }, "payloadSize": { @@ -15678,6 +11556,7 @@ "string", "null" ], + "description": "Maximum payload size per request", "example": "24MiB" }, "indexes": { @@ -15685,6 +11564,7 @@ "object", "null" ], + "description": "Index patterns to export with their settings", "additionalProperties": { "$ref": "#/components/schemas/ExportIndexSettings" }, @@ -15701,12 +11581,14 @@ }, "ExportIndexSettings": { "type": "object", + "description": "Export settings for a specific index", "properties": { "filter": { "type": [ "string", "null" ], + "description": "Filter expression to select which documents to export", "example": "genres = action" }, "overrideSettings": { @@ -15714,12 +11596,14 @@ "boolean", "null" ], + "description": "Whether to override settings on the destination index", "example": true } } }, "FacetSearchQuery": { "type": "object", + "description": "Request body for searching facet values", "required": [ "facet_name", "matching_strategy" @@ -15729,16 +11613,19 @@ "type": [ "string", "null" - ] + ], + "description": "Query string to search for facet values" }, "facet_name": { - "type": "string" + "type": "string", + "description": "Name of the facet to search" }, "q": { "type": [ "string", "null" - ] + ], + "description": "Query string to filter documents before facet search" }, "vector": { "type": [ @@ -15748,22 +11635,29 @@ "items": { "type": "number", "format": "float" - } + }, + "description": "Custom query vector for semantic search" + }, + "media": { + "description": "Multimodal content for AI-powered search" }, - "media": {}, "hybrid": { "oneOf": [ { "type": "null" }, { - "$ref": "#/components/schemas/HybridQuery" + "$ref": "#/components/schemas/HybridQuery", + "description": "Hybrid search configuration that combines keyword search with semantic\n(vector) search. Set `semanticRatio` to balance between keyword\nmatching (0.0) and semantic similarity (1.0). Requires an embedder to\nbe configured in the index settings." } ] }, - "filter": {}, + "filter": { + "description": "Filter expression to apply before facet search" + }, "matching_strategy": { - "$ref": "#/components/schemas/MatchingStrategy" + "$ref": "#/components/schemas/MatchingStrategy", + "description": "Strategy used to match query terms" }, "attributes_to_search_on": { "type": [ @@ -15772,17 +11666,16 @@ ], "items": { "type": "string" - } + }, + "description": "Restrict search to specified attributes" }, "ranking_score_threshold": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/RankingScoreThreshold" - } - ] + "type": [ + "number", + "null" + ], + "format": "double", + "description": "Minimum ranking score threshold (0.0 to 1.0) that documents must\nachieve to be considered when computing facet counts. Documents with\nscores below this threshold are excluded from facet value counts." }, "locales": { "type": [ @@ -15791,18 +11684,21 @@ ], "items": { "$ref": "#/components/schemas/Locale" - } + }, + "description": "Languages to use for query processing" }, "exhaustive_facet_count": { "type": [ "boolean", "null" - ] + ], + "description": "Return exhaustive facet count instead of an estimate" } } }, "FacetStats": { "type": "object", + "description": "The numeric min and max values for a facet", "required": [ "min", "max" @@ -15810,11 +11706,13 @@ "properties": { "min": { "type": "number", - "format": "double" + "format": "double", + "description": "Minimum value of the numeric facet" }, "max": { "type": "number", - "format": "double" + "format": "double", + "description": "Maximum value of the numeric facet" } } }, @@ -15827,12 +11725,14 @@ }, "FacetingSettings": { "type": "object", + "description": "Faceting configuration settings", "properties": { "maxValuesPerFacet": { "type": [ "integer", "null" ], + "description": "Maximum number of facet values returned for each facet", "example": 10, "minimum": 0 }, @@ -15841,6 +11741,7 @@ "object", "null" ], + "description": "How facet values should be sorted (by count or alphabetically)", "additionalProperties": { "$ref": "#/components/schemas/FacetValuesSort" }, @@ -15865,6 +11766,7 @@ }, "FederatedSearch": { "type": "object", + "description": "Request body for federated multi-search across multiple indexes. This\nallows you to execute multiple search queries in a single request and\noptionally combine their results into a unified response. Use this for\ncross-index search scenarios or to reduce network round-trips.", "required": [ "queries" ], @@ -15873,7 +11775,8 @@ "type": "array", "items": { "$ref": "#/components/schemas/SearchQueryWithIndex" - } + }, + "description": "An array of search queries to execute. Each query can target a\ndifferent index and have its own parameters. When `federation` is\n`null`, results are returned separately for each query. When\n`federation` is set, results are merged." }, "federation": { "oneOf": [ @@ -15881,7 +11784,8 @@ "type": "null" }, { - "$ref": "#/components/schemas/Federation" + "$ref": "#/components/schemas/Federation", + "description": "Configuration for combining results from multiple queries into a\nsingle response. When set, results are merged and ranked together.\nWhen `null`, each query's results are returned separately in an\narray." } ] } @@ -15890,7 +11794,8 @@ "FederatedSearchResult": { "allOf": [ { - "$ref": "#/components/schemas/HitsInfo" + "$ref": "#/components/schemas/HitsInfo", + "description": "Pagination information" }, { "type": "object", @@ -15903,11 +11808,8 @@ "type": "array", "items": { "$ref": "#/components/schemas/SearchHit" - } - }, - "processingTimeMs": { - "type": "integer", - "minimum": 0 + }, + "description": "Combined search results from all queries" }, "queryVectors": { "type": [ @@ -15922,12 +11824,9 @@ "minimum": 0 } }, - "semanticHitCount": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", + "processingTimeMs": { + "type": "integer", + "description": "Total processing time in milliseconds", "minimum": 0 }, "facetDistribution": { @@ -15955,6 +11854,7 @@ "object", "null" ], + "description": "Merged facet statistics across all indexes", "additionalProperties": { "$ref": "#/components/schemas/FacetStats" }, @@ -15963,14 +11863,16 @@ } }, "facetsByIndex": { - "$ref": "#/components/schemas/FederatedFacets" + "$ref": "#/components/schemas/FederatedFacets", + "description": "Facets grouped by index" }, "requestUid": { "type": [ "string", "null" ], - "format": "uuid" + "format": "uuid", + "description": "Unique identifier for the request" }, "metadata": { "type": [ @@ -15979,42 +11881,73 @@ ], "items": { "$ref": "#/components/schemas/SearchMetadata" - } + }, + "description": "Metadata for each query" }, "remoteErrors": { "type": [ "object", "null" ], + "description": "Errors from remote servers", "additionalProperties": { "$ref": "#/components/schemas/ResponseError" }, "propertyNames": { "type": "string" } - } + }, + "semanticHitCount": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "minimum": 0 + }, + "performanceDetails": {} } } - ] + ], + "description": "Response from a federated multi-search query" }, "Federation": { "type": "object", + "description": "Configuration for federated multi-search", "required": [ "limit", "offset", - "facetsByIndex" + "facetsByIndex", + "showPerformanceDetails" ], "properties": { "limit": { "type": "integer", + "description": "Maximum number of results to return across all queries", "minimum": 0 }, "offset": { "type": "integer", + "description": "Number of results to skip", + "minimum": 0 + }, + "page": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "hitsPerPage": { + "type": [ + "integer", + "null" + ], "minimum": 0 }, "facetsByIndex": { "type": "object", + "description": "Facets to retrieve per index", "additionalProperties": { "type": [ "array", @@ -16036,72 +11969,93 @@ "type": "null" }, { - "$ref": "#/components/schemas/MergeFacets" + "$ref": "#/components/schemas/MergeFacets", + "description": "Options for merging facets from multiple indexes" } ] + }, + "showPerformanceDetails": { + "type": "boolean", + "description": "Whether to include performance details in the response" } } }, "FederationOptions": { "type": "object", + "description": "Options for federated multi-search queries", "required": [ "weight" ], "properties": { "weight": { "type": "number", - "format": "double" + "format": "double", + "description": "Weight to apply to results from this query (default: 1.0)" }, "remote": { "type": [ "string", "null" - ] + ], + "description": "Remote server to send this query to" }, "queryPosition": { "type": [ "integer", "null" ], + "description": "Position of this query in the list of queries", "minimum": 0 } } }, "FilterFeatures": { "type": "object", + "description": "Controls which filter operators are allowed for an attribute. This\nprovides fine-grained control over filtering capabilities.", "properties": { "equality": { - "type": "boolean" + "type": "boolean", + "description": "When `true`, enables equality operators: `=`, `!=`, and `IN`. These\nallow filtering for exact matches or membership in a set of values.\nAlso enables `IS EMPTY`, `IS NULL`, and `EXISTS` operators. Defaults\nto `true`." }, "comparison": { - "type": "boolean" + "type": "boolean", + "description": "When `true`, enables comparison operators: `<`, `>`, `<=`, `>=`, and\n`TO` (range). These allow filtering based on numeric or string\ncomparisons. Defaults to `false`." } }, "additionalProperties": false }, "FilterableAttributesFeatures": { "type": "object", + "description": "Controls which filtering and faceting operations are enabled for matching\nattributes. This allows restricting certain operations on specific fields\nfor security or performance reasons.", "properties": { "facetSearch": { - "type": "boolean" + "type": "boolean", + "description": "When `true`, allows searching within facet values for matching\nattributes. This enables the facet search feature which lets users\nsearch for specific facet values. Defaults to `false`." }, "filter": { - "$ref": "#/components/schemas/FilterFeatures" + "$ref": "#/components/schemas/FilterFeatures", + "description": "Controls which filter operators are allowed for matching attributes.\nSee `FilterFeatures` for available options." } }, "additionalProperties": false }, "FilterableAttributesPatterns": { "type": "object", + "description": "Defines a set of attribute patterns with specific filtering and faceting\nfeatures. This allows fine-grained control over which operations are\nallowed on matched attributes.", "required": [ "attributePatterns" ], "properties": { "attributePatterns": { - "$ref": "#/components/schemas/AttributePatterns" + "type": "array", + "items": { + "type": "string" + }, + "description": "Patterns to match attribute names. Use `*` as a wildcard to match any\ncharacters. For example, `[\"price_*\", \"stock\"]` matches `price_usd`,\n`price_eur`, and `stock`." }, "features": { - "$ref": "#/components/schemas/FilterableAttributesFeatures" + "$ref": "#/components/schemas/FilterableAttributesFeatures", + "description": "The filtering and faceting features enabled for attributes matching\nthese patterns. If not specified, defaults to equality filtering\nenabled." } }, "additionalProperties": false @@ -16118,6 +12072,7 @@ }, "GetLogs": { "type": "object", + "description": "Request body for streaming logs", "required": [ "target", "mode", @@ -16126,7 +12081,7 @@ "properties": { "target": { "type": "string", - "description": "Lets you specify which parts of the code you want to inspect and is formatted like that: code_part=log_level,code_part=log_level\n- If the `code_part` is missing, then the `log_level` will be applied to everything.\n- If the `log_level` is missing, then the `code_part` will be selected in `info` log level.", + "description": "Log targets to filter. Format: code_part=log_level (e.g.,\nmilli=trace,actix_web=off)", "default": "info", "example": "milli=trace,index_scheduler,actix_web=off" }, @@ -16134,14 +12089,14 @@ "oneOf": [ { "$ref": "#/components/schemas/LogMode", - "description": "Lets you customize the format of the logs." + "description": "Output format for log entries. `human` provides readable text output,\n`json` provides structured JSON for parsing, and `profile` outputs\nFirefox profiler format for performance visualization." } ], "default": "Human" }, "profileMemory": { "type": "boolean", - "description": "A boolean to indicate if you want to profile the memory as well. This is only useful while using the `profile` mode.\nBe cautious, though; it slows down the engine a lot.", + "description": "Enable memory profiling (only useful with profile mode, significantly\nslows down the engine)", "default": false } } @@ -16168,6 +12123,7 @@ "oneOf": [ { "type": "object", + "description": "Finite pagination with exact counts", "required": [ "hitsPerPage", "page", @@ -16177,24 +12133,29 @@ "properties": { "hitsPerPage": { "type": "integer", + "description": "Number of results on each page", "minimum": 0 }, "page": { "type": "integer", + "description": "Current search results page", "minimum": 0 }, "totalPages": { "type": "integer", + "description": "Exhaustive total number of search result pages", "minimum": 0 }, "totalHits": { "type": "integer", + "description": "Exhaustive total number of matches", "minimum": 0 } } }, { "type": "object", + "description": "Offset-based pagination with estimated counts", "required": [ "limit", "offset", @@ -16203,32 +12164,39 @@ "properties": { "limit": { "type": "integer", + "description": "Number of documents to take", "minimum": 0 }, "offset": { "type": "integer", + "description": "Number of documents skipped", "minimum": 0 }, "estimatedTotalHits": { "type": "integer", + "description": "Estimated total number of matches", "minimum": 0 } } } - ] + ], + "description": "Pagination information for search results" }, "HybridQuery": { "type": "object", + "description": "Configuration for hybrid search combining keyword and semantic search.\n\nThis allows searches that understand both exact words and conceptual\nmeaning.", "required": [ "embedder" ], "properties": { "semanticRatio": { "type": "number", - "format": "float" + "format": "float", + "description": "Controls the balance between keyword search and semantic search.\nA value of `0.0` uses only keyword search, `1.0` uses only semantic\nsearch, and `0.5` (the default) gives equal weight to both.\nUse lower values for exact term matching and higher values for\nconceptual similarity." }, "embedder": { - "type": "string" + "type": "string", + "description": "The name of the embedder configuration to use for generating query\nvectors. This must match one of the embedders defined in the index's\n`embedders` settings." } } }, @@ -16261,20 +12229,21 @@ }, "IndexCreateRequest": { "type": "object", + "description": "Request body for creating a new index", "required": [ "uid" ], "properties": { "uid": { "$ref": "#/components/schemas/IndexUid", - "description": "The name of the index" + "description": "Unique identifier for the index" }, "primaryKey": { "type": [ "string", "null" ], - "description": "The primary key of the index", + "description": "Primary key of the index", "example": "id" } } @@ -16332,7 +12301,7 @@ }, "fieldDistribution": { "type": "object", - "description": "Association of every field name with the number of times it occurs in the documents.", + "description": "Association of every field name with the number of times it occurs in\nthe documents.", "additionalProperties": { "type": "integer", "format": "u-int64", @@ -16346,6 +12315,7 @@ }, "IndexSwap": { "type": "object", + "description": "Index swap operation", "required": [ "indexes" ], @@ -16355,13 +12325,15 @@ "items": { "type": "string" }, + "description": "Pair of index UIDs to swap", "example": [ "indexA", "indexB" ] }, "rename": { - "type": "boolean" + "type": "boolean", + "description": "Whether this is a rename operation" } } }, @@ -16372,6 +12344,7 @@ }, "IndexView": { "type": "object", + "description": "An index containing searchable documents", "required": [ "uid", "createdAt", @@ -16380,29 +12353,30 @@ "properties": { "uid": { "type": "string", - "description": "Unique identifier for the index" + "description": "Unique identifier for the index. Once created, it cannot be changed" }, "createdAt": { "type": "string", "format": "date-time", - "description": "An `RFC 3339` format for date/time/duration." + "description": "Creation date of the index, represented in RFC 3339 format" }, "updatedAt": { "type": "string", "format": "date-time", - "description": "An `RFC 3339` format for date/time/duration." + "description": "Latest date of index update, represented in RFC 3339 format" }, "primaryKey": { "type": [ "string", "null" ], - "description": "Custom primaryKey for documents" + "description": "Primary key of the index" } } }, "KeyView": { "type": "object", + "description": "Represents an API key used for authenticating requests to Meilisearch.\nEach key has specific permissions defined by its actions and can be scoped\nto particular indexes. Keys provide fine-grained access control for your\nMeilisearch instance.", "required": [ "key", "uid", @@ -16417,37 +12391,37 @@ "string", "null" ], - "description": "The name of the API Key if any" + "description": "A human-readable name for the API key. Use this to identify the purpose\nof each key, such as \"Frontend Search Key\" or \"Admin Key for CI/CD\".\nThis is optional and can be `null`." }, "description": { "type": [ "string", "null" ], - "description": "The description of the API Key if any" + "description": "A longer description explaining the purpose or usage of this API key.\nUseful for documenting why the key was created and how it should be\nused. This is optional and can be `null`." }, "key": { "type": "string", - "description": "The actual API Key you can send to Meilisearch" + "description": "The actual API key string to use in the `Authorization: Bearer `\nheader when making requests to Meilisearch. Keep this value secret and\nnever expose it in client-side code." }, "uid": { "type": "string", "format": "uuid", - "description": "The `Uuid` specified while creating the key or autogenerated by Meilisearch." + "description": "The unique identifier (UUID) for this API key. Use this to update or\ndelete the key. The UID remains constant even if the key's name or\ndescription changes." }, "actions": { "type": "array", "items": { "$ref": "#/components/schemas/Action" }, - "description": "The actions accessible with this key." + "description": "The list of actions (permissions) this key is allowed to perform.\nExamples include `documents.add`, `search`, `indexes.create`,\n`settings.update`, etc. Use `*` to grant all permissions." }, "indexes": { "type": "array", "items": { "type": "string" }, - "description": "The indexes accessible with this key." + "description": "The list of index UIDs this key can access. Use `*` to grant access to\nall indexes, including future ones. Patterns are also supported, e.g.,\n`movies_*` matches any index starting with \"movies_\"." }, "expiresAt": { "type": [ @@ -16455,18 +12429,18 @@ "null" ], "format": "date-time", - "description": "The expiration date of the key. Once this timestamp is exceeded the key is not deleted but cannot be used anymore." + "description": "The expiration date and time of the key in RFC 3339 format. After this\ntime, the key will no longer be valid for authentication. Set to `null`\nfor keys that never expire." }, "createdAt": { "type": "string", "format": "date-time", - "description": "The date of creation of this API Key.", + "description": "The date and time when this API key was created, formatted as an\nRFC 3339 date-time string. This is automatically set by Meilisearch\nand cannot be modified.", "readOnly": true }, "updatedAt": { "type": "string", "format": "date-time", - "description": "The date of the last update made on this key.", + "description": "The date and time when this API key was last modified, formatted as an\nRFC 3339 date-time string. This is automatically updated by Meilisearch\nwhen the key's name or description changes.", "readOnly": true } } @@ -16640,30 +12614,71 @@ }, "LocalizedAttributesRuleView": { "type": "object", + "description": "Defines a rule for associating specific locales (languages) with\nattributes. This allows Meilisearch to use language-specific tokenization\nand processing for matched attributes, improving search quality for\nmultilingual content.", "required": [ "attributePatterns", "locales" ], "properties": { "attributePatterns": { - "$ref": "#/components/schemas/AttributePatterns" + "type": "array", + "items": { + "type": "string" + }, + "description": "Patterns to match attribute names. Use `*` as a wildcard to match any\ncharacters. For example, `[\"title_*\", \"description\"]` matches\n`title_en`, `title_fr`, and `description`.", + "example": [ + "*_ja" + ] }, "locales": { "type": "array", "items": { "$ref": "#/components/schemas/Locale" - } + }, + "description": "The list of locales (languages) to apply to matching attributes. When\nthese attributes are indexed, Meilisearch will use language-specific\ntokenization rules. Examples: `[\"en\", \"fr\"]` or `[\"jpn\", \"zho\"]`." } } }, "LogMode": { "type": "string", + "description": "Format for log output", "enum": [ "human", "json", "profile" ] }, + "MatchBounds": { + "type": "object", + "description": "Represents the position of a matching term in a document field. Used to\nindicate where query terms were found within attribute values, enabling\nfeatures like highlighting and match position display.", + "required": [ + "start", + "length" + ], + "properties": { + "start": { + "type": "integer", + "description": "The byte offset where the match begins within the attribute value.\nThis is a zero-indexed position from the start of the string.", + "minimum": 0 + }, + "length": { + "type": "integer", + "description": "The length in bytes of the matched text. Combined with `start`, this\ndefines the exact substring that matched the query term.", + "minimum": 0 + }, + "indices": { + "type": [ + "array", + "null" + ], + "items": { + "type": "integer", + "minimum": 0 + }, + "description": "Byte indices of individual matched characters when the match spans\nmultiple positions (e.g., for prefix matches). This is `null` for\nsimple contiguous matches." + } + } + }, "MatchingStrategy": { "type": "string", "description": "This is unfortunately a duplication of the struct in .\nThe reason why it is duplicated is because milli cannot depend on meilisearch. It would be cyclic imports.", @@ -16675,18 +12690,21 @@ }, "MergeFacets": { "type": "object", + "description": "Options for merging facets from multiple indexes in federated search.\nWhen multiple indexes are queried, this controls how their facet values\nare combined into a single facet distribution.", "properties": { "maxValuesPerFacet": { "type": [ "integer", "null" ], + "description": "The maximum number of facet values to return for each facet after\nmerging. Values from all indexes are combined and sorted before\ntruncation. If not specified, uses the default limit from the index\nsettings.", "minimum": 0 } } }, "MinWordSizeTyposSetting": { "type": "object", + "description": "Configures the minimum word length required before typos are allowed.\n\nThis helps prevent matching very short words with typos, which can lead\nto irrelevant results.", "properties": { "oneTypo": { "type": [ @@ -16694,6 +12712,7 @@ "null" ], "format": "u-int8", + "description": "The minimum word length required to accept one typo. Words shorter\nthan this value must match exactly. For example, if set to `5`, the\nword \"apple\" (5 letters) can have one typo, but \"app\" (3 letters)\ncannot. Defaults to `5`.", "example": 5, "minimum": 0 }, @@ -16703,6 +12722,7 @@ "null" ], "format": "u-int8", + "description": "The minimum word length required to accept two typos. Words shorter\nthan this value can have at most one typo. For example, if set to `9`,\nthe word \"computing\" (9 letters) can have two typos. Must be greater\nthan or equal to `oneTypo`. Defaults to `9`.", "example": 9, "minimum": 0 } @@ -16711,12 +12731,14 @@ }, "Network": { "type": "object", + "description": "Network topology configuration for distributed Meilisearch", "properties": { "remotes": { "type": [ "object", "null" ], + "description": "Map of remote instance names to their configurations", "additionalProperties": { "$ref": "#/components/schemas/Remote" }, @@ -16737,6 +12759,7 @@ "string", "null" ], + "description": "Name of this instance in the network", "example": "ms-00" }, "leader": { @@ -16744,6 +12767,7 @@ "string", "null" ], + "description": "Name of the leader instance in the network", "example": "ms-00" }, "previousRemotes": { @@ -16751,6 +12775,7 @@ "object", "null" ], + "description": "Previous remote configurations (for rollback)", "additionalProperties": { "$ref": "#/components/schemas/Remote" }, @@ -16770,22 +12795,26 @@ }, "Origin": { "type": "object", + "description": "Information about the origin of a task in a distributed Meilisearch\ndeployment. This tracks where a task was originally created before being\nreplicated to other nodes.", "required": [ "remoteName", "taskUid" ], "properties": { "remoteName": { - "type": "string" + "type": "string", + "description": "The name of the remote Meilisearch instance where this task originated.\nThis corresponds to a remote defined in the network configuration." }, "taskUid": { "type": "integer", "format": "u-int32", + "description": "The unique task identifier on the originating remote. This allows\ntracking the same task across different nodes in the network.", "minimum": 0 }, "networkVersion": { "type": "string", - "format": "uuid" + "format": "uuid", + "description": "The version of the network topology when this task was created. Used to\nensure consistent task routing during network topology changes." } } }, @@ -16799,12 +12828,14 @@ }, "PaginationSettings": { "type": "object", + "description": "Pagination configuration settings", "properties": { "maxTotalHits": { "type": [ "integer", "null" ], + "description": "Maximum number of hits that can be returned", "example": 250, "minimum": 0 } @@ -16813,6 +12844,7 @@ }, "PaginationView_IndexView": { "type": "object", + "description": "Paginated response wrapper", "required": [ "results", "offset", @@ -16824,6 +12856,7 @@ "type": "array", "items": { "type": "object", + "description": "An index containing searchable documents", "required": [ "uid", "createdAt", @@ -16832,44 +12865,49 @@ "properties": { "uid": { "type": "string", - "description": "Unique identifier for the index" + "description": "Unique identifier for the index. Once created, it cannot be changed" }, "createdAt": { "type": "string", "format": "date-time", - "description": "An `RFC 3339` format for date/time/duration." + "description": "Creation date of the index, represented in RFC 3339 format" }, "updatedAt": { "type": "string", "format": "date-time", - "description": "An `RFC 3339` format for date/time/duration." + "description": "Latest date of index update, represented in RFC 3339 format" }, "primaryKey": { "type": [ "string", "null" ], - "description": "Custom primaryKey for documents" + "description": "Primary key of the index" } } - } + }, + "description": "Array of items for the current page" }, "offset": { "type": "integer", + "description": "Number of items skipped", "minimum": 0 }, "limit": { "type": "integer", + "description": "Maximum number of items returned", "minimum": 0 }, "total": { "type": "integer", + "description": "Total number of items matching the query", "minimum": 0 } } }, "PaginationView_KeyView": { "type": "object", + "description": "Paginated response wrapper", "required": [ "results", "offset", @@ -16881,6 +12919,7 @@ "type": "array", "items": { "type": "object", + "description": "Represents an API key used for authenticating requests to Meilisearch.\nEach key has specific permissions defined by its actions and can be scoped\nto particular indexes. Keys provide fine-grained access control for your\nMeilisearch instance.", "required": [ "key", "uid", @@ -16895,37 +12934,37 @@ "string", "null" ], - "description": "The name of the API Key if any" + "description": "A human-readable name for the API key. Use this to identify the purpose\nof each key, such as \"Frontend Search Key\" or \"Admin Key for CI/CD\".\nThis is optional and can be `null`." }, "description": { "type": [ "string", "null" ], - "description": "The description of the API Key if any" + "description": "A longer description explaining the purpose or usage of this API key.\nUseful for documenting why the key was created and how it should be\nused. This is optional and can be `null`." }, "key": { "type": "string", - "description": "The actual API Key you can send to Meilisearch" + "description": "The actual API key string to use in the `Authorization: Bearer `\nheader when making requests to Meilisearch. Keep this value secret and\nnever expose it in client-side code." }, "uid": { "type": "string", "format": "uuid", - "description": "The `Uuid` specified while creating the key or autogenerated by Meilisearch." + "description": "The unique identifier (UUID) for this API key. Use this to update or\ndelete the key. The UID remains constant even if the key's name or\ndescription changes." }, "actions": { "type": "array", "items": { "$ref": "#/components/schemas/Action" }, - "description": "The actions accessible with this key." + "description": "The list of actions (permissions) this key is allowed to perform.\nExamples include `documents.add`, `search`, `indexes.create`,\n`settings.update`, etc. Use `*` to grant all permissions." }, "indexes": { "type": "array", "items": { "type": "string" }, - "description": "The indexes accessible with this key." + "description": "The list of index UIDs this key can access. Use `*` to grant access to\nall indexes, including future ones. Patterns are also supported, e.g.,\n`movies_*` matches any index starting with \"movies_\"." }, "expiresAt": { "type": [ @@ -16933,39 +12972,44 @@ "null" ], "format": "date-time", - "description": "The expiration date of the key. Once this timestamp is exceeded the key is not deleted but cannot be used anymore." + "description": "The expiration date and time of the key in RFC 3339 format. After this\ntime, the key will no longer be valid for authentication. Set to `null`\nfor keys that never expire." }, "createdAt": { "type": "string", "format": "date-time", - "description": "The date of creation of this API Key.", + "description": "The date and time when this API key was created, formatted as an\nRFC 3339 date-time string. This is automatically set by Meilisearch\nand cannot be modified.", "readOnly": true }, "updatedAt": { "type": "string", "format": "date-time", - "description": "The date of the last update made on this key.", + "description": "The date and time when this API key was last modified, formatted as an\nRFC 3339 date-time string. This is automatically updated by Meilisearch\nwhen the key's name or description changes.", "readOnly": true } } - } + }, + "description": "Array of items for the current page" }, "offset": { "type": "integer", + "description": "Number of items skipped", "minimum": 0 }, "limit": { "type": "integer", + "description": "Maximum number of items returned", "minimum": 0 }, "total": { "type": "integer", + "description": "Total number of items matching the query", "minimum": 0 } } }, "PaginationView_Value": { "type": "object", + "description": "Paginated response wrapper", "required": [ "results", "offset", @@ -16975,30 +13019,36 @@ "properties": { "results": { "type": "array", - "items": {} + "items": {}, + "description": "Array of items for the current page" }, "offset": { "type": "integer", + "description": "Number of items skipped", "minimum": 0 }, "limit": { "type": "integer", + "description": "Maximum number of items returned", "minimum": 0 }, "total": { "type": "integer", + "description": "Total number of items matching the query", "minimum": 0 } } }, "PatchApiKey": { "type": "object", + "description": "Request body for updating an existing API key. Only the name and\ndescription can be modified - other properties like actions, indexes,\nand expiration are immutable after creation.", "properties": { "description": { "type": [ "string", "null" ], + "description": "A new description for the API key. Pass `null` to remove the existing\ndescription. Useful for documenting the purpose or usage of the key.", "example": "This key is used to update documents in the products index" }, "name": { @@ -17006,18 +13056,21 @@ "string", "null" ], + "description": "A new human-readable name for the API key. Pass `null` to remove the\nexisting name. Use this to identify keys by purpose, such as\n\"Production Search Key\" or \"CI/CD Indexing Key\".", "example": "Indexing Products API key" } } }, "Personalize": { "type": "object", + "description": "Configuration for personalized search results.\n\nWhen enabled, search results are tailored based on user context,\nproviding different rankings and results for different user profiles.", "required": [ "user_context" ], "properties": { "user_context": { - "type": "string" + "type": "string", + "description": "A string describing the user context for personalization. This is\npassed to the embedder to generate user-specific vectors that\ninfluence search ranking. Example: user preferences, browsing\nhistory, or demographic information." } } }, @@ -17030,6 +13083,7 @@ }, "ProgressStepView": { "type": "object", + "description": "Information about a single processing step within a batch or task. Each\nstep has a name, current progress, and total items to process.", "required": [ "currentStep", "finished", @@ -17037,22 +13091,26 @@ ], "properties": { "currentStep": { - "type": "string" + "type": "string", + "description": "A human-readable name describing what this processing step is doing.\nExamples include \"indexing documents\", \"computing embeddings\",\n\"building word cache\", etc." }, "finished": { "type": "integer", "format": "u-int32", + "description": "The number of items that have been processed so far in this step.\nCompare with `total` to calculate the percentage complete for this\nspecific step.", "minimum": 0 }, "total": { "type": "integer", "format": "u-int32", + "description": "The total number of items to process in this step. When `finished`\nequals `total`, this step is complete and processing moves to the\nnext step.", "minimum": 0 } } }, "ProgressView": { "type": "object", + "description": "Real-time progress information for a batch or task that is currently\nbeing processed. Use this to display progress bars or status updates to\nusers.", "required": [ "steps", "percentage" @@ -17062,11 +13120,13 @@ "type": "array", "items": { "$ref": "#/components/schemas/ProgressStepView" - } + }, + "description": "A hierarchical list of processing steps currently being executed.\nSteps are listed from outermost to innermost, with each step\nrepresenting a more granular operation within its parent step." }, "percentage": { "type": "number", - "format": "float" + "format": "float", + "description": "The overall completion percentage of the operation (0.0 to 100.0).\nThis is calculated by combining the progress of all nested steps,\nweighted by their relative importance." } } }, @@ -17081,7 +13141,7 @@ "oneOf": [ { "type": "string", - "description": "Sorted by decreasing number of matched query terms.\nQuery words at the front of an attribute is considered better than if it was at the back.", + "description": "Sorted by decreasing number of matched query terms.\nQuery words at the front of an attribute is considered better than if\nit was at the back.", "enum": [ "Words" ] @@ -17109,7 +13169,7 @@ }, { "type": "string", - "description": "Dynamically sort at query time the documents. None, one or multiple Asc/Desc sortable\nattributes can be used in place of this criterion at query time.", + "description": "Dynamically sort at query time the documents. None, one or multiple\nAsc/Desc sortable attributes can be used in place of this criterion at\nquery time.", "enum": [ "Sort" ] @@ -17155,12 +13215,14 @@ }, "Remote": { "type": "object", + "description": "Configuration for a remote Meilisearch instance", "properties": { "url": { "type": [ "string", "null" ], + "description": "URL of the remote instance", "example": "http://localhost:7700" }, "searchApiKey": { @@ -17168,6 +13230,7 @@ "string", "null" ], + "description": "API key for search operations on this remote", "example": "XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU" }, "writeApiKey": { @@ -17175,22 +13238,23 @@ "string", "null" ], + "description": "API key for write operations on this remote", "example": "XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU" } } }, "RemoteTask": { "type": "object", + "description": "Represents a task that was replicated to a remote Meilisearch instance.\nContains either the remote task UID on success, or an error if\nreplication failed.", "properties": { "taskUid": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/u32" - } - ] + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "description": "The unique task identifier assigned by the remote Meilisearch instance.\nPresent when the task was successfully replicated to the remote.", + "minimum": 0 }, "error": { "oneOf": [ @@ -17198,7 +13262,8 @@ "type": "null" }, { - "$ref": "#/components/schemas/ResponseError" + "$ref": "#/components/schemas/ResponseError", + "description": "Error details if the task failed to replicate to this remote. Contains\nthe error message, code, and type from the remote instance." } ] } @@ -17233,108 +13298,132 @@ }, "RuntimeTogglableFeatures": { "type": "object", + "description": "Experimental features that can be toggled at runtime", "properties": { "metrics": { "type": [ "boolean", "null" - ] + ], + "description": "Enable the /metrics endpoint for Prometheus metrics" }, "logsRoute": { "type": [ "boolean", "null" - ] + ], + "description": "Enable the /logs route for log configuration" }, "editDocumentsByFunction": { "type": [ "boolean", "null" - ] + ], + "description": "Enable document editing via JavaScript functions" }, "containsFilter": { "type": [ "boolean", "null" - ] + ], + "description": "Enable the CONTAINS filter operator" }, "network": { "type": [ "boolean", "null" - ] + ], + "description": "Enable network features for distributed search" }, "getTaskDocumentsRoute": { "type": [ "boolean", "null" - ] + ], + "description": "Enable the route to get documents from tasks" }, "compositeEmbedders": { "type": [ "boolean", "null" - ] + ], + "description": "Enable composite embedders for multi-source embeddings" }, "chatCompletions": { "type": [ "boolean", "null" - ] + ], + "description": "Enable chat completion capabilities" }, "multimodal": { "type": [ "boolean", "null" - ] + ], + "description": "Enable multimodal search with images and other media" }, "vectorStoreSetting": { "type": [ "boolean", "null" - ] + ], + "description": "Enable vector store settings configuration" } } }, "SearchHit": { "type": "object", + "description": "A single search result hit", "properties": { "_formatted": { "type": "object", + "description": "The formatted document with highlighted and cropped attributes", "additionalProperties": true }, "_matchesPosition": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/BTreeMap" + "type": [ + "object", + "null" + ], + "description": "Location of matching terms in the document", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MatchBounds" } - ] + }, + "propertyNames": { + "type": "string" + } }, "_rankingScore": { "type": [ "number", "null" ], - "format": "double" + "format": "double", + "description": "Global ranking score of the document" }, "_rankingScoreDetails": { "type": [ "object", "null" ], + "description": "Detailed breakdown of the ranking score", "additionalProperties": {}, "propertyNames": { "type": "string" } } }, - "additionalProperties": {} + "additionalProperties": { + "description": "The document data" + } }, "SearchMetadata": { "type": "object", + "description": "Metadata about a search query", "required": [ "queryUid", "indexUid" @@ -17342,22 +13431,26 @@ "properties": { "queryUid": { "type": "string", - "format": "uuid" + "format": "uuid", + "description": "Unique identifier for the query" }, "indexUid": { - "type": "string" + "type": "string", + "description": "Identifier of the queried index" }, "primaryKey": { "type": [ "string", "null" - ] + ], + "description": "Primary key of the queried index" }, "remote": { "type": [ "string", "null" - ] + ], + "description": "Remote server that processed the query" } } }, @@ -17371,6 +13464,7 @@ "show_matches_position", "show_ranking_score", "show_ranking_score_details", + "show_performance_details", "highlight_pre_tag", "highlight_post_tag", "crop_marker", @@ -17381,7 +13475,8 @@ "type": [ "string", "null" - ] + ], + "description": "Query string" }, "vector": { "type": [ @@ -17391,26 +13486,32 @@ "items": { "type": "number", "format": "float" - } + }, + "description": "Search using a custom query vector" + }, + "media": { + "description": "Perform AI-powered search queries with multimodal content" }, - "media": {}, "hybrid": { "oneOf": [ { "type": "null" }, { - "$ref": "#/components/schemas/HybridQuery" + "$ref": "#/components/schemas/HybridQuery", + "description": "Hybrid search configuration combining keyword and semantic search.\nSet `semanticRatio` to balance between keyword matching (0.0) and\nsemantic similarity (1.0). Requires an embedder to be configured." } ] }, "offset": { "type": "integer", + "description": "Number of documents to skip", "default": 0, "minimum": 0 }, "limit": { "type": "integer", + "description": "Maximum number of documents returned", "default": 20, "minimum": 0 }, @@ -17419,6 +13520,7 @@ "integer", "null" ], + "description": "Request a specific page of results", "minimum": 0 }, "hits_per_page": { @@ -17426,6 +13528,7 @@ "integer", "null" ], + "description": "Maximum number of documents returned for a page", "minimum": 0 }, "attributes_to_retrieve": { @@ -17436,10 +13539,12 @@ "items": { "type": "string" }, + "description": "Attributes to display in the returned documents", "uniqueItems": true }, "retrieve_vectors": { - "type": "boolean" + "type": "boolean", + "description": "Return document and query vector data" }, "attributes_to_crop": { "type": [ @@ -17448,10 +13553,12 @@ ], "items": { "type": "string" - } + }, + "description": "Attributes whose values have to be cropped" }, "crop_length": { "type": "integer", + "description": "Maximum length of cropped value in words", "default": 10, "minimum": 0 }, @@ -17463,18 +13570,35 @@ "items": { "type": "string" }, + "description": "Highlight matching terms contained in an attribute", "uniqueItems": true }, "show_matches_position": { - "type": "boolean" + "type": "boolean", + "description": "Return matching terms location" }, "show_ranking_score": { - "type": "boolean" + "type": "boolean", + "description": "Display the global ranking score of a document" }, "show_ranking_score_details": { - "type": "boolean" + "type": "boolean", + "description": "Adds a detailed global ranking score field" + }, + "show_performance_details": { + "type": "boolean", + "description": "Adds a detailed performance details field" + }, + "use_network": { + "type": [ + "boolean", + "null" + ], + "description": "Experimental: Whether this query should be performed on the whole network or locally.\n\nWhen performing the query on the whole network, this is \"as-if\" a remote federated search were performed,\nsuch that all shards are covered, and such that documents are deduplicated across the remotes.\n\n# Response\n\nThe response will have the same shape as a federated search response.\n\n# Edition\n\nThis feature is available in the Enterprise Edition.\n\n# Experimental\n\n- Setting this parameter to a value different from the default requires the `network` experimental feature.\n\n# Values\n\n- `Some(true)`: Use the whole network for this query.\n- `Some(false)`: Make this query local.\n- `None` (default): Same as `Some(false)`.\n\n# Assumptions when using the network\n\nNetwork queries assume that the following is true:\n\n- the target index exists with compatible settings on all remotes of the network.\n- any document with the same document id between two remotes have the same content and can be deduplicated." + }, + "filter": { + "description": "Filter queries by an attribute's value" }, - "filter": {}, "sort": { "type": [ "array", @@ -17482,13 +13606,15 @@ ], "items": { "type": "string" - } + }, + "description": "Sort search results by an attribute's value" }, "distinct": { "type": [ "string", "null" - ] + ], + "description": "Restrict search to documents with unique values of specified\nattribute" }, "facets": { "type": [ @@ -17497,22 +13623,27 @@ ], "items": { "type": "string" - } + }, + "description": "Display the count of matches per facet" }, "highlight_pre_tag": { "type": "string", + "description": "String inserted at the start of a highlighted term", "default": "" }, "highlight_post_tag": { "type": "string", + "description": "String inserted at the end of a highlighted term", "default": "" }, "crop_marker": { "type": "string", + "description": "String marking crop boundaries", "default": "…" }, "matching_strategy": { - "$ref": "#/components/schemas/MatchingStrategy" + "$ref": "#/components/schemas/MatchingStrategy", + "description": "Strategy used to match query terms within documents" }, "attributes_to_search_on": { "type": [ @@ -17521,17 +13652,16 @@ ], "items": { "type": "string" - } + }, + "description": "Restrict search to the specified attributes" }, "ranking_score_threshold": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/RankingScoreThreshold" - } - ] + "type": [ + "number", + "null" + ], + "format": "double", + "description": "Minimum ranking score threshold (0.0 to 1.0) that documents must\nachieve to be included in results. Documents with scores below this\nthreshold are excluded. Useful for filtering out low-relevance\nresults." }, "locales": { "type": [ @@ -17540,7 +13670,8 @@ ], "items": { "$ref": "#/components/schemas/Locale" - } + }, + "description": "Explicitly specify languages used in a query" }, "personalize": { "oneOf": [ @@ -17548,7 +13679,8 @@ "type": "null" }, { - "$ref": "#/components/schemas/Personalize" + "$ref": "#/components/schemas/Personalize", + "description": "Enables personalized search results based on user context. When\nprovided, the search uses AI to tailor results to the user's\nprofile, preferences, or behavior described in `userContext`." } ] } @@ -17571,13 +13703,15 @@ ], "properties": { "indexUid": { - "$ref": "#/components/schemas/IndexUid" + "$ref": "#/components/schemas/IndexUid", + "description": "Index unique identifier" }, "q": { "type": [ "string", "null" - ] + ], + "description": "Query string" }, "vector": { "type": [ @@ -17587,16 +13721,20 @@ "items": { "type": "number", "format": "float" - } + }, + "description": "Search using a custom query vector" + }, + "media": { + "description": "Perform AI-powered search queries with multimodal content" }, - "media": {}, "hybrid": { "oneOf": [ { "type": "null" }, { - "$ref": "#/components/schemas/HybridQuery" + "$ref": "#/components/schemas/HybridQuery", + "description": "Hybrid search configuration combining keyword and semantic search.\nSet `semanticRatio` to balance between keyword matching (0.0) and\nsemantic similarity (1.0). Requires an embedder to be configured." } ] }, @@ -17605,6 +13743,7 @@ "integer", "null" ], + "description": "Number of documents to skip", "minimum": 0 }, "limit": { @@ -17612,6 +13751,7 @@ "integer", "null" ], + "description": "Maximum number of documents returned", "minimum": 0 }, "page": { @@ -17619,6 +13759,7 @@ "integer", "null" ], + "description": "Request a specific page of results", "minimum": 0 }, "hitsPerPage": { @@ -17626,6 +13767,7 @@ "integer", "null" ], + "description": "Maximum number of documents returned for a page", "minimum": 0 }, "attributesToRetrieve": { @@ -17636,10 +13778,12 @@ "items": { "type": "string" }, + "description": "Attributes to display in the returned documents", "uniqueItems": true }, "retrieveVectors": { - "type": "boolean" + "type": "boolean", + "description": "Return document and query vector data" }, "attributesToCrop": { "type": [ @@ -17648,10 +13792,12 @@ ], "items": { "type": "string" - } + }, + "description": "Attributes whose values have to be cropped" }, "cropLength": { "type": "integer", + "description": "Maximum length of cropped value in words", "minimum": 0 }, "attributesToHighlight": { @@ -17662,18 +13808,37 @@ "items": { "type": "string" }, + "description": "Highlight matching terms contained in an attribute", "uniqueItems": true }, "showRankingScore": { - "type": "boolean" + "type": "boolean", + "description": "Display the global ranking score of a document" }, "showRankingScoreDetails": { - "type": "boolean" + "type": "boolean", + "description": "Adds a detailed global ranking score field" + }, + "showPerformanceDetails": { + "type": [ + "boolean", + "null" + ], + "description": "Adds a detailed performance details field" + }, + "useNetwork": { + "type": [ + "boolean", + "null" + ] }, "showMatchesPosition": { - "type": "boolean" + "type": "boolean", + "description": "Return matching terms location" + }, + "filter": { + "description": "Filter queries by an attribute's value" }, - "filter": {}, "sort": { "type": [ "array", @@ -17681,13 +13846,15 @@ ], "items": { "type": "string" - } + }, + "description": "Sort search results by an attribute's value" }, "distinct": { "type": [ "string", "null" - ] + ], + "description": "Restrict search to documents with unique values of specified\nattribute" }, "facets": { "type": [ @@ -17696,19 +13863,24 @@ ], "items": { "type": "string" - } + }, + "description": "Display the count of matches per facet" }, "highlightPreTag": { - "type": "string" + "type": "string", + "description": "String inserted at the start of a highlighted term" }, "highlightPostTag": { - "type": "string" + "type": "string", + "description": "String inserted at the end of a highlighted term" }, "cropMarker": { - "type": "string" + "type": "string", + "description": "String marking crop boundaries" }, "matchingStrategy": { - "$ref": "#/components/schemas/MatchingStrategy" + "$ref": "#/components/schemas/MatchingStrategy", + "description": "Strategy used to match query terms within documents" }, "attributesToSearchOn": { "type": [ @@ -17717,17 +13889,16 @@ ], "items": { "type": "string" - } + }, + "description": "Restrict search to the specified attributes" }, "rankingScoreThreshold": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/RankingScoreThreshold" - } - ] + "type": [ + "number", + "null" + ], + "format": "double", + "description": "Exclude results below the specified ranking score" }, "locales": { "type": [ @@ -17736,7 +13907,8 @@ ], "items": { "$ref": "#/components/schemas/Locale" - } + }, + "description": "Languages to use for query tokenization" }, "federationOptions": { "oneOf": [ @@ -17744,7 +13916,8 @@ "type": "null" }, { - "$ref": "#/components/schemas/FederationOptions" + "$ref": "#/components/schemas/FederationOptions", + "description": "Federation options for multi-index search" } ] } @@ -17753,7 +13926,8 @@ "SearchResult": { "allOf": [ { - "$ref": "#/components/schemas/HitsInfo" + "$ref": "#/components/schemas/HitsInfo", + "description": "Pagination information for the search results" }, { "type": "object", @@ -17767,10 +13941,12 @@ "type": "array", "items": { "$ref": "#/components/schemas/SearchHit" - } + }, + "description": "Results of the query" }, "query": { - "type": "string" + "type": "string", + "description": "Query originating the response" }, "queryVector": { "type": [ @@ -17780,10 +13956,12 @@ "items": { "type": "number", "format": "float" - } + }, + "description": "Vector representation of the query" }, "processingTimeMs": { "type": "integer", + "description": "Processing time of the query in milliseconds", "minimum": 0 }, "facetDistribution": { @@ -17791,6 +13969,7 @@ "object", "null" ], + "description": "Distribution of the given facets", "additionalProperties": {}, "propertyNames": { "type": "string" @@ -17801,6 +13980,7 @@ "object", "null" ], + "description": "The numeric min and max values per facet", "additionalProperties": { "$ref": "#/components/schemas/FacetStats" }, @@ -17813,7 +13993,8 @@ "string", "null" ], - "format": "uuid" + "format": "uuid", + "description": "A UUID v7 identifying the search request" }, "metadata": { "oneOf": [ @@ -17821,26 +14002,45 @@ "type": "null" }, { - "$ref": "#/components/schemas/SearchMetadata" + "$ref": "#/components/schemas/SearchMetadata", + "description": "Metadata about the search query" } ] }, + "performanceDetails": { + "description": "Performance details of the search query" + }, + "remoteErrors": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/ResponseError" + }, + "propertyNames": { + "type": "string" + } + }, "semanticHitCount": { "type": [ "integer", "null" ], "format": "u-int32", + "description": "Exhaustive number of semantic search matches (only present in\nAI-powered searches)", "minimum": 0 } } } - ] + ], + "description": "Search response containing matching documents and metadata" }, "SearchResultWithIndex": { "allOf": [ { - "$ref": "#/components/schemas/SearchResult" + "$ref": "#/components/schemas/SearchResult", + "description": "Search results for this index" }, { "type": "object", @@ -17849,14 +14049,17 @@ ], "properties": { "indexUid": { - "type": "string" + "type": "string", + "description": "Identifier of the queried index" } } } - ] + ], + "description": "Search result with index identifier for multi-search responses" }, "SearchResults": { "type": "object", + "description": "Response containing results from multiple search queries", "required": [ "results" ], @@ -17865,13 +14068,14 @@ "type": "array", "items": { "$ref": "#/components/schemas/SearchResultWithIndex" - } + }, + "description": "Array of search results for each query" } } }, "SettingEmbeddingSettings": { "type": "object", - "description": "\"Technical\" type that is required due to utoipa.\n\nWe did not find a way to implement [`utoipa::ToSchema`] for the [`Setting`] enum,\nbut most types can use the `value_type` macro parameter to workaround that issue.\n\nHowever that type is used in the settings route, including through the macro that auto-generate\nall the settings route, so we can't remap the `value_type`.", + "description": "\"Technical\" type that is required due to utoipa.\n\nWe did not find a way to implement [`utoipa::ToSchema`] for the\n[`Setting`] enum, but most types can use the `value_type` macro parameter\nto workaround that issue.\n\nHowever that type is used in the settings route, including through the\nmacro that auto-generate all the settings route, so we can't remap the\n`value_type`.", "properties": { "inner": { "oneOf": [ @@ -18035,13 +14239,14 @@ }, "additionalProperties": false } - ] + ], + "description": "Configuration for this embedder. Includes the source (openAi,\nhuggingFace, ollama, rest, userProvided), model settings, API\ncredentials, and document template for generating embeddings." } } }, "Settings_Checked": { "type": "object", - "description": "Holds all the settings for an index. `T` can either be `Checked` if they represents settings\nwhose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a\ncall to `check` will return a `Settings` from a `Settings`.", + "description": "Holds all the settings for an index. `T` can either be `Checked` if\nthey represents settings whose validity is guaranteed, or `Unchecked` if\nthey need to be validated. In the later case, a call to `check` will\nreturn a `Settings` from a `Settings`.", "properties": { "displayedAttributes": { "type": [ @@ -18067,7 +14272,7 @@ "items": { "type": "string" }, - "description": "Fields in which to search for matching query words sorted by order of importance.", + "description": "Fields in which to search for matching query words sorted by order of\nimportance.", "example": [ "title", "description" @@ -18081,7 +14286,7 @@ "items": { "$ref": "#/components/schemas/FilterableAttributesRule" }, - "description": "Attributes to use for faceting and filtering. See [Filtering and Faceted Search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).", + "description": "Attributes to use for faceting and filtering.\nSee [Filtering and Faceted\nSearch](https://meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).", "example": [ "release_date", "genre" @@ -18108,7 +14313,7 @@ "items": { "type": "string" }, - "description": "List of ranking rules sorted by order of importance. The order is customizable.\n[A list of ordered built-in ranking rules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).", + "description": "List of ranking rules sorted by order of importance. The order is\ncustomizable. [A list of ordered built-in ranking\nrules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).", "example": [ "words", "typo", @@ -18178,7 +14383,7 @@ "object", "null" ], - "description": "List of associated words treated similarly. A word associated to an array of word as synonyms.", + "description": "List of associated words treated similarly. A word associated to an\narray of word as synonyms.", "additionalProperties": { "type": "array", "items": { @@ -18205,7 +14410,7 @@ "string", "null" ], - "description": "Search returns documents with distinct (different) values of the given field.", + "description": "Search returns documents with distinct (different) values of the given\nfield.", "example": "sku" }, "proximityPrecision": { @@ -18223,7 +14428,7 @@ }, { "$ref": "#/components/schemas/TypoSettings", - "description": "Customize typo tolerance feature." + "description": "Typo tolerance settings for controlling how Meilisearch handles\nspelling mistakes in search queries. Configure minimum word lengths,\ndisable on specific words or attributes." } ] }, @@ -18234,7 +14439,7 @@ }, { "$ref": "#/components/schemas/FacetingSettings", - "description": "Faceting settings." + "description": "Faceting settings for controlling facet behavior. Configure maximum\nfacet values returned and sorting order for facet values." } ] }, @@ -18245,7 +14450,7 @@ }, { "$ref": "#/components/schemas/PaginationSettings", - "description": "Pagination settings." + "description": "Pagination settings for controlling the maximum number of results\nthat can be returned. Set `maxTotalHits` to limit how far users can\npaginate into results." } ] }, @@ -18280,13 +14485,24 @@ "items": { "$ref": "#/components/schemas/LocalizedAttributesRuleView" }, - "example": null + "description": "Rules for associating locales (languages) with specific attributes.\nThis enables language-specific tokenization for multilingual content,\nimproving search quality for non-English text.", + "example": [ + { + "locales": [ + "jpn" + ], + "attributePatterns": [ + "*_ja" + ] + } + ] }, "facetSearch": { "type": [ "boolean", "null" ], + "description": "When `true`, enables facet search which allows users to search within\nfacet values. When `false`, only the first `maxValuesPerFacet` values\nare returned. Defaults to `true`.", "example": true }, "prefixSearch": { @@ -18295,7 +14511,8 @@ "type": "null" }, { - "$ref": "#/components/schemas/PrefixSearchSettings" + "$ref": "#/components/schemas/PrefixSearchSettings", + "description": "Controls prefix search behavior. `indexingTime` enables prefix search\nby building a prefix database at indexing time. `disabled` turns off\nprefix search for faster indexing. Defaults to `indexingTime`." } ] }, @@ -18306,7 +14523,7 @@ }, { "$ref": "#/components/schemas/ChatSettings", - "description": "Customize the chat prompting." + "description": "Chat settings for AI-powered search. Configure the index description,\ndocument template for rendering, and search parameters used when the\nLLM queries this index." } ] }, @@ -18316,7 +14533,8 @@ "type": "null" }, { - "$ref": "#/components/schemas/VectorStoreBackend" + "$ref": "#/components/schemas/VectorStoreBackend", + "description": "Backend storage for vector embeddings. `memory` stores vectors in\nmemory for fastest performance. `database` stores vectors on disk to\nreduce memory usage at the cost of speed." } ] } @@ -18325,7 +14543,7 @@ }, "Settings_Unchecked": { "type": "object", - "description": "Holds all the settings for an index. `T` can either be `Checked` if they represents settings\nwhose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a\ncall to `check` will return a `Settings` from a `Settings`.", + "description": "Holds all the settings for an index. `T` can either be `Checked` if\nthey represents settings whose validity is guaranteed, or `Unchecked` if\nthey need to be validated. In the later case, a call to `check` will\nreturn a `Settings` from a `Settings`.", "properties": { "displayedAttributes": { "type": [ @@ -18351,7 +14569,7 @@ "items": { "type": "string" }, - "description": "Fields in which to search for matching query words sorted by order of importance.", + "description": "Fields in which to search for matching query words sorted by order of\nimportance.", "example": [ "title", "description" @@ -18365,7 +14583,7 @@ "items": { "$ref": "#/components/schemas/FilterableAttributesRule" }, - "description": "Attributes to use for faceting and filtering. See [Filtering and Faceted Search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).", + "description": "Attributes to use for faceting and filtering.\nSee [Filtering and Faceted\nSearch](https://meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).", "example": [ "release_date", "genre" @@ -18392,7 +14610,7 @@ "items": { "type": "string" }, - "description": "List of ranking rules sorted by order of importance. The order is customizable.\n[A list of ordered built-in ranking rules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).", + "description": "List of ranking rules sorted by order of importance. The order is\ncustomizable. [A list of ordered built-in ranking\nrules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).", "example": [ "words", "typo", @@ -18462,7 +14680,7 @@ "object", "null" ], - "description": "List of associated words treated similarly. A word associated to an array of word as synonyms.", + "description": "List of associated words treated similarly. A word associated to an\narray of word as synonyms.", "additionalProperties": { "type": "array", "items": { @@ -18489,7 +14707,7 @@ "string", "null" ], - "description": "Search returns documents with distinct (different) values of the given field.", + "description": "Search returns documents with distinct (different) values of the given\nfield.", "example": "sku" }, "proximityPrecision": { @@ -18507,7 +14725,7 @@ }, { "$ref": "#/components/schemas/TypoSettings", - "description": "Customize typo tolerance feature." + "description": "Typo tolerance settings for controlling how Meilisearch handles\nspelling mistakes in search queries. Configure minimum word lengths,\ndisable on specific words or attributes." } ] }, @@ -18518,7 +14736,7 @@ }, { "$ref": "#/components/schemas/FacetingSettings", - "description": "Faceting settings." + "description": "Faceting settings for controlling facet behavior. Configure maximum\nfacet values returned and sorting order for facet values." } ] }, @@ -18529,7 +14747,7 @@ }, { "$ref": "#/components/schemas/PaginationSettings", - "description": "Pagination settings." + "description": "Pagination settings for controlling the maximum number of results\nthat can be returned. Set `maxTotalHits` to limit how far users can\npaginate into results." } ] }, @@ -18564,13 +14782,24 @@ "items": { "$ref": "#/components/schemas/LocalizedAttributesRuleView" }, - "example": null + "description": "Rules for associating locales (languages) with specific attributes.\nThis enables language-specific tokenization for multilingual content,\nimproving search quality for non-English text.", + "example": [ + { + "locales": [ + "jpn" + ], + "attributePatterns": [ + "*_ja" + ] + } + ] }, "facetSearch": { "type": [ "boolean", "null" ], + "description": "When `true`, enables facet search which allows users to search within\nfacet values. When `false`, only the first `maxValuesPerFacet` values\nare returned. Defaults to `true`.", "example": true }, "prefixSearch": { @@ -18579,7 +14808,8 @@ "type": "null" }, { - "$ref": "#/components/schemas/PrefixSearchSettings" + "$ref": "#/components/schemas/PrefixSearchSettings", + "description": "Controls prefix search behavior. `indexingTime` enables prefix search\nby building a prefix database at indexing time. `disabled` turns off\nprefix search for faster indexing. Defaults to `indexingTime`." } ] }, @@ -18590,7 +14820,7 @@ }, { "$ref": "#/components/schemas/ChatSettings", - "description": "Customize the chat prompting." + "description": "Chat settings for AI-powered search. Configure the index description,\ndocument template for rendering, and search parameters used when the\nLLM queries this index." } ] }, @@ -18600,7 +14830,8 @@ "type": "null" }, { - "$ref": "#/components/schemas/VectorStoreBackend" + "$ref": "#/components/schemas/VectorStoreBackend", + "description": "Backend storage for vector embeddings. `memory` stores vectors in\nmemory for fastest performance. `database` stores vectors on disk to\nreduce memory usage at the cost of speed." } ] } @@ -18609,6 +14840,7 @@ }, "SimilarQuery": { "type": "object", + "description": "Request body for similar document search", "required": [ "id", "offset", @@ -18617,23 +14849,30 @@ "retrieve_vectors", "show_ranking_score", "show_ranking_score_details", + "show_performance_details", "ranking_score_threshold" ], "properties": { "id": { - "type": "string" + "type": "string", + "description": "Document ID to find similar documents for" }, "offset": { "type": "integer", + "description": "Number of documents to skip", "minimum": 0 }, "limit": { "type": "integer", + "description": "Maximum number of documents returned", "minimum": 0 }, - "filter": {}, + "filter": { + "description": "Filter queries by an attribute's value" + }, "embedder": { - "type": "string" + "type": "string", + "description": "Name of the embedder to use for semantic similarity" }, "attributes_to_retrieve": { "type": [ @@ -18643,27 +14882,37 @@ "items": { "type": "string" }, + "description": "Attributes to display in the returned documents", "uniqueItems": true }, "retrieve_vectors": { - "type": "boolean" + "type": "boolean", + "description": "Return document vector data" }, "show_ranking_score": { - "type": "boolean" + "type": "boolean", + "description": "Display the global ranking score of a document" }, "show_ranking_score_details": { - "type": "boolean" + "type": "boolean", + "description": "Adds a detailed global ranking score field" + }, + "show_performance_details": { + "type": "boolean", + "description": "Adds a detailed performance details field" }, "ranking_score_threshold": { "type": "number", - "format": "double" + "format": "double", + "description": "Excludes results with low ranking scores" } } }, "SimilarResult": { "allOf": [ { - "$ref": "#/components/schemas/HitsInfo" + "$ref": "#/components/schemas/HitsInfo", + "description": "Pagination information" }, { "type": "object", @@ -18677,21 +14926,29 @@ "type": "array", "items": { "$ref": "#/components/schemas/SearchHit" - } + }, + "description": "Results of the query" }, "id": { - "type": "string" + "type": "string", + "description": "Document ID that was used as reference" }, "processingTimeMs": { "type": "integer", + "description": "Processing time of the query in milliseconds", "minimum": 0 + }, + "performanceDetails": { + "description": "Performance details of the query" } } } - ] + ], + "description": "Response containing similar documents" }, "Stats": { "type": "object", + "description": "Global statistics for the Meilisearch instance", "required": [ "databaseSize", "usedDatabaseSize", @@ -18701,13 +14958,13 @@ "databaseSize": { "type": "integer", "format": "u-int64", - "description": "The disk space used by the database, in bytes.", + "description": "Total disk space used by the database in bytes", "minimum": 0 }, "usedDatabaseSize": { "type": "integer", "format": "u-int64", - "description": "The size of the database, in bytes.", + "description": "Actual size of the data in the database in bytes", "minimum": 0 }, "lastUpdate": { @@ -18716,11 +14973,11 @@ "null" ], "format": "date-time", - "description": "The date of the last update in the RFC 3339 formats. Can be `null` if no update has ever been processed." + "description": "Date of the last update in RFC 3339 format. Null if no update has been\nprocessed" }, "indexes": { "type": "object", - "description": "The stats of every individual index your API key lets you access.", + "description": "Statistics for each index", "additionalProperties": { "$ref": "#/components/schemas/IndexStats" }, @@ -18863,6 +15120,7 @@ }, "SummarizedTaskView": { "type": "object", + "description": "A summarized view of a task, returned when a task is enqueued", "required": [ "taskUid", "status", @@ -18873,7 +15131,7 @@ "taskUid": { "type": "integer", "format": "u-int32", - "description": "The task unique identifier.", + "description": "Unique sequential identifier of the task", "minimum": 0 }, "indexUid": { @@ -18881,31 +15139,33 @@ "string", "null" ], - "description": "The index affected by this task. May be `null` if the task is not linked to any index." + "description": "Unique identifier of the targeted index. Null for global tasks" }, "status": { "$ref": "#/components/schemas/Status", - "description": "The status of the task." + "description": "Status of the task. Possible values are enqueued, processing,\nsucceeded, failed, and canceled" }, "type": { "$ref": "#/components/schemas/Kind", - "description": "The type of the task." + "description": "Type of operation performed by the task" }, "enqueuedAt": { "type": "string", "format": "date-time", - "description": "The date on which the task was enqueued." + "description": "Date and time when the task was enqueued" }, "customMetadata": { "type": [ "string", "null" - ] + ], + "description": "Custom metadata string that was attached to this task when it was\ncreated. This can be used to associate tasks with external systems or\nadd application-specific information." } } }, "SwapIndexesPayload": { "type": "object", + "description": "Request body for swapping two indexes", "required": [ "indexes", "rename" @@ -18916,16 +15176,17 @@ "items": { "$ref": "#/components/schemas/IndexUid" }, - "description": "Array of the two indexUids to be swapped" + "description": "Array of the two index UIDs to be swapped" }, "rename": { "type": "boolean", - "description": "If set to true, instead of swapping the left and right indexes it'll change the name of the first index to the second" + "description": "If true, rename the first index to the second instead of swapping" } } }, "TaskView": { "type": "object", + "description": "Represents the current state and details of an asynchronous task.\n\nTasks are created when you perform operations like adding documents,\nupdating settings, or creating indexes. Use this view to monitor task\nprogress and check for errors.", "required": [ "uid", "status", @@ -18936,7 +15197,7 @@ "uid": { "type": "integer", "format": "u-int32", - "description": "The unique sequential identifier of the task.", + "description": "The unique sequential identifier assigned to this task. Task UIDs are\nassigned in order of creation and can be used to retrieve specific\ntask information or track task dependencies.", "example": 4312, "minimum": 0 }, @@ -18946,7 +15207,7 @@ "null" ], "format": "u-int32", - "description": "The unique identifier of the batch where this task is grouped.", + "description": "The unique identifier of the batch that processed this task. Multiple\ntasks may share the same batch UID if they were processed together\nfor efficiency. This is `null` for tasks that haven't been processed.", "example": 12, "minimum": 0 }, @@ -18954,14 +15215,16 @@ "type": [ "string", "null" - ] + ], + "description": "The unique identifier of the index this task operates on. This is\n`null` for global tasks like `dumpCreation` or `taskDeletion` that\ndon't target a specific index." }, "status": { - "$ref": "#/components/schemas/Status" + "$ref": "#/components/schemas/Status", + "description": "The current processing status of the task. Possible values are:\n`enqueued` (waiting), `processing` (executing), `succeeded`,\n`failed`, or `canceled`." }, "type": { "$ref": "#/components/schemas/Kind", - "description": "The type of the task." + "description": "The type of operation this task performs. Examples include\n`documentAdditionOrUpdate`, `documentDeletion`, `settingsUpdate`,\n`indexCreation`, `indexDeletion`, `dumpCreation`, etc." }, "canceledBy": { "type": [ @@ -18969,19 +15232,16 @@ "null" ], "format": "u-int32", - "description": "The uid of the task that performed the taskCancelation if the task has been canceled.", + "description": "If this task was canceled, this field contains the UID of the\n`taskCancelation` task that canceled it. This is `null` for tasks\nthat were not canceled.", "example": 4326, "minimum": 0 }, "details": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/DetailsView" - } - ] + "type": [ + "object", + "null" + ], + "description": "Contains type-specific information about the task, such as the number\nof documents processed, settings that were applied, or filters that\nwere used. The structure varies depending on the task type." }, "error": { "oneOf": [ @@ -18989,7 +15249,8 @@ "type": "null" }, { - "$ref": "#/components/schemas/ResponseError" + "$ref": "#/components/schemas/ResponseError", + "description": "If the task failed, this field contains detailed error information\nincluding an error message, error code, error type, and a link to\ndocumentation. This is `null` for tasks that succeeded or are still\nprocessing." } ] }, @@ -18998,22 +15259,22 @@ "string", "null" ], - "description": "Total elasped time the engine was in processing state expressed as a `ISO-8601` duration format.", + "description": "The total time spent processing this task, formatted as an ISO-8601\nduration (e.g., `PT0.5S` for 0.5 seconds). This is `null` for tasks\nthat haven't finished processing yet.", "example": null }, "enqueuedAt": { "type": "string", - "description": "An `RFC 3339` format for date/time/duration.", + "description": "The timestamp when this task was added to the queue, formatted as an\nRFC 3339 date-time string. All tasks have an enqueued timestamp as\nit's set when the task is created.", "example": "2024-08-08_14:12:09.393Z" }, "startedAt": { "type": "string", - "description": "An `RFC 3339` format for date/time/duration.", + "description": "The timestamp when Meilisearch began processing this task, formatted\nas an RFC 3339 date-time string. This is `null` for tasks that are\nstill in the queue waiting to be processed.", "example": "2024-08-08_14:12:09.393Z" }, "finishedAt": { "type": "string", - "description": "An `RFC 3339` format for date/time/duration.", + "description": "The timestamp when this task finished processing (whether successfully\nor with an error), formatted as an RFC 3339 date-time string. This is\n`null` for tasks that haven't finished yet.", "example": "2024-08-08_14:12:09.393Z" }, "network": { @@ -19022,7 +15283,8 @@ "type": "null" }, { - "$ref": "#/components/schemas/DbTaskNetwork" + "$ref": "#/components/schemas/DbTaskNetwork", + "description": "Network topology information for distributed deployments. Contains\ndetails about which nodes are involved in processing this task. This\nis only present when running Meilisearch in a distributed config." } ] }, @@ -19030,18 +15292,21 @@ "type": [ "string", "null" - ] + ], + "description": "Custom metadata string that was attached to this task when it was\ncreated. This can be used to associate tasks with external systems,\ntrack task origins, or add any application-specific information." } } }, "TypoSettings": { "type": "object", + "description": "Configuration for typo tolerance in search queries.\n\nTypo tolerance allows Meilisearch to match documents even when search\nterms contain spelling mistakes.", "properties": { "enabled": { "type": [ "boolean", "null" ], + "description": "When `true`, enables typo tolerance for search queries. When `false`,\nonly exact matches are returned. Defaults to `true`.", "example": true }, "minWordSizeForTypos": { @@ -19050,7 +15315,8 @@ "type": "null" }, { - "$ref": "#/components/schemas/MinWordSizeTyposSetting" + "$ref": "#/components/schemas/MinWordSizeTyposSetting", + "description": "Configures the minimum word length before typos are allowed. Contains\n`oneTypo` (min length for 1 typo) and `twoTypos` (min length for 2\ntypos) settings." } ] }, @@ -19062,6 +15328,7 @@ "items": { "type": "string" }, + "description": "A list of words for which typo tolerance should be disabled. Use this\nfor brand names, technical terms, or other words that must be matched\nexactly. Example: `[\"iPhone\", \"macOS\"]`.", "example": [ "iPhone", "phone" @@ -19076,6 +15343,7 @@ "items": { "type": "string" }, + "description": "A list of attributes for which typo tolerance should be disabled.\nSearches in these attributes will only return exact matches. Useful\nfor fields like product codes or IDs.", "example": [ "uuid", "url" @@ -19087,6 +15355,7 @@ "boolean", "null" ], + "description": "When `true`, disables typo tolerance on numeric tokens. This prevents\nnumbers like `123` from matching `132`. Defaults to `false`.", "example": true } }, @@ -19097,32 +15366,34 @@ }, "UpdateIndexRequest": { "type": "object", + "description": "Request body for updating an existing index", "properties": { "primaryKey": { "type": [ "string", "null" ], - "description": "The new primary key of the index" + "description": "New primary key of the index" }, "uid": { "type": [ "string", "null" ], - "description": "The new uid of the index (for renaming)" + "description": "New uid for the index (for renaming)" } } }, "UpdateStderrLogs": { "type": "object", + "description": "Request body for updating stderr log configuration", "required": [ "target" ], "properties": { "target": { "type": "string", - "description": "Lets you specify which parts of the code you want to inspect and is formatted like that: code_part=log_level,code_part=log_level\n- If the `code_part` is missing, then the `log_level` will be applied to everything.\n- If the `log_level` is missing, then the `code_part` will be selected in `info` log level.", + "description": "Log targets to filter. Format: code_part=log_level (e.g.,\nmilli=trace,actix_web=off)", "default": "info", "example": "milli=trace,index_scheduler,actix_web=off" } @@ -19166,6 +15437,7 @@ }, "WebhookResults": { "type": "object", + "description": "Response containing a list of all registered webhooks", "required": [ "results" ], @@ -19174,18 +15446,21 @@ "type": "array", "items": { "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" - } + }, + "description": "Array of all webhooks configured in this Meilisearch instance. Each\nwebhook includes its UUID, URL, headers (with authorization values\nredacted), and editability status." } } }, "WebhookSettings": { "type": "object", + "description": "Configuration for a webhook endpoint", "properties": { "url": { "type": [ "string", "null" ], + "description": "URL endpoint to call when tasks complete", "example": "https://your.site/on-tasks-completed" }, "headers": { @@ -19193,6 +15468,7 @@ "object", "null" ], + "description": "HTTP headers to include in webhook requests", "additionalProperties": { "type": "string" }, @@ -19208,7 +15484,8 @@ "WebhookWithMetadataRedactedAuthorization": { "allOf": [ { - "$ref": "#/components/schemas/WebhookSettings" + "$ref": "#/components/schemas/WebhookSettings", + "description": "Webhook settings" }, { "type": "object", @@ -19219,14 +15496,17 @@ "properties": { "uuid": { "type": "string", - "format": "uuid" + "format": "uuid", + "description": "Unique identifier of the webhook" }, "isEditable": { - "type": "boolean" + "type": "boolean", + "description": "Whether the webhook can be edited" } } } - ] + ], + "description": "A webhook with metadata and redacted authorization headers" }, "u32": { "type": "integer", From d4f666d5fe2a05942421402cf9d48717adb426e4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 5 Feb 2026 21:51:23 +0000 Subject: [PATCH 11/45] Update code samples [skip ci] --- .../generated-code-samples/code_samples_compact_index_1.mdx | 2 +- .../code_samples_getting_started_add_documents.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/snippets/generated-code-samples/code_samples_compact_index_1.mdx b/snippets/generated-code-samples/code_samples_compact_index_1.mdx index a3c0bbed9..29a9dd481 100644 --- a/snippets/generated-code-samples/code_samples_compact_index_1.mdx +++ b/snippets/generated-code-samples/code_samples_compact_index_1.mdx @@ -32,4 +32,4 @@ let task: TaskInfo = client .await .unwrap(); ``` - + \ No newline at end of file diff --git a/snippets/generated-code-samples/code_samples_getting_started_add_documents.mdx b/snippets/generated-code-samples/code_samples_getting_started_add_documents.mdx index fbd773200..f77bbe050 100644 --- a/snippets/generated-code-samples/code_samples_getting_started_add_documents.mdx +++ b/snippets/generated-code-samples/code_samples_getting_started_add_documents.mdx @@ -288,4 +288,4 @@ var client = MeiliSearchClient('http://localhost:7700', 'aSampleMasterKey'); final json = await File('movies.json').readAsString(); await client.index('movies').addDocumentsJson(json); ``` - + \ No newline at end of file From a848ad070fae93b2ab05578e5db01368b2d22abd Mon Sep 17 00:00:00 2001 From: curquiza Date: Thu, 5 Feb 2026 22:55:59 +0100 Subject: [PATCH 12/45] Fix GitHub typo --- docs.json | 60 ++++++++-------------------------------- guides/laravel_scout.mdx | 2 +- 2 files changed, 13 insertions(+), 49 deletions(-) diff --git a/docs.json b/docs.json index b0c1996e5..bd121c7e1 100644 --- a/docs.json +++ b/docs.json @@ -35,7 +35,7 @@ }, "links": [ { - "label": "Github", + "label": "GitHub", "href": "https://github.com/meilisearch/meilisearch" }, { @@ -93,7 +93,7 @@ "header": "Contact us", "items": [ { - "label": "Github", + "label": "GitHub", "href": "https://github.com/meilisearch" }, { @@ -155,10 +155,6 @@ { "version": "latest", "anchors": [ - { - "anchor": "Open API", - "openapi": "openapi-curqui.json" - }, { "anchor": "Learn", "icon": "book", @@ -348,48 +344,6 @@ } ] }, - { - "anchor": "References", - "icon": "code", - "groups": [ - { - "group": "API reference", - "pages": [ - "reference/api/overview", - "reference/api/indexes", - "reference/api/documents", - "reference/api/search", - "reference/api/multi_search", - "reference/api/network", - "reference/api/similar", - "reference/api/facet_search", - "reference/api/chats", - "reference/api/tasks", - "reference/api/batches", - "reference/api/keys", - "reference/api/settings", - "reference/api/snapshots", - "reference/api/stats", - "reference/api/health", - "reference/api/version", - "reference/api/dump", - "reference/api/experimental_features", - "reference/api/metrics", - "reference/api/logs", - "reference/api/export", - "reference/api/webhooks", - "reference/api/compact" - ] - }, - { - "group": "Errors", - "pages": [ - "reference/errors/overview", - "reference/errors/error_codes" - ] - } - ] - }, { "anchor": "Guides", "icon": "file-lines", @@ -469,6 +423,16 @@ ] } ] + }, + { + "anchor": "API Reference", + "openapi": "openapi-curqui.json", + "icon": "code", + "examples": { + "languages": ["curl", "javascript", "php", "python", "java", "ruby", "go", "csharp", "rust", "dart", "swift"], + "defaults": "required", + "prefill": true + } } ] } diff --git a/guides/laravel_scout.mdx b/guides/laravel_scout.mdx index ba8089f08..22df66e93 100644 --- a/guides/laravel_scout.mdx +++ b/guides/laravel_scout.mdx @@ -189,4 +189,4 @@ This demo application uses the following features: - [Filtering](/learn/filtering_and_sorting/filter_search_results) - [Sorting](/learn/filtering_and_sorting/sort_search_results) -Of course, the code is open-sourced on [Github](https://github.com/meilisearch/saas-demo). 🎉 +Of course, the code is open-sourced on [GitHub](https://github.com/meilisearch/saas-demo). 🎉 From 6d3e8703d176402679be1fa63794c63a50ea87a8 Mon Sep 17 00:00:00 2001 From: curquiza Date: Thu, 5 Feb 2026 23:09:43 +0100 Subject: [PATCH 13/45] Add right file for tests --- openapi-curqui.json | 4488 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 4431 insertions(+), 57 deletions(-) diff --git a/openapi-curqui.json b/openapi-curqui.json index 5539f6fa8..ea7857b98 100644 --- a/openapi-curqui.json +++ b/openapi-curqui.json @@ -15,7 +15,7 @@ }, "servers": [ { - "url": "/", + "url": "http://localhost:7700", "description": "Local server" } ], @@ -292,6 +292,36 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.GetBatches();" + }, + { + "lang": "JS", + "source": "client.batches.getBatches();" + }, + { + "lang": "PHP", + "source": "$client->getBatches();" + }, + { + "lang": "Python", + "source": "client.get_batches()" + }, + { + "lang": "Ruby", + "source": "client.batches" + }, + { + "lang": "Rust", + "source": "let mut query = meilisearch_sdk::batches::BatchesQuery::new(&client);\nquery.with_limit(20);\nlet batches: meilisearch_sdk::batches::BatchesResults =\n client.get_batches_with(&query).await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches'" + } ] } }, @@ -375,6 +405,36 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.GetBatch(BATCH_UID);" + }, + { + "lang": "JS", + "source": "client.batches.getBatch(BATCH_UID);" + }, + { + "lang": "PHP", + "source": "$client->getBatch(BATCH_UID);" + }, + { + "lang": "Python", + "source": "client.get_batch(BATCH_UID)" + }, + { + "lang": "Ruby", + "source": "client.batch(BATCH_UID)" + }, + { + "lang": "Rust", + "source": "let uid: u32 = 42;\nlet batch: meilisearch_sdk::batches::Batch = client\n .get_batch(uid)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches/BATCH_UID'" + } ] } }, @@ -429,6 +489,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.CreateDumpAsync();" + }, + { + "lang": "Dart", + "source": "await client.createDump();" + }, + { + "lang": "Go", + "source": "resp, err := client.CreateDump()" + }, + { + "lang": "JS", + "source": "client.createDump()" + }, + { + "lang": "Java", + "source": "client.createDump();" + }, + { + "lang": "PHP", + "source": "$client->createDump();" + }, + { + "lang": "Python", + "source": "client.create_dump()" + }, + { + "lang": "Ruby", + "source": "client.create_dump" + }, + { + "lang": "Rust", + "source": "client\n .create_dump()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.createDump { result in\n switch result {\n case .success(let dumpStatus):\n print(dumpStatus)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/dumps'" + } ] } }, @@ -488,6 +594,24 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.ExperimentalFeatures().Get()" + }, + { + "lang": "Ruby", + "source": "client.experimental_features" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nlet res = features\n .get()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/experimental-features/'" + } ] }, "patch": { @@ -545,6 +669,24 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.ExperimentalFeatures().SetMetrics(true).Update()" + }, + { + "lang": "Ruby", + "source": "client.update_experimental_features(metrics: true)" + }, + { + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nfeatures.set_metrics(true)\nlet res = features\n .update()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/experimental-features/' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"metrics\": true\n }'" + } ] } }, @@ -607,6 +749,16 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Java", + "source": "Map indexes = new HashMap<>();\nindexes.put(\"*\", ExportIndexFilter.builder().overrideSettings(true).build());\nExportRequest request = ExportRequest.builder().url(\"TARGET_INSTANCE_URL\").indexes(indexes).build();\nclient.export(request);" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/export' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"TARGET_INSTANCE_URL\",\n \"indexes\": {\n \"*\": {\n \"overrideSettings\": true\n }\n }\n }'" + } ] } }, @@ -632,7 +784,53 @@ } } } - } + }, + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.HealthAsync();" + }, + { + "lang": "Dart", + "source": "await client.health();" + }, + { + "lang": "Go", + "source": "client.Health()" + }, + { + "lang": "JS", + "source": "client.health()" + }, + { + "lang": "Java", + "source": "client.health();" + }, + { + "lang": "PHP", + "source": "$client->health();" + }, + { + "lang": "Python", + "source": "client.health()" + }, + { + "lang": "Ruby", + "source": "client.health" + }, + { + "lang": "Rust", + "source": "// health() return an Err() if the server is not healthy, so this example would panic due to the unwrap\nclient\n .health()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.health { (result) in\n switch result {\n case .success:\n print(\"Healthy!\")\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/health'" + } + ] } }, "/indexes": { @@ -717,6 +915,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.GetAllIndexesAsync(new IndexesQuery { Limit = 3 });" + }, + { + "lang": "Dart", + "source": "await client.getIndexes(params: IndexesQuery(limit: 3));" + }, + { + "lang": "Go", + "source": "client.GetIndexes(&meilisearch.IndexesQuery{\n Limit: 3,\n})" + }, + { + "lang": "JS", + "source": "client.getIndexes({ limit: 3 })" + }, + { + "lang": "Java", + "source": "IndexesQuery query = new IndexesQuery().setLimit(3);\nclient.getIndexes(query);" + }, + { + "lang": "PHP", + "source": "$client->getIndexes((new IndexesQuery())->setLimit(3));" + }, + { + "lang": "Python", + "source": "client.get_indexes({'limit': 3})" + }, + { + "lang": "Ruby", + "source": "client.indexes(limit: 3)" + }, + { + "lang": "Rust", + "source": "let mut indexes = IndexesQuery::new(&client)\n .with_limit(3)\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.getIndexes { (result) in\n switch result {\n case .success(let indexes):\n print(indexes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes?limit=3'" + } ] }, "post": { @@ -779,6 +1023,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "TaskInfo task = await client.CreateIndexAsync(\"movies\", \"id\");" + }, + { + "lang": "Dart", + "source": "await client.createIndex('movies', primaryKey: 'id');" + }, + { + "lang": "Go", + "source": "client.CreateIndex(&meilisearch.IndexConfig{\n Uid: \"movies\",\n PrimaryKey: \"id\",\n})" + }, + { + "lang": "JS", + "source": "client.createIndex('movies', { primaryKey: 'id' })" + }, + { + "lang": "Java", + "source": "client.createIndex(\"movies\", \"id\");" + }, + { + "lang": "PHP", + "source": "$client->createIndex('movies', ['primaryKey' => 'id']);" + }, + { + "lang": "Python", + "source": "client.create_index('movies', {'primaryKey': 'id'})" + }, + { + "lang": "Ruby", + "source": "client.create_index('movies', primary_key: 'id')" + }, + { + "lang": "Rust", + "source": "client.create_index(\"movies\", Some(\"id\"))\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.createIndex(uid: \"movies\", primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"uid\": \"movies\",\n \"primaryKey\": \"id\"\n }'" + } ] } }, @@ -860,6 +1150,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.GetIndexAsync(\"movies\");" + }, + { + "lang": "Dart", + "source": "await client.getIndex('movies');" + }, + { + "lang": "Go", + "source": "client.GetIndex(\"movies\")" + }, + { + "lang": "JS", + "source": "client.index('movies').getRawInfo()" + }, + { + "lang": "Java", + "source": "client.getIndex(\"movies\");" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->fetchRawInfo();" + }, + { + "lang": "Python", + "source": "client.get_index('movies')" + }, + { + "lang": "Ruby", + "source": "client.fetch_index('movies')" + }, + { + "lang": "Rust", + "source": "let movies: Index = client\n .get_index(\"movies\")\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.getIndex(\"movies\") { (result) in\n switch result {\n case .success(let index):\n print(index)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies'" + } ] }, "delete": { @@ -924,6 +1260,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.DeleteIndexAsync(\"movies\");" + }, + { + "lang": "Dart", + "source": "await client.index('movies').delete();\nt_one_document_1: \"await client.index('movies').getDocument(25684,\\n fields: ['id', 'title', 'poster', 'release_date']);\"" + }, + { + "lang": "Go", + "source": "client.DeleteIndex(\"movies\")\n// OR\nclient.Index(\"movies\").Delete()" + }, + { + "lang": "JS", + "source": "client.deleteIndex('movies')" + }, + { + "lang": "Java", + "source": "client.deleteIndex(\"movies\");" + }, + { + "lang": "PHP", + "source": "$client->deleteIndex('movies');" + }, + { + "lang": "Python", + "source": "client.delete_index('movies')\n// OR\nclient.index('movies').delete()" + }, + { + "lang": "Ruby", + "source": "client.delete_index('movies')" + }, + { + "lang": "Rust", + "source": "client.index(\"movies\")\n .delete()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").delete { (result) in\n switch result {\n case .success:\n print(\"Index deleted\")\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies'" + } ] }, "patch": { @@ -998,6 +1380,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "TaskInfo task = await client.UpdateIndexAsync(\"movies\", \"id\");" + }, + { + "lang": "Dart", + "source": "await client.index('movies').update(primaryKey: 'id');" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateIndex(&meilisearch.UpdateIndexRequestParams{\n PrimaryKey: \"id\",\n})" + }, + { + "lang": "JS", + "source": "client.updateIndex('movies', { primaryKey: 'id' })" + }, + { + "lang": "Java", + "source": "client.updateIndex(\"movies\", \"id\");" + }, + { + "lang": "PHP", + "source": "$client->updateIndex('movies', ['primaryKey' => 'id']);" + }, + { + "lang": "Python", + "source": "client.index('movies').update(primary_key='id')" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update(primary_key: 'movie_id')" + }, + { + "lang": "Rust", + "source": "let task = IndexUpdater::new(\"movies\", &client)\n .with_primary_key(\"movie_review_id\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").update(primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"primaryKey\": \"id\" }'" + } ] } }, @@ -1063,6 +1491,28 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Java", + "source": "client.index(\"INDEX_NAME\").compact();" + }, + { + "lang": "Python", + "source": "client.index('movies').compact()" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_UID').compact" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"INDEX_UID\")\n .compact()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_UID/compact'" + } ] } }, @@ -1231,6 +1681,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() { Limit = 2, Filter = \"genres = action\" });" + }, + { + "lang": "Go", + "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"movies\").GetDocuments(&meilisearch.DocumentsQuery{\n Limit: 2,\n Filter: \"genres = action\",\n}, &result)" + }, + { + "lang": "JS", + "source": "client.index('movies').getDocuments({\n limit: 2,\n filter: 'genres = action',\n sort: ['release_date:desc']\n})" + }, + { + "lang": "Java", + "source": "DocumentsQuery query = new DocumentsQuery().setLimit(2).setFilter(new String[] {\"genres = action\"});\nclient.index(\"movies\").getDocuments(query, TargetClassName.class);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getDocuments((new DocumentsQuery())->setFilter('genres = action')->setLimit(2));" + }, + { + "lang": "Python", + "source": "client.index('movies').get_documents({\n 'limit':2, 'filter': 'genres=action',\n 'sort': ['rating:desc', 'release_date:asc'] # list format\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').get_documents(limit: 2, filter: 'genres = action')" + }, + { + "lang": "Rust", + "source": "let index = client.index(\"movies\");\nlet documents: DocumentsResults = DocumentsQuery::new(&index)\n .with_filter(\"genres = action\")\n .with_limit(2)\n .execute::()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getDocuments(params: DocumentsQuery(limit: 2)) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let movies):\n print(movies)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents?limit=2&filter=genres=action'" + } ] }, "put": { @@ -1344,15 +1836,57 @@ "*" ] } - ] - }, - "post": { - "tags": [ - "Documents" ], - "summary": "Add or replace documents", - "description": "Add a list of documents or replace them if they already exist.\n\nIf you send an already existing document (same id) the whole existing\ndocument will be overwritten by the new document. Fields previously in the\ndocument not present in the new document are removed.\n\nFor a partial update of the document see Add or update documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document.\n> `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved\n> `_vectors` field in your documents. It can accept an array of floats,\n> multiple arrays of floats in an outer array or an object. This object\n> accepts keys corresponding to the different embedders defined your index\n> settings.", - "operationId": "replace_documents", + "x-codeSamples": [ + { + "lang": "C#", + "source": "var movie = new[]\n{\n new Movie { Id = \"287947\", Title = \"Shazam ⚡️\", Genres = \"comedy\" }\n};\nawait index.UpdateDocumentsAsync(movie);" + }, + { + "lang": "Go", + "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\",\n },\n}\noptions := &meilisearch.DocumentOptions{SkipCreation: true}\nclient.Index(\"movies\").UpdateDocuments(documents, options)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateDocuments([{\n id: 287947,\n title: 'Shazam ⚡️',\n genres: 'comedy'\n}])" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateDocuments(\"[{\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam ⚡️\\\",\"\n + \"\\\"genres\\\": \\\"comedy\\\"\"\n + \"}]\"\n);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateDocuments([\n [\n 'id' => 287947,\n 'title' => 'Shazam ⚡️',\n 'genres' => 'comedy'\n ]\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_documents([{\n 'id': 287947,\n 'title': 'Shazam ⚡️',\n 'genres': 'comedy'\n}], skip_creation=True)" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_documents([\n {\n id: 287947,\n title: 'Shazam ⚡️',\n genres: 'comedy'\n }\n])" + }, + { + "lang": "Rust", + "source": "// Define the type of our documents\n#[derive(Serialize, Deserialize)]\nstruct IncompleteMovie {\n id: usize,\n title: String,\n genres: String\n}\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .add_or_update(&[\n IncompleteMovie {\n id: 287947,\n title: \"Shazam ⚡️\".to_string(),\n genres: \"comedy\".to_string()\n }\n ], None)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let documentJsonString = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\"\n }\n]\n\"\"\"\nlet documents: Data = documentJsonString.data(using: .utf8)!\n\nclient.index(\"movies\").updateDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\"\n }\n ]'" + } + ] + }, + "post": { + "tags": [ + "Documents" + ], + "summary": "Add or replace documents", + "description": "Add a list of documents or replace them if they already exist.\n\nIf you send an already existing document (same id) the whole existing\ndocument will be overwritten by the new document. Fields previously in the\ndocument not present in the new document are removed.\n\nFor a partial update of the document see Add or update documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document.\n> `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved\n> `_vectors` field in your documents. It can accept an array of floats,\n> multiple arrays of floats in an outer array or an object. This object\n> accepts keys corresponding to the different embedders defined your index\n> settings.", + "operationId": "replace_documents", "parameters": [ { "name": "indexUid", @@ -1457,6 +1991,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var movie = new[]\n{\n new Movie\n {\n Id = \"287947\",\n Title = \"Shazam\",\n Poster = \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n Overview = \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n ReleaseDate = \"2019-03-23\"\n }\n};\nawait index.AddDocumentsAsync(movie);" + }, + { + "lang": "Dart", + "source": "await client.index('movies').addDocuments([\n {\n 'id': 287947,\n 'title': 'Shazam',\n 'poster':\n 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview':\n 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n }\n]);\nd_or_update_documents_1: \"await client.index('movies').updateDocuments([\\n {\\n 'id': 287947,\\n 'title': 'Shazam ⚡️',\\n 'genres': 'comedy',\\n }\\n]);\"" + }, + { + "lang": "Go", + "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\",\n },\n}\noptions := &meilisearch.DocumentOptions{SkipCreation: false}\nclient.Index(\"movies\").AddDocuments(documents, options)" + }, + { + "lang": "JS", + "source": "client.index('movies').addDocuments([{\n id: 287947,\n title: 'Shazam',\n poster: 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n overview: 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n release_date: '2019-03-23'\n}])" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").addDocuments(\"[{\"\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam\\\",\"\n + \"\\\"poster\\\": \\\"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\\\",\"\n + \"\\\"overview\\\": \\\"A boy is given the ability to become an adult superhero in times of need with a single magic word.\\\",\"\n + \"\\\"release_date\\\": \\\"2019-03-23\\\"\"\n + \"}]\"\n);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->addDocuments([\n [\n 'id' => 287947,\n 'title' => 'Shazam',\n 'poster' => 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview' => 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date' => '2019-03-23'\n ]\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').add_documents([{\n 'id': 287947,\n 'title': 'Shazam',\n 'poster': 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview': 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n}], skip_creation=True)" + }, + { + "lang": "Ruby", + "source": "client.index('movies').add_documents([\n {\n id: 287947,\n title: 'Shazam',\n poster: 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n overview: 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n release_date: '2019-03-23'\n }\n])" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .add_or_replace(&[\n Movie {\n id: 287947,\n title: \"Shazam\".to_string(),\n poster: \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\".to_string(),\n overview: \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\".to_string(),\n release_date: \"2019-03-23\".to_string(),\n }\n ], None)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let documentJsonString = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n]\n\"\"\"\nlet documents: Data = documentJsonString.data(using: .utf8)!\n\nclient.index(\"movies\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n ]'" + } ] }, "delete": { @@ -1521,6 +2101,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteAllDocumentsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').deleteAllDocuments();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").DeleteAllDocuments()" + }, + { + "lang": "JS", + "source": "client.index('movies').deleteAllDocuments()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").deleteAllDocuments();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->deleteAllDocuments();" + }, + { + "lang": "Python", + "source": "client.index('movies').delete_all_documents()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').delete_all_documents" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_all_documents()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").deleteAllDocuments() { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/documents'" + } ] } }, @@ -1597,6 +2223,44 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new DeleteDocumentsQuery() { Filter = \"genres = action OR genres = adventure\" });" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").DeleteDocumentsByFilter(\"genres=action OR genres=adventure\")" + }, + { + "lang": "JS", + "source": "client.index('movies').deleteDocuments({\n filter: 'genres = action OR genres = adventure'\n})" + }, + { + "lang": "Java", + "source": "String filter = \"genres = action OR genres = adventure\";\nclient.index(\"movies\").deleteDocumentsByFilter(filter);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->deleteDocuments(['filter' => 'genres = action OR genres = adventure']);" + }, + { + "lang": "Python", + "source": "client.index('movies').delete_documents(filter='genres=action OR genres=adventure')" + }, + { + "lang": "Ruby", + "source": "client.index('movies').delete_documents(filter: 'genres = action OR genres = adventure')" + }, + { + "lang": "Rust", + "source": "let index = client.index(\"movies\");\nlet task = DocumentDeletionQuery::new(&index)\n .with_filter(\"genres = action OR genres = adventure\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/movies/documents/delete \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"genres = action OR genres = adventure\"\n }'" + } ] } }, @@ -1674,6 +2338,44 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new[] { \"23488\", \"153738\", \"437035\", \"363869\" });" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").DeleteDocuments([]string{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\",\n})" + }, + { + "lang": "JS", + "source": "client.index('movies').deleteDocuments([23488, 153738, 437035, 363869])" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").deleteDocuments(Arrays.asList(new String[]\n{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\"\n}));" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->deleteDocuments([23488, 153738, 437035, 363869]);" + }, + { + "lang": "Python", + "source": "client.index('movies').delete_documents([23488, 153738, 437035, 363869])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').delete_documents([23488, 153738, 437035, 363869])" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_documents(&[23488, 153738, 437035, 363869])\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents/delete-batch' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n 23488,\n 153738,\n 437035,\n 363869\n ]'" + } ] } }, @@ -1749,6 +2451,12 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents/edit' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"function\": \"doc.new_field = `a]new[value`\",\n \"filter\": \"id > 3000\",\n \"context\": {\n \"max_title_length\": 10\n }\n }'" + } ] } }, @@ -1845,6 +2553,44 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() {\n Limit = 3,\n Fields = new List { \"title\", \"genres\", \"rating\", \"language\"},\n Filter = \"(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English\"\n});" + }, + { + "lang": "Go", + "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"books\").GetDocuments(&meilisearch.DocumentsQuery{\n Fields: []string{\"title\", \"genres\", \"rating\", \"language\"},\n Filter: \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n}, &result)" + }, + { + "lang": "JS", + "source": "client.index('books').getDocuments({\n filter: '(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English',\n fields: ['title', 'genres', 'rating', 'language'],\n limit: 3,\n sort: ['release_date:desc']\n})" + }, + { + "lang": "Java", + "source": "DocumentsQuery query = new DocumentsQuery()\n .setFilter(new String[] {\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\"})\n .setFields(new String[] {\"title\", \"genres\", \"rating\", \"language\"})\n .setLimit(3);\nclient.index(\"books\").getDocuments(query, TargetClassName.class);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->getDocuments(\n (new DocumentsQuery())\n ->setFilter('(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English')\n ->setLimit(3)\n ->setFields(['title', 'genres', 'rating', 'language'])\n);" + }, + { + "lang": "Python", + "source": "client.index('books').get_documents({\n 'limit':3,\n 'fields': ['title', 'genres', 'rating', 'language'],\n 'filter': '(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English',\n 'sort': 'rating:desc, title:asc' # comma-separated string format\n})" + }, + { + "lang": "Ruby", + "source": "client.index('books').get_documents(\n filter: '(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English',\n limit: 3,\n fields: ['title', 'genres', 'rating', 'language']\n)" + }, + { + "lang": "Rust", + "source": "let index = client.index(\"books\");\nlet documents: DocumentsResults = DocumentsQuery::new(&index)\n .with_filter(\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\")\n .with_fields([\"title\", \"genres\", \"rating\", \"language\"])\n .with_limit(2)\n .execute::()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/books/documents/fetch \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n \"fields\": [\"title\", \"genres\", \"rating\", \"language\"],\n \"limit\": 3\n }'" + } ] } }, @@ -1956,6 +2702,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetDocumentAsync(25684, new List { \"id\", \"title\", \"poster\", \"release_date\" });" + }, + { + "lang": "Go", + "source": "var a interface{}\nclient.Index(\"movies\").GetDocument(\"25684\",&meilisearch.DocumentQuery{\n Fields: []string{\"id\", \"title\", \"poster\", \"release_date\"},\n}, &a)" + }, + { + "lang": "JS", + "source": "client\n .index('movies')\n .getDocument(25684, { fields: ['id', 'title', 'poster', 'release_date'] })" + }, + { + "lang": "Java", + "source": "DocumentQuery query = new DocumentQuery().setFields(new String[] {\"id\", \"title\", \"poster\", \"release_date\"});\nclient.index(\"movies\").getDocument(\"25684\", query);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getDocument(25684, ['id', 'title', 'poster', 'release_date']);" + }, + { + "lang": "Python", + "source": "client.index('movies').get_document(25684, {\n 'fields': ['id', 'title', 'poster', 'release_date']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').document(25684, fields: ['id', 'title', 'poster', 'release_date'])" + }, + { + "lang": "Rust", + "source": "let index = client\n .index(\"movies\");\nlet document = DocumentQuery::new(&index)\n .with_fields([\"id\", \"title\", \"poster\", \"release_date\"])\n .execute::(\"25684\")\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getDocument(25684) { (result: Result) in\n switch result {\n case .success(let movie):\n print(movie)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents/25684?fields=id,title,poster,release_date'" + } ] }, "delete": { @@ -2030,6 +2818,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteOneDocumentAsync(\"25684\");" + }, + { + "lang": "Dart", + "source": "await client.index('movies').deleteDocument(25684);\nlete_documents_by_batch_1: \"await client.index('movies').deleteDocuments(\\n DeleteDocumentsQuery(\\n ids: [23488, 153738, 437035, 363869],\\n ),\\n );\"" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").DeleteDocument(\"25684\")" + }, + { + "lang": "JS", + "source": "client.index('movies').deleteDocument(25684)" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").deleteDocument(\"25684\");" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->deleteDocument(25684);" + }, + { + "lang": "Python", + "source": "client.index('movies').delete_document(25684)" + }, + { + "lang": "Ruby", + "source": "client.index('movies').delete_document(25684)" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_document(25684)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").deleteDocument(\"25684\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/documents/25684'" + } ] } }, @@ -2137,6 +2971,44 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var query = new SearchFacetsQuery()\n{\n FacetQuery = \"fiction\",\n Filter = \"rating > 3\"\n};\nawait client.Index(\"books\").FacetSearchAsync(\"genres\", query);" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").FacetSearch(&meilisearch.FacetSearchRequest{\n FacetQuery: \"fiction\",\n FacetName: \"genres\",\n Filter: \"rating > 3\",\n})" + }, + { + "lang": "JS", + "source": "client.index('books').searchForFacetValues({\n facetQuery: 'fiction',\n facetName: 'genres'\n filter: 'rating > 3'\n})" + }, + { + "lang": "Java", + "source": "FacetSearchRequest fsr = FacetSearchRequest.builder().facetName(\"genres\").facetQuery(\"fiction\").filter(new String[]{\"rating > 3\"}).build();\nclient.index(\"books\").facetSearch(fsr);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->facetSearch(\n (new FacetSearchQuery())\n ->setFacetQuery('fiction')\n ->setFacetName('genres')\n ->setFilter(['rating > 3'])\n);" + }, + { + "lang": "Python", + "source": "client.index('books').facet_search('genres', 'fiction', {\n 'filter': 'rating > 3'\n})" + }, + { + "lang": "Ruby", + "source": "client.index('books').facet_search('genres', 'fiction', filter: 'rating > 3')" + }, + { + "lang": "Rust", + "source": "let res = client.index(\"books\")\n .facet_search(\"genres\")\n .with_facet_query(\"fiction\")\n .with_filter(\"rating > 3\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"facetQuery\": \"fiction\",\n \"facetName\": \"genres\",\n \"filter\": \"rating > 3\"\n }'" + } ] } }, @@ -2546,6 +3418,16 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "JS", + "source": "client.index('movies').searchGet('American ninja')" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/search?q=american%20ninja'" + } ] }, "post": { @@ -2652,6 +3534,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").SearchAsync(\"American ninja\");\nt_task_1: |\nTaskInfo task = await client.GetTaskAsync(1);\nt_all_tasks_1: |\nResourceResults taskResult = await client.GetTasksAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').search('American ninja');" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").Search(\"american ninja\", &meilisearch.SearchRequest{})" + }, + { + "lang": "JS", + "source": "client.index('movies').search('American ninja')" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").search(\"American ninja\");" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->search('american ninja');" + }, + { + "lang": "Python", + "source": "client.index('movies').search('American ninja')" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search('american ninja')" + }, + { + "lang": "Rust", + "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"american ninja\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let searchParameters = SearchParameters(query: \"American ninja\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"american ninja\" }'" + } ] } }, @@ -2712,6 +3640,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetSettingsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getSettings();\ndate_settings_1: \"await client.index('movies').updateSettings(\\n IndexSettings(\\n rankingRules: [\\n 'words',\\n 'typo',\\n 'proximity',\\n 'attribute',\\n 'sort',\\n 'exactness',\\n 'release_date:desc',\\n 'rank:desc'\\n ],\\n distinctAttribute: 'movie_id',\\n searchableAttributes: ['title', 'overview', 'genres'],\\n displayedAttributes: [\\n 'title',\\n 'overview',\\n 'genres',\\n 'release_date'\\n ],\\n stopWords: ['the', 'a', 'an'],\\n sortableAttributes: ['title', 'release_date'],\\n synonyms: {\\n 'wolverine': ['xmen', 'logan'],\\n 'logan': ['wolverine'],\\n },\\n ),\\n );\"" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetSettings()" + }, + { + "lang": "JS", + "source": "client.index('movies').getSettings()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getSettings();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_settings()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').settings" + }, + { + "lang": "Rust", + "source": "let settings: Settings = client\n .index(\"movies\")\n .get_settings()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getSettings { (result) in\n switch result {\n case .success(let setting):\n print(setting)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings'" + } ] }, "delete": { @@ -2776,14 +3750,60 @@ "*" ] } - ] - }, - "patch": { - "tags": [ - "Settings" ], - "summary": "Update settings", - "description": "Update the settings of an index.\nPassing null to an index setting will reset it to its default value.\nUpdates in the settings route are partial. This means that any parameters not provided in the body will be left unchanged.\nIf the provided index does not exist, it will be created.", + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSettingsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetSettings();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetSettings()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetSettings()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetSettings();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_settings()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_settings" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_settings()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").resetSettings { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings'" + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update settings", + "description": "Update the settings of an index.\nPassing null to an index setting will reset it to its default value.\nUpdates in the settings route are partial. This means that any parameters not provided in the body will be left unchanged.\nIf the provided index does not exist, it will be created.", "operationId": "update_all", "parameters": [ { @@ -2850,6 +3870,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "Settings newSettings = new Settings\n{\n RankingRules = new string[]\n {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n },\n DistinctAttribute = \"movie_id\",\n SearchableAttributes = new string[] { \"title\", \"overview\", \"genres\" },\n DisplayedAttributes = new string[] { \"title\", \"overview\", \"genres\", \"release_date\" },\n SortableAttributes = new string[] { \"title\", \"release_date\" },\n StopWords = new string[] { \"the\", \"a\", \"an\" },\n Synonyms = new Dictionary>\n {\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\" } },\n },\n FilterableAttributes = new string[] { },\n TypoTolerance = new TypoTolerance\n {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeForTypos = new TypoTolerance.TypoSize\n {\n OneTypo = 8,\n TwoTypos = 10\n }\n },\n SearchCutoffMs = 150\n};\nTaskInfo task = await client.Index(\"movies\").UpdateSettingsAsync(newFilters);" + }, + { + "lang": "Go", + "source": "distinctAttribute := \"movie_id\"\nsettings := meilisearch.Settings{\n RankingRules: []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\",\n },\n DistinctAttribute: &distinctAttribute,\n SearchableAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n },\n DisplayedAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n },\n StopWords: []string{\n \"the\",\n \"a\",\n \"an\",\n },\n SortableAttributes: []string{\n \"title\",\n \"release_date\",\n },\n Synonyms: map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\"},\n },\n TypoTolerance: &meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 8,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n },\n Pagination: &meilisearch.Pagination{\n MaxTotalHits: 5000,\n },\n Faceting: &meilisearch.Faceting{\n MaxValuesPerFacet: 200,\n },\n SearchCutoffMs: 150,\n}\nclient.Index(\"movies\").UpdateSettings(&settings)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateSettings({\n rankingRules: [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n distinctAttribute: 'movie_id',\n searchableAttributes: [\n 'title',\n 'overview',\n 'genres'\n ],\n displayedAttributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n stopWords: [\n 'the',\n 'a',\n 'an'\n ],\n sortableAttributes: [\n 'title',\n 'release_date'\n ],\n synonyms: {\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine']\n },\n typoTolerance: {\n 'minWordSizeForTypos': {\n 'oneTypo': 8,\n 'twoTypos': 10\n },\n 'disableOnAttributes': [\n 'title'\n ]\n },\n pagination: {\n maxTotalHits: 5000\n },\n faceting: {\n maxValuesPerFacet: 200\n },\n searchCutoffMs: 150\n})" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setRankingRules(\n new String[] {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n });\nsettings.setDistinctAttribute(\"movie_id\");\nsettings.setSearchableAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\"\n });\nsettings.setDisplayedAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n });\nsettings.setStopWords(\n new String[] {\n \"the\",\n \"a\",\n \"an\"\n });\nsettings.setSortableAttributes(\n new String[] {\n \"title\",\n \"release_date\"\n });\n\nHashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nsettings.setSynonyms(synonyms);\n\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 8);\n put(\"twoTypos\", 10);\n }\n };\nTypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\nsettings.setTypoTolerance(typoTolerance);\nsettings.setSearchCutoffMs(150);\nclient.index(\"movies\").updateSettings(settings);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateSettings([\n 'rankingRules' => [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n 'distinctAttribute' => 'movie_id',\n 'searchableAttributes' => [\n 'title',\n 'overview',\n 'genres'\n ],\n 'displayedAttributes' => [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n 'stopWords' => [\n 'the',\n 'a',\n 'an'\n ],\n 'sortableAttributes' => [\n 'title',\n 'release_date'\n ],\n 'synonyms' => [\n 'wolverine' => ['xmen', 'logan'],\n 'logan' => ['wolverine']\n ],\n 'typoTolerance' => [\n 'minWordSizeForTypos' => [\n 'oneTypo' => 8,\n 'twoTypos' => 10\n ],\n 'disableOnAttributes' => ['title']\n ],\n 'pagination' => [\n 'maxTotalHits' => 5000\n ],\n 'faceting' => [\n 'maxValuesPerFacet' => 200\n ],\n 'searchCutoffMs' => 150\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_settings({\n 'rankingRules': [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n 'distinctAttribute': 'movie_id',\n 'searchableAttributes': [\n 'title',\n 'overview',\n 'genres'\n ],\n 'displayedAttributes': [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n 'sortableAttributes': [\n 'title',\n 'release_date'\n ],\n 'stopWords': [\n 'the',\n 'a',\n 'an'\n ],\n 'synonyms': {\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine']\n },\n 'typoTolerance': {\n 'minWordSizeForTypos': {\n 'oneTypo': 8,\n 'twoTypos': 10\n },\n 'disableOnAttributes': ['title']\n },\n 'pagination': {\n 'maxTotalHits': 5000\n },\n 'faceting': {\n 'maxValuesPerFacet': 200\n },\n 'searchCutoffMs': 150\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_settings({\n ranking_rules: [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n distinct_attribute: 'movie_id',\n searchable_attributes: [\n 'title',\n 'overview',\n 'genres'\n ],\n displayed_attributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n stop_words: [\n 'the',\n 'a',\n 'an'\n ],\n sortable_attributes: [\n 'title',\n 'release_date'\n ],\n synonyms: {\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine']\n },\n pagination: {\n max_total_hits: 5000\n },\n faceting: {\n max_values_per_facet: 200\n },\n search_cutoff_ms: 150\n})" + }, + { + "lang": "Rust", + "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"wolverine\"), vec![\"xmen\", \"logan\"]);\nsynonyms.insert(String::from(\"logan\"), vec![\"wolverine\"]);\n\nlet min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(4),\n two_typos; Some(12)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![\"title\".to_string()]),\n disable_on_words: Some(vec![])\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet settings = Settings::new()\n .with_ranking_rules([\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ])\n .with_distinct_attribute(Some(\"movie_id\"))\n .with_searchable_attributes([\n \"title\",\n \"overview\",\n \"genres\"\n ])\n .with_displayed_attributes([\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ])\n .with_stop_words([\n \"the\",\n \"a\",\n \"an\"\n ])\n .with_sortable_attributes([\n \"title\",\n \"release_date\"\n ])\n .with_synonyms(synonyms)\n .with_typo_tolerance(typo_tolerance)\n .with_search_cutoff(150);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_settings(&settings)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let settings = Setting(rankingRules: [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n], searchableAttributes: [\n \"title\",\n \"overview\",\n \"genres\"\n], displayedAttributes: [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n], stopWords: [\n \"the\",\n \"a\",\n \"an\"\n], synonyms: [\n \"wolverine\": [\"xmen\", \"logan\"],\n \"logan\": [\"wolverine\"]\n], distinctAttribute: \"movie_id\",\nsortableAttributes: [\n \"title\",\n \"release_date\"\n])\nclient.index(\"movies\").updateSettings(settings) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"rankingRules\": [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ],\n \"distinctAttribute\": \"movie_id\",\n \"searchableAttributes\": [\n \"title\",\n \"overview\",\n \"genres\"\n ],\n \"displayedAttributes\": [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ],\n \"stopWords\": [\n \"the\",\n \"a\",\n \"an\"\n ],\n \"sortableAttributes\": [\n \"title\",\n \"release_date\"\n ],\n \"synonyms\": {\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\"wolverine\"]\n },\n \"typoTolerance\": {\n \"minWordSizeForTypos\": {\n \"oneTypo\": 8,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n },\n \"pagination\": {\n \"maxTotalHits\": 5000\n },\n \"faceting\": {\n \"maxValuesPerFacet\": 200\n },\n \"searchCutoffMs\": 150\n }'" + } ] } }, @@ -2910,6 +3972,12 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/chat'" + } ] }, "delete": { @@ -2984,6 +4052,12 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/chat'" + } ] }, "patch": { @@ -3058,6 +4132,12 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/chat' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"description\": \"An index of movies.\",\n \"documentTemplate\": \"A movie titled '{{doc.title}}' released in {{ doc.release_date }}\",\n \"documentTemplateMaxBytes\": 400\n }'" + } ] } }, @@ -3122,6 +4202,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var indexDictionary = await client.Index(\"books\").GetDictionaryAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetDictionary()" + }, + { + "lang": "JS", + "source": "client.index('books').getDictionary()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").getDictionarySettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->getDictionary();" + }, + { + "lang": "Python", + "source": "client.index('books').get_dictionary()" + }, + { + "lang": "Ruby", + "source": "client.index('books').dictionary" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('books')\n .get_dictionary()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").getDictionary { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/dictionary'" + } ] }, "put": { @@ -3200,6 +4322,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var newDictionary = new string[] { \"J. R. R.\", \"W. E. B.\" };\nawait client.Index(\"books\").UpdateDictionaryAsync(newDictionary);" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateDictionary([]string{\n \"J. R. R.\",\n \"W. E. B.\",\n})" + }, + { + "lang": "JS", + "source": "client.index('books').updateDictionary(['J. R. R.', 'W. E. B.'])" + }, + { + "lang": "Java", + "source": "client.index(\"books\").updateDictionarySettings(new String[] {\"J. R. R.\", \"W. E. B.\"});" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateDictionary(['J. R. R.', 'W. E. B.']);" + }, + { + "lang": "Python", + "source": "client.index('books').update_dictionary([\"J. R. R.\", \"W. E. B.\"])" + }, + { + "lang": "Ruby", + "source": "client.index('books').update_dictionary(['J. R. R.', 'W. E. B.'])" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('books')\n .set_dictionary(['J. R. R.', 'W. E. B.'])\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").updateDictionary([\"J. R. R.\", \"W. E. B.\"]) { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/dictionary' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"J. R. R.\",\n \"W. E. B.\"\n ]'" + } ] }, "delete": { @@ -3278,6 +4442,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").ResetDictionaryAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetDictionary()" + }, + { + "lang": "JS", + "source": "client.index('books').resetDictionary()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").resetDictionarySettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->resetDictionary();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_dictionary()" + }, + { + "lang": "Ruby", + "source": "client.index('books').reset_dictionary" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('books')\n .reset_dictionary()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").resetDictionary { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/dictionary'" + } ] } }, @@ -3341,6 +4547,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetDisplayedAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getDisplayedAttributes();\ndate_displayed_attributes_1: \"await client.index('movies').updateDisplayedAttributes([\\n 'title',\\n 'overview',\\n 'genres',\\n 'release_date',\\n]);\"" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetDisplayedAttributes()" + }, + { + "lang": "JS", + "source": "client.index('movies').getDisplayedAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getDisplayedAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getDisplayedAttributes();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_displayed_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').get_displayed_attributes" + }, + { + "lang": "Rust", + "source": "let displayed_attributes: Vec = client\n .index(\"movies\")\n .get_displayed_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getDisplayedAttributes { (result) in\n switch result {\n case .success(let displayedAttributes):\n print(displayedAttributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" + } ] }, "put": { @@ -3418,6 +4670,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateDisplayedAttributesAsync(new[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" + }, + { + "lang": "Go", + "source": "displayedAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n}\nclient.Index(\"movies\").UpdateDisplayedAttributes(&displayedAttributes)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateDisplayedAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" + }, + { + "lang": "Rust", + "source": "let displayed_attributes = [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_displayed_attributes(&displayed_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let displayedAttributes: [String] = [\"title\", \"overview\", \"genres\", \"release_date\"]\nclient.index(\"movies\").updateDisplayedAttributes(displayedAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ]'" + } ] }, "delete": { @@ -3495,6 +4789,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetDisplayedAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetDisplayedAttributes();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetDisplayedAttributes()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetDisplayedAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetDisplayedAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetDisplayedAttributes();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_displayed_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_displayed_attributes" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_displayed_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").resetDisplayedAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" + } ] } }, @@ -3555,6 +4895,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "string result = await client.Index(\"shoes\").GetDistinctAttributeAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('shoes').getDistinctAttribute();" + }, + { + "lang": "Go", + "source": "client.Index(\"shoes\").GetDistinctAttribute()" + }, + { + "lang": "JS", + "source": "client.index('shoes').getDistinctAttribute()" + }, + { + "lang": "Java", + "source": "client.index(\"shoes\").getDistinctAttributeSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('shoes')->getDistinctAttribute();" + }, + { + "lang": "Python", + "source": "client.index('shoes').get_distinct_attribute()" + }, + { + "lang": "Ruby", + "source": "client.index('shoes').distinct_attribute" + }, + { + "lang": "Rust", + "source": "let distinct_attribute: Option = client\n .index(\"shoes\")\n .get_distinct_attribute()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"shoes\").getDistinctAttribute { (result) in\n switch result {\n case .success(let distinctAttribute):\n print(distinctAttribute)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" + } ] }, "put": { @@ -3629,6 +5015,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "TaskInfo result = await client.Index(\"shoes\").UpdateDistinctAttributeAsync(\"skuid\");" + }, + { + "lang": "Dart", + "source": "await client.index('shoes').updateDistinctAttribute('skuid');" + }, + { + "lang": "Go", + "source": "client.Index(\"shoes\").UpdateDistinctAttribute(\"skuid\")" + }, + { + "lang": "JS", + "source": "client.index('shoes').updateDistinctAttribute('skuid')" + }, + { + "lang": "Java", + "source": "client.index(\"shoes\").updateDistinctAttributeSettings(\"skuid\");" + }, + { + "lang": "PHP", + "source": "$client->index('shoes')->updateDistinctAttribute('skuid');" + }, + { + "lang": "Python", + "source": "client.index('shoes').update_distinct_attribute('skuid')" + }, + { + "lang": "Ruby", + "source": "client.index('shoes').update_distinct_attribute('skuid')" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"shoes\")\n .set_distinct_attribute(\"skuid\")\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"shoes\").updateDistinctAttribute(\"skuid\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"skuid\"'" + } ] }, "delete": { @@ -3703,28 +5135,74 @@ "*" ] } - ] - } - }, - "/indexes/{indexUid}/settings/embedders": { - "get": { - "tags": [ - "Settings" ], - "summary": "Get embedders", - "description": "Get an user defined embedders", - "operationId": "getembedders", - "parameters": [ + "x-codeSamples": [ { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } + "lang": "C#", + "source": "TaskInfo result = await client.Index(\"shoes\").ResetDistinctAttributeAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('shoes').resetDistinctAttribute();" + }, + { + "lang": "Go", + "source": "client.Index(\"shoes\").ResetDistinctAttribute()" + }, + { + "lang": "JS", + "source": "client.index('shoes').resetDistinctAttribute()" + }, + { + "lang": "Java", + "source": "client.index(\"shoes\").resetDistinctAttributeSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('shoes')->resetDistinctAttribute();" + }, + { + "lang": "Python", + "source": "client.index('shoes').reset_distinct_attribute()" + }, + { + "lang": "Ruby", + "source": "client.index('shoes').reset_distinct_attribute" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"shoes\")\n .reset_distinct_attribute()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"shoes\").resetDistinctAttribute { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" + } + ] + } + }, + "/indexes/{indexUid}/settings/embedders": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get embedders", + "description": "Get an user defined embedders", + "operationId": "getembedders", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } ], "responses": { "200": { @@ -3769,6 +5247,20 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').embedders" + }, + { + "lang": "Rust", + "source": "let embedders = index.get_embedders().await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" + } ] }, "delete": { @@ -3849,6 +5341,20 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').reset_embedders" + }, + { + "lang": "Rust", + "source": "index.reset_embedders().await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" + } ] }, "patch": { @@ -3929,6 +5435,28 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "JS", + "source": "client.index('INDEX_NAME').updateEmbedders({\n default: {\n source: 'openAi',\n apiKey: 'OPEN_AI_API_KEY',\n model: 'text-embedding-3-small',\n documentTemplate: 'A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}'\n }\n});" + }, + { + "lang": "PHP", + "source": "$client->updateEmbedders([\n 'default' => [\n 'source' => 'openAi',\n 'apiKey' => 'OPEN_AI_API_KEY',\n 'model' => 'text-embedding-3-small',\n 'documentTemplate' => 'A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}'\n ]\n]);" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').update_embedders(\n default: {\n source: 'openAi',\n api_key: 'OPEN_AI_API_KEY',\n model: 'text-embedding-3-small',\n document_template: \"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\"\n }\n)" + }, + { + "lang": "Rust", + "source": "let embedders = HashMap::from([(\n String::from(\"default\"),\n Embedder {\n source: EmbedderSource::OpenAi,\n api_key: Some(String::from(\"OPEN_AI_API_KEY\")),\n model: Some(String::from(\"text-embedding-3-small\")),\n document_template: Some(String::from(\"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\")),\n ..Embedder::default()\n }\n)]);\nlet task = index\n .set_embedders(&embedders)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"default\": {\n \"source\": \"openAi\",\n \"apiKey\": \"OPEN_AI_API_KEY\",\n \"model\": \"text-embedding-3-small\",\n \"documentTemplate\": \"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\"\n }\n }'" + } ] } }, @@ -3989,6 +5517,36 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.Index(\"books\").GetFacetSearch()" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').getFacetSearch();" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->getFacetSearch();" + }, + { + "lang": "Python", + "source": "client.index('books').get_facet_search_settings()" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_UID').facet_search_setting" + }, + { + "lang": "Rust", + "source": "let facet_search: bool = client\n .index(INDEX_UID)\n .get_facet_search()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" + } ] }, "put": { @@ -4063,6 +5621,36 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateFacetSearch(false)" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').updateFacetSearch(false);" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->updateFacetSearch(false);" + }, + { + "lang": "Python", + "source": "client.index('books').update_facet_search_settings(False)" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_UID').update_facet_search_setting(false)" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_facet_search(false)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary 'false'" + } ] }, "delete": { @@ -4137,6 +5725,36 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.Index(\"books\").ResetFacetSearch()" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').resetFacetSearch();" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->resetFacetSearch();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_facet_search_settings()" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_UID').reset_facet_search_setting" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_facet_search()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" + } ] } }, @@ -4197,6 +5815,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetFacetingAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getFaceting();\ndate_faceting_settings_1: \"await client.index('books').updateFaceting(Faceting(\\n maxValuesPerFacet: 2,\\n sortFacetValuesBy: {\\n '*': FacetingSortTypes.alpha,\\n 'genres': FacetingSortTypes.count\\n }));\"" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetFaceting()" + }, + { + "lang": "JS", + "source": "client.index('books').getFaceting()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").getFacetingSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->getFaceting();" + }, + { + "lang": "Python", + "source": "client.index('books').get_faceting_settings()" + }, + { + "lang": "Ruby", + "source": "client.index('books').faceting" + }, + { + "lang": "Rust", + "source": "let faceting: FacetingSettings = client\n .index(\"books\")\n .get_faceting()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/faceting'" + } ] }, "delete": { @@ -4271,6 +5931,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetFacetingAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetFaceting();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetFaceting()" + }, + { + "lang": "JS", + "source": "client.index('books').resetFaceting()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").resetFacetingSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->resetFaceting();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_faceting_settings()" + }, + { + "lang": "Ruby", + "source": "index('books').reset_faceting" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_faceting()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/faceting'" + } ] }, "patch": { @@ -4345,6 +6047,44 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var faceting = new Faceting\n{\n MaxValuesPerFacet = 2,\n SortFacetValuesBy = new Dictionary\n {\n [\"*\"] = SortFacetValuesByType.Alpha,\n [\"genres\"] = SortFacetValuesByType.Count\n }\n};\nawait client.Index(\"books\").UpdateFacetingAsync(faceting);" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateFaceting(&meilisearch.Faceting{\n MaxValuesPerFacet: 2,\n SortFacetValuesBy: {\n \"*\": SortFacetTypeAlpha,\n \"genres\": SortFacetTypeCount,\n }\n})" + }, + { + "lang": "JS", + "source": "client.index('books').updateFaceting({\n maxValuesPerFacet: 2\n sortFacetValuesBy: {\n '*': 'alpha',\n genres: 'count'\n }\n})" + }, + { + "lang": "Java", + "source": "Faceting newFaceting = new Faceting();\nnewFaceting.setMaxValuesPerFacet(2);\nHashMap facetSortValues = new HashMap<>();\nfacetSortValues.put(\"*\", FacetSortValue.ALPHA);\nfacetSortValues.put(\"genres\", FacetSortValue.COUNT);\nnewFaceting.setSortFacetValuesBy(facetSortValues);\nclient.index(\"books\").updateFacetingSettings(newFaceting);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateFaceting([\n 'maxValuesPerFacet' => 2,\n 'sortFacetValuesBy' => ['*' => 'alpha', 'genres' => 'count']\n]);" + }, + { + "lang": "Python", + "source": "params = {\n 'maxValuesPerFacet': 2,\n 'sortFacetValuesBy': {\n '*': 'count',\n 'genres': 'count'\n }\n}\nclient.index('books').update_faceting_settings(params)" + }, + { + "lang": "Ruby", + "source": "client.index('books').update_faceting({\n max_values_per_facet: 2,\n sort_facet_values_by: {\n '*': 'alpha',\n genres: 'count'\n }\n})" + }, + { + "lang": "Rust", + "source": "let mut facet_sort_setting = BTreeMap::new();\nfacet_sort_setting.insert(String::from(\"*\"), FacetSortValue::Alpha);\nfacet_sort_setting.insert(String::from(\"genres\"), FacetSortValue::Count);\nlet mut faceting = FacetingSettings {\n max_values_per_facet: 2,\n sort_facet_values_by: Some(facet_sort_setting),\n};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_faceting(&faceting)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/faceting' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxValuesPerFacet\": 2,\n \"sortFacetValuesBy\": {\n \"*\": \"alpha\",\n \"genres\": \"count\"\n }\n }'" + } ] } }, @@ -4408,6 +6148,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "IEnumerable attributes = await client.Index(\"movies\").GetFilterableAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getFilterableAttributes();\ndate_filterable_attributes_1: \"await client\\n .index('movies')\\n .updateFilterableAttributes(['genres', 'director']);\"" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetFilterableAttributes()" + }, + { + "lang": "JS", + "source": "client.index('movies').getFilterableAttributes()" + }, + { + "lang": "Java", + "source": "// Granular filterable attributes API (v1.14+)\nclient.index(\"movies\").getGranularFilterableAttributesSettings();\n// Legacy String[] API\nclient.index(\"movies\").getFilterableAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getFilterableAttributes();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_filterable_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').filterable_attributes" + }, + { + "lang": "Rust", + "source": "let filterable_attributes: Vec = client\n .index(\"movies\")\n .get_filterable_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" + } ] }, "put": { @@ -4485,6 +6271,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "List attributes = new() { \"genres\", \"director\" };\nTaskInfo result = await client.Index(\"movies\").UpdateFilterableAttributesAsync(attributes);" + }, + { + "lang": "Go", + "source": "filterableAttributes := []interface{}{\n \"genres\",\n \"director\",\n AttributeRule{\n AttributePatterns: []string{\"tag\"}\n Features: AttributeFeatures{\n FacetSearch: false,\n Filter: FilterFeatures{\n Equality: true,\n Comparison: false,\n }\n }\n },\n map[string]interface{}{\n \"attributePatterns\": []interface{}{\"year\"}\n \"features\": map[string]interface{}{\n \"facetSearch\": false,\n \"filter\": map[string]interface{}{\n \"equality\": true,\n \"comparison\": true,\n }\n }\n }\n}\nclient.Index(\"movies\").UpdateFilterableAttributes(&filterableAttributes)" + }, + { + "lang": "JS", + "source": "client.index('movies')\n .updateFilterableAttributes([\n \"genres\",\n {\n attributePatterns: [\"genre\"],\n features: {\n facetSearch: true,\n filter: { equality: true, comparison: false },\n },\n }\n ])" + }, + { + "lang": "Java", + "source": "FilterableAttributesConfig genres = FilterableAttributesConfig.simple(\"genres\");\n\nFilterableAttributesFilter directorFilter = new FilterableAttributesFilter();\ndirectorFilter.setEquality(true);\ndirectorFilter.setComparison(false);\n\nFilterableAttributesFeatures directorFeatures = new FilterableAttributesFeatures();\ndirectorFeatures.setFacetSearch(true);\ndirectorFeatures.setFilter(directorFilter);\n\nFilterableAttributesConfig director = new FilterableAttributesConfig();\ndirector.setAttributePatterns(new String[] {\"director\"});\ndirector.setFeatures(directorFeatures);\n\n// Update settings\nclient.index(\"movies\").updateGranularFilterableAttributesSettings(\n new FilterableAttributesConfig[] {genres, director});" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateFilterableAttributes([\n 'author',\n [\n 'attributePatterns' => ['genres'],\n 'features' => [\n 'facetSearch' => true,\n 'filter' => [\n 'equality' => true,\n 'comparison' => false,\n ],\n ],\n ],\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_filterable_attributes([\n 'genres',\n 'director'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_filterable_attributes([\n 'genres',\n 'director'\n])" + }, + { + "lang": "Rust", + "source": "use meilisearch_sdk::settings::{\n FilterableAttribute,\n FilterableAttributesSettings,\n FilterFeatures,\n FilterFeatureModes,\n};\n\n// Mixed legacy + new syntax\nlet filterable_attributes: Vec = vec![\n // legacy: plain attribute name\n \"author\".into(),\n // new syntax: settings object\n FilterableAttribute::Settings(FilterableAttributesSettings {\n attribute_patterns: vec![\"genre\".to_string()],\n features: FilterFeatures {\n facet_search: true,\n filter: FilterFeatureModes { equality: true, comparison: false },\n },\n }),\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_filterable_attributes_advanced(filterable_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").updateFilterableAttributes([\"genre\", \"director\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"genres\",\n \"director\",\n {\n \"attributePatterns\": [\"*_ratings\"],\n \"features\": {\n \"facetSearch\": false,\n \"filter\": {\n \"equality\": true,\n \"comparison\": false\n }\n }\n }\n ]'" + } ] }, "delete": { @@ -4562,6 +6390,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "TaskInfo result = await client.Index(\"movies\").ResetFilterableAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetFilterableAttributes();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetFilterableAttributes()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetFilterableAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetFilterableAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetFilterableAttributes();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_filterable_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_filterable_attributes" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_filterable_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").resetFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" + } ] } }, @@ -4625,23 +6499,57 @@ "*" ] } - ] - }, - "put": { - "tags": [ - "Settings" ], - "summary": "Update localizedAttributes", - "description": "Update an index's user defined localizedAttributes", - "operationId": "putlocalizedAttributes", - "parameters": [ + "x-codeSamples": [ { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" + "lang": "Go", + "source": "client.index(\"INDEX_NAME\").GetLocalizedAttributes()" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').getLocalizedAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"INDEX_NAME\").getLocalizedAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->getLocalizedAttributes();" + }, + { + "lang": "Python", + "source": "client.index('INDEX_NAME').get_localized_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').localized_attributes" + }, + { + "lang": "Rust", + "source": "let localized_attributes: Option> = client\n .index(\"books\")\n .get_localized_attributes()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update localizedAttributes", + "description": "Update an index's user defined localizedAttributes", + "operationId": "putlocalizedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" }, "example": "movies" } @@ -4702,6 +6610,40 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.index(\"INDEX_NAME\").UpdateLocalizedAttributes([]*LocalizedAttributes{\n { AttributePatterns: [\"*_ja\"], Locales: [\"jpn\"] },\n})" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').updateLocalizedAttributes([\n { attributePatterns: ['*_ja'], locales: ['jpn'] },\n])" + }, + { + "lang": "Java", + "source": "LocalizedAttribute attribute = new LocalizedAttribute();\nattribute.setAttributePatterns(new String[] {\"jpn\"});\nattribute.setLocales(new String[] {\"*_ja\"});\n\nclient.index(\"INDEX_NAME\").updateLocalizedAttributesSettings(\n new LocalizedAttributes[] {attribute}\n);" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->updateLocalizedAttributes([\n 'locales' => ['jpn'],\n 'attributePatterns' => ['*_ja']\n]);" + }, + { + "lang": "Python", + "source": "client.index('INDEX_NAME').update_localized_attributes([\n {'attribute_patterns': ['*_ja'], 'locales': ['jpn']}\n])" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').update_localized_attributes([\n { attribute_patterns: ['*_ja'], locales: ['jpn'] },\n])" + }, + { + "lang": "Rust", + "source": "let localized_attributes = vec![LocalizedAttributes {\n locales: vec![\"jpn\".to_string()],\n attribute_patterns: vec![\"*_ja\".to_string()],\n}];\nlet task: TaskInfo = client\n .index(\"books\")\n .set_localized_attributes(&localizced_attributes)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\"locales\": [\"jpn\"], \"attributePatterns\": [\"*_ja\"]}\n ]'" + } ] }, "delete": { @@ -4779,6 +6721,40 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.index(\"INDEX_NAME\").ResetLocalizedAttributes()" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').resetLocalizedAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"INDEX_NAME\").resetLocalizedAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->resetLocalizedAttributes();" + }, + { + "lang": "Python", + "source": "client.index('INDEX_NAME').reset_localized_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').reset_localized_attributes" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_localized_attributes()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" + } ] } }, @@ -4843,6 +6819,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetNonSeparatorTokensAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").GetNonSeparatorTokens()" + }, + { + "lang": "JS", + "source": "client.index('books').getNonSeparatorTokens()" + }, + { + "lang": "Java", + "source": "client.index(\"articles\").getNonSeparatorTokensSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('articles')->getNonSeparatorTokens();" + }, + { + "lang": "Python", + "source": "client.index('articles').get_non_separator_tokens()" + }, + { + "lang": "Ruby", + "source": "client.index('articles').non_separator_tokens" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('articles')\n .get_non_separator_tokens()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").getNonSeparatorTokens { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" + } ] }, "put": { @@ -4921,6 +6939,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateNonSeparatorTokensAsync(new[] { \"@\", \"#\" });" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").UpdateNonSeparatorTokens([]string{\n \"@\",\n \"#\",\n})" + }, + { + "lang": "JS", + "source": "client.index('books').updateNonSeparatorTokens(['@', '#'])" + }, + { + "lang": "Java", + "source": "String[] newSeparatorTokens = { \"@\", \"#\" };\nclient.index(\"articles\").updateNonSeparatorTokensSettings(newSeparatorTokens);" + }, + { + "lang": "PHP", + "source": "$client->index('articles')->updateNonSeparatorTokens(['@', '#']);" + }, + { + "lang": "Python", + "source": "client.index('articles').update_non_separator_tokens([\"@\", \"#\"])" + }, + { + "lang": "Ruby", + "source": "client.index('articles').update_non_separator_tokens(['@', '#'])" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('articles')\n .set_non_separator_tokens(&vec!['@'.to_string(), '#'.to_string()])\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").updateNonSeparatorTokens([\"@\", \"#\"]) { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"@\", \"#\"]'" + } ] }, "delete": { @@ -4999,6 +7059,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetNonSeparatorTokensAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").ResetNonSeparatorTokens()" + }, + { + "lang": "JS", + "source": "client.index('books').resetNonSeparatorTokens()" + }, + { + "lang": "Java", + "source": "client.index(\"articles\").resetNonSeparatorTokensSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('articles')->resetNonSeparatorTokens();" + }, + { + "lang": "Python", + "source": "client.index('articles').reset_non_separator_tokens()" + }, + { + "lang": "Ruby", + "source": "client.index('articles').reset_non_separator_tokens" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('articles')\n .reset_non_separator_tokens()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").resetNonSeparatorTokens { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" + } ] } }, @@ -5059,6 +7161,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetPaginationAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getPagination();\ndate_pagination_settings_1: \"await client\\n .index('books')\\n .updatePagination(Pagination(maxTotalHits: 100));\"" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetPagination()" + }, + { + "lang": "JS", + "source": "client.index('books').getPagination()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").getPaginationSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->getPagination();" + }, + { + "lang": "Python", + "source": "client.index('books').get_pagination_settings()" + }, + { + "lang": "Ruby", + "source": "index('books').pagination" + }, + { + "lang": "Rust", + "source": "let pagination: PaginationSetting = client\n .index(\"books\")\n .get_pagination()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/pagination'" + } ] }, "delete": { @@ -5133,6 +7277,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetPaginationAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetPagination();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetPagination()" + }, + { + "lang": "JS", + "source": "client.index('books').resetPagination()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").resetPaginationSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->resetPagination();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_pagination_settings()" + }, + { + "lang": "Ruby", + "source": "index('books').reset_pagination" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_pagination()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/pagination'" + } ] }, "patch": { @@ -5207,6 +7393,44 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var pagination = new Pagination {\n MaxTotalHits = 20\n};\nawait client.Index(\"movies\").UpdatePaginationAsync(pagination);" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdatePagination(&meilisearch.Pagination{\n MaxTotalHits: 100,\n})" + }, + { + "lang": "JS", + "source": "client.index('books').updateSettings({ pagination: { maxTotalHits: 100 }})" + }, + { + "lang": "Java", + "source": "Pagination newPagination = new Pagination();\nnewPagination.setMaxTotalHits(100);\nclient.index(\"books\").updatePaginationSettings(newPagination);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateSettings([\n 'pagination' => [\n 'maxTotalHits' => 100\n ]\n]);" + }, + { + "lang": "Python", + "source": "client.index('books').update_pagination_settings({'maxTotalHits': 100})" + }, + { + "lang": "Ruby", + "source": "index('books').update_pagination({ max_total_hits: 100 })" + }, + { + "lang": "Rust", + "source": "let pagination = PaginationSetting {max_total_hits:100};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_pagination(pagination)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/pagination' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxTotalHits\": 100\n }'" + } ] } }, @@ -5267,6 +7491,36 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.Index(\"books\").GetPrefixSearch()" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').getPrefixSearch();" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->getPrefixSearch();" + }, + { + "lang": "Python", + "source": "client.index('books').get_prefix_search()" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_UID').prefix_search" + }, + { + "lang": "Rust", + "source": "let prefix_search: PrefixSearchSettings = client\n .index(INDEX_UID)\n .get_prefix_search()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" + } ] }, "put": { @@ -5341,6 +7595,36 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.Index(\"books\").UpdatePrefixSearch(\"disabled\")" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').updatePrefixSearch('disabled');" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->updatePrefixSearch('disabled');" + }, + { + "lang": "Python", + "source": "client.index('books').update_prefix_search(PrefixSearch.DISABLED)" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_UID').update_prefix_search('disabled')" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_prefix_search(PrefixSearchSettings::Disabled)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"disabled\"'" + } ] }, "delete": { @@ -5415,6 +7699,36 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.Index(\"books\").ResetPrefixSearch()" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').resetPrefixSearch();" + }, + { + "lang": "PHP", + "source": "$client->index('INDEX_NAME')->resetPrefixSearch();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_prefix_search()" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_UID').reset_prefix_search" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_prefix_search()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" + } ] } }, @@ -5475,6 +7789,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").GetProximityPrecisionAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetProximityPrecision()" + }, + { + "lang": "JS", + "source": "client.index('books').getProximityPrecision()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").getProximityPrecisionSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->getProximityPrecision();" + }, + { + "lang": "Python", + "source": "client.index('books').get_proximity_precision()" + }, + { + "lang": "Ruby", + "source": "client.index('books').proximity_precision" + }, + { + "lang": "Rust", + "source": "let proximity_precision: String = client\n .index(\"books\")\n .get_proximity_precision()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let precisionValue = try await self.client.index(\"books\").getProximityPrecision()" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" + } ] }, "put": { @@ -5549,6 +7905,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").UpdateProximityPrecisionAsync(\"byAttribute\");" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateProximityPrecision(ByAttribute)" + }, + { + "lang": "JS", + "source": "client.index('books').updateProximityPrecision('byAttribute')" + }, + { + "lang": "Java", + "source": "client.index(\"books\").updateProximityPrecisionSettings(\"byAttribute\");" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateProximityPrecision('byAttribute');" + }, + { + "lang": "Python", + "source": "client.index('books').update_proximity_precision(ProximityPrecision.BY_ATTRIBUTE)" + }, + { + "lang": "Ruby", + "source": "client.index('books').update_proximity_precision('byAttribute')" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .set_proximity_precision(\"byAttribute\".to_string())\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let task = try await self.client.index(\"books\").updateProximityPrecision(.byWord)" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/proximity-precision' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"byAttribute\"'" + } ] }, "delete": { @@ -5623,6 +8021,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").ResetProximityPrecisionAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetProximityPrecision()" + }, + { + "lang": "JS", + "source": "client.index('books').resetProximityPrecision()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").resetProximityPrecisionSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->resetProximityPrecision();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_proximity_precision()" + }, + { + "lang": "Ruby", + "source": "client.index('books').reset_proximity_precision" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_proximity_precision()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let task = try await self.client.index(\"books\").resetProximityPrecision()" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" + } ] } }, @@ -5686,6 +8126,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetRankingRulesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getRankingRules();\ndate_ranking_rules_1: \"await client.index('movies').updateRankingRules([\\n 'words',\\n 'typo',\\n 'proximity',\\n 'attribute',\\n 'sort',\\n 'exactness',\\n 'release_date:asc',\\n 'rank:desc',\\n]);\"" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetRankingRules()" + }, + { + "lang": "JS", + "source": "client.index('movies').getRankingRules()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getRankingRulesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getRankingRules();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_ranking_rules()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').ranking_rules" + }, + { + "lang": "Rust", + "source": "let ranking_rules: Vec = client\n .index(\"movies\")\n .get_ranking_rules()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getRankingRules { (result) in\n switch result {\n case .success(let rankingRules):\n print(rankingRules)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" + } ] }, "put": { @@ -5763,6 +8249,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateRankingRulesAsync(new[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});" + }, + { + "lang": "Go", + "source": "rankingRules := []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\",\n}\nclient.Index(\"movies\").UpdateRankingRules(&rankingRules)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateRankingRules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" + }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setRankingRules(new String[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});\nclient.index(\"movies\").updateSettings(settings);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateRankingRules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_ranking_rules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_ranking_rules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" + }, + { + "lang": "Rust", + "source": "let ranking_rules = [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\",\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_ranking_rules(&ranking_rules)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let rankingRules: [String] = [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n]\nclient.index(\"movies\").updateRankingRules(rankingRules) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n ]'" + } ] }, "delete": { @@ -5840,6 +8368,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetRankingRulesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetRankingRules();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetRankingRules()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetRankingRules()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetRankingRulesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetRankingRules();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_ranking_rules()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_ranking_rules" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_ranking_rules()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").resetRankingRules { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" + } ] } }, @@ -5902,6 +8476,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var searchCutoff = await client.Index(\"movies\").GetSearchCutoffMsAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetSearchCutoffMs()" + }, + { + "lang": "JS", + "source": "client.index('movies').getSearchCutoffMs()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getSearchCutoffMsSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getSearchCutoffMs();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_search_cutoff_ms()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').search_cutoff_ms" + }, + { + "lang": "Rust", + "source": "let search_cutoff_ms: String = client\n .index(\"movies\")\n .get_search_cutoff_ms()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let precisionValue = try await self.client.index(\"books\").getSearchCutoffMs()" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" + } ] }, "put": { @@ -5978,6 +8594,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSearchCutoffMsAsync(150);" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateSearchCutoffMs(150)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateSearchCutoffMs(150)" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateSearchCutoffMsSettings(150);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateSearchCutoffMs(150);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_search_cutoff_ms(150)" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_search_cutoff_ms(150)" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .set_search_cutoff_ms(Some(150))\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let task = try await self.client.index(\"books\").updateSearchCutoffMs(150)" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '150'" + } ] }, "delete": { @@ -6054,6 +8712,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSearchCutoffMsAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetSearchCutoffMs()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetSearchCutoffMs()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetSearchCutoffMsSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetSearchCutoffMs();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_search_cutoff_ms()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_search_cutoff_ms" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_search_cutoff_ms()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let task = try await self.client.index(\"books\").resetSearchCutoffMs()" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" + } ] } }, @@ -6117,6 +8817,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetSearchableAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getSearchableAttributes();\ndate_searchable_attributes_1: \"await client\\n .index('movies')\\n .updateSearchableAttributes(['title', 'overview', 'genres']);\"" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetSearchableAttributes()" + }, + { + "lang": "JS", + "source": "client.index('movies').getSearchableAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getSearchableAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getSearchableAttributes();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_searchable_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').searchable_attributes" + }, + { + "lang": "Rust", + "source": "let searchable_attributes: Vec = client\n .index(\"movies\")\n .get_searchable_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getSearchableAttributes { (result) in\n switch result {\n case .success(let searchableAttributes):\n print(searchableAttributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" + } ] }, "put": { @@ -6194,6 +8940,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSearchableAttributesAsync(new[] {\"title\", \"overview\", \"genres\"});" + }, + { + "lang": "Go", + "source": "searchableAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n}\nclient.Index(\"movies\").UpdateSearchableAttributes(&searchableAttributes)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n])" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateSearchableAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\"\n});" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" + }, + { + "lang": "Rust", + "source": "let searchable_attributes = [\n \"title\",\n \"overview\",\n \"genres\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_searchable_attributes(&searchable_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let searchableAttributes: [String] = [\"title\", \"overview\", \"genres\"]\nclient.index(\"movies\").updateSearchableAttributes(searchableAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\"\n ]'" + } ] }, "delete": { @@ -6271,6 +9059,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSearchableAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetSearchableAttributes();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetSearchableAttributes()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetSearchableAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetSearchableAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetSearchableAttributes();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_searchable_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_searchable_attributes" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_searchable_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").resetSearchableAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" + } ] } }, @@ -6335,6 +9169,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetSeparatorTokensAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").GetSeparatorTokens()" + }, + { + "lang": "JS", + "source": "client.index('books').getSeparatorTokens()" + }, + { + "lang": "Java", + "source": "client.index(\"articles\").getSeparatorTokensSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('articles')->getSeparatorTokens();" + }, + { + "lang": "Python", + "source": "client.index('articles').get_separator_tokens()" + }, + { + "lang": "Ruby", + "source": "client.index('articles').separator_tokens" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('articles')\n .get_separator_tokens()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").getSeparatorTokens { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" + } ] }, "put": { @@ -6413,6 +9289,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSeparatorTokensAsync(new[] { \"|\", \"…\" });" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").UpdateSeparatorTokens([]string{\n \"|\",\n \"…\",\n})" + }, + { + "lang": "JS", + "source": "client.index('books').updateSeparatorTokens(['|', '…'])" + }, + { + "lang": "Java", + "source": "String[] newSeparatorTokens = { \"|\", \"…\" };\nclient.index(\"articles\").updateSeparatorTokensSettings(newSeparatorTokens);" + }, + { + "lang": "PHP", + "source": "$client->index('articles')->updateSeparatorTokens(['|', '…']);" + }, + { + "lang": "Python", + "source": "client.index('articles').update_separator_tokens([\"|\", \"…\"])" + }, + { + "lang": "Ruby", + "source": "client.index('articles').update_separator_tokens(['|', '…'])" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('articles')\n .set_separator_tokens(&vec!['|'.to_string(), '…'.to_string()])\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").updateSeparatorTokens([\"|\", \"…\"]) { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"|\", \"…\"]'" + } ] }, "delete": { @@ -6491,6 +9409,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSeparatorTokensAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").ResetSeparatorTokens()" + }, + { + "lang": "JS", + "source": "client.index('books').resetSeparatorTokens()" + }, + { + "lang": "Java", + "source": "client.index(\"articles\").resetSeparatorTokensSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('articles')->resetSeparatorTokens();" + }, + { + "lang": "Python", + "source": "client.index('articles').reset_separator_tokens()" + }, + { + "lang": "Ruby", + "source": "client.index('articles').reset_separator_tokens" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index('articles')\n .reset_separator_tokens()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").resetSeparatorTokens { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" + } ] } }, @@ -6555,6 +9515,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").GetSortableAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('books').getSortableAttributes();\ndate_sortable_attributes_1: \"await client.index('books').updateSortableAttributes(['price', 'author']);\"" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetSortableAttributes()" + }, + { + "lang": "JS", + "source": "client.index('books').getSortableAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").getSortableAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->getSortableAttributes();" + }, + { + "lang": "Python", + "source": "client.index('books').get_sortable_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('books').sortable_attributes" + }, + { + "lang": "Rust", + "source": "let sortable_attributes: Vec = client\n .index(\"books\")\n .get_sortable_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").getSortableAttributes { (result: Result, Swift.Error>) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" + } ] }, "put": { @@ -6633,6 +9639,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").UpdateSortableAttributesAsync(new [] { \"price\", \"author\" });" + }, + { + "lang": "Go", + "source": "sortableAttributes := []string{\n \"price\",\n \"author\",\n}\nclient.Index(\"books\").UpdateSortableAttributes(&sortableAttributes)" + }, + { + "lang": "JS", + "source": "client.index('books')\n .updateSortableAttributes([\n 'price',\n 'author'\n ])" + }, + { + "lang": "Java", + "source": "client.index(\"books\").updateSortableAttributesSettings(new String[] {\"price\", \"author\"});" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateSortableAttributes([\n 'price',\n 'author'\n]);" + }, + { + "lang": "Python", + "source": "client.index('books').update_sortable_attributes([\n 'price',\n 'author'\n])" + }, + { + "lang": "Ruby", + "source": "client.index('books').update_sortable_attributes([\n 'price',\n 'author'\n])" + }, + { + "lang": "Rust", + "source": "let sortable_attributes = [\n \"price\",\n \"author\"\n];\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_sortable_attributes(&sortable_attributes)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").updateSortableAttributes([\"price\", \"author\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"price\",\n \"author\"\n ]'" + } ] }, "delete": { @@ -6711,6 +9759,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").ResetSortableAttributesAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('books').resetSortableAttributes();\narch_parameter_guide_sort_1: \"await client\\n .index('books')\\n .search('science fiction', SearchQuery(sort: ['price:asc']));\"" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetSortableAttributes()" + }, + { + "lang": "JS", + "source": "client.index('books').resetSortableAttributes()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").resetSortableAttributesSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->resetSortableAttributes();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_sortable_attributes()" + }, + { + "lang": "Ruby", + "source": "client.index('books').reset_sortable_attributes" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_sortable_attributes()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"books\").resetSortableAttributes() { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" + } ] } }, @@ -6775,6 +9869,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetStopWordsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getStopWords();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetStopWords()" + }, + { + "lang": "JS", + "source": "client.index('movies').getStopWords()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getStopWordsSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getStopWords();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_stop_words()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').stop_words" + }, + { + "lang": "Rust", + "source": "let stop_words: Vec = client\n .index(\"movies\")\n .get_stop_words()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getStopWords { (result) in\n switch result {\n case .success(let stopWords):\n print(stopWords)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" + } ] }, "put": { @@ -6853,6 +9993,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateStopWordsAsync(new[] {\"of\", \"the\", \"to\"});" + }, + { + "lang": "Dart", + "source": "await client.index('movies').updateStopWords(['of', 'the', 'to']);" + }, + { + "lang": "Go", + "source": "stopWords := []string{\"of\", \"the\", \"to\"}\nclient.Index(\"movies\").UpdateStopWords(&stopWords)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateStopWords(['of', 'the', 'to'])" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateStopWordsSettings(new String[] {\"of\", \"the\", \"to\"});" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateStopWords(['the', 'of', 'to']);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_stop_words(['of', 'the', 'to'])" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_stop_words(['of', 'the', 'to'])" + }, + { + "lang": "Rust", + "source": "let stop_words = [\"of\", \"the\", \"to\"];\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_stop_words(&stop_words)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let stopWords: [String] = [\"of\", \"the\", \"to\"]\nclient.index(\"movies\").updateStopWords(stopWords) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/stop-words' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"the\",\n \"of\",\n \"to\"\n ]'" + } ] }, "delete": { @@ -6931,6 +10117,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetStopWordsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetStopWords();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetStopWords()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetStopWords()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetStopWordsSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetStopWords();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_stop_words()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_stop_words" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_stop_words()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").resetStopWords { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" + } ] } }, @@ -7000,6 +10232,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetSynonymsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getSynonyms();\ndate_synonyms_1: \"await client.index('movies').updateSynonyms({\\n 'wolverine': ['xmen', 'logan'],\\n 'logan': ['wolverine', 'xmen'],\\n 'wow': ['world of warcraft'],\\n});\"" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetSynonyms()" + }, + { + "lang": "JS", + "source": "client.index('movies').getSynonyms()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getSynonymsSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->getSynonyms();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_synonyms()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').synonyms" + }, + { + "lang": "Rust", + "source": "let synonyms: HashMap> = client\n .index(\"movies\")\n .get_synonyms()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").getSynonyms { (result) in\n switch result {\n case .success(let synonyms):\n print(synonyms)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" + } ] }, "put": { @@ -7083,6 +10361,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var synonyms = new Dictionary>\n{\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\", \"xmen\" } },\n { \"wow\", new string[] { \"world of warcraft\" } }\n};\nawait client.Index(\"movies\").UpdateSynonymsAsync(synonyms);" + }, + { + "lang": "Go", + "source": "synonyms := map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\", \"xmen\"},\n \"wow\": []string{\"world of warcraft\"},\n}\nclient.Index(\"movies\").UpdateSynonyms(&synonyms)" + }, + { + "lang": "JS", + "source": "client.index('movies').updateSynonyms({\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine', 'xmen'],\n wow: ['world of warcraft']\n})" + }, + { + "lang": "Java", + "source": "HashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nclient.index(\"movies\").updateSynonymsSettings(synonyms);" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->updateSynonyms([\n 'wolverine' => ['xmen', 'logan'],\n 'logan' => ['wolverine', 'xmen'],\n 'wow' => ['world of warcraft']\n]);" + }, + { + "lang": "Python", + "source": "client.index('movies').update_synonyms({\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine', 'xmen'],\n 'wow': ['world of warcraft']\n})" + }, + { + "lang": "Ruby", + "source": "client.index('movies').update_synonyms({\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine', 'xmen'],\n wow: ['world of warcraft']\n})" + }, + { + "lang": "Rust", + "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"wolverine\"), vec![String::from(\"xmen\"), String::from(\"logan\")]);\nsynonyms.insert(String::from(\"logan\"), vec![String::from(\"xmen\"), String::from(\"wolverine\")]);\nsynonyms.insert(String::from(\"wow\"), vec![String::from(\"world of warcraft\")]);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_synonyms(&synonyms)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let synonyms: [String: [String]] = [\n \"wolverine\": [\"xmen\", \"logan\"],\n \"logan\": [\"wolverine\", \"xmen\"],\n \"wow\": [\"world of warcraft\"]\n]\nclient.index(\"movies\").updateSynonyms(synonyms) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/synonyms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\n \"wolverine\",\n \"xmen\"\n ],\n \"wow\": [\"world of warcraft\"]\n }'" + } ] }, "delete": { @@ -7160,11 +10480,57 @@ }, "security": [ { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSynonymsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').resetSynonyms();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetSynonyms()" + }, + { + "lang": "JS", + "source": "client.index('movies').resetSynonyms()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetSynonymsSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->resetSynonyms();" + }, + { + "lang": "Python", + "source": "client.index('movies').reset_synonyms()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').reset_synonyms" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_synonyms()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").resetSynonyms { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" } ] } @@ -7226,6 +10592,40 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Dart", + "source": "await client.index('books').getTypoTolerance();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetTypoTolerance()" + }, + { + "lang": "JS", + "source": "client.index('books').getTypoTolerance()" + }, + { + "lang": "PHP", + "source": "$client->index('books')->getTypoTolerance();" + }, + { + "lang": "Python", + "source": "client.index('books').get_typo_tolerance()" + }, + { + "lang": "Ruby", + "source": "index('books').typo_tolerance" + }, + { + "lang": "Rust", + "source": "let typo_tolerance: TypoToleranceSettings = client\n .index(\"books\")\n .get_typo_tolerance()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" + } ] }, "delete": { @@ -7300,6 +10700,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"books\").ResetTypoToleranceAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('books').resetTypoTolerance();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetTypoTolerance()" + }, + { + "lang": "JS", + "source": "client.index('books').resetTypoTolerance()" + }, + { + "lang": "Java", + "source": "client.index(\"books\").resetTypoToleranceSettings();" + }, + { + "lang": "PHP", + "source": "$client->index('books')->resetTypoTolerance();" + }, + { + "lang": "Python", + "source": "client.index('books').reset_typo_tolerance()" + }, + { + "lang": "Ruby", + "source": "index('books').reset_typo_tolerance" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_typo_tolerance()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" + } ] }, "patch": { @@ -7374,6 +10816,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "var typoTolerance = new TypoTolerance {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeTypos = new TypoTolerance.TypoSize {\n OneTypo = 4,\n TwoTypos = 10\n }\n};\n\nawait client.Index(\"books\").UpdateTypoToleranceAsync(typoTolerance);" + }, + { + "lang": "Dart", + "source": "final toUpdate = TypoTolerance(\n minWordSizeForTypos: MinWordSizeForTypos(\n oneTypo: 4,\n twoTypos: 10,\n ),\n disableOnAttributes: ['title'],\n);\nawait client.index('books').updateTypoTolerance(toUpdate);" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 4,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n})" + }, + { + "lang": "JS", + "source": "client.index('books').updateTypoTolerance({\n minWordSizeForTypos: {\n oneTypo: 4,\n twoTypos: 10\n },\n disableOnAttributes: [\n 'title'\n ]\n})" + }, + { + "lang": "Java", + "source": "TypoTolerance typoTolerance = new TypoTolerance();\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 4);\n put(\"twoTypos\", 10);\n }\n };\n\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\ntypoTolerance.setDisableOnAttributes(new String[] {\"title\"});\n\nclient.index(\"books\").updateTypoToleranceSettings(typoTolerance);" + }, + { + "lang": "PHP", + "source": "$client->index('books')->updateTypoTolerance([\n 'minWordSizeForTypos' => [\n 'oneTypo' => 4,\n 'twoTypos' => 10\n ],\n 'disableOnAttributes' => [\n 'title'\n ]\n]);" + }, + { + "lang": "Python", + "source": "client.index('books').update_typo_tolerance({\n 'minWordSizeForTypos': {\n 'oneTypo': 4,\n 'twoTypos': 10\n },\n 'disableOnAttributes': [\n 'title'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "index('books').update_typo_tolerance({\n min_word_size_for_typos: {\n one_typo: 4,\n two_typos: 10\n },\n disable_on_attributes: ['title']\n})" + }, + { + "lang": "Rust", + "source": "let typo_tolerance = TypoToleranceSettings {\n enabled: Some(false),\n disable_on_attributes: None,\n disable_on_words: None,\n min_word_size_for_typos: None,\n};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"minWordSizeForTypos\": {\n \"oneTypo\": 4,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n }'" + } ] } }, @@ -7434,6 +10918,12 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store'" + } ] }, "delete": { @@ -7508,6 +10998,12 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store'" + } ] }, "patch": { @@ -7582,6 +11078,12 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"experimental\"'" + } ] } }, @@ -7786,6 +11288,12 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/similar?id=TARGET_DOCUMENT_ID&embedder=EMBEDDER_NAME'" + } ] }, "post": { @@ -7891,6 +11399,36 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "resp := new(meilisearch.SimilarDocumentResult)\nclient.Index(\"INDEX_NAME\").SearchSimilarDocuments(&meilisearch.SimilarDocumentQuery{\n Id: \"TARGET_DOCUMENT_ID\",\n Embedder: \"default\",\n}, resp)" + }, + { + "lang": "JS", + "source": "client.index('INDEX_NAME').searchSimilarDocuments({ id: 'TARGET_DOCUMENT_ID', embedder: 'default' })" + }, + { + "lang": "PHP", + "source": "$similarQuery = new SimilarDocumentsQuery('TARGET_DOCUMENT_ID', 'default');\n$client->index('INDEX_NAME')->searchSimilarDocuments($similarQuery);" + }, + { + "lang": "Python", + "source": "client.index(\"INDEX_NAME\").get_similar_documents({\"id\": \"TARGET_DOCUMENT_ID\", \"embedder\": \"default\"})" + }, + { + "lang": "Ruby", + "source": "client.index('INDEX_NAME').search_similar_documents('TARGET_DOCUMENT_ID', embedder: 'default')" + }, + { + "lang": "Rust", + "source": "let results = index\n .similar_search(\"TARGET_DOCUMENT_ID\", \"EMBEDDER_NAME\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/similar' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"id\": TARGET_DOCUMENT_ID,\n \"embedder\": \"EMBEDDER_NAME\"\n }'" + } ] } }, @@ -7978,6 +11516,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetStatsAsync();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').getStats();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetStats()" + }, + { + "lang": "JS", + "source": "client.index('movies').getStats()" + }, + { + "lang": "Java", + "source": "client.index(\"movies\").getStats();" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->stats();" + }, + { + "lang": "Python", + "source": "client.index('movies').get_stats()" + }, + { + "lang": "Ruby", + "source": "client.index('movies').stats" + }, + { + "lang": "Rust", + "source": "let stats: IndexStats = client\n .index(\"movies\")\n .get_stats()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").stats { (result) in\n switch result {\n case .success(let stats):\n print(stats)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/stats'" + } ] } }, @@ -8071,6 +11655,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "ResourceResults keyResult = await client.GetKeysAsync(new KeysQuery { Limit = 3 });" + }, + { + "lang": "Dart", + "source": "await client.getKeys(params: KeysQuery(limit: 3));\neate_a_key_1: \"await client.createKey(\\n description: 'Add documents: Products API key',\\n actions: ['documents.add'],\\n indexes: ['products'],\\n expiresAt: DateTime(2042, 04, 02));\"\ndate_a_key_1: \"await client.updateKey(\\n '6062abda-a5aa-4414-ac91-ecd7944c0f8d',\\n description: 'Manage documents: Products\\/Reviews API key',\\n name: 'Products\\/Reviews API key',\\n);\"" + }, + { + "lang": "Go", + "source": "client.GetKeys(&meilisearch.KeysQuery{\n Limit: 3\n});" + }, + { + "lang": "JS", + "source": "client.getKeys({ limit: 3 })" + }, + { + "lang": "Java", + "source": "KeysQuery query = new KeysQuery().setLimit(3);\nclient.getKeys(query);" + }, + { + "lang": "PHP", + "source": "$client->getKeys((new KeysQuery())->setLimit(3));" + }, + { + "lang": "Python", + "source": "client.get_keys({'limit': 3})" + }, + { + "lang": "Ruby", + "source": "client.keys(limit: 3)" + }, + { + "lang": "Rust", + "source": "let mut query = KeysQuery::new()\n .with_limit(3)\n .execute(&client)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.getKeys(params: KeysQuery(limit: 3)) { result in\n switch result {\n case .success(let keys):\n print(keys)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys?limit=3' \\\n -H 'Authorization: Bearer MASTER_KEY'" + } ] }, "post": { @@ -8141,6 +11771,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "Key keyOptions = new Key\n{\n Description = \"Add documents: Products API key\",\n Actions = new KeyAction[] { KeyAction.DocumentsAdd },\n Indexes = new string[] { \"products\" },\n ExpiresAt = DateTime.Parse(\"2042-04-02T00:42:42Z\")\n};\nKey createdKey = await this.client.CreateKeyAsync(keyOptions);" + }, + { + "lang": "Go", + "source": "client.CreateKey(&meilisearch.Key{\n Description: \"Add documents: Products API key\",\n Actions: []string{\"documents.add\"},\n Indexes: []string{\"products\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" + }, + { + "lang": "JS", + "source": "client.createKey({\n description: 'Add documents: Products API key',\n actions: ['documents.add'],\n indexes: ['products'],\n expiresAt: '2021-11-13T00:00:00Z'\n})" + }, + { + "lang": "Java", + "source": "SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\nDate dateParsed = format.parse(\"2042-04-02T00:42:42Z\");\n\nKey keyInfo = new Key();\n\nkeyInfo.setDescription(\"Add documents: Products API key\");\nkeyInfo.setActions(new String[] {\"documents.add\"});\nkeyInfo.setIndexes(new String[] {\"products\"});\nkeyInfo.setExpiresAt(dateParsed);\n\nclient.createKey(keyInfo);" + }, + { + "lang": "PHP", + "source": "$client->createKey([\n 'description' => 'Add documents: Products API key',\n 'actions' => ['documents.add'],\n 'indexes' => ['products'],\n 'expiresAt' => '2042-04-02T00:42:42Z',\n]);" + }, + { + "lang": "Python", + "source": "client.create_key(options={\n 'description': 'Add documents: Products API key',\n 'actions': ['documents.add'],\n 'indexes': ['products'],\n 'expiresAt': '2042-04-02T00:42:42Z'\n})" + }, + { + "lang": "Ruby", + "source": "client.create_key(\n description: 'Add documents: Products API key',\n actions: ['documents.add'],\n indexes: ['products'],\n expires_at: '2042-04-02T00:42:42Z'\n)" + }, + { + "lang": "Rust", + "source": "let mut key_options = KeyBuilder::new();\nkey_options\n .with_name(\"Add documents: Products API key\")\n .with_action(Action::DocumentsAdd)\n .with_expires_at(time::macros::datetime!(2042 - 04 - 02 00:42:42 UTC))\n .with_index(\"products\");\nlet new_key = client\n .create_key(key_options)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let keyParams = KeyParams(\n description: \"Add documents: Products API key\",\n actions: [\"documents.add\"],\n indexes: [\"products\"],\n expiresAt: \"2042-04-02T00:42:42Z\"\n)\nclient.createKey(keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/keys' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"description\": \"Add documents: Products API key\",\n \"actions\": [\"documents.add\"],\n \"indexes\": [\"products\"],\n \"expiresAt\": \"2042-04-02T00:42:42Z\"\n }'" + } ] } }, @@ -8216,6 +11888,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "Key key = await client.GetKeyAsync(\"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4\");" + }, + { + "lang": "Dart", + "source": "await client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" + }, + { + "lang": "Go", + "source": "client.GetKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + }, + { + "lang": "JS", + "source": "client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + }, + { + "lang": "Java", + "source": "client.getKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\");" + }, + { + "lang": "PHP", + "source": "$client->getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" + }, + { + "lang": "Python", + "source": "client.get_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + }, + { + "lang": "Ruby", + "source": "client.key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + }, + { + "lang": "Rust", + "source": "let key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.getKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" + } ] }, "delete": { @@ -8267,6 +11985,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "client.DeleteKeyAsync(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + }, + { + "lang": "Dart", + "source": "await client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" + }, + { + "lang": "Go", + "source": "client.DeleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + }, + { + "lang": "JS", + "source": "client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + }, + { + "lang": "Java", + "source": "client.deleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + }, + { + "lang": "PHP", + "source": "$client->deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" + }, + { + "lang": "Python", + "source": "client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + }, + { + "lang": "Ruby", + "source": "client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + }, + { + "lang": "Rust", + "source": "let key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();\nclient\n .delete_key(&key)\n .await?;\nthorization_header_1:\nlet client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet keys = client\n.get_keys()\n.await\n.unwrap();" + }, + { + "lang": "Swift", + "source": "client.deleteKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success:\n print(\"success\")\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" + } ] }, "patch": { @@ -8350,6 +12114,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.UpdateKeyAsync(\n \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\",\n description: \"Manage documents: Products/Reviews API key\",\n name: \"Products/Reviews API key\"\n)" + }, + { + "lang": "Go", + "source": "client.UpdateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", &meilisearch.Key{\n Description: \"Manage documents: Products/Reviews API key\",\n Actions: []string{\"documents.add\", \"document.delete\"},\n Indexes: []string{\"products\", \"reviews\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" + }, + { + "lang": "JS", + "source": "client.updateKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d', {\n name: 'Products/Reviews API key',\n description: 'Manage documents: Products/Reviews API key',\n})" + }, + { + "lang": "Java", + "source": "KeyUpdate keyChanges = new KeyUpdate();\nkeyChanges.setName(\"Products/Reviews API key\");\nkeyChanges.setDescription(\"Manage documents: Products/Reviews API key\");\n\nclient.updateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", keyChanges);" + }, + { + "lang": "PHP", + "source": "$client->updateKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n [\n 'name' => 'Products/Reviews API key',\n 'description' => 'Manage documents: Products/Reviews API key'\n ]);" + }, + { + "lang": "Python", + "source": "client.update_key(key_or_uid='6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n options={\n 'name': 'Products/Reviews API key',\n 'description': 'Manage documents: Products/Reviews API key'\n})" + }, + { + "lang": "Ruby", + "source": "client.update_key(\n '6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n {\n description: 'Manage documents: Products/Reviews API key',\n name: 'Products/Reviews API key'\n }\n)" + }, + { + "lang": "Rust", + "source": "let mut key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();\nkey\n .with_description(\"Manage documents: Products/Reviews API key\".to_string())\n .with_name(\"Products/Reviews API key\".to_string())\n .update(&client)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let keyParams = KeyUpdateParams(\n description: \"Manage documents: Products/Reviews API key\",\n name: \"Products/Reviews API key\"\n)\n\nclient.updateKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", keyParams: keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"name\": \"Products/Reviews API key\",\n \"description\": \"Manage documents: Products/Reviews API key\"\n }'" + } ] } }, @@ -8400,6 +12206,12 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X POST MEILISEARCH_URL/logs/stderr \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"target\": \"milli=trace,index_scheduler=info,actix_web=off\"\n }'" + } ] } }, @@ -8474,6 +12286,12 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X POST MEILISEARCH_URL/logs/stream \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"mode\": \"human\",\n \"target\": \"index_scheduler=trace\"\n }'" + } ] }, "delete": { @@ -8512,6 +12330,12 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X DELETE MEILISEARCH_URL/logs/stream\n}'" + } ] } }, @@ -8560,6 +12384,12 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/metrics'" + } ] } }, @@ -8643,6 +12473,44 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.MultiSearchAsync(new MultiSearchQuery()\n{\n Queries = new System.Collections.Generic.List()\n {\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"booh\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"nemo\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movie_ratings\",\n Q = \"us\",\n },\n }\n});" + }, + { + "lang": "Go", + "source": "client.MultiSearch(&MultiSearchRequest{\n Queries: []SearchRequest{\n {\n IndexUID: \"movies\",\n Query: \"pooh\",\n Limit: 5,\n },\n {\n IndexUID: \"movies\",\n Query: \"nemo\",\n Limit: 5,\n },\n {\n IndexUID: \"movie_ratings\",\n Query: \"us\",\n },\n },\n})" + }, + { + "lang": "JS", + "source": "client.multiSearch({ queries: [\n {\n indexUid: 'movies',\n q: 'pooh',\n limit: 5,\n },\n {\n indexUid: 'movies',\n q: 'nemo',\n limit: 5,\n },\n {\n indexUid: 'movie_ratings',\n q: 'us',\n },\n]})" + }, + { + "lang": "Java", + "source": "MultiSearchRequest multiSearchRequest = new MultiSearchRequest();\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"pooh\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"nemo\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movie_ratings\").setQuery(\"us\"));\n\nclient.multiSearch(multiSearchRequest);\nt_similar_post_1:\nSimilarDocumentRequest query = new SimilarDocumentRequest()\n .setId(\"143\")\n .setEmbedder(\"manual\");\nclient.index(\"movies\").searchSimilarDocuments(query)" + }, + { + "lang": "PHP", + "source": "$client->multiSearch([\n (new SearchQuery())\n ->setIndexUid('movies')\n ->setQuery('pooh')\n ->setLimit(5),\n (new SearchQuery())\n ->setIndexUid('movies')\n ->setQuery('nemo')\n ->setLimit(5),\n (new SearchQuery())\n ->setIndexUid('movie_ratings')\n ->setQuery('us')\n ]);" + }, + { + "lang": "Python", + "source": "client.multi_search(\n [\n {'indexUid': 'movies', 'q': 'pooh', 'limit': 5},\n {'indexUid': 'movies', 'q': 'nemo', 'limit': 5},\n {'indexUid': 'movie_ratings', 'q': 'us'}\n ]\n)" + }, + { + "lang": "Ruby", + "source": "client.multi_search([\n { index_uid: 'books', q: 'prince' },\n { index_uid: 'movies', q: 'pooh', limit: 5 }\n { index_uid: 'movies', q: 'nemo', limit: 5 }\n { index_uid: 'movie_ratings', q: 'us' }\n])" + }, + { + "lang": "Rust", + "source": "let movie = client.index(\"movie\");\nlet movie_ratings = client.index(\"movie_ratings\");\n\nlet search_query_1 = SearchQuery::new(&movie)\n .with_query(\"pooh\")\n .with_limit(5)\n .build();\nlet search_query_2 = SearchQuery::new(&movie)\n .with_query(\"nemo\")\n .with_limit(5)\n .build();\nlet search_query_3 = SearchQuery::new(&movie_ratings)\n .with_query(\"us\")\n .build();\n\nlet response = client\n .multi_search()\n .with_search_query(search_query_1)\n .with_search_query(search_query_2)\n .with_search_query(search_query_3)\n .execute::()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/multi-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"queries\": [\n {\n \"indexUid\": \"movies\",\n \"q\": \"pooh\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movies\",\n \"q\": \"nemo\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movie_ratings\",\n \"q\": \"us\"\n }\n ]\n }'" + } ] } }, @@ -8709,6 +12577,28 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.GetNetwork();" + }, + { + "lang": "PHP", + "source": "$client->getNetwork();" + }, + { + "lang": "Python", + "source": "client.get_all_networks()" + }, + { + "lang": "Rust", + "source": "let network = client\n .get_network_state()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/network'" + } ] }, "patch": { @@ -8783,6 +12673,28 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.UpdateNetwork(&meilisearch.UpdateNetworkRequest{\n Self: meilisearch.String(\"ms-00\"),\n Leader: meilisearch.String(\"ms-00\"),\n Remotes: meilisearch.NewOpt(map[string]meilisearch.Opt[meilisearch.Remote]{\n \"ms-00\": meilisearch.NewOpt(meilisearch.Remote{\n URL: meilisearch.String(\"https://meilisearch.com\"),\n SearchAPIKey: meilisearch.String(\"ReadKey\"),\n WriteAPIKey: meilisearch.String(\"WriteKey\"),\n },\n },\n});" + }, + { + "lang": "PHP", + "source": "$client->updateNetwork([\n 'self' => 'ms-00',\n 'leader' => 'ms-00',\n 'remotes' => [\n 'ms-00' => [\n 'url' => 'http://INSTANCE_URL',\n 'searchApiKey' => 'INSTANCE_API_KEY',\n 'writeApiKey' => 'INSTANCE_WRITE_API_KEY'\n ],\n 'ms-01' => [\n 'url' => 'http://ANOTHER_INSTANCE_URL',\n 'searchApiKey' => 'ANOTHER_INSTANCE_API_KEY',\n 'writeApiKey' => 'ANOTHER_INSTANCE_WRITE_API_KEY'\n ]\n ]\n]);" + }, + { + "lang": "Python", + "source": "client.add_or_update_networks({\n \"remotes\": {\n \"http://localhost:7700\": {\n \"searchApiKey\": \"masterKey\"\n }\n },\n \"leader\": None\n})" + }, + { + "lang": "Rust", + "source": "let mut remotes = std::collections::HashMap::new();\nremotes.insert(String::from(\"ms-01\"), Some(meilisearch_sdk::network::RemoteConfig {\n url: \"https://ms-01.enterprise.meilisearch.com\".to_string(),\n search_api_key: \"SEARCH_API_KEY\".to_string(),\n write_api_key: Some(\"WRITE_API_KEY\".to_string()),\n}));\n// Remove ms-00 from the topology\nremotes.insert(String::from(\"ms-00\"), None);\n\nlet update = meilisearch_sdk::network::NetworkUpdate {\n leader: Some(\"ms-01\".to_string()),\n remotes: Some(remotes),\n ..meilisearch_sdk::network::NetworkUpdate::default()\n};\n\nlet task: TaskInfo = client\n .update_network_state(&update)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/network' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"self\": \"ms-00\",\n \"remotes\": {\n \"ms-00\": {\n \"url\": \"http://INSTANCE_URL\",\n \"searchApiKey\": \"INSTANCE_API_KEY\"\n },\n \"ms-01\": {\n \"url\": \"http://ANOTHER_INSTANCE_URL\",\n \"searchApiKey\": \"ANOTHER_INSTANCE_API_KEY\"\n }\n }\n }'" + } ] } }, @@ -8837,6 +12749,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.CreateSnapshotAsync();" + }, + { + "lang": "Go", + "source": "client.CreateSnapshot()" + }, + { + "lang": "JS", + "source": "client.createSnapshot()" + }, + { + "lang": "Java", + "source": "client.createSnapshot();" + }, + { + "lang": "PHP", + "source": "$client->createSnapshot();" + }, + { + "lang": "Python", + "source": "client.create_snapshot()" + }, + { + "lang": "Ruby", + "source": "client.create_snapshot" + }, + { + "lang": "Rust", + "source": "client\n .create_snapshot()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let task = try await self.client.createSnapshot()" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/snapshots'" + } ] } }, @@ -8902,6 +12856,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.GetStatsAsync();" + }, + { + "lang": "Dart", + "source": "await client.getStats();" + }, + { + "lang": "Go", + "source": "client.GetStats()" + }, + { + "lang": "JS", + "source": "client.getStats()" + }, + { + "lang": "Java", + "source": "client.getStats();" + }, + { + "lang": "PHP", + "source": "$client->stats();" + }, + { + "lang": "Python", + "source": "client.get_all_stats()" + }, + { + "lang": "Ruby", + "source": "client.stats" + }, + { + "lang": "Rust", + "source": "let stats: ClientStats = client\n .get_stats()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.allStats { (result) in\n switch result {\n case .success(let stats):\n print(stats)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/stats'" + } ] } }, @@ -8968,6 +12968,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.SwapIndexesAsync(new List { new IndexSwap(\"indexA\", \"indexB\"), new IndexSwap(\"indexX\", \"indexY\") } });" + }, + { + "lang": "Go", + "source": "client.SwapIndexes([]SwapIndexesParams{\n {Indexes: []string{\"indexA\", \"indexB\"}},\n {Indexes: []string{\"indexX\", \"indexY\"}},\n})" + }, + { + "lang": "JS", + "source": "client.swapIndexes([\n { 'indexes': ['indexA', 'indexB'] },\n { 'indexes': ['indexX', 'indexY'] }\n])" + }, + { + "lang": "Java", + "source": "SwapIndexesParams[] params =\n new SwapIndexesParams[] {\n new SwapIndexesParams().setIndexes(new String[] {\"indexA\", \"indexB\"}),\n new SwapIndexesParams().setIndexes(new String[] {\"indexX\", \"indexY\"})\n };\nTaskInfo task = client.swapIndexes(params);" + }, + { + "lang": "PHP", + "source": "$client->swapIndexes([['indexA', 'indexB'], ['indexX', 'indexY']]);" + }, + { + "lang": "Python", + "source": "client.swap_indexes([{'indexes': ['indexA', 'indexB']}, {'indexes': ['indexX', 'indexY']}])" + }, + { + "lang": "Ruby", + "source": "client.swap_indexes(['indexA', 'indexB'], ['indexX', 'indexY'])" + }, + { + "lang": "Rust", + "source": "client.swap_indexes([\n &SwapIndexes {\n indexes: (\n \"indexA\".to_string(),\n \"indexB\".to_string(),\n ),\n }, &SwapIndexes {\n indexes: (\n \"indexX\".to_string(),\n \"indexY\".to_string(),\n ),\n}])" + }, + { + "lang": "Swift", + "source": "let task = try await self.client.swapIndexes([\n (\"indexA\", \"indexB\"),\n (\"indexX\", \"indexY\")\n])" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/swap-indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"indexes\": [\n \"indexA\",\n \"indexB\"\n ]\n },\n {\n \"indexes\": [\n \"indexX\",\n \"indexY\"\n ]\n }\n ]'" + } ] } }, @@ -9231,6 +13273,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Dart", + "source": "await client.getTasks();" + }, + { + "lang": "Go", + "source": "client.GetTasks(nil);" + }, + { + "lang": "JS", + "source": "client.tasks.getTasks()" + }, + { + "lang": "Java", + "source": "client.getTasks();" + }, + { + "lang": "PHP", + "source": "$client->getTasks();" + }, + { + "lang": "Python", + "source": "client.get_tasks()" + }, + { + "lang": "Ruby", + "source": "client.tasks" + }, + { + "lang": "Rust", + "source": "let tasks: TasksResults = client\n .get_tasks()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.getTasks { (result) in\n switch result {\n case .success(let tasks):\n print(tasks)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks'" + } ] }, "delete": { @@ -9480,6 +13564,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.DeleteTasksAsync(new DeleteTasksQuery { Uids = new List { 1, 2 } });" + }, + { + "lang": "Dart", + "source": "await client.deleteTasks(params: DeleteTasksQuery(uids: [1, 2]));" + }, + { + "lang": "Go", + "source": "client.DeleteTaks(&meilisearch.DeleteTasksQuery{\n UIDS: []int64{1, 2},\n});" + }, + { + "lang": "JS", + "source": "client.tasks.deleteTasks({ uids: [1, 2] })" + }, + { + "lang": "Java", + "source": "DeleteTasksQuery query = new DeleteTasksQuery().setUids(new int[] {1, 2})\nclient.deleteTasks(query);" + }, + { + "lang": "PHP", + "source": "$client->deleteTasks((new DeleteTasksQuery())->setUids([1, 2]));" + }, + { + "lang": "Python", + "source": "client.delete_tasks({'uids': ['1', '2']})" + }, + { + "lang": "Ruby", + "source": "client.delete_tasks(uids: [1, 2])" + }, + { + "lang": "Rust", + "source": "let mut query = tasks::TasksDeleteQuery::new(&client);\nquery.with_uids([1, 2]);\n\nlet res = client.delete_tasks_with(&query).await.unwrap();" + }, + { + "lang": "Swift", + "source": "client.deleteTasks(filter: DeleteTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/tasks?uids=1,2'" + } ] } }, @@ -9731,6 +13861,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.CancelTasksAsync(new CancelTasksQuery { Uids = new List { 1, 2 } });" + }, + { + "lang": "Dart", + "source": "await client.cancelTasks(params: CancelTasksQuery(uids: [1, 2]));" + }, + { + "lang": "Go", + "source": "client.CancelTasks(&meilisearch.CancelTasksQuery{\n UIDS: []int64{1, 2},\n});" + }, + { + "lang": "JS", + "source": "client.tasks.cancelTasks({ uids: [1, 2] })" + }, + { + "lang": "Java", + "source": "CancelTasksQuery query = new CancelTasksQuery().setUids(new int[] {1, 2})\nclient.cancelTasks(query);" + }, + { + "lang": "PHP", + "source": "$client->cancelTasks((new CancelTasksQuery())->setUids([1, 2]));" + }, + { + "lang": "Python", + "source": "client.cancel_tasks({'uids': ['1', '2']})" + }, + { + "lang": "Ruby", + "source": "client.cancel_tasks(uids: [1, 2])" + }, + { + "lang": "Rust", + "source": "let mut query = tasks::TasksCancelQuery::new(&client);\nquery.with_uids([1, 2]);\n\nlet res = client.cancel_task_with(&query).await.unwrap();" + }, + { + "lang": "Swift", + "source": "client.cancelTasks(filter: CancelTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/tasks/cancel?uids=1,2'" + } ] } }, @@ -9820,6 +13996,48 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Dart", + "source": "await client.getTask(1);" + }, + { + "lang": "Go", + "source": "client.GetTask(1);" + }, + { + "lang": "JS", + "source": "client.tasks.getTask(1)" + }, + { + "lang": "Java", + "source": "client.getTask(1);" + }, + { + "lang": "PHP", + "source": "$client->getTask(1);" + }, + { + "lang": "Python", + "source": "client.get_task(1)" + }, + { + "lang": "Ruby", + "source": "client.task(1)" + }, + { + "lang": "Rust", + "source": "let task: Task = client\n .get_task(1)\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.getTask(taskUid: 1) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks/1'" + } ] } }, @@ -9871,6 +14089,52 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "C#", + "source": "await client.GetVersionAsync();" + }, + { + "lang": "Dart", + "source": "await client.getVersion();" + }, + { + "lang": "Go", + "source": "client.GetVersion()" + }, + { + "lang": "JS", + "source": "client.getVersion()" + }, + { + "lang": "Java", + "source": "client.getVersion();" + }, + { + "lang": "PHP", + "source": "$client->version();" + }, + { + "lang": "Python", + "source": "client.get_version()" + }, + { + "lang": "Ruby", + "source": "client.version" + }, + { + "lang": "Rust", + "source": "let version: Version = client\n .get_version()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "client.version { (result) in\n switch result {\n case .success(let version):\n print(version)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/version'" + } ] } }, @@ -9936,6 +14200,28 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.ListWebhooks();" + }, + { + "lang": "JS", + "source": "client.getWebhooks()" + }, + { + "lang": "Python", + "source": "client.get_webhooks()" + }, + { + "lang": "Rust", + "source": "let webhooks = client.get_webhooks().await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks'" + } ] }, "post": { @@ -10003,6 +14289,28 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.AddWebhook(&meilisearch.AddWebhookRequest{\n URL: \"WEBHOOK_TARGET_URL\",\n Headers: map[string]string{\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n },\n});" + }, + { + "lang": "JS", + "source": "client.createWebhook({\n url: 'WEBHOOK_TARGET_URL',\n headers: {\n authorization: 'SECURITY_KEY',\n referer: 'https://example.com'\n }\n})" + }, + { + "lang": "Python", + "source": "client.create_webhook({\n 'url': 'https://example.com/webhook',\n 'headers': {\"Authorization\":\"\", \"X-Custom-Header\":\"test\"},\n})" + }, + { + "lang": "Rust", + "source": "let mut payload = meilisearch_sdk::webhooks::WebhookCreate::new(\"WEBHOOK_TARGET_URL\");\npayload\n .insert_header(\"authorization\", \"SECURITY_KEY\")\n .insert_header(\"referer\", \"https://example.com\");\nlet webhook = client.create_webhook(&payload).await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/webhooks' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"WEBHOOK_TARGET_URL\",\n \"headers\": {\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n }\n }'" + } ] } }, @@ -10075,6 +14383,28 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.GetWebhook(\"WEBHOOK_UUID\");" + }, + { + "lang": "JS", + "source": "client.getWebhook(WEBHOOK_UUID)" + }, + { + "lang": "Python", + "source": "client.get_webhook('WEBHOOK_UID')" + }, + { + "lang": "Rust", + "source": "let webhook = client.get_webhook(\"WEBHOOK_UUID\").await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID'" + } ] }, "delete": { @@ -10129,6 +14459,28 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.DeleteWebhook(\"WEBHOOK_UUID\");" + }, + { + "lang": "JS", + "source": "client.deleteWebhook(WEBHOOK_UUID)" + }, + { + "lang": "Python", + "source": "client.delete_webhook('WEBHOOK_UID')" + }, + { + "lang": "Rust", + "source": "client.delete_webhook(\"WEBHOOK_UUID\").await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID'" + } ] }, "patch": { @@ -10208,6 +14560,28 @@ "*" ] } + ], + "x-codeSamples": [ + { + "lang": "Go", + "source": "client.UpdateWebhook(\"WEBHOOK_UUID\", &meilisearch.UpdateWebhookRequest{\n Header: map[string]string{\n \"referer\": \"\"\n },\n});" + }, + { + "lang": "JS", + "source": "client.updateWebhook(WEBHOOK_UUID, {\n headers: {\n referer: null\n }\n})" + }, + { + "lang": "Python", + "source": "client.update_webhook('WEBHOOK_UID', {\n 'url': 'https://example.com/new-webhook',\n 'headers': {\"Authorization\":\"\", \"X-Custom-Header\":\"test\"},\n})" + }, + { + "lang": "Rust", + "source": "let mut update = meilisearch_sdk::webhooks::WebhookUpdate::new();\nupdate.remove_header(\"referer\");\nlet webhook = client\n .update_webhook(\"WEBHOOK_UUID\", &update)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"header\": {\n \"referer\": null\n }\n }'" + } ] } } From 98cb043c56e562df2a25f80cb4d7bdd1a7977e72 Mon Sep 17 00:00:00 2001 From: curquiza Date: Sun, 8 Feb 2026 19:46:22 +0100 Subject: [PATCH 14/45] Add overview and errors page done by gui --- docs.json | 37 +- .../analytics/configure_analytics_events.mdx | 2 +- learn/analytics/events_endpoint.mdx | 2 +- learn/indexing/indexing_best_practices.mdx | 2 +- ...g_started_with_self_hosted_meilisearch.mdx | 2 +- openapi-curqui.json | 3234 ++++++++--------- reference/api/authorization.mdx | 26 + reference/api/headers.mdx | 85 + reference/api/openapi.mdx | 7 + reference/api/pagination.mdx | 19 + reference/api/parameters_and_requests.mdx | 51 + reference/errors/error_codes.mdx | 6 +- 12 files changed, 1808 insertions(+), 1665 deletions(-) create mode 100644 reference/api/authorization.mdx create mode 100644 reference/api/headers.mdx create mode 100644 reference/api/openapi.mdx create mode 100644 reference/api/pagination.mdx create mode 100644 reference/api/parameters_and_requests.mdx diff --git a/docs.json b/docs.json index bd121c7e1..0f16b7570 100644 --- a/docs.json +++ b/docs.json @@ -426,13 +426,36 @@ }, { "anchor": "API Reference", - "openapi": "openapi-curqui.json", "icon": "code", - "examples": { - "languages": ["curl", "javascript", "php", "python", "java", "ruby", "go", "csharp", "rust", "dart", "swift"], - "defaults": "required", - "prefill": true - } + "groups": [ + { + "group": "Overview", + "pages": [ + "reference/api/authorization", + "reference/api/headers", + "reference/api/parameters_and_requests", + "reference/api/pagination", + "reference/api/openapi" + ] + }, + { + "group": "API Routes", + "openapi": "openapi-curqui.json", + "examples": { + "languages": ["curl", "javascript", "php", "python", "java", "ruby", "go", "csharp", "rust", "dart", "swift"], + "autogenerate": false + } + }, + { + "group": "Errors", + "pages": [ + "reference/errors/overview", + "reference/errors/error_codes" + ] + } + + ] + } ] } @@ -936,7 +959,7 @@ }, { "source": "/reference", - "destination": "/reference/api/overview" + "destination": "/reference/api/parameters_and_requests" }, { "source": "/guides/deployment/gcp", diff --git a/learn/analytics/configure_analytics_events.mdx b/learn/analytics/configure_analytics_events.mdx index 2d0738b73..0e2320722 100644 --- a/learn/analytics/configure_analytics_events.mdx +++ b/learn/analytics/configure_analytics_events.mdx @@ -24,7 +24,7 @@ Every time a user clicks on a search result, your application must send a `click You must explicitly submit a `userId` associated with the event. This can be any arbitrary string you use to identify the user, such as their profile ID in your application or their hashed IP address. You may submit user IDs directly on the event payload, or setting a `X-MS-USER-ID` request header. -Specifying a `queryUid` is optional but recommended as it ensures Meilisearch correctly associates the search query with the event. You can find the query UID in the [`metadata` field present in Meilisearch Cloud's search query responses](/reference/api/overview#search-metadata). +Specifying a `queryUid` is optional but recommended as it ensures Meilisearch correctly associates the search query with the event. You can find the query UID in the [`metadata` field present in Meilisearch Cloud's search query responses](/reference/api/headers#search-metadata). For more information, consult the [analytics events endpoint reference](/learn/analytics/events_endpoint). diff --git a/learn/analytics/events_endpoint.mdx b/learn/analytics/events_endpoint.mdx index 72f905420..c1f185c19 100644 --- a/learn/analytics/events_endpoint.mdx +++ b/learn/analytics/events_endpoint.mdx @@ -22,7 +22,7 @@ Send an analytics event to Meilisearch Cloud. | `eventType` | String | N/A | The event type, such as `click` or `conversion`, required | | `eventName` | String | N/A | A string describing the event, required | | `indexUid` | String | N/A | The name of the index of the clicked document, required | -| `queryUid` | String | N/A | The [search query's UID](/reference/api/overview#search-metadata) | +| `queryUid` | String | N/A | The [search query's UID](/reference/api/headers#search-metadata) | | `objectId` | String | N/A | The clicked document's primary key value | | `objectName` | String | N/A | A string describing the document | | `position` | Integer | N/A | An integer indicating the clicked document's position in the search result list | diff --git a/learn/indexing/indexing_best_practices.mdx b/learn/indexing/indexing_best_practices.mdx index ed4ba353e..2f89b85b4 100644 --- a/learn/indexing/indexing_best_practices.mdx +++ b/learn/indexing/indexing_best_practices.mdx @@ -22,7 +22,7 @@ When creating a new index, first [configure its settings](/reference/api/setting ## Optimize document size -Smaller documents are processed faster, so make sure to trim down any unnecessary data from your documents. When a document field is missing from the list of [searchable](/reference/api/settings#searchable-attributes), [filterable](/reference/api/settings#filterable-attributes), [sortable](/reference/api/settings#sortable-attributes), or [displayed](/reference/api/settings#displayed-attributes) attributes, it might be best to remove it from the document. To go further, consider compressing your data using methods such as `br`, `deflate`, or `gzip`. Consult the [supported encoding formats reference](/reference/api/overview#content-encoding). +Smaller documents are processed faster, so make sure to trim down any unnecessary data from your documents. When a document field is missing from the list of [searchable](/reference/api/settings#searchable-attributes), [filterable](/reference/api/settings#filterable-attributes), [sortable](/reference/api/settings#sortable-attributes), or [displayed](/reference/api/settings#displayed-attributes) attributes, it might be best to remove it from the document. To go further, consider compressing your data using methods such as `br`, `deflate`, or `gzip`. Consult the [supported encoding formats reference](/reference/api/headers#content-encoding). ## Prefer bigger HTTP payloads diff --git a/learn/self_hosted/getting_started_with_self_hosted_meilisearch.mdx b/learn/self_hosted/getting_started_with_self_hosted_meilisearch.mdx index ca07c5340..9192d8b02 100644 --- a/learn/self_hosted/getting_started_with_self_hosted_meilisearch.mdx +++ b/learn/self_hosted/getting_started_with_self_hosted_meilisearch.mdx @@ -191,4 +191,4 @@ You now know how to install Meilisearch, create an index, add documents, check t If you'd like to search through the documents you just added using a clean browser interface rather than the terminal, you can do so with [our built-in search preview](/learn/getting_started/search_preview). You can also [learn how to quickly build a front-end interface](/guides/front_end/front_end_integration) of your own. -For a more advanced approach, consult the [API reference](/reference/api/overview). +For a more advanced approach, consult the [API reference](/reference/api/parameters_and_requests). diff --git a/openapi-curqui.json b/openapi-curqui.json index ea7857b98..89051f2c4 100644 --- a/openapi-curqui.json +++ b/openapi-curqui.json @@ -23,16 +23,16 @@ "/batches": { "get": { "tags": [ - "Batches" + "Async task management" ], - "summary": "Get batches", - "description": "List all batches, regardless of index. The batch objects are contained in\nthe results array. Batches are always returned in descending order of uid.\nThis means that by default, the most recently created batch objects appear\nfirst. Batch results are paginated and can be filtered with query\nparameters.", + "summary": "List batches", + "description": "The `/batches` route gives information about the progress of batches of [asynchronous operations](/learn/async/asynchronous_operations).\n\nBatches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first. Batch results are paginated and can be filtered with query parameters.", "operationId": "get_batches", "parameters": [ { "name": "limit", "in": "query", - "description": "Maximum number of results to return.", + "description": "Maximum number of batches to return", "required": false, "schema": { "type": "integer", @@ -45,7 +45,7 @@ { "name": "from", "in": "query", - "description": "Fetch the next set of results from the given uid.", + "description": "`uid` of the first batch returned", "required": false, "schema": { "type": "integer", @@ -57,7 +57,7 @@ { "name": "reverse", "in": "query", - "description": "The order you want to retrieve the objects.", + "description": "If `true`, returns results in the reverse order, from oldest to most recent", "required": false, "schema": { "type": "boolean" @@ -259,10 +259,10 @@ "finishedAt": "2024-12-10T15:49:05.105404Z" } ], - "total": 3, - "limit": 1, - "from": 2, - "next": 1 + "total": 1, + "limit": 20, + "from": 1, + "next": null } } } @@ -295,8 +295,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.GetBatches();" + "lang": "cURL", + "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches'" }, { "lang": "JS", @@ -315,12 +315,12 @@ "source": "client.batches" }, { - "lang": "Rust", - "source": "let mut query = meilisearch_sdk::batches::BatchesQuery::new(&client);\nquery.with_limit(20);\nlet batches: meilisearch_sdk::batches::BatchesResults =\n client.get_batches_with(&query).await.unwrap();" + "lang": "Go", + "source": "client.GetBatches();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches'" + "lang": "Rust", + "source": "let mut query = meilisearch_sdk::batches::BatchesQuery::new(&client);\nquery.with_limit(20);\nlet batches: meilisearch_sdk::batches::BatchesResults =\n client.get_batches_with(&query).await.unwrap();" } ] } @@ -328,10 +328,10 @@ "/batches/{batchUid}": { "get": { "tags": [ - "Batches" + "Async task management" ], - "summary": "Get one batch", - "description": "Get a single batch.", + "summary": "Get batch", + "description": "Get a single batch by its unique identifier.\n\nThe `/batches` route gives information about the progress of batches of [asynchronous operations](/learn/async/asynchronous_operations).", "operationId": "get_batch", "parameters": [ { @@ -354,7 +354,7 @@ "$ref": "#/components/schemas/BatchView" }, "example": { - "uid": 1, + "uid": 0, "details": { "receivedDocuments": 1, "indexedDocuments": 1 @@ -408,8 +408,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.GetBatch(BATCH_UID);" + "lang": "cURL", + "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches/BATCH_UID'" }, { "lang": "JS", @@ -428,12 +428,12 @@ "source": "client.batch(BATCH_UID)" }, { - "lang": "Rust", - "source": "let uid: u32 = 42;\nlet batch: meilisearch_sdk::batches::Batch = client\n .get_batch(uid)\n .await\n .unwrap();" + "lang": "Go", + "source": "client.GetBatch(BATCH_UID);" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches/BATCH_UID'" + "lang": "Rust", + "source": "let uid: u32 = 42;\nlet batch: meilisearch_sdk::batches::Batch = client\n .get_batch(uid)\n .await\n .unwrap();" } ] } @@ -441,9 +441,9 @@ "/dumps": { "post": { "tags": [ - "Dumps" + "Backups" ], - "summary": "Create a dump", + "summary": "Create dump", "description": "Triggers a dump creation process. Once the process is complete, a dump is created in the\n[dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory).\nIf the dump directory does not exist yet, it will be created.", "operationId": "create_dump", "responses": { @@ -492,25 +492,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.CreateDumpAsync();" - }, - { - "lang": "Dart", - "source": "await client.createDump();" - }, - { - "lang": "Go", - "source": "resp, err := client.CreateDump()" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/dumps'" }, { "lang": "JS", "source": "client.createDump()" }, - { - "lang": "Java", - "source": "client.createDump();" - }, { "lang": "PHP", "source": "$client->createDump();" @@ -519,21 +507,33 @@ "lang": "Python", "source": "client.create_dump()" }, + { + "lang": "Java", + "source": "client.createDump();" + }, { "lang": "Ruby", "source": "client.create_dump" }, + { + "lang": "Go", + "source": "resp, err := client.CreateDump()" + }, + { + "lang": "C#", + "source": "await client.CreateDumpAsync();" + }, { "lang": "Rust", "source": "client\n .create_dump()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.createDump { result in\n switch result {\n case .success(let dumpStatus):\n print(dumpStatus)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.createDump();" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/dumps'" + "lang": "Swift", + "source": "client.createDump { result in\n switch result {\n case .success(let dumpStatus):\n print(dumpStatus)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -543,7 +543,7 @@ "tags": [ "Experimental features" ], - "summary": "Get all experimental features", + "summary": "List experimental features", "description": "Get a list of all experimental features that can be activated via the\n/experimental-features route and whether or not they are currently\nactivated.", "operationId": "get_features", "responses": { @@ -597,20 +597,20 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.ExperimentalFeatures().Get()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/experimental-features/'" }, { "lang": "Ruby", "source": "client.experimental_features" }, { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nlet res = features\n .get()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.ExperimentalFeatures().Get()" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/experimental-features/'" + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nlet res = features\n .get()\n .await\n .unwrap();" } ] }, @@ -672,20 +672,20 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.ExperimentalFeatures().SetMetrics(true).Update()" + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/experimental-features/' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"metrics\": true\n }'" }, { "lang": "Ruby", "source": "client.update_experimental_features(metrics: true)" }, { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nfeatures.set_metrics(true)\nlet res = features\n .update()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.ExperimentalFeatures().SetMetrics(true).Update()" }, { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/experimental-features/' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"metrics\": true\n }'" + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nfeatures.set_metrics(true)\nlet res = features\n .update()\n .await\n .unwrap();" } ] } @@ -693,7 +693,7 @@ "/export": { "post": { "tags": [ - "Export" + "Documents" ], "summary": "Export to a remote Meilisearch", "description": "Triggers an export process to a remote Meilisearch instance. This allows you to send\ndocuments and settings from the current instance to another Meilisearch server.", @@ -751,13 +751,13 @@ } ], "x-codeSamples": [ - { - "lang": "Java", - "source": "Map indexes = new HashMap<>();\nindexes.put(\"*\", ExportIndexFilter.builder().overrideSettings(true).build());\nExportRequest request = ExportRequest.builder().url(\"TARGET_INSTANCE_URL\").indexes(indexes).build();\nclient.export(request);" - }, { "lang": "cURL", "source": "curl \\\n -X POST 'MEILISEARCH_URL/export' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"TARGET_INSTANCE_URL\",\n \"indexes\": {\n \"*\": {\n \"overrideSettings\": true\n }\n }\n }'" + }, + { + "lang": "Java", + "source": "Map indexes = new HashMap<>();\nindexes.put(\"*\", ExportIndexFilter.builder().overrideSettings(true).build());\nExportRequest request = ExportRequest.builder().url(\"TARGET_INSTANCE_URL\").indexes(indexes).build();\nclient.export(request);" } ] } @@ -767,7 +767,7 @@ "tags": [ "Health" ], - "summary": "Get Health", + "summary": "Get health", "description": "The health check endpoint enables you to periodically test the health of\nyour Meilisearch instance.", "operationId": "get_health", "responses": { @@ -787,19 +787,19 @@ }, "x-codeSamples": [ { - "lang": "C#", - "source": "await client.HealthAsync();" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/health'" }, { - "lang": "Dart", - "source": "await client.health();" + "lang": "JS", + "source": "client.health()" }, { - "lang": "Go", - "source": "client.Health()" + "lang": "PHP", + "source": "$client->health();" }, { - "lang": "JS", + "lang": "Python", "source": "client.health()" }, { @@ -807,28 +807,28 @@ "source": "client.health();" }, { - "lang": "PHP", - "source": "$client->health();" + "lang": "Ruby", + "source": "client.health" }, { - "lang": "Python", - "source": "client.health()" + "lang": "Go", + "source": "client.Health()" }, { - "lang": "Ruby", - "source": "client.health" + "lang": "C#", + "source": "await client.HealthAsync();" }, { "lang": "Rust", "source": "// health() return an Err() if the server is not healthy, so this example would panic due to the unwrap\nclient\n .health()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.health { (result) in\n switch result {\n case .success:\n print(\"Healthy!\")\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.health();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/health'" + "lang": "Swift", + "source": "client.health { (result) in\n switch result {\n case .success:\n print(\"Healthy!\")\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -918,25 +918,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.GetAllIndexesAsync(new IndexesQuery { Limit = 3 });" - }, - { - "lang": "Dart", - "source": "await client.getIndexes(params: IndexesQuery(limit: 3));" - }, - { - "lang": "Go", - "source": "client.GetIndexes(&meilisearch.IndexesQuery{\n Limit: 3,\n})" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes?limit=3'" }, { "lang": "JS", "source": "client.getIndexes({ limit: 3 })" }, - { - "lang": "Java", - "source": "IndexesQuery query = new IndexesQuery().setLimit(3);\nclient.getIndexes(query);" - }, { "lang": "PHP", "source": "$client->getIndexes((new IndexesQuery())->setLimit(3));" @@ -945,21 +933,33 @@ "lang": "Python", "source": "client.get_indexes({'limit': 3})" }, + { + "lang": "Java", + "source": "IndexesQuery query = new IndexesQuery().setLimit(3);\nclient.getIndexes(query);" + }, { "lang": "Ruby", "source": "client.indexes(limit: 3)" }, + { + "lang": "Go", + "source": "client.GetIndexes(&meilisearch.IndexesQuery{\n Limit: 3,\n})" + }, + { + "lang": "C#", + "source": "await client.GetAllIndexesAsync(new IndexesQuery { Limit = 3 });" + }, { "lang": "Rust", "source": "let mut indexes = IndexesQuery::new(&client)\n .with_limit(3)\n .execute()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.getIndexes { (result) in\n switch result {\n case .success(let indexes):\n print(indexes)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.getIndexes(params: IndexesQuery(limit: 3));" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes?limit=3'" + "lang": "Swift", + "source": "client.getIndexes { (result) in\n switch result {\n case .success(let indexes):\n print(indexes)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -1026,25 +1026,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "TaskInfo task = await client.CreateIndexAsync(\"movies\", \"id\");" - }, - { - "lang": "Dart", - "source": "await client.createIndex('movies', primaryKey: 'id');" - }, - { - "lang": "Go", - "source": "client.CreateIndex(&meilisearch.IndexConfig{\n Uid: \"movies\",\n PrimaryKey: \"id\",\n})" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"uid\": \"movies\",\n \"primaryKey\": \"id\"\n }'" }, { "lang": "JS", "source": "client.createIndex('movies', { primaryKey: 'id' })" }, - { - "lang": "Java", - "source": "client.createIndex(\"movies\", \"id\");" - }, { "lang": "PHP", "source": "$client->createIndex('movies', ['primaryKey' => 'id']);" @@ -1053,21 +1041,33 @@ "lang": "Python", "source": "client.create_index('movies', {'primaryKey': 'id'})" }, + { + "lang": "Java", + "source": "client.createIndex(\"movies\", \"id\");" + }, { "lang": "Ruby", "source": "client.create_index('movies', primary_key: 'id')" }, + { + "lang": "Go", + "source": "client.CreateIndex(&meilisearch.IndexConfig{\n Uid: \"movies\",\n PrimaryKey: \"id\",\n})" + }, + { + "lang": "C#", + "source": "TaskInfo task = await client.CreateIndexAsync(\"movies\", \"id\");" + }, { "lang": "Rust", "source": "client.create_index(\"movies\", Some(\"id\"))\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.createIndex(uid: \"movies\", primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.createIndex('movies', primaryKey: 'id');" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"uid\": \"movies\",\n \"primaryKey\": \"id\"\n }'" + "lang": "Swift", + "source": "client.createIndex(uid: \"movies\", primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -1153,25 +1153,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.GetIndexAsync(\"movies\");" - }, - { - "lang": "Dart", - "source": "await client.getIndex('movies');" - }, - { - "lang": "Go", - "source": "client.GetIndex(\"movies\")" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies'" }, { "lang": "JS", "source": "client.index('movies').getRawInfo()" }, - { - "lang": "Java", - "source": "client.getIndex(\"movies\");" - }, { "lang": "PHP", "source": "$client->index('movies')->fetchRawInfo();" @@ -1180,21 +1168,33 @@ "lang": "Python", "source": "client.get_index('movies')" }, + { + "lang": "Java", + "source": "client.getIndex(\"movies\");" + }, { "lang": "Ruby", "source": "client.fetch_index('movies')" }, + { + "lang": "Go", + "source": "client.GetIndex(\"movies\")" + }, + { + "lang": "C#", + "source": "await client.GetIndexAsync(\"movies\");" + }, { "lang": "Rust", "source": "let movies: Index = client\n .get_index(\"movies\")\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.getIndex(\"movies\") { (result) in\n switch result {\n case .success(let index):\n print(index)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.getIndex('movies');" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies'" + "lang": "Swift", + "source": "client.getIndex(\"movies\") { (result) in\n switch result {\n case .success(let index):\n print(index)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -1263,25 +1263,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.DeleteIndexAsync(\"movies\");" - }, - { - "lang": "Dart", - "source": "await client.index('movies').delete();\nt_one_document_1: \"await client.index('movies').getDocument(25684,\\n fields: ['id', 'title', 'poster', 'release_date']);\"" - }, - { - "lang": "Go", - "source": "client.DeleteIndex(\"movies\")\n// OR\nclient.Index(\"movies\").Delete()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies'" }, { "lang": "JS", "source": "client.deleteIndex('movies')" }, - { - "lang": "Java", - "source": "client.deleteIndex(\"movies\");" - }, { "lang": "PHP", "source": "$client->deleteIndex('movies');" @@ -1290,21 +1278,33 @@ "lang": "Python", "source": "client.delete_index('movies')\n// OR\nclient.index('movies').delete()" }, + { + "lang": "Java", + "source": "client.deleteIndex(\"movies\");" + }, { "lang": "Ruby", "source": "client.delete_index('movies')" }, + { + "lang": "Go", + "source": "client.DeleteIndex(\"movies\")\n// OR\nclient.Index(\"movies\").Delete()" + }, + { + "lang": "C#", + "source": "await client.DeleteIndexAsync(\"movies\");" + }, { "lang": "Rust", "source": "client.index(\"movies\")\n .delete()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").delete { (result) in\n switch result {\n case .success:\n print(\"Index deleted\")\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').delete();\nt_one_document_1: \"await client.index('movies').getDocument(25684,\\n fields: ['id', 'title', 'poster', 'release_date']);\"" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies'" + "lang": "Swift", + "source": "client.index(\"movies\").delete { (result) in\n switch result {\n case .success:\n print(\"Index deleted\")\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -1383,25 +1383,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "TaskInfo task = await client.UpdateIndexAsync(\"movies\", \"id\");" - }, - { - "lang": "Dart", - "source": "await client.index('movies').update(primaryKey: 'id');" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateIndex(&meilisearch.UpdateIndexRequestParams{\n PrimaryKey: \"id\",\n})" + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"primaryKey\": \"id\" }'" }, { "lang": "JS", "source": "client.updateIndex('movies', { primaryKey: 'id' })" }, - { - "lang": "Java", - "source": "client.updateIndex(\"movies\", \"id\");" - }, { "lang": "PHP", "source": "$client->updateIndex('movies', ['primaryKey' => 'id']);" @@ -1410,21 +1398,33 @@ "lang": "Python", "source": "client.index('movies').update(primary_key='id')" }, + { + "lang": "Java", + "source": "client.updateIndex(\"movies\", \"id\");" + }, { "lang": "Ruby", "source": "client.index('movies').update(primary_key: 'movie_id')" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateIndex(&meilisearch.UpdateIndexRequestParams{\n PrimaryKey: \"id\",\n})" + }, + { + "lang": "C#", + "source": "TaskInfo task = await client.UpdateIndexAsync(\"movies\", \"id\");" + }, { "lang": "Rust", "source": "let task = IndexUpdater::new(\"movies\", &client)\n .with_primary_key(\"movie_review_id\")\n .execute()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").update(primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').update(primaryKey: 'id');" }, { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"primaryKey\": \"id\" }'" + "lang": "Swift", + "source": "client.index(\"movies\").update(primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -1432,9 +1432,9 @@ "/indexes/{indexUid}/compact": { "post": { "tags": [ - "Compact an index" + "Indexes" ], - "summary": "Compact an index", + "summary": "Compact index", "description": "Triggers a compaction process on the specified index. Compaction reorganizes the index database to make it smaller and more efficient.", "operationId": "compact", "parameters": [ @@ -1494,13 +1494,17 @@ ], "x-codeSamples": [ { - "lang": "Java", - "source": "client.index(\"INDEX_NAME\").compact();" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_UID/compact'" }, { "lang": "Python", "source": "client.index('movies').compact()" }, + { + "lang": "Java", + "source": "client.index(\"INDEX_NAME\").compact();" + }, { "lang": "Ruby", "source": "client.index('INDEX_UID').compact" @@ -1508,10 +1512,6 @@ { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"INDEX_UID\")\n .compact()\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_UID/compact'" } ] } @@ -1521,7 +1521,7 @@ "tags": [ "Documents" ], - "summary": "Get documents", + "summary": "List documents with GET", "description": "Get documents by batches.", "operationId": "get_documents", "parameters": [ @@ -1684,21 +1684,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() { Limit = 2, Filter = \"genres = action\" });" - }, - { - "lang": "Go", - "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"movies\").GetDocuments(&meilisearch.DocumentsQuery{\n Limit: 2,\n Filter: \"genres = action\",\n}, &result)" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents?limit=2&filter=genres=action'" }, { "lang": "JS", "source": "client.index('movies').getDocuments({\n limit: 2,\n filter: 'genres = action',\n sort: ['release_date:desc']\n})" }, - { - "lang": "Java", - "source": "DocumentsQuery query = new DocumentsQuery().setLimit(2).setFilter(new String[] {\"genres = action\"});\nclient.index(\"movies\").getDocuments(query, TargetClassName.class);" - }, { "lang": "PHP", "source": "$client->index('movies')->getDocuments((new DocumentsQuery())->setFilter('genres = action')->setLimit(2));" @@ -1707,10 +1699,22 @@ "lang": "Python", "source": "client.index('movies').get_documents({\n 'limit':2, 'filter': 'genres=action',\n 'sort': ['rating:desc', 'release_date:asc'] # list format\n})" }, + { + "lang": "Java", + "source": "DocumentsQuery query = new DocumentsQuery().setLimit(2).setFilter(new String[] {\"genres = action\"});\nclient.index(\"movies\").getDocuments(query, TargetClassName.class);" + }, { "lang": "Ruby", "source": "client.index('movies').get_documents(limit: 2, filter: 'genres = action')" }, + { + "lang": "Go", + "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"movies\").GetDocuments(&meilisearch.DocumentsQuery{\n Limit: 2,\n Filter: \"genres = action\",\n}, &result)" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() { Limit = 2, Filter = \"genres = action\" });" + }, { "lang": "Rust", "source": "let index = client.index(\"movies\");\nlet documents: DocumentsResults = DocumentsQuery::new(&index)\n .with_filter(\"genres = action\")\n .with_limit(2)\n .execute::()\n .await\n .unwrap();" @@ -1718,10 +1722,6 @@ { "lang": "Swift", "source": "client.index(\"movies\").getDocuments(params: DocumentsQuery(limit: 2)) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let movies):\n print(movies)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents?limit=2&filter=genres=action'" } ] }, @@ -1839,21 +1839,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "var movie = new[]\n{\n new Movie { Id = \"287947\", Title = \"Shazam ⚡️\", Genres = \"comedy\" }\n};\nawait index.UpdateDocumentsAsync(movie);" - }, - { - "lang": "Go", - "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\",\n },\n}\noptions := &meilisearch.DocumentOptions{SkipCreation: true}\nclient.Index(\"movies\").UpdateDocuments(documents, options)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\"\n }\n ]'" }, { "lang": "JS", "source": "client.index('movies').updateDocuments([{\n id: 287947,\n title: 'Shazam ⚡️',\n genres: 'comedy'\n}])" }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateDocuments(\"[{\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam ⚡️\\\",\"\n + \"\\\"genres\\\": \\\"comedy\\\"\"\n + \"}]\"\n);" - }, { "lang": "PHP", "source": "$client->index('movies')->updateDocuments([\n [\n 'id' => 287947,\n 'title' => 'Shazam ⚡️',\n 'genres' => 'comedy'\n ]\n]);" @@ -1862,10 +1854,22 @@ "lang": "Python", "source": "client.index('movies').update_documents([{\n 'id': 287947,\n 'title': 'Shazam ⚡️',\n 'genres': 'comedy'\n}], skip_creation=True)" }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateDocuments(\"[{\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam ⚡️\\\",\"\n + \"\\\"genres\\\": \\\"comedy\\\"\"\n + \"}]\"\n);" + }, { "lang": "Ruby", "source": "client.index('movies').update_documents([\n {\n id: 287947,\n title: 'Shazam ⚡️',\n genres: 'comedy'\n }\n])" }, + { + "lang": "Go", + "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\",\n },\n}\noptions := &meilisearch.DocumentOptions{SkipCreation: true}\nclient.Index(\"movies\").UpdateDocuments(documents, options)" + }, + { + "lang": "C#", + "source": "var movie = new[]\n{\n new Movie { Id = \"287947\", Title = \"Shazam ⚡️\", Genres = \"comedy\" }\n};\nawait index.UpdateDocumentsAsync(movie);" + }, { "lang": "Rust", "source": "// Define the type of our documents\n#[derive(Serialize, Deserialize)]\nstruct IncompleteMovie {\n id: usize,\n title: String,\n genres: String\n}\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .add_or_update(&[\n IncompleteMovie {\n id: 287947,\n title: \"Shazam ⚡️\".to_string(),\n genres: \"comedy\".to_string()\n }\n ], None)\n .await\n .unwrap();" @@ -1873,10 +1877,6 @@ { "lang": "Swift", "source": "let documentJsonString = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\"\n }\n]\n\"\"\"\nlet documents: Data = documentJsonString.data(using: .utf8)!\n\nclient.index(\"movies\").updateDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\"\n }\n ]'" } ] }, @@ -1994,25 +1994,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "var movie = new[]\n{\n new Movie\n {\n Id = \"287947\",\n Title = \"Shazam\",\n Poster = \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n Overview = \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n ReleaseDate = \"2019-03-23\"\n }\n};\nawait index.AddDocumentsAsync(movie);" - }, - { - "lang": "Dart", - "source": "await client.index('movies').addDocuments([\n {\n 'id': 287947,\n 'title': 'Shazam',\n 'poster':\n 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview':\n 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n }\n]);\nd_or_update_documents_1: \"await client.index('movies').updateDocuments([\\n {\\n 'id': 287947,\\n 'title': 'Shazam ⚡️',\\n 'genres': 'comedy',\\n }\\n]);\"" - }, - { - "lang": "Go", - "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\",\n },\n}\noptions := &meilisearch.DocumentOptions{SkipCreation: false}\nclient.Index(\"movies\").AddDocuments(documents, options)" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n ]'" }, { "lang": "JS", "source": "client.index('movies').addDocuments([{\n id: 287947,\n title: 'Shazam',\n poster: 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n overview: 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n release_date: '2019-03-23'\n}])" }, - { - "lang": "Java", - "source": "client.index(\"movies\").addDocuments(\"[{\"\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam\\\",\"\n + \"\\\"poster\\\": \\\"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\\\",\"\n + \"\\\"overview\\\": \\\"A boy is given the ability to become an adult superhero in times of need with a single magic word.\\\",\"\n + \"\\\"release_date\\\": \\\"2019-03-23\\\"\"\n + \"}]\"\n);" - }, { "lang": "PHP", "source": "$client->index('movies')->addDocuments([\n [\n 'id' => 287947,\n 'title' => 'Shazam',\n 'poster' => 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview' => 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date' => '2019-03-23'\n ]\n]);" @@ -2021,21 +2009,33 @@ "lang": "Python", "source": "client.index('movies').add_documents([{\n 'id': 287947,\n 'title': 'Shazam',\n 'poster': 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview': 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n}], skip_creation=True)" }, + { + "lang": "Java", + "source": "client.index(\"movies\").addDocuments(\"[{\"\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam\\\",\"\n + \"\\\"poster\\\": \\\"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\\\",\"\n + \"\\\"overview\\\": \\\"A boy is given the ability to become an adult superhero in times of need with a single magic word.\\\",\"\n + \"\\\"release_date\\\": \\\"2019-03-23\\\"\"\n + \"}]\"\n);" + }, { "lang": "Ruby", "source": "client.index('movies').add_documents([\n {\n id: 287947,\n title: 'Shazam',\n poster: 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n overview: 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n release_date: '2019-03-23'\n }\n])" }, + { + "lang": "Go", + "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\",\n },\n}\noptions := &meilisearch.DocumentOptions{SkipCreation: false}\nclient.Index(\"movies\").AddDocuments(documents, options)" + }, + { + "lang": "C#", + "source": "var movie = new[]\n{\n new Movie\n {\n Id = \"287947\",\n Title = \"Shazam\",\n Poster = \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n Overview = \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n ReleaseDate = \"2019-03-23\"\n }\n};\nawait index.AddDocumentsAsync(movie);" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .add_or_replace(&[\n Movie {\n id: 287947,\n title: \"Shazam\".to_string(),\n poster: \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\".to_string(),\n overview: \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\".to_string(),\n release_date: \"2019-03-23\".to_string(),\n }\n ], None)\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "let documentJsonString = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n]\n\"\"\"\nlet documents: Data = documentJsonString.data(using: .utf8)!\n\nclient.index(\"movies\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').addDocuments([\n {\n 'id': 287947,\n 'title': 'Shazam',\n 'poster':\n 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview':\n 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n }\n]);\nd_or_update_documents_1: \"await client.index('movies').updateDocuments([\\n {\\n 'id': 287947,\\n 'title': 'Shazam ⚡️',\\n 'genres': 'comedy',\\n }\\n]);\"" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n ]'" + "lang": "Swift", + "source": "let documentJsonString = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n]\n\"\"\"\nlet documents: Data = documentJsonString.data(using: .utf8)!\n\nclient.index(\"movies\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -2104,25 +2104,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteAllDocumentsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').deleteAllDocuments();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteAllDocuments()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/documents'" }, { "lang": "JS", "source": "client.index('movies').deleteAllDocuments()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").deleteAllDocuments();" - }, { "lang": "PHP", "source": "$client->index('movies')->deleteAllDocuments();" @@ -2131,21 +2119,33 @@ "lang": "Python", "source": "client.index('movies').delete_all_documents()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").deleteAllDocuments();" + }, { "lang": "Ruby", "source": "client.index('movies').delete_all_documents" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").DeleteAllDocuments()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteAllDocumentsAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_all_documents()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").deleteAllDocuments() { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').deleteAllDocuments();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/documents'" + "lang": "Swift", + "source": "client.index(\"movies\").deleteAllDocuments() { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -2226,21 +2226,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new DeleteDocumentsQuery() { Filter = \"genres = action OR genres = adventure\" });" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteDocumentsByFilter(\"genres=action OR genres=adventure\")" + "lang": "cURL", + "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/movies/documents/delete \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"genres = action OR genres = adventure\"\n }'" }, { "lang": "JS", "source": "client.index('movies').deleteDocuments({\n filter: 'genres = action OR genres = adventure'\n})" }, - { - "lang": "Java", - "source": "String filter = \"genres = action OR genres = adventure\";\nclient.index(\"movies\").deleteDocumentsByFilter(filter);" - }, { "lang": "PHP", "source": "$client->index('movies')->deleteDocuments(['filter' => 'genres = action OR genres = adventure']);" @@ -2249,17 +2241,25 @@ "lang": "Python", "source": "client.index('movies').delete_documents(filter='genres=action OR genres=adventure')" }, + { + "lang": "Java", + "source": "String filter = \"genres = action OR genres = adventure\";\nclient.index(\"movies\").deleteDocumentsByFilter(filter);" + }, { "lang": "Ruby", "source": "client.index('movies').delete_documents(filter: 'genres = action OR genres = adventure')" }, { - "lang": "Rust", - "source": "let index = client.index(\"movies\");\nlet task = DocumentDeletionQuery::new(&index)\n .with_filter(\"genres = action OR genres = adventure\")\n .execute()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"movies\").DeleteDocumentsByFilter(\"genres=action OR genres=adventure\")" }, { - "lang": "cURL", - "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/movies/documents/delete \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"genres = action OR genres = adventure\"\n }'" + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new DeleteDocumentsQuery() { Filter = \"genres = action OR genres = adventure\" });" + }, + { + "lang": "Rust", + "source": "let index = client.index(\"movies\");\nlet task = DocumentDeletionQuery::new(&index)\n .with_filter(\"genres = action OR genres = adventure\")\n .execute()\n .await\n .unwrap();" } ] } @@ -2341,21 +2341,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new[] { \"23488\", \"153738\", \"437035\", \"363869\" });" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteDocuments([]string{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\",\n})" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents/delete-batch' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n 23488,\n 153738,\n 437035,\n 363869\n ]'" }, { "lang": "JS", "source": "client.index('movies').deleteDocuments([23488, 153738, 437035, 363869])" }, - { - "lang": "Java", - "source": "client.index(\"movies\").deleteDocuments(Arrays.asList(new String[]\n{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\"\n}));" - }, { "lang": "PHP", "source": "$client->index('movies')->deleteDocuments([23488, 153738, 437035, 363869]);" @@ -2364,17 +2356,25 @@ "lang": "Python", "source": "client.index('movies').delete_documents([23488, 153738, 437035, 363869])" }, + { + "lang": "Java", + "source": "client.index(\"movies\").deleteDocuments(Arrays.asList(new String[]\n{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\"\n}));" + }, { "lang": "Ruby", "source": "client.index('movies').delete_documents([23488, 153738, 437035, 363869])" }, { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_documents(&[23488, 153738, 437035, 363869])\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"movies\").DeleteDocuments([]string{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\",\n})" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents/delete-batch' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n 23488,\n 153738,\n 437035,\n 363869\n ]'" + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new[] { \"23488\", \"153738\", \"437035\", \"363869\" });" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_documents(&[23488, 153738, 437035, 363869])\n .await\n .unwrap();" } ] } @@ -2384,7 +2384,7 @@ "tags": [ "Documents" ], - "summary": "Edit documents by function.", + "summary": "Edit documents by function", "description": "Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to\nedit one or more documents directly in Meilisearch.", "operationId": "edit_documents_by_function", "parameters": [ @@ -2465,7 +2465,7 @@ "tags": [ "Documents" ], - "summary": "Get documents with POST", + "summary": "List documents with POST", "description": "Get a set of documents.", "operationId": "documents_by_query_post", "parameters": [ @@ -2556,21 +2556,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() {\n Limit = 3,\n Fields = new List { \"title\", \"genres\", \"rating\", \"language\"},\n Filter = \"(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English\"\n});" - }, - { - "lang": "Go", - "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"books\").GetDocuments(&meilisearch.DocumentsQuery{\n Fields: []string{\"title\", \"genres\", \"rating\", \"language\"},\n Filter: \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n}, &result)" + "lang": "cURL", + "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/books/documents/fetch \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n \"fields\": [\"title\", \"genres\", \"rating\", \"language\"],\n \"limit\": 3\n }'" }, { "lang": "JS", "source": "client.index('books').getDocuments({\n filter: '(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English',\n fields: ['title', 'genres', 'rating', 'language'],\n limit: 3,\n sort: ['release_date:desc']\n})" }, - { - "lang": "Java", - "source": "DocumentsQuery query = new DocumentsQuery()\n .setFilter(new String[] {\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\"})\n .setFields(new String[] {\"title\", \"genres\", \"rating\", \"language\"})\n .setLimit(3);\nclient.index(\"books\").getDocuments(query, TargetClassName.class);" - }, { "lang": "PHP", "source": "$client->index('books')->getDocuments(\n (new DocumentsQuery())\n ->setFilter('(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English')\n ->setLimit(3)\n ->setFields(['title', 'genres', 'rating', 'language'])\n);" @@ -2579,17 +2571,25 @@ "lang": "Python", "source": "client.index('books').get_documents({\n 'limit':3,\n 'fields': ['title', 'genres', 'rating', 'language'],\n 'filter': '(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English',\n 'sort': 'rating:desc, title:asc' # comma-separated string format\n})" }, + { + "lang": "Java", + "source": "DocumentsQuery query = new DocumentsQuery()\n .setFilter(new String[] {\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\"})\n .setFields(new String[] {\"title\", \"genres\", \"rating\", \"language\"})\n .setLimit(3);\nclient.index(\"books\").getDocuments(query, TargetClassName.class);" + }, { "lang": "Ruby", "source": "client.index('books').get_documents(\n filter: '(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English',\n limit: 3,\n fields: ['title', 'genres', 'rating', 'language']\n)" }, { - "lang": "Rust", - "source": "let index = client.index(\"books\");\nlet documents: DocumentsResults = DocumentsQuery::new(&index)\n .with_filter(\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\")\n .with_fields([\"title\", \"genres\", \"rating\", \"language\"])\n .with_limit(2)\n .execute::()\n .await\n .unwrap();" + "lang": "Go", + "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"books\").GetDocuments(&meilisearch.DocumentsQuery{\n Fields: []string{\"title\", \"genres\", \"rating\", \"language\"},\n Filter: \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n}, &result)" }, { - "lang": "cURL", - "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/books/documents/fetch \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n \"fields\": [\"title\", \"genres\", \"rating\", \"language\"],\n \"limit\": 3\n }'" + "lang": "C#", + "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() {\n Limit = 3,\n Fields = new List { \"title\", \"genres\", \"rating\", \"language\"},\n Filter = \"(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English\"\n});" + }, + { + "lang": "Rust", + "source": "let index = client.index(\"books\");\nlet documents: DocumentsResults = DocumentsQuery::new(&index)\n .with_filter(\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\")\n .with_fields([\"title\", \"genres\", \"rating\", \"language\"])\n .with_limit(2)\n .execute::()\n .await\n .unwrap();" } ] } @@ -2599,7 +2599,7 @@ "tags": [ "Documents" ], - "summary": "Get one document", + "summary": "Get document", "description": "Get one document from its primary key.", "operationId": "get_document", "parameters": [ @@ -2705,21 +2705,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDocumentAsync(25684, new List { \"id\", \"title\", \"poster\", \"release_date\" });" - }, - { - "lang": "Go", - "source": "var a interface{}\nclient.Index(\"movies\").GetDocument(\"25684\",&meilisearch.DocumentQuery{\n Fields: []string{\"id\", \"title\", \"poster\", \"release_date\"},\n}, &a)" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents/25684?fields=id,title,poster,release_date'" }, { "lang": "JS", "source": "client\n .index('movies')\n .getDocument(25684, { fields: ['id', 'title', 'poster', 'release_date'] })" }, - { - "lang": "Java", - "source": "DocumentQuery query = new DocumentQuery().setFields(new String[] {\"id\", \"title\", \"poster\", \"release_date\"});\nclient.index(\"movies\").getDocument(\"25684\", query);" - }, { "lang": "PHP", "source": "$client->index('movies')->getDocument(25684, ['id', 'title', 'poster', 'release_date']);" @@ -2728,10 +2720,22 @@ "lang": "Python", "source": "client.index('movies').get_document(25684, {\n 'fields': ['id', 'title', 'poster', 'release_date']\n})" }, + { + "lang": "Java", + "source": "DocumentQuery query = new DocumentQuery().setFields(new String[] {\"id\", \"title\", \"poster\", \"release_date\"});\nclient.index(\"movies\").getDocument(\"25684\", query);" + }, { "lang": "Ruby", "source": "client.index('movies').document(25684, fields: ['id', 'title', 'poster', 'release_date'])" }, + { + "lang": "Go", + "source": "var a interface{}\nclient.Index(\"movies\").GetDocument(\"25684\",&meilisearch.DocumentQuery{\n Fields: []string{\"id\", \"title\", \"poster\", \"release_date\"},\n}, &a)" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetDocumentAsync(25684, new List { \"id\", \"title\", \"poster\", \"release_date\" });" + }, { "lang": "Rust", "source": "let index = client\n .index(\"movies\");\nlet document = DocumentQuery::new(&index)\n .with_fields([\"id\", \"title\", \"poster\", \"release_date\"])\n .execute::(\"25684\")\n .await\n .unwrap();" @@ -2739,10 +2743,6 @@ { "lang": "Swift", "source": "client.index(\"movies\").getDocument(25684) { (result: Result) in\n switch result {\n case .success(let movie):\n print(movie)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents/25684?fields=id,title,poster,release_date'" } ] }, @@ -2750,7 +2750,7 @@ "tags": [ "Documents" ], - "summary": "Delete a document", + "summary": "Delete document", "description": "Delete a single document by id.", "operationId": "delete_document", "parameters": [ @@ -2821,25 +2821,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteOneDocumentAsync(\"25684\");" - }, - { - "lang": "Dart", - "source": "await client.index('movies').deleteDocument(25684);\nlete_documents_by_batch_1: \"await client.index('movies').deleteDocuments(\\n DeleteDocumentsQuery(\\n ids: [23488, 153738, 437035, 363869],\\n ),\\n );\"" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteDocument(\"25684\")" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/documents/25684'" }, { "lang": "JS", "source": "client.index('movies').deleteDocument(25684)" }, - { - "lang": "Java", - "source": "client.index(\"movies\").deleteDocument(\"25684\");" - }, { "lang": "PHP", "source": "$client->index('movies')->deleteDocument(25684);" @@ -2848,21 +2836,33 @@ "lang": "Python", "source": "client.index('movies').delete_document(25684)" }, + { + "lang": "Java", + "source": "client.index(\"movies\").deleteDocument(\"25684\");" + }, { "lang": "Ruby", "source": "client.index('movies').delete_document(25684)" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").DeleteDocument(\"25684\")" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteOneDocumentAsync(\"25684\");" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_document(25684)\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").deleteDocument(\"25684\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').deleteDocument(25684);\nlete_documents_by_batch_1: \"await client.index('movies').deleteDocuments(\\n DeleteDocumentsQuery(\\n ids: [23488, 153738, 437035, 363869],\\n ),\\n );\"" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/documents/25684'" + "lang": "Swift", + "source": "client.index(\"movies\").deleteDocument(\"25684\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -2872,7 +2872,7 @@ "tags": [ "Facet Search" ], - "summary": "Perform a facet search", + "summary": "Search in facets", "description": "Search for a facet value within a given facet.", "operationId": "search", "parameters": [ @@ -2974,21 +2974,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "var query = new SearchFacetsQuery()\n{\n FacetQuery = \"fiction\",\n Filter = \"rating > 3\"\n};\nawait client.Index(\"books\").FacetSearchAsync(\"genres\", query);" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").FacetSearch(&meilisearch.FacetSearchRequest{\n FacetQuery: \"fiction\",\n FacetName: \"genres\",\n Filter: \"rating > 3\",\n})" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"facetQuery\": \"fiction\",\n \"facetName\": \"genres\",\n \"filter\": \"rating > 3\"\n }'" }, { "lang": "JS", "source": "client.index('books').searchForFacetValues({\n facetQuery: 'fiction',\n facetName: 'genres'\n filter: 'rating > 3'\n})" }, - { - "lang": "Java", - "source": "FacetSearchRequest fsr = FacetSearchRequest.builder().facetName(\"genres\").facetQuery(\"fiction\").filter(new String[]{\"rating > 3\"}).build();\nclient.index(\"books\").facetSearch(fsr);" - }, { "lang": "PHP", "source": "$client->index('books')->facetSearch(\n (new FacetSearchQuery())\n ->setFacetQuery('fiction')\n ->setFacetName('genres')\n ->setFilter(['rating > 3'])\n);" @@ -2997,17 +2989,25 @@ "lang": "Python", "source": "client.index('books').facet_search('genres', 'fiction', {\n 'filter': 'rating > 3'\n})" }, + { + "lang": "Java", + "source": "FacetSearchRequest fsr = FacetSearchRequest.builder().facetName(\"genres\").facetQuery(\"fiction\").filter(new String[]{\"rating > 3\"}).build();\nclient.index(\"books\").facetSearch(fsr);" + }, { "lang": "Ruby", "source": "client.index('books').facet_search('genres', 'fiction', filter: 'rating > 3')" }, { - "lang": "Rust", - "source": "let res = client.index(\"books\")\n .facet_search(\"genres\")\n .with_facet_query(\"fiction\")\n .with_filter(\"rating > 3\")\n .execute()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"books\").FacetSearch(&meilisearch.FacetSearchRequest{\n FacetQuery: \"fiction\",\n FacetName: \"genres\",\n Filter: \"rating > 3\",\n})" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"facetQuery\": \"fiction\",\n \"facetName\": \"genres\",\n \"filter\": \"rating > 3\"\n }'" + "lang": "C#", + "source": "var query = new SearchFacetsQuery()\n{\n FacetQuery = \"fiction\",\n Filter = \"rating > 3\"\n};\nawait client.Index(\"books\").FacetSearchAsync(\"genres\", query);" + }, + { + "lang": "Rust", + "source": "let res = client.index(\"books\")\n .facet_search(\"genres\")\n .with_facet_query(\"fiction\")\n .with_filter(\"rating > 3\")\n .execute()\n .await\n .unwrap();" } ] } @@ -3015,10 +3015,9 @@ "/indexes/{indexUid}/search": { "get": { "tags": [ - "Indexes", "Search" ], - "summary": "Search an index with GET", + "summary": "Search with GET", "description": "Search for documents matching a specific query in the given index.", "operationId": "search_with_url_query", "parameters": [ @@ -3420,19 +3419,18 @@ } ], "x-codeSamples": [ - { - "lang": "JS", - "source": "client.index('movies').searchGet('American ninja')" - }, { "lang": "cURL", "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/search?q=american%20ninja'" + }, + { + "lang": "JS", + "source": "client.index('movies').searchGet('American ninja')" } ] }, "post": { "tags": [ - "Indexes", "Search" ], "summary": "Search with POST", @@ -3537,19 +3535,19 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").SearchAsync(\"American ninja\");\nt_task_1: |\nTaskInfo task = await client.GetTaskAsync(1);\nt_all_tasks_1: |\nResourceResults taskResult = await client.GetTasksAsync();" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"american ninja\" }'" }, { - "lang": "Dart", - "source": "await client.index('movies').search('American ninja');" + "lang": "JS", + "source": "client.index('movies').search('American ninja')" }, { - "lang": "Go", - "source": "client.Index(\"movies\").Search(\"american ninja\", &meilisearch.SearchRequest{})" + "lang": "PHP", + "source": "$client->index('movies')->search('american ninja');" }, { - "lang": "JS", + "lang": "Python", "source": "client.index('movies').search('American ninja')" }, { @@ -3557,28 +3555,28 @@ "source": "client.index(\"movies\").search(\"American ninja\");" }, { - "lang": "PHP", - "source": "$client->index('movies')->search('american ninja');" + "lang": "Ruby", + "source": "client.index('movies').search('american ninja')" }, { - "lang": "Python", - "source": "client.index('movies').search('American ninja')" + "lang": "Go", + "source": "client.Index(\"movies\").Search(\"american ninja\", &meilisearch.SearchRequest{})" }, { - "lang": "Ruby", - "source": "client.index('movies').search('american ninja')" + "lang": "C#", + "source": "await client.Index(\"movies\").SearchAsync(\"American ninja\");\nt_task_1: |\nTaskInfo task = await client.GetTaskAsync(1);\nt_all_tasks_1: |\nResourceResults taskResult = await client.GetTasksAsync();" }, { "lang": "Rust", "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"american ninja\")\n .execute()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(query: \"American ninja\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').search('American ninja');" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"american ninja\" }'" + "lang": "Swift", + "source": "let searchParameters = SearchParameters(query: \"American ninja\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -3588,7 +3586,7 @@ "tags": [ "Settings" ], - "summary": "All settings", + "summary": "List settings", "description": "This route allows you to retrieve, configure, or reset all of an index's settings at once.", "operationId": "get_all", "parameters": [ @@ -3643,25 +3641,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSettingsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getSettings();\ndate_settings_1: \"await client.index('movies').updateSettings(\\n IndexSettings(\\n rankingRules: [\\n 'words',\\n 'typo',\\n 'proximity',\\n 'attribute',\\n 'sort',\\n 'exactness',\\n 'release_date:desc',\\n 'rank:desc'\\n ],\\n distinctAttribute: 'movie_id',\\n searchableAttributes: ['title', 'overview', 'genres'],\\n displayedAttributes: [\\n 'title',\\n 'overview',\\n 'genres',\\n 'release_date'\\n ],\\n stopWords: ['the', 'a', 'an'],\\n sortableAttributes: ['title', 'release_date'],\\n synonyms: {\\n 'wolverine': ['xmen', 'logan'],\\n 'logan': ['wolverine'],\\n },\\n ),\\n );\"" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSettings()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings'" }, { "lang": "JS", "source": "client.index('movies').getSettings()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").getSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->getSettings();" @@ -3670,21 +3656,33 @@ "lang": "Python", "source": "client.index('movies').get_settings()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").getSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').settings" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetSettings()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetSettingsAsync();" + }, { "lang": "Rust", "source": "let settings: Settings = client\n .index(\"movies\")\n .get_settings()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").getSettings { (result) in\n switch result {\n case .success(let setting):\n print(setting)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').getSettings();\ndate_settings_1: \"await client.index('movies').updateSettings(\\n IndexSettings(\\n rankingRules: [\\n 'words',\\n 'typo',\\n 'proximity',\\n 'attribute',\\n 'sort',\\n 'exactness',\\n 'release_date:desc',\\n 'rank:desc'\\n ],\\n distinctAttribute: 'movie_id',\\n searchableAttributes: ['title', 'overview', 'genres'],\\n displayedAttributes: [\\n 'title',\\n 'overview',\\n 'genres',\\n 'release_date'\\n ],\\n stopWords: ['the', 'a', 'an'],\\n sortableAttributes: ['title', 'release_date'],\\n synonyms: {\\n 'wolverine': ['xmen', 'logan'],\\n 'logan': ['wolverine'],\\n },\\n ),\\n );\"" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings'" + "lang": "Swift", + "source": "client.index(\"movies\").getSettings { (result) in\n switch result {\n case .success(let setting):\n print(setting)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -3753,25 +3751,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSettingsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetSettings();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetSettings()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings'" }, { "lang": "JS", "source": "client.index('movies').resetSettings()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->resetSettings();" @@ -3780,21 +3766,33 @@ "lang": "Python", "source": "client.index('movies').reset_settings()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').reset_settings" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetSettings()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSettingsAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_settings()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").resetSettings { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').resetSettings();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings'" + "lang": "Swift", + "source": "client.index(\"movies\").resetSettings { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -3873,21 +3871,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "Settings newSettings = new Settings\n{\n RankingRules = new string[]\n {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n },\n DistinctAttribute = \"movie_id\",\n SearchableAttributes = new string[] { \"title\", \"overview\", \"genres\" },\n DisplayedAttributes = new string[] { \"title\", \"overview\", \"genres\", \"release_date\" },\n SortableAttributes = new string[] { \"title\", \"release_date\" },\n StopWords = new string[] { \"the\", \"a\", \"an\" },\n Synonyms = new Dictionary>\n {\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\" } },\n },\n FilterableAttributes = new string[] { },\n TypoTolerance = new TypoTolerance\n {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeForTypos = new TypoTolerance.TypoSize\n {\n OneTypo = 8,\n TwoTypos = 10\n }\n },\n SearchCutoffMs = 150\n};\nTaskInfo task = await client.Index(\"movies\").UpdateSettingsAsync(newFilters);" - }, - { - "lang": "Go", - "source": "distinctAttribute := \"movie_id\"\nsettings := meilisearch.Settings{\n RankingRules: []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\",\n },\n DistinctAttribute: &distinctAttribute,\n SearchableAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n },\n DisplayedAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n },\n StopWords: []string{\n \"the\",\n \"a\",\n \"an\",\n },\n SortableAttributes: []string{\n \"title\",\n \"release_date\",\n },\n Synonyms: map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\"},\n },\n TypoTolerance: &meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 8,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n },\n Pagination: &meilisearch.Pagination{\n MaxTotalHits: 5000,\n },\n Faceting: &meilisearch.Faceting{\n MaxValuesPerFacet: 200,\n },\n SearchCutoffMs: 150,\n}\nclient.Index(\"movies\").UpdateSettings(&settings)" + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"rankingRules\": [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ],\n \"distinctAttribute\": \"movie_id\",\n \"searchableAttributes\": [\n \"title\",\n \"overview\",\n \"genres\"\n ],\n \"displayedAttributes\": [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ],\n \"stopWords\": [\n \"the\",\n \"a\",\n \"an\"\n ],\n \"sortableAttributes\": [\n \"title\",\n \"release_date\"\n ],\n \"synonyms\": {\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\"wolverine\"]\n },\n \"typoTolerance\": {\n \"minWordSizeForTypos\": {\n \"oneTypo\": 8,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n },\n \"pagination\": {\n \"maxTotalHits\": 5000\n },\n \"faceting\": {\n \"maxValuesPerFacet\": 200\n },\n \"searchCutoffMs\": 150\n }'" }, { "lang": "JS", "source": "client.index('movies').updateSettings({\n rankingRules: [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n distinctAttribute: 'movie_id',\n searchableAttributes: [\n 'title',\n 'overview',\n 'genres'\n ],\n displayedAttributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n stopWords: [\n 'the',\n 'a',\n 'an'\n ],\n sortableAttributes: [\n 'title',\n 'release_date'\n ],\n synonyms: {\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine']\n },\n typoTolerance: {\n 'minWordSizeForTypos': {\n 'oneTypo': 8,\n 'twoTypos': 10\n },\n 'disableOnAttributes': [\n 'title'\n ]\n },\n pagination: {\n maxTotalHits: 5000\n },\n faceting: {\n maxValuesPerFacet: 200\n },\n searchCutoffMs: 150\n})" }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setRankingRules(\n new String[] {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n });\nsettings.setDistinctAttribute(\"movie_id\");\nsettings.setSearchableAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\"\n });\nsettings.setDisplayedAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n });\nsettings.setStopWords(\n new String[] {\n \"the\",\n \"a\",\n \"an\"\n });\nsettings.setSortableAttributes(\n new String[] {\n \"title\",\n \"release_date\"\n });\n\nHashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nsettings.setSynonyms(synonyms);\n\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 8);\n put(\"twoTypos\", 10);\n }\n };\nTypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\nsettings.setTypoTolerance(typoTolerance);\nsettings.setSearchCutoffMs(150);\nclient.index(\"movies\").updateSettings(settings);" - }, { "lang": "PHP", "source": "$client->index('movies')->updateSettings([\n 'rankingRules' => [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n 'distinctAttribute' => 'movie_id',\n 'searchableAttributes' => [\n 'title',\n 'overview',\n 'genres'\n ],\n 'displayedAttributes' => [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n 'stopWords' => [\n 'the',\n 'a',\n 'an'\n ],\n 'sortableAttributes' => [\n 'title',\n 'release_date'\n ],\n 'synonyms' => [\n 'wolverine' => ['xmen', 'logan'],\n 'logan' => ['wolverine']\n ],\n 'typoTolerance' => [\n 'minWordSizeForTypos' => [\n 'oneTypo' => 8,\n 'twoTypos' => 10\n ],\n 'disableOnAttributes' => ['title']\n ],\n 'pagination' => [\n 'maxTotalHits' => 5000\n ],\n 'faceting' => [\n 'maxValuesPerFacet' => 200\n ],\n 'searchCutoffMs' => 150\n]);" @@ -3896,10 +3886,22 @@ "lang": "Python", "source": "client.index('movies').update_settings({\n 'rankingRules': [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n 'distinctAttribute': 'movie_id',\n 'searchableAttributes': [\n 'title',\n 'overview',\n 'genres'\n ],\n 'displayedAttributes': [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n 'sortableAttributes': [\n 'title',\n 'release_date'\n ],\n 'stopWords': [\n 'the',\n 'a',\n 'an'\n ],\n 'synonyms': {\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine']\n },\n 'typoTolerance': {\n 'minWordSizeForTypos': {\n 'oneTypo': 8,\n 'twoTypos': 10\n },\n 'disableOnAttributes': ['title']\n },\n 'pagination': {\n 'maxTotalHits': 5000\n },\n 'faceting': {\n 'maxValuesPerFacet': 200\n },\n 'searchCutoffMs': 150\n})" }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setRankingRules(\n new String[] {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n });\nsettings.setDistinctAttribute(\"movie_id\");\nsettings.setSearchableAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\"\n });\nsettings.setDisplayedAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n });\nsettings.setStopWords(\n new String[] {\n \"the\",\n \"a\",\n \"an\"\n });\nsettings.setSortableAttributes(\n new String[] {\n \"title\",\n \"release_date\"\n });\n\nHashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nsettings.setSynonyms(synonyms);\n\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 8);\n put(\"twoTypos\", 10);\n }\n };\nTypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\nsettings.setTypoTolerance(typoTolerance);\nsettings.setSearchCutoffMs(150);\nclient.index(\"movies\").updateSettings(settings);" + }, { "lang": "Ruby", "source": "client.index('movies').update_settings({\n ranking_rules: [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n distinct_attribute: 'movie_id',\n searchable_attributes: [\n 'title',\n 'overview',\n 'genres'\n ],\n displayed_attributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n stop_words: [\n 'the',\n 'a',\n 'an'\n ],\n sortable_attributes: [\n 'title',\n 'release_date'\n ],\n synonyms: {\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine']\n },\n pagination: {\n max_total_hits: 5000\n },\n faceting: {\n max_values_per_facet: 200\n },\n search_cutoff_ms: 150\n})" }, + { + "lang": "Go", + "source": "distinctAttribute := \"movie_id\"\nsettings := meilisearch.Settings{\n RankingRules: []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\",\n },\n DistinctAttribute: &distinctAttribute,\n SearchableAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n },\n DisplayedAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n },\n StopWords: []string{\n \"the\",\n \"a\",\n \"an\",\n },\n SortableAttributes: []string{\n \"title\",\n \"release_date\",\n },\n Synonyms: map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\"},\n },\n TypoTolerance: &meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 8,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n },\n Pagination: &meilisearch.Pagination{\n MaxTotalHits: 5000,\n },\n Faceting: &meilisearch.Faceting{\n MaxValuesPerFacet: 200,\n },\n SearchCutoffMs: 150,\n}\nclient.Index(\"movies\").UpdateSettings(&settings)" + }, + { + "lang": "C#", + "source": "Settings newSettings = new Settings\n{\n RankingRules = new string[]\n {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n },\n DistinctAttribute = \"movie_id\",\n SearchableAttributes = new string[] { \"title\", \"overview\", \"genres\" },\n DisplayedAttributes = new string[] { \"title\", \"overview\", \"genres\", \"release_date\" },\n SortableAttributes = new string[] { \"title\", \"release_date\" },\n StopWords = new string[] { \"the\", \"a\", \"an\" },\n Synonyms = new Dictionary>\n {\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\" } },\n },\n FilterableAttributes = new string[] { },\n TypoTolerance = new TypoTolerance\n {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeForTypos = new TypoTolerance.TypoSize\n {\n OneTypo = 8,\n TwoTypos = 10\n }\n },\n SearchCutoffMs = 150\n};\nTaskInfo task = await client.Index(\"movies\").UpdateSettingsAsync(newFilters);" + }, { "lang": "Rust", "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"wolverine\"), vec![\"xmen\", \"logan\"]);\nsynonyms.insert(String::from(\"logan\"), vec![\"wolverine\"]);\n\nlet min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(4),\n two_typos; Some(12)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![\"title\".to_string()]),\n disable_on_words: Some(vec![])\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet settings = Settings::new()\n .with_ranking_rules([\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ])\n .with_distinct_attribute(Some(\"movie_id\"))\n .with_searchable_attributes([\n \"title\",\n \"overview\",\n \"genres\"\n ])\n .with_displayed_attributes([\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ])\n .with_stop_words([\n \"the\",\n \"a\",\n \"an\"\n ])\n .with_sortable_attributes([\n \"title\",\n \"release_date\"\n ])\n .with_synonyms(synonyms)\n .with_typo_tolerance(typo_tolerance)\n .with_search_cutoff(150);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_settings(&settings)\n .await\n .unwrap();" @@ -3907,10 +3909,6 @@ { "lang": "Swift", "source": "let settings = Setting(rankingRules: [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n], searchableAttributes: [\n \"title\",\n \"overview\",\n \"genres\"\n], displayedAttributes: [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n], stopWords: [\n \"the\",\n \"a\",\n \"an\"\n], synonyms: [\n \"wolverine\": [\"xmen\", \"logan\"],\n \"logan\": [\"wolverine\"]\n], distinctAttribute: \"movie_id\",\nsortableAttributes: [\n \"title\",\n \"release_date\"\n])\nclient.index(\"movies\").updateSettings(settings) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"rankingRules\": [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ],\n \"distinctAttribute\": \"movie_id\",\n \"searchableAttributes\": [\n \"title\",\n \"overview\",\n \"genres\"\n ],\n \"displayedAttributes\": [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ],\n \"stopWords\": [\n \"the\",\n \"a\",\n \"an\"\n ],\n \"sortableAttributes\": [\n \"title\",\n \"release_date\"\n ],\n \"synonyms\": {\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\"wolverine\"]\n },\n \"typoTolerance\": {\n \"minWordSizeForTypos\": {\n \"oneTypo\": 8,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n },\n \"pagination\": {\n \"maxTotalHits\": 5000\n },\n \"faceting\": {\n \"maxValuesPerFacet\": 200\n },\n \"searchCutoffMs\": 150\n }'" } ] } @@ -4205,21 +4203,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "var indexDictionary = await client.Index(\"books\").GetDictionaryAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetDictionary()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/dictionary'" }, { "lang": "JS", "source": "client.index('books').getDictionary()" }, - { - "lang": "Java", - "source": "client.index(\"books\").getDictionarySettings();" - }, { "lang": "PHP", "source": "$client->index('books')->getDictionary();" @@ -4228,10 +4218,22 @@ "lang": "Python", "source": "client.index('books').get_dictionary()" }, + { + "lang": "Java", + "source": "client.index(\"books\").getDictionarySettings();" + }, { "lang": "Ruby", "source": "client.index('books').dictionary" }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetDictionary()" + }, + { + "lang": "C#", + "source": "var indexDictionary = await client.Index(\"books\").GetDictionaryAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('books')\n .get_dictionary()\n .await\n .unwrap();" @@ -4239,10 +4241,6 @@ { "lang": "Swift", "source": "client.index(\"books\").getDictionary { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/dictionary'" } ] }, @@ -4325,21 +4323,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "var newDictionary = new string[] { \"J. R. R.\", \"W. E. B.\" };\nawait client.Index(\"books\").UpdateDictionaryAsync(newDictionary);" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateDictionary([]string{\n \"J. R. R.\",\n \"W. E. B.\",\n})" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/dictionary' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"J. R. R.\",\n \"W. E. B.\"\n ]'" }, { "lang": "JS", "source": "client.index('books').updateDictionary(['J. R. R.', 'W. E. B.'])" }, - { - "lang": "Java", - "source": "client.index(\"books\").updateDictionarySettings(new String[] {\"J. R. R.\", \"W. E. B.\"});" - }, { "lang": "PHP", "source": "$client->index('books')->updateDictionary(['J. R. R.', 'W. E. B.']);" @@ -4348,10 +4338,22 @@ "lang": "Python", "source": "client.index('books').update_dictionary([\"J. R. R.\", \"W. E. B.\"])" }, + { + "lang": "Java", + "source": "client.index(\"books\").updateDictionarySettings(new String[] {\"J. R. R.\", \"W. E. B.\"});" + }, { "lang": "Ruby", "source": "client.index('books').update_dictionary(['J. R. R.', 'W. E. B.'])" }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateDictionary([]string{\n \"J. R. R.\",\n \"W. E. B.\",\n})" + }, + { + "lang": "C#", + "source": "var newDictionary = new string[] { \"J. R. R.\", \"W. E. B.\" };\nawait client.Index(\"books\").UpdateDictionaryAsync(newDictionary);" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('books')\n .set_dictionary(['J. R. R.', 'W. E. B.'])\n .await\n .unwrap();" @@ -4359,10 +4361,6 @@ { "lang": "Swift", "source": "client.index(\"books\").updateDictionary([\"J. R. R.\", \"W. E. B.\"]) { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/dictionary' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"J. R. R.\",\n \"W. E. B.\"\n ]'" } ] }, @@ -4445,21 +4443,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"books\").ResetDictionaryAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetDictionary()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/dictionary'" }, { "lang": "JS", "source": "client.index('books').resetDictionary()" }, - { - "lang": "Java", - "source": "client.index(\"books\").resetDictionarySettings();" - }, { "lang": "PHP", "source": "$client->index('books')->resetDictionary();" @@ -4468,10 +4458,22 @@ "lang": "Python", "source": "client.index('books').reset_dictionary()" }, + { + "lang": "Java", + "source": "client.index(\"books\").resetDictionarySettings();" + }, { "lang": "Ruby", "source": "client.index('books').reset_dictionary" }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetDictionary()" + }, + { + "lang": "C#", + "source": "await client.Index(\"books\").ResetDictionaryAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('books')\n .reset_dictionary()\n .await\n .unwrap();" @@ -4479,10 +4481,6 @@ { "lang": "Swift", "source": "client.index(\"books\").resetDictionary { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/dictionary'" } ] } @@ -4550,25 +4548,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDisplayedAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getDisplayedAttributes();\ndate_displayed_attributes_1: \"await client.index('movies').updateDisplayedAttributes([\\n 'title',\\n 'overview',\\n 'genres',\\n 'release_date',\\n]);\"" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetDisplayedAttributes()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" }, { "lang": "JS", "source": "client.index('movies').getDisplayedAttributes()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").getDisplayedAttributesSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->getDisplayedAttributes();" @@ -4577,21 +4563,33 @@ "lang": "Python", "source": "client.index('movies').get_displayed_attributes()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").getDisplayedAttributesSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').get_displayed_attributes" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetDisplayedAttributes()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetDisplayedAttributesAsync();" + }, { "lang": "Rust", "source": "let displayed_attributes: Vec = client\n .index(\"movies\")\n .get_displayed_attributes()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").getDisplayedAttributes { (result) in\n switch result {\n case .success(let displayedAttributes):\n print(displayedAttributes)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').getDisplayedAttributes();\ndate_displayed_attributes_1: \"await client.index('movies').updateDisplayedAttributes([\\n 'title',\\n 'overview',\\n 'genres',\\n 'release_date',\\n]);\"" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" + "lang": "Swift", + "source": "client.index(\"movies\").getDisplayedAttributes { (result) in\n switch result {\n case .success(let displayedAttributes):\n print(displayedAttributes)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -4673,21 +4671,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateDisplayedAttributesAsync(new[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" - }, - { - "lang": "Go", - "source": "displayedAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n}\nclient.Index(\"movies\").UpdateDisplayedAttributes(&displayedAttributes)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ]'" }, { "lang": "JS", "source": "client.index('movies').updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateDisplayedAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" - }, { "lang": "PHP", "source": "$client->index('movies')->updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n]);" @@ -4696,10 +4686,22 @@ "lang": "Python", "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateDisplayedAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" + }, { "lang": "Ruby", "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" }, + { + "lang": "Go", + "source": "displayedAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n}\nclient.Index(\"movies\").UpdateDisplayedAttributes(&displayedAttributes)" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateDisplayedAttributesAsync(new[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" + }, { "lang": "Rust", "source": "let displayed_attributes = [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_displayed_attributes(&displayed_attributes)\n .await\n .unwrap();" @@ -4707,10 +4709,6 @@ { "lang": "Swift", "source": "let displayedAttributes: [String] = [\"title\", \"overview\", \"genres\", \"release_date\"]\nclient.index(\"movies\").updateDisplayedAttributes(displayedAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ]'" } ] }, @@ -4792,25 +4790,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetDisplayedAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetDisplayedAttributes();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetDisplayedAttributes()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" }, { "lang": "JS", "source": "client.index('movies').resetDisplayedAttributes()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetDisplayedAttributesSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->resetDisplayedAttributes();" @@ -4819,21 +4805,33 @@ "lang": "Python", "source": "client.index('movies').reset_displayed_attributes()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetDisplayedAttributesSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').reset_displayed_attributes" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetDisplayedAttributes()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetDisplayedAttributesAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_displayed_attributes()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").resetDisplayedAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').resetDisplayedAttributes();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" + "lang": "Swift", + "source": "client.index(\"movies\").resetDisplayedAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -4898,25 +4896,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "string result = await client.Index(\"shoes\").GetDistinctAttributeAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('shoes').getDistinctAttribute();" - }, - { - "lang": "Go", - "source": "client.Index(\"shoes\").GetDistinctAttribute()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" }, { "lang": "JS", "source": "client.index('shoes').getDistinctAttribute()" }, - { - "lang": "Java", - "source": "client.index(\"shoes\").getDistinctAttributeSettings();" - }, { "lang": "PHP", "source": "$client->index('shoes')->getDistinctAttribute();" @@ -4925,21 +4911,33 @@ "lang": "Python", "source": "client.index('shoes').get_distinct_attribute()" }, + { + "lang": "Java", + "source": "client.index(\"shoes\").getDistinctAttributeSettings();" + }, { "lang": "Ruby", "source": "client.index('shoes').distinct_attribute" }, + { + "lang": "Go", + "source": "client.Index(\"shoes\").GetDistinctAttribute()" + }, + { + "lang": "C#", + "source": "string result = await client.Index(\"shoes\").GetDistinctAttributeAsync();" + }, { "lang": "Rust", "source": "let distinct_attribute: Option = client\n .index(\"shoes\")\n .get_distinct_attribute()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"shoes\").getDistinctAttribute { (result) in\n switch result {\n case .success(let distinctAttribute):\n print(distinctAttribute)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('shoes').getDistinctAttribute();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" + "lang": "Swift", + "source": "client.index(\"shoes\").getDistinctAttribute { (result) in\n switch result {\n case .success(let distinctAttribute):\n print(distinctAttribute)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -5018,25 +5016,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "TaskInfo result = await client.Index(\"shoes\").UpdateDistinctAttributeAsync(\"skuid\");" - }, - { - "lang": "Dart", - "source": "await client.index('shoes').updateDistinctAttribute('skuid');" - }, - { - "lang": "Go", - "source": "client.Index(\"shoes\").UpdateDistinctAttribute(\"skuid\")" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"skuid\"'" }, { "lang": "JS", "source": "client.index('shoes').updateDistinctAttribute('skuid')" }, - { - "lang": "Java", - "source": "client.index(\"shoes\").updateDistinctAttributeSettings(\"skuid\");" - }, { "lang": "PHP", "source": "$client->index('shoes')->updateDistinctAttribute('skuid');" @@ -5045,21 +5031,33 @@ "lang": "Python", "source": "client.index('shoes').update_distinct_attribute('skuid')" }, + { + "lang": "Java", + "source": "client.index(\"shoes\").updateDistinctAttributeSettings(\"skuid\");" + }, { "lang": "Ruby", "source": "client.index('shoes').update_distinct_attribute('skuid')" }, + { + "lang": "Go", + "source": "client.Index(\"shoes\").UpdateDistinctAttribute(\"skuid\")" + }, + { + "lang": "C#", + "source": "TaskInfo result = await client.Index(\"shoes\").UpdateDistinctAttributeAsync(\"skuid\");" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"shoes\")\n .set_distinct_attribute(\"skuid\")\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"shoes\").updateDistinctAttribute(\"skuid\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('shoes').updateDistinctAttribute('skuid');" }, { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"skuid\"'" + "lang": "Swift", + "source": "client.index(\"shoes\").updateDistinctAttribute(\"skuid\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -5138,25 +5136,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "TaskInfo result = await client.Index(\"shoes\").ResetDistinctAttributeAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('shoes').resetDistinctAttribute();" - }, - { - "lang": "Go", - "source": "client.Index(\"shoes\").ResetDistinctAttribute()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" }, { "lang": "JS", "source": "client.index('shoes').resetDistinctAttribute()" }, - { - "lang": "Java", - "source": "client.index(\"shoes\").resetDistinctAttributeSettings();" - }, { "lang": "PHP", "source": "$client->index('shoes')->resetDistinctAttribute();" @@ -5165,21 +5151,33 @@ "lang": "Python", "source": "client.index('shoes').reset_distinct_attribute()" }, + { + "lang": "Java", + "source": "client.index(\"shoes\").resetDistinctAttributeSettings();" + }, { "lang": "Ruby", "source": "client.index('shoes').reset_distinct_attribute" }, + { + "lang": "Go", + "source": "client.Index(\"shoes\").ResetDistinctAttribute()" + }, + { + "lang": "C#", + "source": "TaskInfo result = await client.Index(\"shoes\").ResetDistinctAttributeAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"shoes\")\n .reset_distinct_attribute()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"shoes\").resetDistinctAttribute { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('shoes').resetDistinctAttribute();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" + "lang": "Swift", + "source": "client.index(\"shoes\").resetDistinctAttribute { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -5249,6 +5247,10 @@ } ], "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" + }, { "lang": "Ruby", "source": "client.index('INDEX_NAME').embedders" @@ -5256,10 +5258,6 @@ { "lang": "Rust", "source": "let embedders = index.get_embedders().await.unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" } ] }, @@ -5343,6 +5341,10 @@ } ], "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" + }, { "lang": "Ruby", "source": "client.index('INDEX_NAME').reset_embedders" @@ -5350,10 +5352,6 @@ { "lang": "Rust", "source": "index.reset_embedders().await.unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" } ] }, @@ -5437,6 +5435,10 @@ } ], "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"default\": {\n \"source\": \"openAi\",\n \"apiKey\": \"OPEN_AI_API_KEY\",\n \"model\": \"text-embedding-3-small\",\n \"documentTemplate\": \"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\"\n }\n }'" + }, { "lang": "JS", "source": "client.index('INDEX_NAME').updateEmbedders({\n default: {\n source: 'openAi',\n apiKey: 'OPEN_AI_API_KEY',\n model: 'text-embedding-3-small',\n documentTemplate: 'A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}'\n }\n});" @@ -5452,10 +5454,6 @@ { "lang": "Rust", "source": "let embedders = HashMap::from([(\n String::from(\"default\"),\n Embedder {\n source: EmbedderSource::OpenAi,\n api_key: Some(String::from(\"OPEN_AI_API_KEY\")),\n model: Some(String::from(\"text-embedding-3-small\")),\n document_template: Some(String::from(\"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\")),\n ..Embedder::default()\n }\n)]);\nlet task = index\n .set_embedders(&embedders)\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"default\": {\n \"source\": \"openAi\",\n \"apiKey\": \"OPEN_AI_API_KEY\",\n \"model\": \"text-embedding-3-small\",\n \"documentTemplate\": \"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\"\n }\n }'" } ] } @@ -5520,8 +5518,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.Index(\"books\").GetFacetSearch()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" }, { "lang": "JS", @@ -5540,12 +5538,12 @@ "source": "client.index('INDEX_UID').facet_search_setting" }, { - "lang": "Rust", - "source": "let facet_search: bool = client\n .index(INDEX_UID)\n .get_facet_search()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"books\").GetFacetSearch()" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" + "lang": "Rust", + "source": "let facet_search: bool = client\n .index(INDEX_UID)\n .get_facet_search()\n .await\n .unwrap();" } ] }, @@ -5624,8 +5622,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.Index(\"books\").UpdateFacetSearch(false)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary 'false'" }, { "lang": "JS", @@ -5644,12 +5642,12 @@ "source": "client.index('INDEX_UID').update_facet_search_setting(false)" }, { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_facet_search(false)\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"books\").UpdateFacetSearch(false)" }, { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary 'false'" + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_facet_search(false)\n .await\n .unwrap();" } ] }, @@ -5728,8 +5726,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.Index(\"books\").ResetFacetSearch()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" }, { "lang": "JS", @@ -5748,12 +5746,12 @@ "source": "client.index('INDEX_UID').reset_facet_search_setting" }, { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_facet_search()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"books\").ResetFacetSearch()" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_facet_search()\n .await\n .unwrap();" } ] } @@ -5818,25 +5816,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetFacetingAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getFaceting();\ndate_faceting_settings_1: \"await client.index('books').updateFaceting(Faceting(\\n maxValuesPerFacet: 2,\\n sortFacetValuesBy: {\\n '*': FacetingSortTypes.alpha,\\n 'genres': FacetingSortTypes.count\\n }));\"" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetFaceting()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/faceting'" }, { "lang": "JS", "source": "client.index('books').getFaceting()" }, - { - "lang": "Java", - "source": "client.index(\"books\").getFacetingSettings();" - }, { "lang": "PHP", "source": "$client->index('books')->getFaceting();" @@ -5845,17 +5831,29 @@ "lang": "Python", "source": "client.index('books').get_faceting_settings()" }, + { + "lang": "Java", + "source": "client.index(\"books\").getFacetingSettings();" + }, { "lang": "Ruby", "source": "client.index('books').faceting" }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetFaceting()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetFacetingAsync();" + }, { "lang": "Rust", "source": "let faceting: FacetingSettings = client\n .index(\"books\")\n .get_faceting()\n .await\n .unwrap();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/faceting'" + "lang": "Dart", + "source": "await client.index('movies').getFaceting();\ndate_faceting_settings_1: \"await client.index('books').updateFaceting(Faceting(\\n maxValuesPerFacet: 2,\\n sortFacetValuesBy: {\\n '*': FacetingSortTypes.alpha,\\n 'genres': FacetingSortTypes.count\\n }));\"" } ] }, @@ -5934,25 +5932,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetFacetingAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetFaceting();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetFaceting()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/faceting'" }, { "lang": "JS", "source": "client.index('books').resetFaceting()" }, - { - "lang": "Java", - "source": "client.index(\"books\").resetFacetingSettings();" - }, { "lang": "PHP", "source": "$client->index('books')->resetFaceting();" @@ -5961,17 +5947,29 @@ "lang": "Python", "source": "client.index('books').reset_faceting_settings()" }, + { + "lang": "Java", + "source": "client.index(\"books\").resetFacetingSettings();" + }, { "lang": "Ruby", "source": "index('books').reset_faceting" }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetFaceting()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetFacetingAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_faceting()\n .await\n .unwrap();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/faceting'" + "lang": "Dart", + "source": "await client.index('movies').resetFaceting();" } ] }, @@ -6050,21 +6048,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "var faceting = new Faceting\n{\n MaxValuesPerFacet = 2,\n SortFacetValuesBy = new Dictionary\n {\n [\"*\"] = SortFacetValuesByType.Alpha,\n [\"genres\"] = SortFacetValuesByType.Count\n }\n};\nawait client.Index(\"books\").UpdateFacetingAsync(faceting);" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateFaceting(&meilisearch.Faceting{\n MaxValuesPerFacet: 2,\n SortFacetValuesBy: {\n \"*\": SortFacetTypeAlpha,\n \"genres\": SortFacetTypeCount,\n }\n})" + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/faceting' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxValuesPerFacet\": 2,\n \"sortFacetValuesBy\": {\n \"*\": \"alpha\",\n \"genres\": \"count\"\n }\n }'" }, { "lang": "JS", "source": "client.index('books').updateFaceting({\n maxValuesPerFacet: 2\n sortFacetValuesBy: {\n '*': 'alpha',\n genres: 'count'\n }\n})" }, - { - "lang": "Java", - "source": "Faceting newFaceting = new Faceting();\nnewFaceting.setMaxValuesPerFacet(2);\nHashMap facetSortValues = new HashMap<>();\nfacetSortValues.put(\"*\", FacetSortValue.ALPHA);\nfacetSortValues.put(\"genres\", FacetSortValue.COUNT);\nnewFaceting.setSortFacetValuesBy(facetSortValues);\nclient.index(\"books\").updateFacetingSettings(newFaceting);" - }, { "lang": "PHP", "source": "$client->index('books')->updateFaceting([\n 'maxValuesPerFacet' => 2,\n 'sortFacetValuesBy' => ['*' => 'alpha', 'genres' => 'count']\n]);" @@ -6073,17 +6063,25 @@ "lang": "Python", "source": "params = {\n 'maxValuesPerFacet': 2,\n 'sortFacetValuesBy': {\n '*': 'count',\n 'genres': 'count'\n }\n}\nclient.index('books').update_faceting_settings(params)" }, + { + "lang": "Java", + "source": "Faceting newFaceting = new Faceting();\nnewFaceting.setMaxValuesPerFacet(2);\nHashMap facetSortValues = new HashMap<>();\nfacetSortValues.put(\"*\", FacetSortValue.ALPHA);\nfacetSortValues.put(\"genres\", FacetSortValue.COUNT);\nnewFaceting.setSortFacetValuesBy(facetSortValues);\nclient.index(\"books\").updateFacetingSettings(newFaceting);" + }, { "lang": "Ruby", "source": "client.index('books').update_faceting({\n max_values_per_facet: 2,\n sort_facet_values_by: {\n '*': 'alpha',\n genres: 'count'\n }\n})" }, { - "lang": "Rust", - "source": "let mut facet_sort_setting = BTreeMap::new();\nfacet_sort_setting.insert(String::from(\"*\"), FacetSortValue::Alpha);\nfacet_sort_setting.insert(String::from(\"genres\"), FacetSortValue::Count);\nlet mut faceting = FacetingSettings {\n max_values_per_facet: 2,\n sort_facet_values_by: Some(facet_sort_setting),\n};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_faceting(&faceting)\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"books\").UpdateFaceting(&meilisearch.Faceting{\n MaxValuesPerFacet: 2,\n SortFacetValuesBy: {\n \"*\": SortFacetTypeAlpha,\n \"genres\": SortFacetTypeCount,\n }\n})" }, { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/faceting' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxValuesPerFacet\": 2,\n \"sortFacetValuesBy\": {\n \"*\": \"alpha\",\n \"genres\": \"count\"\n }\n }'" + "lang": "C#", + "source": "var faceting = new Faceting\n{\n MaxValuesPerFacet = 2,\n SortFacetValuesBy = new Dictionary\n {\n [\"*\"] = SortFacetValuesByType.Alpha,\n [\"genres\"] = SortFacetValuesByType.Count\n }\n};\nawait client.Index(\"books\").UpdateFacetingAsync(faceting);" + }, + { + "lang": "Rust", + "source": "let mut facet_sort_setting = BTreeMap::new();\nfacet_sort_setting.insert(String::from(\"*\"), FacetSortValue::Alpha);\nfacet_sort_setting.insert(String::from(\"genres\"), FacetSortValue::Count);\nlet mut faceting = FacetingSettings {\n max_values_per_facet: 2,\n sort_facet_values_by: Some(facet_sort_setting),\n};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_faceting(&faceting)\n .await\n .unwrap();" } ] } @@ -6151,25 +6149,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "IEnumerable attributes = await client.Index(\"movies\").GetFilterableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getFilterableAttributes();\ndate_filterable_attributes_1: \"await client\\n .index('movies')\\n .updateFilterableAttributes(['genres', 'director']);\"" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetFilterableAttributes()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" }, { "lang": "JS", "source": "client.index('movies').getFilterableAttributes()" }, - { - "lang": "Java", - "source": "// Granular filterable attributes API (v1.14+)\nclient.index(\"movies\").getGranularFilterableAttributesSettings();\n// Legacy String[] API\nclient.index(\"movies\").getFilterableAttributesSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->getFilterableAttributes();" @@ -6178,21 +6164,33 @@ "lang": "Python", "source": "client.index('movies').get_filterable_attributes()" }, + { + "lang": "Java", + "source": "// Granular filterable attributes API (v1.14+)\nclient.index(\"movies\").getGranularFilterableAttributesSettings();\n// Legacy String[] API\nclient.index(\"movies\").getFilterableAttributesSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').filterable_attributes" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetFilterableAttributes()" + }, + { + "lang": "C#", + "source": "IEnumerable attributes = await client.Index(\"movies\").GetFilterableAttributesAsync();" + }, { "lang": "Rust", "source": "let filterable_attributes: Vec = client\n .index(\"movies\")\n .get_filterable_attributes()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").getFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').getFilterableAttributes();\ndate_filterable_attributes_1: \"await client\\n .index('movies')\\n .updateFilterableAttributes(['genres', 'director']);\"" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" + "lang": "Swift", + "source": "client.index(\"movies\").getFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -6274,21 +6272,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "List attributes = new() { \"genres\", \"director\" };\nTaskInfo result = await client.Index(\"movies\").UpdateFilterableAttributesAsync(attributes);" - }, - { - "lang": "Go", - "source": "filterableAttributes := []interface{}{\n \"genres\",\n \"director\",\n AttributeRule{\n AttributePatterns: []string{\"tag\"}\n Features: AttributeFeatures{\n FacetSearch: false,\n Filter: FilterFeatures{\n Equality: true,\n Comparison: false,\n }\n }\n },\n map[string]interface{}{\n \"attributePatterns\": []interface{}{\"year\"}\n \"features\": map[string]interface{}{\n \"facetSearch\": false,\n \"filter\": map[string]interface{}{\n \"equality\": true,\n \"comparison\": true,\n }\n }\n }\n}\nclient.Index(\"movies\").UpdateFilterableAttributes(&filterableAttributes)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"genres\",\n \"director\",\n {\n \"attributePatterns\": [\"*_ratings\"],\n \"features\": {\n \"facetSearch\": false,\n \"filter\": {\n \"equality\": true,\n \"comparison\": false\n }\n }\n }\n ]'" }, { "lang": "JS", "source": "client.index('movies')\n .updateFilterableAttributes([\n \"genres\",\n {\n attributePatterns: [\"genre\"],\n features: {\n facetSearch: true,\n filter: { equality: true, comparison: false },\n },\n }\n ])" }, - { - "lang": "Java", - "source": "FilterableAttributesConfig genres = FilterableAttributesConfig.simple(\"genres\");\n\nFilterableAttributesFilter directorFilter = new FilterableAttributesFilter();\ndirectorFilter.setEquality(true);\ndirectorFilter.setComparison(false);\n\nFilterableAttributesFeatures directorFeatures = new FilterableAttributesFeatures();\ndirectorFeatures.setFacetSearch(true);\ndirectorFeatures.setFilter(directorFilter);\n\nFilterableAttributesConfig director = new FilterableAttributesConfig();\ndirector.setAttributePatterns(new String[] {\"director\"});\ndirector.setFeatures(directorFeatures);\n\n// Update settings\nclient.index(\"movies\").updateGranularFilterableAttributesSettings(\n new FilterableAttributesConfig[] {genres, director});" - }, { "lang": "PHP", "source": "$client->index('movies')->updateFilterableAttributes([\n 'author',\n [\n 'attributePatterns' => ['genres'],\n 'features' => [\n 'facetSearch' => true,\n 'filter' => [\n 'equality' => true,\n 'comparison' => false,\n ],\n ],\n ],\n]);" @@ -6297,10 +6287,22 @@ "lang": "Python", "source": "client.index('movies').update_filterable_attributes([\n 'genres',\n 'director'\n])" }, + { + "lang": "Java", + "source": "FilterableAttributesConfig genres = FilterableAttributesConfig.simple(\"genres\");\n\nFilterableAttributesFilter directorFilter = new FilterableAttributesFilter();\ndirectorFilter.setEquality(true);\ndirectorFilter.setComparison(false);\n\nFilterableAttributesFeatures directorFeatures = new FilterableAttributesFeatures();\ndirectorFeatures.setFacetSearch(true);\ndirectorFeatures.setFilter(directorFilter);\n\nFilterableAttributesConfig director = new FilterableAttributesConfig();\ndirector.setAttributePatterns(new String[] {\"director\"});\ndirector.setFeatures(directorFeatures);\n\n// Update settings\nclient.index(\"movies\").updateGranularFilterableAttributesSettings(\n new FilterableAttributesConfig[] {genres, director});" + }, { "lang": "Ruby", "source": "client.index('movies').update_filterable_attributes([\n 'genres',\n 'director'\n])" }, + { + "lang": "Go", + "source": "filterableAttributes := []interface{}{\n \"genres\",\n \"director\",\n AttributeRule{\n AttributePatterns: []string{\"tag\"}\n Features: AttributeFeatures{\n FacetSearch: false,\n Filter: FilterFeatures{\n Equality: true,\n Comparison: false,\n }\n }\n },\n map[string]interface{}{\n \"attributePatterns\": []interface{}{\"year\"}\n \"features\": map[string]interface{}{\n \"facetSearch\": false,\n \"filter\": map[string]interface{}{\n \"equality\": true,\n \"comparison\": true,\n }\n }\n }\n}\nclient.Index(\"movies\").UpdateFilterableAttributes(&filterableAttributes)" + }, + { + "lang": "C#", + "source": "List attributes = new() { \"genres\", \"director\" };\nTaskInfo result = await client.Index(\"movies\").UpdateFilterableAttributesAsync(attributes);" + }, { "lang": "Rust", "source": "use meilisearch_sdk::settings::{\n FilterableAttribute,\n FilterableAttributesSettings,\n FilterFeatures,\n FilterFeatureModes,\n};\n\n// Mixed legacy + new syntax\nlet filterable_attributes: Vec = vec![\n // legacy: plain attribute name\n \"author\".into(),\n // new syntax: settings object\n FilterableAttribute::Settings(FilterableAttributesSettings {\n attribute_patterns: vec![\"genre\".to_string()],\n features: FilterFeatures {\n facet_search: true,\n filter: FilterFeatureModes { equality: true, comparison: false },\n },\n }),\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_filterable_attributes_advanced(filterable_attributes)\n .await\n .unwrap();" @@ -6308,10 +6310,6 @@ { "lang": "Swift", "source": "client.index(\"movies\").updateFilterableAttributes([\"genre\", \"director\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"genres\",\n \"director\",\n {\n \"attributePatterns\": [\"*_ratings\"],\n \"features\": {\n \"facetSearch\": false,\n \"filter\": {\n \"equality\": true,\n \"comparison\": false\n }\n }\n }\n ]'" } ] }, @@ -6393,25 +6391,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "TaskInfo result = await client.Index(\"movies\").ResetFilterableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetFilterableAttributes();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetFilterableAttributes()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" }, { "lang": "JS", "source": "client.index('movies').resetFilterableAttributes()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetFilterableAttributesSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->resetFilterableAttributes();" @@ -6420,21 +6406,33 @@ "lang": "Python", "source": "client.index('movies').reset_filterable_attributes()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetFilterableAttributesSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').reset_filterable_attributes" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetFilterableAttributes()" + }, + { + "lang": "C#", + "source": "TaskInfo result = await client.Index(\"movies\").ResetFilterableAttributesAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_filterable_attributes()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").resetFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').resetFilterableAttributes();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" + "lang": "Swift", + "source": "client.index(\"movies\").resetFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -6502,17 +6500,13 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.index(\"INDEX_NAME\").GetLocalizedAttributes()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" }, { "lang": "JS", "source": "client.index('INDEX_NAME').getLocalizedAttributes()" }, - { - "lang": "Java", - "source": "client.index(\"INDEX_NAME\").getLocalizedAttributesSettings();" - }, { "lang": "PHP", "source": "$client->index('INDEX_NAME')->getLocalizedAttributes();" @@ -6521,17 +6515,21 @@ "lang": "Python", "source": "client.index('INDEX_NAME').get_localized_attributes()" }, + { + "lang": "Java", + "source": "client.index(\"INDEX_NAME\").getLocalizedAttributesSettings();" + }, { "lang": "Ruby", "source": "client.index('INDEX_NAME').localized_attributes" }, { - "lang": "Rust", - "source": "let localized_attributes: Option> = client\n .index(\"books\")\n .get_localized_attributes()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.index(\"INDEX_NAME\").GetLocalizedAttributes()" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" + "lang": "Rust", + "source": "let localized_attributes: Option> = client\n .index(\"books\")\n .get_localized_attributes()\n .await\n .unwrap();" } ] }, @@ -6613,17 +6611,13 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.index(\"INDEX_NAME\").UpdateLocalizedAttributes([]*LocalizedAttributes{\n { AttributePatterns: [\"*_ja\"], Locales: [\"jpn\"] },\n})" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\"locales\": [\"jpn\"], \"attributePatterns\": [\"*_ja\"]}\n ]'" }, { "lang": "JS", "source": "client.index('INDEX_NAME').updateLocalizedAttributes([\n { attributePatterns: ['*_ja'], locales: ['jpn'] },\n])" }, - { - "lang": "Java", - "source": "LocalizedAttribute attribute = new LocalizedAttribute();\nattribute.setAttributePatterns(new String[] {\"jpn\"});\nattribute.setLocales(new String[] {\"*_ja\"});\n\nclient.index(\"INDEX_NAME\").updateLocalizedAttributesSettings(\n new LocalizedAttributes[] {attribute}\n);" - }, { "lang": "PHP", "source": "$client->index('INDEX_NAME')->updateLocalizedAttributes([\n 'locales' => ['jpn'],\n 'attributePatterns' => ['*_ja']\n]);" @@ -6632,17 +6626,21 @@ "lang": "Python", "source": "client.index('INDEX_NAME').update_localized_attributes([\n {'attribute_patterns': ['*_ja'], 'locales': ['jpn']}\n])" }, + { + "lang": "Java", + "source": "LocalizedAttribute attribute = new LocalizedAttribute();\nattribute.setAttributePatterns(new String[] {\"jpn\"});\nattribute.setLocales(new String[] {\"*_ja\"});\n\nclient.index(\"INDEX_NAME\").updateLocalizedAttributesSettings(\n new LocalizedAttributes[] {attribute}\n);" + }, { "lang": "Ruby", "source": "client.index('INDEX_NAME').update_localized_attributes([\n { attribute_patterns: ['*_ja'], locales: ['jpn'] },\n])" }, { - "lang": "Rust", - "source": "let localized_attributes = vec![LocalizedAttributes {\n locales: vec![\"jpn\".to_string()],\n attribute_patterns: vec![\"*_ja\".to_string()],\n}];\nlet task: TaskInfo = client\n .index(\"books\")\n .set_localized_attributes(&localizced_attributes)\n .await\n .unwrap();" + "lang": "Go", + "source": "client.index(\"INDEX_NAME\").UpdateLocalizedAttributes([]*LocalizedAttributes{\n { AttributePatterns: [\"*_ja\"], Locales: [\"jpn\"] },\n})" }, { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\"locales\": [\"jpn\"], \"attributePatterns\": [\"*_ja\"]}\n ]'" + "lang": "Rust", + "source": "let localized_attributes = vec![LocalizedAttributes {\n locales: vec![\"jpn\".to_string()],\n attribute_patterns: vec![\"*_ja\".to_string()],\n}];\nlet task: TaskInfo = client\n .index(\"books\")\n .set_localized_attributes(&localizced_attributes)\n .await\n .unwrap();" } ] }, @@ -6724,17 +6722,13 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.index(\"INDEX_NAME\").ResetLocalizedAttributes()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" }, { "lang": "JS", "source": "client.index('INDEX_NAME').resetLocalizedAttributes()" }, - { - "lang": "Java", - "source": "client.index(\"INDEX_NAME\").resetLocalizedAttributesSettings();" - }, { "lang": "PHP", "source": "$client->index('INDEX_NAME')->resetLocalizedAttributes();" @@ -6743,17 +6737,21 @@ "lang": "Python", "source": "client.index('INDEX_NAME').reset_localized_attributes()" }, + { + "lang": "Java", + "source": "client.index(\"INDEX_NAME\").resetLocalizedAttributesSettings();" + }, { "lang": "Ruby", "source": "client.index('INDEX_NAME').reset_localized_attributes" }, { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_localized_attributes()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.index(\"INDEX_NAME\").ResetLocalizedAttributes()" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_localized_attributes()\n .await\n .unwrap();" } ] } @@ -6822,21 +6820,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetNonSeparatorTokensAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").GetNonSeparatorTokens()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" }, { "lang": "JS", "source": "client.index('books').getNonSeparatorTokens()" }, - { - "lang": "Java", - "source": "client.index(\"articles\").getNonSeparatorTokensSettings();" - }, { "lang": "PHP", "source": "$client->index('articles')->getNonSeparatorTokens();" @@ -6845,10 +6835,22 @@ "lang": "Python", "source": "client.index('articles').get_non_separator_tokens()" }, + { + "lang": "Java", + "source": "client.index(\"articles\").getNonSeparatorTokensSettings();" + }, { "lang": "Ruby", "source": "client.index('articles').non_separator_tokens" }, + { + "lang": "Go", + "source": "client.Index(\"articles\").GetNonSeparatorTokens()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetNonSeparatorTokensAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('articles')\n .get_non_separator_tokens()\n .await\n .unwrap();" @@ -6856,10 +6858,6 @@ { "lang": "Swift", "source": "client.index(\"books\").getNonSeparatorTokens { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" } ] }, @@ -6942,21 +6940,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateNonSeparatorTokensAsync(new[] { \"@\", \"#\" });" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").UpdateNonSeparatorTokens([]string{\n \"@\",\n \"#\",\n})" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"@\", \"#\"]'" }, { "lang": "JS", "source": "client.index('books').updateNonSeparatorTokens(['@', '#'])" }, - { - "lang": "Java", - "source": "String[] newSeparatorTokens = { \"@\", \"#\" };\nclient.index(\"articles\").updateNonSeparatorTokensSettings(newSeparatorTokens);" - }, { "lang": "PHP", "source": "$client->index('articles')->updateNonSeparatorTokens(['@', '#']);" @@ -6965,10 +6955,22 @@ "lang": "Python", "source": "client.index('articles').update_non_separator_tokens([\"@\", \"#\"])" }, + { + "lang": "Java", + "source": "String[] newSeparatorTokens = { \"@\", \"#\" };\nclient.index(\"articles\").updateNonSeparatorTokensSettings(newSeparatorTokens);" + }, { "lang": "Ruby", "source": "client.index('articles').update_non_separator_tokens(['@', '#'])" }, + { + "lang": "Go", + "source": "client.Index(\"articles\").UpdateNonSeparatorTokens([]string{\n \"@\",\n \"#\",\n})" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateNonSeparatorTokensAsync(new[] { \"@\", \"#\" });" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('articles')\n .set_non_separator_tokens(&vec!['@'.to_string(), '#'.to_string()])\n .await\n .unwrap();" @@ -6976,10 +6978,6 @@ { "lang": "Swift", "source": "client.index(\"books\").updateNonSeparatorTokens([\"@\", \"#\"]) { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"@\", \"#\"]'" } ] }, @@ -7062,21 +7060,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetNonSeparatorTokensAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").ResetNonSeparatorTokens()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" }, { "lang": "JS", "source": "client.index('books').resetNonSeparatorTokens()" }, - { - "lang": "Java", - "source": "client.index(\"articles\").resetNonSeparatorTokensSettings();" - }, { "lang": "PHP", "source": "$client->index('articles')->resetNonSeparatorTokens();" @@ -7085,10 +7075,22 @@ "lang": "Python", "source": "client.index('articles').reset_non_separator_tokens()" }, + { + "lang": "Java", + "source": "client.index(\"articles\").resetNonSeparatorTokensSettings();" + }, { "lang": "Ruby", "source": "client.index('articles').reset_non_separator_tokens" }, + { + "lang": "Go", + "source": "client.Index(\"articles\").ResetNonSeparatorTokens()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetNonSeparatorTokensAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('articles')\n .reset_non_separator_tokens()\n .await\n .unwrap();" @@ -7096,10 +7098,6 @@ { "lang": "Swift", "source": "client.index(\"books\").resetNonSeparatorTokens { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" } ] } @@ -7164,25 +7162,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetPaginationAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getPagination();\ndate_pagination_settings_1: \"await client\\n .index('books')\\n .updatePagination(Pagination(maxTotalHits: 100));\"" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetPagination()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/pagination'" }, { "lang": "JS", "source": "client.index('books').getPagination()" }, - { - "lang": "Java", - "source": "client.index(\"books\").getPaginationSettings();" - }, { "lang": "PHP", "source": "$client->index('books')->getPagination();" @@ -7191,17 +7177,29 @@ "lang": "Python", "source": "client.index('books').get_pagination_settings()" }, + { + "lang": "Java", + "source": "client.index(\"books\").getPaginationSettings();" + }, { "lang": "Ruby", "source": "index('books').pagination" }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetPagination()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetPaginationAsync();" + }, { "lang": "Rust", "source": "let pagination: PaginationSetting = client\n .index(\"books\")\n .get_pagination()\n .await\n .unwrap();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/pagination'" + "lang": "Dart", + "source": "await client.index('movies').getPagination();\ndate_pagination_settings_1: \"await client\\n .index('books')\\n .updatePagination(Pagination(maxTotalHits: 100));\"" } ] }, @@ -7280,25 +7278,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetPaginationAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetPagination();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetPagination()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/pagination'" }, { "lang": "JS", "source": "client.index('books').resetPagination()" }, - { - "lang": "Java", - "source": "client.index(\"books\").resetPaginationSettings();" - }, { "lang": "PHP", "source": "$client->index('books')->resetPagination();" @@ -7307,17 +7293,29 @@ "lang": "Python", "source": "client.index('books').reset_pagination_settings()" }, + { + "lang": "Java", + "source": "client.index(\"books\").resetPaginationSettings();" + }, { "lang": "Ruby", "source": "index('books').reset_pagination" }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetPagination()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetPaginationAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_pagination()\n .await\n .unwrap();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/pagination'" + "lang": "Dart", + "source": "await client.index('movies').resetPagination();" } ] }, @@ -7396,21 +7394,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "var pagination = new Pagination {\n MaxTotalHits = 20\n};\nawait client.Index(\"movies\").UpdatePaginationAsync(pagination);" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdatePagination(&meilisearch.Pagination{\n MaxTotalHits: 100,\n})" + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/pagination' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxTotalHits\": 100\n }'" }, { "lang": "JS", "source": "client.index('books').updateSettings({ pagination: { maxTotalHits: 100 }})" }, - { - "lang": "Java", - "source": "Pagination newPagination = new Pagination();\nnewPagination.setMaxTotalHits(100);\nclient.index(\"books\").updatePaginationSettings(newPagination);" - }, { "lang": "PHP", "source": "$client->index('books')->updateSettings([\n 'pagination' => [\n 'maxTotalHits' => 100\n ]\n]);" @@ -7420,16 +7410,24 @@ "source": "client.index('books').update_pagination_settings({'maxTotalHits': 100})" }, { - "lang": "Ruby", + "lang": "Java", + "source": "Pagination newPagination = new Pagination();\nnewPagination.setMaxTotalHits(100);\nclient.index(\"books\").updatePaginationSettings(newPagination);" + }, + { + "lang": "Ruby", "source": "index('books').update_pagination({ max_total_hits: 100 })" }, { - "lang": "Rust", - "source": "let pagination = PaginationSetting {max_total_hits:100};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_pagination(pagination)\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"books\").UpdatePagination(&meilisearch.Pagination{\n MaxTotalHits: 100,\n})" }, { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/pagination' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxTotalHits\": 100\n }'" + "lang": "C#", + "source": "var pagination = new Pagination {\n MaxTotalHits = 20\n};\nawait client.Index(\"movies\").UpdatePaginationAsync(pagination);" + }, + { + "lang": "Rust", + "source": "let pagination = PaginationSetting {max_total_hits:100};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_pagination(pagination)\n .await\n .unwrap();" } ] } @@ -7494,8 +7492,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.Index(\"books\").GetPrefixSearch()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" }, { "lang": "JS", @@ -7514,12 +7512,12 @@ "source": "client.index('INDEX_UID').prefix_search" }, { - "lang": "Rust", - "source": "let prefix_search: PrefixSearchSettings = client\n .index(INDEX_UID)\n .get_prefix_search()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"books\").GetPrefixSearch()" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" + "lang": "Rust", + "source": "let prefix_search: PrefixSearchSettings = client\n .index(INDEX_UID)\n .get_prefix_search()\n .await\n .unwrap();" } ] }, @@ -7598,8 +7596,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.Index(\"books\").UpdatePrefixSearch(\"disabled\")" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"disabled\"'" }, { "lang": "JS", @@ -7618,12 +7616,12 @@ "source": "client.index('INDEX_UID').update_prefix_search('disabled')" }, { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_prefix_search(PrefixSearchSettings::Disabled)\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"books\").UpdatePrefixSearch(\"disabled\")" }, { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"disabled\"'" + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_prefix_search(PrefixSearchSettings::Disabled)\n .await\n .unwrap();" } ] }, @@ -7702,8 +7700,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.Index(\"books\").ResetPrefixSearch()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" }, { "lang": "JS", @@ -7722,12 +7720,12 @@ "source": "client.index('INDEX_UID').reset_prefix_search" }, { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_prefix_search()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"books\").ResetPrefixSearch()" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_prefix_search()\n .await\n .unwrap();" } ] } @@ -7792,21 +7790,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"books\").GetProximityPrecisionAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetProximityPrecision()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" }, { "lang": "JS", "source": "client.index('books').getProximityPrecision()" }, - { - "lang": "Java", - "source": "client.index(\"books\").getProximityPrecisionSettings();" - }, { "lang": "PHP", "source": "$client->index('books')->getProximityPrecision();" @@ -7815,10 +7805,22 @@ "lang": "Python", "source": "client.index('books').get_proximity_precision()" }, + { + "lang": "Java", + "source": "client.index(\"books\").getProximityPrecisionSettings();" + }, { "lang": "Ruby", "source": "client.index('books').proximity_precision" }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetProximityPrecision()" + }, + { + "lang": "C#", + "source": "await client.Index(\"books\").GetProximityPrecisionAsync();" + }, { "lang": "Rust", "source": "let proximity_precision: String = client\n .index(\"books\")\n .get_proximity_precision()\n .await\n .unwrap();" @@ -7826,10 +7828,6 @@ { "lang": "Swift", "source": "let precisionValue = try await self.client.index(\"books\").getProximityPrecision()" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" } ] }, @@ -7908,21 +7906,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"books\").UpdateProximityPrecisionAsync(\"byAttribute\");" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateProximityPrecision(ByAttribute)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/proximity-precision' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"byAttribute\"'" }, { "lang": "JS", "source": "client.index('books').updateProximityPrecision('byAttribute')" }, - { - "lang": "Java", - "source": "client.index(\"books\").updateProximityPrecisionSettings(\"byAttribute\");" - }, { "lang": "PHP", "source": "$client->index('books')->updateProximityPrecision('byAttribute');" @@ -7931,10 +7921,22 @@ "lang": "Python", "source": "client.index('books').update_proximity_precision(ProximityPrecision.BY_ATTRIBUTE)" }, + { + "lang": "Java", + "source": "client.index(\"books\").updateProximityPrecisionSettings(\"byAttribute\");" + }, { "lang": "Ruby", "source": "client.index('books').update_proximity_precision('byAttribute')" }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateProximityPrecision(ByAttribute)" + }, + { + "lang": "C#", + "source": "await client.Index(\"books\").UpdateProximityPrecisionAsync(\"byAttribute\");" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"books\")\n .set_proximity_precision(\"byAttribute\".to_string())\n .await\n .unwrap();" @@ -7942,10 +7944,6 @@ { "lang": "Swift", "source": "let task = try await self.client.index(\"books\").updateProximityPrecision(.byWord)" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/proximity-precision' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"byAttribute\"'" } ] }, @@ -8024,21 +8022,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"books\").ResetProximityPrecisionAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetProximityPrecision()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" }, { "lang": "JS", "source": "client.index('books').resetProximityPrecision()" }, - { - "lang": "Java", - "source": "client.index(\"books\").resetProximityPrecisionSettings();" - }, { "lang": "PHP", "source": "$client->index('books')->resetProximityPrecision();" @@ -8047,10 +8037,22 @@ "lang": "Python", "source": "client.index('books').reset_proximity_precision()" }, + { + "lang": "Java", + "source": "client.index(\"books\").resetProximityPrecisionSettings();" + }, { "lang": "Ruby", "source": "client.index('books').reset_proximity_precision" }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetProximityPrecision()" + }, + { + "lang": "C#", + "source": "await client.Index(\"books\").ResetProximityPrecisionAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_proximity_precision()\n .await\n .unwrap();" @@ -8058,10 +8060,6 @@ { "lang": "Swift", "source": "let task = try await self.client.index(\"books\").resetProximityPrecision()" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" } ] } @@ -8129,25 +8127,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetRankingRulesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getRankingRules();\ndate_ranking_rules_1: \"await client.index('movies').updateRankingRules([\\n 'words',\\n 'typo',\\n 'proximity',\\n 'attribute',\\n 'sort',\\n 'exactness',\\n 'release_date:asc',\\n 'rank:desc',\\n]);\"" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetRankingRules()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" }, { "lang": "JS", "source": "client.index('movies').getRankingRules()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").getRankingRulesSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->getRankingRules();" @@ -8156,21 +8142,33 @@ "lang": "Python", "source": "client.index('movies').get_ranking_rules()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").getRankingRulesSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').ranking_rules" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetRankingRules()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetRankingRulesAsync();" + }, { "lang": "Rust", "source": "let ranking_rules: Vec = client\n .index(\"movies\")\n .get_ranking_rules()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").getRankingRules { (result) in\n switch result {\n case .success(let rankingRules):\n print(rankingRules)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').getRankingRules();\ndate_ranking_rules_1: \"await client.index('movies').updateRankingRules([\\n 'words',\\n 'typo',\\n 'proximity',\\n 'attribute',\\n 'sort',\\n 'exactness',\\n 'release_date:asc',\\n 'rank:desc',\\n]);\"" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" + "lang": "Swift", + "source": "client.index(\"movies\").getRankingRules { (result) in\n switch result {\n case .success(let rankingRules):\n print(rankingRules)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -8252,21 +8250,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateRankingRulesAsync(new[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});" - }, - { - "lang": "Go", - "source": "rankingRules := []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\",\n}\nclient.Index(\"movies\").UpdateRankingRules(&rankingRules)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n ]'" }, { "lang": "JS", "source": "client.index('movies').updateRankingRules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setRankingRules(new String[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});\nclient.index(\"movies\").updateSettings(settings);" - }, { "lang": "PHP", "source": "$client->index('movies')->updateRankingRules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n]);" @@ -8275,10 +8265,22 @@ "lang": "Python", "source": "client.index('movies').update_ranking_rules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setRankingRules(new String[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});\nclient.index(\"movies\").updateSettings(settings);" + }, { "lang": "Ruby", "source": "client.index('movies').update_ranking_rules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" }, + { + "lang": "Go", + "source": "rankingRules := []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\",\n}\nclient.Index(\"movies\").UpdateRankingRules(&rankingRules)" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateRankingRulesAsync(new[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});" + }, { "lang": "Rust", "source": "let ranking_rules = [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\",\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_ranking_rules(&ranking_rules)\n .await\n .unwrap();" @@ -8286,10 +8288,6 @@ { "lang": "Swift", "source": "let rankingRules: [String] = [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n]\nclient.index(\"movies\").updateRankingRules(rankingRules) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n ]'" } ] }, @@ -8371,25 +8369,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetRankingRulesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetRankingRules();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetRankingRules()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" }, { "lang": "JS", "source": "client.index('movies').resetRankingRules()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetRankingRulesSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->resetRankingRules();" @@ -8398,21 +8384,33 @@ "lang": "Python", "source": "client.index('movies').reset_ranking_rules()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetRankingRulesSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').reset_ranking_rules" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetRankingRules()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetRankingRulesAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_ranking_rules()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").resetRankingRules { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').resetRankingRules();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" + "lang": "Swift", + "source": "client.index(\"movies\").resetRankingRules { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -8479,21 +8477,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "var searchCutoff = await client.Index(\"movies\").GetSearchCutoffMsAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSearchCutoffMs()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" }, { "lang": "JS", "source": "client.index('movies').getSearchCutoffMs()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").getSearchCutoffMsSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->getSearchCutoffMs();" @@ -8502,21 +8492,29 @@ "lang": "Python", "source": "client.index('movies').get_search_cutoff_ms()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").getSearchCutoffMsSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').search_cutoff_ms" }, { - "lang": "Rust", - "source": "let search_cutoff_ms: String = client\n .index(\"movies\")\n .get_search_cutoff_ms()\n .await\n .unwrap();" - }, + "lang": "Go", + "source": "client.Index(\"movies\").GetSearchCutoffMs()" + }, { - "lang": "Swift", - "source": "let precisionValue = try await self.client.index(\"books\").getSearchCutoffMs()" + "lang": "C#", + "source": "var searchCutoff = await client.Index(\"movies\").GetSearchCutoffMsAsync();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" + "lang": "Rust", + "source": "let search_cutoff_ms: String = client\n .index(\"movies\")\n .get_search_cutoff_ms()\n .await\n .unwrap();" + }, + { + "lang": "Swift", + "source": "let precisionValue = try await self.client.index(\"books\").getSearchCutoffMs()" } ] }, @@ -8597,21 +8595,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSearchCutoffMsAsync(150);" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateSearchCutoffMs(150)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '150'" }, { "lang": "JS", "source": "client.index('movies').updateSearchCutoffMs(150)" }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateSearchCutoffMsSettings(150);" - }, { "lang": "PHP", "source": "$client->index('movies')->updateSearchCutoffMs(150);" @@ -8620,10 +8610,22 @@ "lang": "Python", "source": "client.index('movies').update_search_cutoff_ms(150)" }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateSearchCutoffMsSettings(150);" + }, { "lang": "Ruby", "source": "client.index('movies').update_search_cutoff_ms(150)" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateSearchCutoffMs(150)" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSearchCutoffMsAsync(150);" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .set_search_cutoff_ms(Some(150))\n .await\n .unwrap();" @@ -8631,10 +8633,6 @@ { "lang": "Swift", "source": "let task = try await self.client.index(\"books\").updateSearchCutoffMs(150)" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '150'" } ] }, @@ -8715,21 +8713,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSearchCutoffMsAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetSearchCutoffMs()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" }, { "lang": "JS", "source": "client.index('movies').resetSearchCutoffMs()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetSearchCutoffMsSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->resetSearchCutoffMs();" @@ -8738,10 +8728,22 @@ "lang": "Python", "source": "client.index('movies').reset_search_cutoff_ms()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetSearchCutoffMsSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').reset_search_cutoff_ms" }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetSearchCutoffMs()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSearchCutoffMsAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_search_cutoff_ms()\n .await\n .unwrap();" @@ -8749,10 +8751,6 @@ { "lang": "Swift", "source": "let task = try await self.client.index(\"books\").resetSearchCutoffMs()" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" } ] } @@ -8820,25 +8818,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSearchableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getSearchableAttributes();\ndate_searchable_attributes_1: \"await client\\n .index('movies')\\n .updateSearchableAttributes(['title', 'overview', 'genres']);\"" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSearchableAttributes()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" }, { "lang": "JS", "source": "client.index('movies').getSearchableAttributes()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").getSearchableAttributesSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->getSearchableAttributes();" @@ -8847,21 +8833,33 @@ "lang": "Python", "source": "client.index('movies').get_searchable_attributes()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").getSearchableAttributesSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').searchable_attributes" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetSearchableAttributes()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetSearchableAttributesAsync();" + }, { "lang": "Rust", "source": "let searchable_attributes: Vec = client\n .index(\"movies\")\n .get_searchable_attributes()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").getSearchableAttributes { (result) in\n switch result {\n case .success(let searchableAttributes):\n print(searchableAttributes)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').getSearchableAttributes();\ndate_searchable_attributes_1: \"await client\\n .index('movies')\\n .updateSearchableAttributes(['title', 'overview', 'genres']);\"" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" + "lang": "Swift", + "source": "client.index(\"movies\").getSearchableAttributes { (result) in\n switch result {\n case .success(let searchableAttributes):\n print(searchableAttributes)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -8943,21 +8941,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSearchableAttributesAsync(new[] {\"title\", \"overview\", \"genres\"});" - }, - { - "lang": "Go", - "source": "searchableAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n}\nclient.Index(\"movies\").UpdateSearchableAttributes(&searchableAttributes)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\"\n ]'" }, { "lang": "JS", "source": "client.index('movies').updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n])" }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateSearchableAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\"\n});" - }, { "lang": "PHP", "source": "$client->index('movies')->updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n]);" @@ -8966,10 +8956,22 @@ "lang": "Python", "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateSearchableAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\"\n});" + }, { "lang": "Ruby", "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" }, + { + "lang": "Go", + "source": "searchableAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n}\nclient.Index(\"movies\").UpdateSearchableAttributes(&searchableAttributes)" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSearchableAttributesAsync(new[] {\"title\", \"overview\", \"genres\"});" + }, { "lang": "Rust", "source": "let searchable_attributes = [\n \"title\",\n \"overview\",\n \"genres\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_searchable_attributes(&searchable_attributes)\n .await\n .unwrap();" @@ -8977,10 +8979,6 @@ { "lang": "Swift", "source": "let searchableAttributes: [String] = [\"title\", \"overview\", \"genres\"]\nclient.index(\"movies\").updateSearchableAttributes(searchableAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\"\n ]'" } ] }, @@ -9062,25 +9060,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSearchableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetSearchableAttributes();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetSearchableAttributes()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" }, { "lang": "JS", "source": "client.index('movies').resetSearchableAttributes()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetSearchableAttributesSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->resetSearchableAttributes();" @@ -9089,21 +9075,33 @@ "lang": "Python", "source": "client.index('movies').reset_searchable_attributes()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetSearchableAttributesSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').reset_searchable_attributes" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetSearchableAttributes()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSearchableAttributesAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_searchable_attributes()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").resetSearchableAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').resetSearchableAttributes();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" + "lang": "Swift", + "source": "client.index(\"movies\").resetSearchableAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -9172,21 +9170,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSeparatorTokensAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").GetSeparatorTokens()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" }, { "lang": "JS", "source": "client.index('books').getSeparatorTokens()" }, - { - "lang": "Java", - "source": "client.index(\"articles\").getSeparatorTokensSettings();" - }, { "lang": "PHP", "source": "$client->index('articles')->getSeparatorTokens();" @@ -9195,10 +9185,22 @@ "lang": "Python", "source": "client.index('articles').get_separator_tokens()" }, + { + "lang": "Java", + "source": "client.index(\"articles\").getSeparatorTokensSettings();" + }, { "lang": "Ruby", "source": "client.index('articles').separator_tokens" }, + { + "lang": "Go", + "source": "client.Index(\"articles\").GetSeparatorTokens()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetSeparatorTokensAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('articles')\n .get_separator_tokens()\n .await\n .unwrap();" @@ -9206,10 +9208,6 @@ { "lang": "Swift", "source": "client.index(\"books\").getSeparatorTokens { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" } ] }, @@ -9292,21 +9290,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSeparatorTokensAsync(new[] { \"|\", \"…\" });" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").UpdateSeparatorTokens([]string{\n \"|\",\n \"…\",\n})" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"|\", \"…\"]'" }, { "lang": "JS", "source": "client.index('books').updateSeparatorTokens(['|', '…'])" }, - { - "lang": "Java", - "source": "String[] newSeparatorTokens = { \"|\", \"…\" };\nclient.index(\"articles\").updateSeparatorTokensSettings(newSeparatorTokens);" - }, { "lang": "PHP", "source": "$client->index('articles')->updateSeparatorTokens(['|', '…']);" @@ -9315,10 +9305,22 @@ "lang": "Python", "source": "client.index('articles').update_separator_tokens([\"|\", \"…\"])" }, + { + "lang": "Java", + "source": "String[] newSeparatorTokens = { \"|\", \"…\" };\nclient.index(\"articles\").updateSeparatorTokensSettings(newSeparatorTokens);" + }, { "lang": "Ruby", "source": "client.index('articles').update_separator_tokens(['|', '…'])" }, + { + "lang": "Go", + "source": "client.Index(\"articles\").UpdateSeparatorTokens([]string{\n \"|\",\n \"…\",\n})" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSeparatorTokensAsync(new[] { \"|\", \"…\" });" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('articles')\n .set_separator_tokens(&vec!['|'.to_string(), '…'.to_string()])\n .await\n .unwrap();" @@ -9326,10 +9328,6 @@ { "lang": "Swift", "source": "client.index(\"books\").updateSeparatorTokens([\"|\", \"…\"]) { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"|\", \"…\"]'" } ] }, @@ -9412,21 +9410,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSeparatorTokensAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").ResetSeparatorTokens()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" }, { "lang": "JS", "source": "client.index('books').resetSeparatorTokens()" }, - { - "lang": "Java", - "source": "client.index(\"articles\").resetSeparatorTokensSettings();" - }, { "lang": "PHP", "source": "$client->index('articles')->resetSeparatorTokens();" @@ -9435,10 +9425,22 @@ "lang": "Python", "source": "client.index('articles').reset_separator_tokens()" }, + { + "lang": "Java", + "source": "client.index(\"articles\").resetSeparatorTokensSettings();" + }, { "lang": "Ruby", "source": "client.index('articles').reset_separator_tokens" }, + { + "lang": "Go", + "source": "client.Index(\"articles\").ResetSeparatorTokens()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSeparatorTokensAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('articles')\n .reset_separator_tokens()\n .await\n .unwrap();" @@ -9446,10 +9448,6 @@ { "lang": "Swift", "source": "client.index(\"books\").resetSeparatorTokens { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" } ] } @@ -9518,25 +9516,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"books\").GetSortableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('books').getSortableAttributes();\ndate_sortable_attributes_1: \"await client.index('books').updateSortableAttributes(['price', 'author']);\"" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetSortableAttributes()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" }, { "lang": "JS", "source": "client.index('books').getSortableAttributes()" }, - { - "lang": "Java", - "source": "client.index(\"books\").getSortableAttributesSettings();" - }, { "lang": "PHP", "source": "$client->index('books')->getSortableAttributes();" @@ -9545,21 +9531,33 @@ "lang": "Python", "source": "client.index('books').get_sortable_attributes()" }, + { + "lang": "Java", + "source": "client.index(\"books\").getSortableAttributesSettings();" + }, { "lang": "Ruby", "source": "client.index('books').sortable_attributes" }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetSortableAttributes()" + }, + { + "lang": "C#", + "source": "await client.Index(\"books\").GetSortableAttributesAsync();" + }, { "lang": "Rust", "source": "let sortable_attributes: Vec = client\n .index(\"books\")\n .get_sortable_attributes()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"books\").getSortableAttributes { (result: Result, Swift.Error>) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('books').getSortableAttributes();\ndate_sortable_attributes_1: \"await client.index('books').updateSortableAttributes(['price', 'author']);\"" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" + "lang": "Swift", + "source": "client.index(\"books\").getSortableAttributes { (result: Result, Swift.Error>) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -9642,21 +9640,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"books\").UpdateSortableAttributesAsync(new [] { \"price\", \"author\" });" - }, - { - "lang": "Go", - "source": "sortableAttributes := []string{\n \"price\",\n \"author\",\n}\nclient.Index(\"books\").UpdateSortableAttributes(&sortableAttributes)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"price\",\n \"author\"\n ]'" }, { "lang": "JS", "source": "client.index('books')\n .updateSortableAttributes([\n 'price',\n 'author'\n ])" }, - { - "lang": "Java", - "source": "client.index(\"books\").updateSortableAttributesSettings(new String[] {\"price\", \"author\"});" - }, { "lang": "PHP", "source": "$client->index('books')->updateSortableAttributes([\n 'price',\n 'author'\n]);" @@ -9665,10 +9655,22 @@ "lang": "Python", "source": "client.index('books').update_sortable_attributes([\n 'price',\n 'author'\n])" }, + { + "lang": "Java", + "source": "client.index(\"books\").updateSortableAttributesSettings(new String[] {\"price\", \"author\"});" + }, { "lang": "Ruby", "source": "client.index('books').update_sortable_attributes([\n 'price',\n 'author'\n])" }, + { + "lang": "Go", + "source": "sortableAttributes := []string{\n \"price\",\n \"author\",\n}\nclient.Index(\"books\").UpdateSortableAttributes(&sortableAttributes)" + }, + { + "lang": "C#", + "source": "await client.Index(\"books\").UpdateSortableAttributesAsync(new [] { \"price\", \"author\" });" + }, { "lang": "Rust", "source": "let sortable_attributes = [\n \"price\",\n \"author\"\n];\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_sortable_attributes(&sortable_attributes)\n .await\n .unwrap();" @@ -9676,10 +9678,6 @@ { "lang": "Swift", "source": "client.index(\"books\").updateSortableAttributes([\"price\", \"author\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"price\",\n \"author\"\n ]'" } ] }, @@ -9762,25 +9760,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"books\").ResetSortableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('books').resetSortableAttributes();\narch_parameter_guide_sort_1: \"await client\\n .index('books')\\n .search('science fiction', SearchQuery(sort: ['price:asc']));\"" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetSortableAttributes()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" }, { "lang": "JS", "source": "client.index('books').resetSortableAttributes()" }, - { - "lang": "Java", - "source": "client.index(\"books\").resetSortableAttributesSettings();" - }, { "lang": "PHP", "source": "$client->index('books')->resetSortableAttributes();" @@ -9789,21 +9775,33 @@ "lang": "Python", "source": "client.index('books').reset_sortable_attributes()" }, + { + "lang": "Java", + "source": "client.index(\"books\").resetSortableAttributesSettings();" + }, { "lang": "Ruby", "source": "client.index('books').reset_sortable_attributes" }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetSortableAttributes()" + }, + { + "lang": "C#", + "source": "await client.Index(\"books\").ResetSortableAttributesAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_sortable_attributes()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"books\").resetSortableAttributes() { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('books').resetSortableAttributes();\narch_parameter_guide_sort_1: \"await client\\n .index('books')\\n .search('science fiction', SearchQuery(sort: ['price:asc']));\"" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" + "lang": "Swift", + "source": "client.index(\"books\").resetSortableAttributes() { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -9872,25 +9870,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetStopWordsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getStopWords();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetStopWords()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" }, { "lang": "JS", "source": "client.index('movies').getStopWords()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").getStopWordsSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->getStopWords();" @@ -9899,21 +9885,33 @@ "lang": "Python", "source": "client.index('movies').get_stop_words()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").getStopWordsSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').stop_words" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetStopWords()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetStopWordsAsync();" + }, { "lang": "Rust", "source": "let stop_words: Vec = client\n .index(\"movies\")\n .get_stop_words()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").getStopWords { (result) in\n switch result {\n case .success(let stopWords):\n print(stopWords)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').getStopWords();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" + "lang": "Swift", + "source": "client.index(\"movies\").getStopWords { (result) in\n switch result {\n case .success(let stopWords):\n print(stopWords)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -9996,25 +9994,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateStopWordsAsync(new[] {\"of\", \"the\", \"to\"});" - }, - { - "lang": "Dart", - "source": "await client.index('movies').updateStopWords(['of', 'the', 'to']);" - }, - { - "lang": "Go", - "source": "stopWords := []string{\"of\", \"the\", \"to\"}\nclient.Index(\"movies\").UpdateStopWords(&stopWords)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/stop-words' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"the\",\n \"of\",\n \"to\"\n ]'" }, { "lang": "JS", "source": "client.index('movies').updateStopWords(['of', 'the', 'to'])" }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateStopWordsSettings(new String[] {\"of\", \"the\", \"to\"});" - }, { "lang": "PHP", "source": "$client->index('movies')->updateStopWords(['the', 'of', 'to']);" @@ -10023,21 +10009,33 @@ "lang": "Python", "source": "client.index('movies').update_stop_words(['of', 'the', 'to'])" }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateStopWordsSettings(new String[] {\"of\", \"the\", \"to\"});" + }, { "lang": "Ruby", "source": "client.index('movies').update_stop_words(['of', 'the', 'to'])" }, + { + "lang": "Go", + "source": "stopWords := []string{\"of\", \"the\", \"to\"}\nclient.Index(\"movies\").UpdateStopWords(&stopWords)" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateStopWordsAsync(new[] {\"of\", \"the\", \"to\"});" + }, { "lang": "Rust", "source": "let stop_words = [\"of\", \"the\", \"to\"];\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_stop_words(&stop_words)\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "let stopWords: [String] = [\"of\", \"the\", \"to\"]\nclient.index(\"movies\").updateStopWords(stopWords) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').updateStopWords(['of', 'the', 'to']);" }, { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/stop-words' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"the\",\n \"of\",\n \"to\"\n ]'" + "lang": "Swift", + "source": "let stopWords: [String] = [\"of\", \"the\", \"to\"]\nclient.index(\"movies\").updateStopWords(stopWords) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -10120,25 +10118,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetStopWordsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetStopWords();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetStopWords()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" }, { "lang": "JS", "source": "client.index('movies').resetStopWords()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetStopWordsSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->resetStopWords();" @@ -10147,21 +10133,33 @@ "lang": "Python", "source": "client.index('movies').reset_stop_words()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetStopWordsSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').reset_stop_words" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetStopWords()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetStopWordsAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_stop_words()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").resetStopWords { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').resetStopWords();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" + "lang": "Swift", + "source": "client.index(\"movies\").resetStopWords { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -10235,25 +10233,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSynonymsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getSynonyms();\ndate_synonyms_1: \"await client.index('movies').updateSynonyms({\\n 'wolverine': ['xmen', 'logan'],\\n 'logan': ['wolverine', 'xmen'],\\n 'wow': ['world of warcraft'],\\n});\"" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSynonyms()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" }, { "lang": "JS", "source": "client.index('movies').getSynonyms()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").getSynonymsSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->getSynonyms();" @@ -10262,21 +10248,33 @@ "lang": "Python", "source": "client.index('movies').get_synonyms()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").getSynonymsSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').synonyms" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetSynonyms()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetSynonymsAsync();" + }, { "lang": "Rust", "source": "let synonyms: HashMap> = client\n .index(\"movies\")\n .get_synonyms()\n .await\n .unwrap();" }, + { + "lang": "Dart", + "source": "await client.index('movies').getSynonyms();\ndate_synonyms_1: \"await client.index('movies').updateSynonyms({\\n 'wolverine': ['xmen', 'logan'],\\n 'logan': ['wolverine', 'xmen'],\\n 'wow': ['world of warcraft'],\\n});\"" + }, { "lang": "Swift", "source": "client.index(\"movies\").getSynonyms { (result) in\n switch result {\n case .success(let synonyms):\n print(synonyms)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" } ] }, @@ -10364,21 +10362,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "var synonyms = new Dictionary>\n{\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\", \"xmen\" } },\n { \"wow\", new string[] { \"world of warcraft\" } }\n};\nawait client.Index(\"movies\").UpdateSynonymsAsync(synonyms);" - }, - { - "lang": "Go", - "source": "synonyms := map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\", \"xmen\"},\n \"wow\": []string{\"world of warcraft\"},\n}\nclient.Index(\"movies\").UpdateSynonyms(&synonyms)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/synonyms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\n \"wolverine\",\n \"xmen\"\n ],\n \"wow\": [\"world of warcraft\"]\n }'" }, { "lang": "JS", "source": "client.index('movies').updateSynonyms({\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine', 'xmen'],\n wow: ['world of warcraft']\n})" }, - { - "lang": "Java", - "source": "HashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nclient.index(\"movies\").updateSynonymsSettings(synonyms);" - }, { "lang": "PHP", "source": "$client->index('movies')->updateSynonyms([\n 'wolverine' => ['xmen', 'logan'],\n 'logan' => ['wolverine', 'xmen'],\n 'wow' => ['world of warcraft']\n]);" @@ -10387,10 +10377,22 @@ "lang": "Python", "source": "client.index('movies').update_synonyms({\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine', 'xmen'],\n 'wow': ['world of warcraft']\n})" }, + { + "lang": "Java", + "source": "HashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nclient.index(\"movies\").updateSynonymsSettings(synonyms);" + }, { "lang": "Ruby", "source": "client.index('movies').update_synonyms({\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine', 'xmen'],\n wow: ['world of warcraft']\n})" }, + { + "lang": "Go", + "source": "synonyms := map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\", \"xmen\"},\n \"wow\": []string{\"world of warcraft\"},\n}\nclient.Index(\"movies\").UpdateSynonyms(&synonyms)" + }, + { + "lang": "C#", + "source": "var synonyms = new Dictionary>\n{\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\", \"xmen\" } },\n { \"wow\", new string[] { \"world of warcraft\" } }\n};\nawait client.Index(\"movies\").UpdateSynonymsAsync(synonyms);" + }, { "lang": "Rust", "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"wolverine\"), vec![String::from(\"xmen\"), String::from(\"logan\")]);\nsynonyms.insert(String::from(\"logan\"), vec![String::from(\"xmen\"), String::from(\"wolverine\")]);\nsynonyms.insert(String::from(\"wow\"), vec![String::from(\"world of warcraft\")]);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_synonyms(&synonyms)\n .await\n .unwrap();" @@ -10398,10 +10400,6 @@ { "lang": "Swift", "source": "let synonyms: [String: [String]] = [\n \"wolverine\": [\"xmen\", \"logan\"],\n \"logan\": [\"wolverine\", \"xmen\"],\n \"wow\": [\"world of warcraft\"]\n]\nclient.index(\"movies\").updateSynonyms(synonyms) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/synonyms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\n \"wolverine\",\n \"xmen\"\n ],\n \"wow\": [\"world of warcraft\"]\n }'" } ] }, @@ -10489,25 +10487,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSynonymsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetSynonyms();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetSynonyms()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" }, { "lang": "JS", "source": "client.index('movies').resetSynonyms()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetSynonymsSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->resetSynonyms();" @@ -10516,21 +10502,33 @@ "lang": "Python", "source": "client.index('movies').reset_synonyms()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetSynonymsSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').reset_synonyms" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetSynonyms()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSynonymsAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_synonyms()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").resetSynonyms { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').resetSynonyms();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" + "lang": "Swift", + "source": "client.index(\"movies\").resetSynonyms { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -10595,12 +10593,8 @@ ], "x-codeSamples": [ { - "lang": "Dart", - "source": "await client.index('books').getTypoTolerance();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetTypoTolerance()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" }, { "lang": "JS", @@ -10618,13 +10612,17 @@ "lang": "Ruby", "source": "index('books').typo_tolerance" }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetTypoTolerance()" + }, { "lang": "Rust", "source": "let typo_tolerance: TypoToleranceSettings = client\n .index(\"books\")\n .get_typo_tolerance()\n .await\n .unwrap();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" + "lang": "Dart", + "source": "await client.index('books').getTypoTolerance();" } ] }, @@ -10703,25 +10701,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"books\").ResetTypoToleranceAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('books').resetTypoTolerance();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetTypoTolerance()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" }, { "lang": "JS", "source": "client.index('books').resetTypoTolerance()" }, - { - "lang": "Java", - "source": "client.index(\"books\").resetTypoToleranceSettings();" - }, { "lang": "PHP", "source": "$client->index('books')->resetTypoTolerance();" @@ -10730,17 +10716,29 @@ "lang": "Python", "source": "client.index('books').reset_typo_tolerance()" }, + { + "lang": "Java", + "source": "client.index(\"books\").resetTypoToleranceSettings();" + }, { "lang": "Ruby", "source": "index('books').reset_typo_tolerance" }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetTypoTolerance()" + }, + { + "lang": "C#", + "source": "await client.Index(\"books\").ResetTypoToleranceAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_typo_tolerance()\n .await\n .unwrap();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" + "lang": "Dart", + "source": "await client.index('books').resetTypoTolerance();" } ] }, @@ -10819,25 +10817,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "var typoTolerance = new TypoTolerance {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeTypos = new TypoTolerance.TypoSize {\n OneTypo = 4,\n TwoTypos = 10\n }\n};\n\nawait client.Index(\"books\").UpdateTypoToleranceAsync(typoTolerance);" - }, - { - "lang": "Dart", - "source": "final toUpdate = TypoTolerance(\n minWordSizeForTypos: MinWordSizeForTypos(\n oneTypo: 4,\n twoTypos: 10,\n ),\n disableOnAttributes: ['title'],\n);\nawait client.index('books').updateTypoTolerance(toUpdate);" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 4,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n})" + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"minWordSizeForTypos\": {\n \"oneTypo\": 4,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n }'" }, { "lang": "JS", "source": "client.index('books').updateTypoTolerance({\n minWordSizeForTypos: {\n oneTypo: 4,\n twoTypos: 10\n },\n disableOnAttributes: [\n 'title'\n ]\n})" }, - { - "lang": "Java", - "source": "TypoTolerance typoTolerance = new TypoTolerance();\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 4);\n put(\"twoTypos\", 10);\n }\n };\n\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\ntypoTolerance.setDisableOnAttributes(new String[] {\"title\"});\n\nclient.index(\"books\").updateTypoToleranceSettings(typoTolerance);" - }, { "lang": "PHP", "source": "$client->index('books')->updateTypoTolerance([\n 'minWordSizeForTypos' => [\n 'oneTypo' => 4,\n 'twoTypos' => 10\n ],\n 'disableOnAttributes' => [\n 'title'\n ]\n]);" @@ -10846,17 +10832,29 @@ "lang": "Python", "source": "client.index('books').update_typo_tolerance({\n 'minWordSizeForTypos': {\n 'oneTypo': 4,\n 'twoTypos': 10\n },\n 'disableOnAttributes': [\n 'title'\n ]\n})" }, + { + "lang": "Java", + "source": "TypoTolerance typoTolerance = new TypoTolerance();\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 4);\n put(\"twoTypos\", 10);\n }\n };\n\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\ntypoTolerance.setDisableOnAttributes(new String[] {\"title\"});\n\nclient.index(\"books\").updateTypoToleranceSettings(typoTolerance);" + }, { "lang": "Ruby", "source": "index('books').update_typo_tolerance({\n min_word_size_for_typos: {\n one_typo: 4,\n two_typos: 10\n },\n disable_on_attributes: ['title']\n})" }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 4,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n})" + }, + { + "lang": "C#", + "source": "var typoTolerance = new TypoTolerance {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeTypos = new TypoTolerance.TypoSize {\n OneTypo = 4,\n TwoTypos = 10\n }\n};\n\nawait client.Index(\"books\").UpdateTypoToleranceAsync(typoTolerance);" + }, { "lang": "Rust", "source": "let typo_tolerance = TypoToleranceSettings {\n enabled: Some(false),\n disable_on_attributes: None,\n disable_on_words: None,\n min_word_size_for_typos: None,\n};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" }, { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"minWordSizeForTypos\": {\n \"oneTypo\": 4,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n }'" + "lang": "Dart", + "source": "final toUpdate = TypoTolerance(\n minWordSizeForTypos: MinWordSizeForTypos(\n oneTypo: 4,\n twoTypos: 10,\n ),\n disableOnAttributes: ['title'],\n);\nawait client.index('books').updateTypoTolerance(toUpdate);" } ] } @@ -11402,8 +11400,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "resp := new(meilisearch.SimilarDocumentResult)\nclient.Index(\"INDEX_NAME\").SearchSimilarDocuments(&meilisearch.SimilarDocumentQuery{\n Id: \"TARGET_DOCUMENT_ID\",\n Embedder: \"default\",\n}, resp)" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/similar' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"id\": TARGET_DOCUMENT_ID,\n \"embedder\": \"EMBEDDER_NAME\"\n }'" }, { "lang": "JS", @@ -11422,12 +11420,12 @@ "source": "client.index('INDEX_NAME').search_similar_documents('TARGET_DOCUMENT_ID', embedder: 'default')" }, { - "lang": "Rust", - "source": "let results = index\n .similar_search(\"TARGET_DOCUMENT_ID\", \"EMBEDDER_NAME\")\n .execute()\n .await\n .unwrap();" + "lang": "Go", + "source": "resp := new(meilisearch.SimilarDocumentResult)\nclient.Index(\"INDEX_NAME\").SearchSimilarDocuments(&meilisearch.SimilarDocumentQuery{\n Id: \"TARGET_DOCUMENT_ID\",\n Embedder: \"default\",\n}, resp)" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/similar' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"id\": TARGET_DOCUMENT_ID,\n \"embedder\": \"EMBEDDER_NAME\"\n }'" + "lang": "Rust", + "source": "let results = index\n .similar_search(\"TARGET_DOCUMENT_ID\", \"EMBEDDER_NAME\")\n .execute()\n .await\n .unwrap();" } ] } @@ -11519,25 +11517,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetStatsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getStats();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetStats()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/stats'" }, { "lang": "JS", "source": "client.index('movies').getStats()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").getStats();" - }, { "lang": "PHP", "source": "$client->index('movies')->stats();" @@ -11546,21 +11532,33 @@ "lang": "Python", "source": "client.index('movies').get_stats()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").getStats();" + }, { "lang": "Ruby", "source": "client.index('movies').stats" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetStats()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetStatsAsync();" + }, { "lang": "Rust", "source": "let stats: IndexStats = client\n .index(\"movies\")\n .get_stats()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").stats { (result) in\n switch result {\n case .success(let stats):\n print(stats)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').getStats();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/stats'" + "lang": "Swift", + "source": "client.index(\"movies\").stats { (result) in\n switch result {\n case .success(let stats):\n print(stats)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -11570,8 +11568,8 @@ "tags": [ "Keys" ], - "summary": "Get API Keys", - "description": "List all API Keys", + "summary": "List API keys", + "description": "List all API keys", "operationId": "list_api_keys", "parameters": [ { @@ -11658,25 +11656,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "ResourceResults keyResult = await client.GetKeysAsync(new KeysQuery { Limit = 3 });" - }, - { - "lang": "Dart", - "source": "await client.getKeys(params: KeysQuery(limit: 3));\neate_a_key_1: \"await client.createKey(\\n description: 'Add documents: Products API key',\\n actions: ['documents.add'],\\n indexes: ['products'],\\n expiresAt: DateTime(2042, 04, 02));\"\ndate_a_key_1: \"await client.updateKey(\\n '6062abda-a5aa-4414-ac91-ecd7944c0f8d',\\n description: 'Manage documents: Products\\/Reviews API key',\\n name: 'Products\\/Reviews API key',\\n);\"" - }, - { - "lang": "Go", - "source": "client.GetKeys(&meilisearch.KeysQuery{\n Limit: 3\n});" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys?limit=3' \\\n -H 'Authorization: Bearer MASTER_KEY'" }, { "lang": "JS", "source": "client.getKeys({ limit: 3 })" }, - { - "lang": "Java", - "source": "KeysQuery query = new KeysQuery().setLimit(3);\nclient.getKeys(query);" - }, { "lang": "PHP", "source": "$client->getKeys((new KeysQuery())->setLimit(3));" @@ -11685,21 +11671,33 @@ "lang": "Python", "source": "client.get_keys({'limit': 3})" }, + { + "lang": "Java", + "source": "KeysQuery query = new KeysQuery().setLimit(3);\nclient.getKeys(query);" + }, { "lang": "Ruby", "source": "client.keys(limit: 3)" }, + { + "lang": "Go", + "source": "client.GetKeys(&meilisearch.KeysQuery{\n Limit: 3\n});" + }, + { + "lang": "C#", + "source": "ResourceResults keyResult = await client.GetKeysAsync(new KeysQuery { Limit = 3 });" + }, { "lang": "Rust", "source": "let mut query = KeysQuery::new()\n .with_limit(3)\n .execute(&client)\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.getKeys(params: KeysQuery(limit: 3)) { result in\n switch result {\n case .success(let keys):\n print(keys)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.getKeys(params: KeysQuery(limit: 3));\neate_a_key_1: \"await client.createKey(\\n description: 'Add documents: Products API key',\\n actions: ['documents.add'],\\n indexes: ['products'],\\n expiresAt: DateTime(2042, 04, 02));\"\ndate_a_key_1: \"await client.updateKey(\\n '6062abda-a5aa-4414-ac91-ecd7944c0f8d',\\n description: 'Manage documents: Products\\/Reviews API key',\\n name: 'Products\\/Reviews API key',\\n);\"" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys?limit=3' \\\n -H 'Authorization: Bearer MASTER_KEY'" + "lang": "Swift", + "source": "client.getKeys(params: KeysQuery(limit: 3)) { result in\n switch result {\n case .success(let keys):\n print(keys)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -11707,7 +11705,7 @@ "tags": [ "Keys" ], - "summary": "Create an API Key", + "summary": "Create API key", "description": "Create an API Key.", "operationId": "create_api_key", "requestBody": { @@ -11774,21 +11772,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "Key keyOptions = new Key\n{\n Description = \"Add documents: Products API key\",\n Actions = new KeyAction[] { KeyAction.DocumentsAdd },\n Indexes = new string[] { \"products\" },\n ExpiresAt = DateTime.Parse(\"2042-04-02T00:42:42Z\")\n};\nKey createdKey = await this.client.CreateKeyAsync(keyOptions);" - }, - { - "lang": "Go", - "source": "client.CreateKey(&meilisearch.Key{\n Description: \"Add documents: Products API key\",\n Actions: []string{\"documents.add\"},\n Indexes: []string{\"products\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/keys' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"description\": \"Add documents: Products API key\",\n \"actions\": [\"documents.add\"],\n \"indexes\": [\"products\"],\n \"expiresAt\": \"2042-04-02T00:42:42Z\"\n }'" }, { "lang": "JS", "source": "client.createKey({\n description: 'Add documents: Products API key',\n actions: ['documents.add'],\n indexes: ['products'],\n expiresAt: '2021-11-13T00:00:00Z'\n})" }, - { - "lang": "Java", - "source": "SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\nDate dateParsed = format.parse(\"2042-04-02T00:42:42Z\");\n\nKey keyInfo = new Key();\n\nkeyInfo.setDescription(\"Add documents: Products API key\");\nkeyInfo.setActions(new String[] {\"documents.add\"});\nkeyInfo.setIndexes(new String[] {\"products\"});\nkeyInfo.setExpiresAt(dateParsed);\n\nclient.createKey(keyInfo);" - }, { "lang": "PHP", "source": "$client->createKey([\n 'description' => 'Add documents: Products API key',\n 'actions' => ['documents.add'],\n 'indexes' => ['products'],\n 'expiresAt' => '2042-04-02T00:42:42Z',\n]);" @@ -11798,8 +11788,20 @@ "source": "client.create_key(options={\n 'description': 'Add documents: Products API key',\n 'actions': ['documents.add'],\n 'indexes': ['products'],\n 'expiresAt': '2042-04-02T00:42:42Z'\n})" }, { - "lang": "Ruby", - "source": "client.create_key(\n description: 'Add documents: Products API key',\n actions: ['documents.add'],\n indexes: ['products'],\n expires_at: '2042-04-02T00:42:42Z'\n)" + "lang": "Java", + "source": "SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\nDate dateParsed = format.parse(\"2042-04-02T00:42:42Z\");\n\nKey keyInfo = new Key();\n\nkeyInfo.setDescription(\"Add documents: Products API key\");\nkeyInfo.setActions(new String[] {\"documents.add\"});\nkeyInfo.setIndexes(new String[] {\"products\"});\nkeyInfo.setExpiresAt(dateParsed);\n\nclient.createKey(keyInfo);" + }, + { + "lang": "Ruby", + "source": "client.create_key(\n description: 'Add documents: Products API key',\n actions: ['documents.add'],\n indexes: ['products'],\n expires_at: '2042-04-02T00:42:42Z'\n)" + }, + { + "lang": "Go", + "source": "client.CreateKey(&meilisearch.Key{\n Description: \"Add documents: Products API key\",\n Actions: []string{\"documents.add\"},\n Indexes: []string{\"products\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" + }, + { + "lang": "C#", + "source": "Key keyOptions = new Key\n{\n Description = \"Add documents: Products API key\",\n Actions = new KeyAction[] { KeyAction.DocumentsAdd },\n Indexes = new string[] { \"products\" },\n ExpiresAt = DateTime.Parse(\"2042-04-02T00:42:42Z\")\n};\nKey createdKey = await this.client.CreateKeyAsync(keyOptions);" }, { "lang": "Rust", @@ -11808,10 +11810,6 @@ { "lang": "Swift", "source": "let keyParams = KeyParams(\n description: \"Add documents: Products API key\",\n actions: [\"documents.add\"],\n indexes: [\"products\"],\n expiresAt: \"2042-04-02T00:42:42Z\"\n)\nclient.createKey(keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/keys' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"description\": \"Add documents: Products API key\",\n \"actions\": [\"documents.add\"],\n \"indexes\": [\"products\"],\n \"expiresAt\": \"2042-04-02T00:42:42Z\"\n }'" } ] } @@ -11821,7 +11819,7 @@ "tags": [ "Keys" ], - "summary": "Get an API Key", + "summary": "Get API key", "description": "Get an API key from its `uid` or its `key` field.", "operationId": "get_api_key", "parameters": [ @@ -11891,25 +11889,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "Key key = await client.GetKeyAsync(\"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4\");" - }, - { - "lang": "Dart", - "source": "await client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" - }, - { - "lang": "Go", - "source": "client.GetKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" }, { "lang": "JS", "source": "client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" }, - { - "lang": "Java", - "source": "client.getKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\");" - }, { "lang": "PHP", "source": "$client->getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" @@ -11918,21 +11904,33 @@ "lang": "Python", "source": "client.get_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" }, + { + "lang": "Java", + "source": "client.getKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\");" + }, { "lang": "Ruby", "source": "client.key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" }, + { + "lang": "Go", + "source": "client.GetKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + }, + { + "lang": "C#", + "source": "Key key = await client.GetKeyAsync(\"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4\");" + }, { "lang": "Rust", "source": "let key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.getKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" + "lang": "Swift", + "source": "client.getKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -11940,7 +11938,7 @@ "tags": [ "Keys" ], - "summary": "Delete a key", + "summary": "Delete API key", "description": "Delete the specified API key.", "operationId": "delete_api_key", "parameters": [ @@ -11988,25 +11986,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "client.DeleteKeyAsync(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" - }, - { - "lang": "Dart", - "source": "await client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" - }, - { - "lang": "Go", - "source": "client.DeleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" }, { "lang": "JS", "source": "client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" }, - { - "lang": "Java", - "source": "client.deleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" - }, { "lang": "PHP", "source": "$client->deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" @@ -12015,21 +12001,33 @@ "lang": "Python", "source": "client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" }, + { + "lang": "Java", + "source": "client.deleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + }, { "lang": "Ruby", "source": "client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" }, + { + "lang": "Go", + "source": "client.DeleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + }, + { + "lang": "C#", + "source": "client.DeleteKeyAsync(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + }, { "lang": "Rust", "source": "let key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();\nclient\n .delete_key(&key)\n .await?;\nthorization_header_1:\nlet client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet keys = client\n.get_keys()\n.await\n.unwrap();" }, { - "lang": "Swift", - "source": "client.deleteKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success:\n print(\"success\")\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" + "lang": "Swift", + "source": "client.deleteKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success:\n print(\"success\")\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -12037,7 +12035,7 @@ "tags": [ "Keys" ], - "summary": "Update a Key", + "summary": "Update API key", "description": "Update the name and description of an API key. Updates to keys are partial.\nThis means you should provide only the fields you intend to update, as any\nfields not present in the payload will remain unchanged.", "operationId": "patch_api_key", "parameters": [ @@ -12117,21 +12115,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.UpdateKeyAsync(\n \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\",\n description: \"Manage documents: Products/Reviews API key\",\n name: \"Products/Reviews API key\"\n)" - }, - { - "lang": "Go", - "source": "client.UpdateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", &meilisearch.Key{\n Description: \"Manage documents: Products/Reviews API key\",\n Actions: []string{\"documents.add\", \"document.delete\"},\n Indexes: []string{\"products\", \"reviews\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"name\": \"Products/Reviews API key\",\n \"description\": \"Manage documents: Products/Reviews API key\"\n }'" }, { "lang": "JS", "source": "client.updateKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d', {\n name: 'Products/Reviews API key',\n description: 'Manage documents: Products/Reviews API key',\n})" }, - { - "lang": "Java", - "source": "KeyUpdate keyChanges = new KeyUpdate();\nkeyChanges.setName(\"Products/Reviews API key\");\nkeyChanges.setDescription(\"Manage documents: Products/Reviews API key\");\n\nclient.updateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", keyChanges);" - }, { "lang": "PHP", "source": "$client->updateKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n [\n 'name' => 'Products/Reviews API key',\n 'description' => 'Manage documents: Products/Reviews API key'\n ]);" @@ -12140,10 +12130,22 @@ "lang": "Python", "source": "client.update_key(key_or_uid='6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n options={\n 'name': 'Products/Reviews API key',\n 'description': 'Manage documents: Products/Reviews API key'\n})" }, + { + "lang": "Java", + "source": "KeyUpdate keyChanges = new KeyUpdate();\nkeyChanges.setName(\"Products/Reviews API key\");\nkeyChanges.setDescription(\"Manage documents: Products/Reviews API key\");\n\nclient.updateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", keyChanges);" + }, { "lang": "Ruby", "source": "client.update_key(\n '6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n {\n description: 'Manage documents: Products/Reviews API key',\n name: 'Products/Reviews API key'\n }\n)" }, + { + "lang": "Go", + "source": "client.UpdateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", &meilisearch.Key{\n Description: \"Manage documents: Products/Reviews API key\",\n Actions: []string{\"documents.add\", \"document.delete\"},\n Indexes: []string{\"products\", \"reviews\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" + }, + { + "lang": "C#", + "source": "await client.UpdateKeyAsync(\n \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\",\n description: \"Manage documents: Products/Reviews API key\",\n name: \"Products/Reviews API key\"\n)" + }, { "lang": "Rust", "source": "let mut key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();\nkey\n .with_description(\"Manage documents: Products/Reviews API key\".to_string())\n .with_name(\"Products/Reviews API key\".to_string())\n .update(&client)\n .await\n .unwrap();" @@ -12151,10 +12153,6 @@ { "lang": "Swift", "source": "let keyParams = KeyUpdateParams(\n description: \"Manage documents: Products/Reviews API key\",\n name: \"Products/Reviews API key\"\n)\n\nclient.updateKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", keyParams: keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"name\": \"Products/Reviews API key\",\n \"description\": \"Manage documents: Products/Reviews API key\"\n }'" } ] } @@ -12162,7 +12160,7 @@ "/logs/stderr": { "post": { "tags": [ - "Logs" + "Experimental features" ], "summary": "Update target of the console logs", "description": "This route lets you specify at runtime the level of the console logs\noutputted on stderr.", @@ -12218,7 +12216,7 @@ "/logs/stream": { "post": { "tags": [ - "Logs" + "Experimental features" ], "summary": "Retrieve logs", "description": "Stream logs over HTTP. The format of the logs depends on the\nconfiguration specified in the payload. The logs are sent as multi-part,\nand the stream never stops, so make sure your clients correctly handle\nthat. To make the server stop sending you logs, you can call the `DELETE\n/logs/stream` route.\n\nThere can only be one listener at a timeand an error will be returned if\nyou call this route while it's being used by another client.", @@ -12296,7 +12294,7 @@ }, "delete": { "tags": [ - "Logs" + "Experimental features" ], "summary": "Stop retrieving logs", "description": "Call this route to make the engine stops sending logs through the `POST\n/logs/stream` route.", @@ -12396,7 +12394,7 @@ "/multi-search": { "post": { "tags": [ - "Multi-search" + "Search" ], "summary": "Perform a multi-search", "description": "Bundle multiple search queries in a single API request. Use this endpoint\nto search through multiple indexes at once.", @@ -12476,21 +12474,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.MultiSearchAsync(new MultiSearchQuery()\n{\n Queries = new System.Collections.Generic.List()\n {\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"booh\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"nemo\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movie_ratings\",\n Q = \"us\",\n },\n }\n});" - }, - { - "lang": "Go", - "source": "client.MultiSearch(&MultiSearchRequest{\n Queries: []SearchRequest{\n {\n IndexUID: \"movies\",\n Query: \"pooh\",\n Limit: 5,\n },\n {\n IndexUID: \"movies\",\n Query: \"nemo\",\n Limit: 5,\n },\n {\n IndexUID: \"movie_ratings\",\n Query: \"us\",\n },\n },\n})" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/multi-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"queries\": [\n {\n \"indexUid\": \"movies\",\n \"q\": \"pooh\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movies\",\n \"q\": \"nemo\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movie_ratings\",\n \"q\": \"us\"\n }\n ]\n }'" }, { "lang": "JS", "source": "client.multiSearch({ queries: [\n {\n indexUid: 'movies',\n q: 'pooh',\n limit: 5,\n },\n {\n indexUid: 'movies',\n q: 'nemo',\n limit: 5,\n },\n {\n indexUid: 'movie_ratings',\n q: 'us',\n },\n]})" }, - { - "lang": "Java", - "source": "MultiSearchRequest multiSearchRequest = new MultiSearchRequest();\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"pooh\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"nemo\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movie_ratings\").setQuery(\"us\"));\n\nclient.multiSearch(multiSearchRequest);\nt_similar_post_1:\nSimilarDocumentRequest query = new SimilarDocumentRequest()\n .setId(\"143\")\n .setEmbedder(\"manual\");\nclient.index(\"movies\").searchSimilarDocuments(query)" - }, { "lang": "PHP", "source": "$client->multiSearch([\n (new SearchQuery())\n ->setIndexUid('movies')\n ->setQuery('pooh')\n ->setLimit(5),\n (new SearchQuery())\n ->setIndexUid('movies')\n ->setQuery('nemo')\n ->setLimit(5),\n (new SearchQuery())\n ->setIndexUid('movie_ratings')\n ->setQuery('us')\n ]);" @@ -12499,17 +12489,25 @@ "lang": "Python", "source": "client.multi_search(\n [\n {'indexUid': 'movies', 'q': 'pooh', 'limit': 5},\n {'indexUid': 'movies', 'q': 'nemo', 'limit': 5},\n {'indexUid': 'movie_ratings', 'q': 'us'}\n ]\n)" }, + { + "lang": "Java", + "source": "MultiSearchRequest multiSearchRequest = new MultiSearchRequest();\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"pooh\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"nemo\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movie_ratings\").setQuery(\"us\"));\n\nclient.multiSearch(multiSearchRequest);\nt_similar_post_1:\nSimilarDocumentRequest query = new SimilarDocumentRequest()\n .setId(\"143\")\n .setEmbedder(\"manual\");\nclient.index(\"movies\").searchSimilarDocuments(query)" + }, { "lang": "Ruby", "source": "client.multi_search([\n { index_uid: 'books', q: 'prince' },\n { index_uid: 'movies', q: 'pooh', limit: 5 }\n { index_uid: 'movies', q: 'nemo', limit: 5 }\n { index_uid: 'movie_ratings', q: 'us' }\n])" }, { - "lang": "Rust", - "source": "let movie = client.index(\"movie\");\nlet movie_ratings = client.index(\"movie_ratings\");\n\nlet search_query_1 = SearchQuery::new(&movie)\n .with_query(\"pooh\")\n .with_limit(5)\n .build();\nlet search_query_2 = SearchQuery::new(&movie)\n .with_query(\"nemo\")\n .with_limit(5)\n .build();\nlet search_query_3 = SearchQuery::new(&movie_ratings)\n .with_query(\"us\")\n .build();\n\nlet response = client\n .multi_search()\n .with_search_query(search_query_1)\n .with_search_query(search_query_2)\n .with_search_query(search_query_3)\n .execute::()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.MultiSearch(&MultiSearchRequest{\n Queries: []SearchRequest{\n {\n IndexUID: \"movies\",\n Query: \"pooh\",\n Limit: 5,\n },\n {\n IndexUID: \"movies\",\n Query: \"nemo\",\n Limit: 5,\n },\n {\n IndexUID: \"movie_ratings\",\n Query: \"us\",\n },\n },\n})" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/multi-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"queries\": [\n {\n \"indexUid\": \"movies\",\n \"q\": \"pooh\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movies\",\n \"q\": \"nemo\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movie_ratings\",\n \"q\": \"us\"\n }\n ]\n }'" + "lang": "C#", + "source": "await client.MultiSearchAsync(new MultiSearchQuery()\n{\n Queries = new System.Collections.Generic.List()\n {\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"booh\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"nemo\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movie_ratings\",\n Q = \"us\",\n },\n }\n});" + }, + { + "lang": "Rust", + "source": "let movie = client.index(\"movie\");\nlet movie_ratings = client.index(\"movie_ratings\");\n\nlet search_query_1 = SearchQuery::new(&movie)\n .with_query(\"pooh\")\n .with_limit(5)\n .build();\nlet search_query_2 = SearchQuery::new(&movie)\n .with_query(\"nemo\")\n .with_limit(5)\n .build();\nlet search_query_3 = SearchQuery::new(&movie_ratings)\n .with_query(\"us\")\n .build();\n\nlet response = client\n .multi_search()\n .with_search_query(search_query_1)\n .with_search_query(search_query_2)\n .with_search_query(search_query_3)\n .execute::()\n .await\n .unwrap();" } ] } @@ -12517,7 +12515,7 @@ "/network": { "get": { "tags": [ - "Network" + "Experimental features" ], "summary": "Get network topology", "description": "Get a list of all Meilisearch instances currently known to this instance.", @@ -12580,8 +12578,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.GetNetwork();" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/network'" }, { "lang": "PHP", @@ -12592,20 +12590,20 @@ "source": "client.get_all_networks()" }, { - "lang": "Rust", - "source": "let network = client\n .get_network_state()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.GetNetwork();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/network'" + "lang": "Rust", + "source": "let network = client\n .get_network_state()\n .await\n .unwrap();" } ] }, "patch": { "tags": [ - "Network" + "Experimental features" ], - "summary": "Configure Network", + "summary": "Configure network topology", "description": "Add or remove nodes from network.", "operationId": "patch_network", "requestBody": { @@ -12676,8 +12674,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.UpdateNetwork(&meilisearch.UpdateNetworkRequest{\n Self: meilisearch.String(\"ms-00\"),\n Leader: meilisearch.String(\"ms-00\"),\n Remotes: meilisearch.NewOpt(map[string]meilisearch.Opt[meilisearch.Remote]{\n \"ms-00\": meilisearch.NewOpt(meilisearch.Remote{\n URL: meilisearch.String(\"https://meilisearch.com\"),\n SearchAPIKey: meilisearch.String(\"ReadKey\"),\n WriteAPIKey: meilisearch.String(\"WriteKey\"),\n },\n },\n});" + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/network' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"self\": \"ms-00\",\n \"remotes\": {\n \"ms-00\": {\n \"url\": \"http://INSTANCE_URL\",\n \"searchApiKey\": \"INSTANCE_API_KEY\"\n },\n \"ms-01\": {\n \"url\": \"http://ANOTHER_INSTANCE_URL\",\n \"searchApiKey\": \"ANOTHER_INSTANCE_API_KEY\"\n }\n }\n }'" }, { "lang": "PHP", @@ -12688,12 +12686,12 @@ "source": "client.add_or_update_networks({\n \"remotes\": {\n \"http://localhost:7700\": {\n \"searchApiKey\": \"masterKey\"\n }\n },\n \"leader\": None\n})" }, { - "lang": "Rust", - "source": "let mut remotes = std::collections::HashMap::new();\nremotes.insert(String::from(\"ms-01\"), Some(meilisearch_sdk::network::RemoteConfig {\n url: \"https://ms-01.enterprise.meilisearch.com\".to_string(),\n search_api_key: \"SEARCH_API_KEY\".to_string(),\n write_api_key: Some(\"WRITE_API_KEY\".to_string()),\n}));\n// Remove ms-00 from the topology\nremotes.insert(String::from(\"ms-00\"), None);\n\nlet update = meilisearch_sdk::network::NetworkUpdate {\n leader: Some(\"ms-01\".to_string()),\n remotes: Some(remotes),\n ..meilisearch_sdk::network::NetworkUpdate::default()\n};\n\nlet task: TaskInfo = client\n .update_network_state(&update)\n .await\n .unwrap();" + "lang": "Go", + "source": "client.UpdateNetwork(&meilisearch.UpdateNetworkRequest{\n Self: meilisearch.String(\"ms-00\"),\n Leader: meilisearch.String(\"ms-00\"),\n Remotes: meilisearch.NewOpt(map[string]meilisearch.Opt[meilisearch.Remote]{\n \"ms-00\": meilisearch.NewOpt(meilisearch.Remote{\n URL: meilisearch.String(\"https://meilisearch.com\"),\n SearchAPIKey: meilisearch.String(\"ReadKey\"),\n WriteAPIKey: meilisearch.String(\"WriteKey\"),\n },\n },\n});" }, { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/network' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"self\": \"ms-00\",\n \"remotes\": {\n \"ms-00\": {\n \"url\": \"http://INSTANCE_URL\",\n \"searchApiKey\": \"INSTANCE_API_KEY\"\n },\n \"ms-01\": {\n \"url\": \"http://ANOTHER_INSTANCE_URL\",\n \"searchApiKey\": \"ANOTHER_INSTANCE_API_KEY\"\n }\n }\n }'" + "lang": "Rust", + "source": "let mut remotes = std::collections::HashMap::new();\nremotes.insert(String::from(\"ms-01\"), Some(meilisearch_sdk::network::RemoteConfig {\n url: \"https://ms-01.enterprise.meilisearch.com\".to_string(),\n search_api_key: \"SEARCH_API_KEY\".to_string(),\n write_api_key: Some(\"WRITE_API_KEY\".to_string()),\n}));\n// Remove ms-00 from the topology\nremotes.insert(String::from(\"ms-00\"), None);\n\nlet update = meilisearch_sdk::network::NetworkUpdate {\n leader: Some(\"ms-01\".to_string()),\n remotes: Some(remotes),\n ..meilisearch_sdk::network::NetworkUpdate::default()\n};\n\nlet task: TaskInfo = client\n .update_network_state(&update)\n .await\n .unwrap();" } ] } @@ -12701,9 +12699,9 @@ "/snapshots": { "post": { "tags": [ - "Snapshots" + "Backups" ], - "summary": "Create a snapshot", + "summary": "Create snapshot", "description": "Triggers a snapshot creation process. Once the process is complete, a snapshot is created in the snapshot directory. If the snapshot directory does not exist yet, it will be created.", "operationId": "create_snapshot", "responses": { @@ -12752,21 +12750,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.CreateSnapshotAsync();" - }, - { - "lang": "Go", - "source": "client.CreateSnapshot()" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/snapshots'" }, { "lang": "JS", "source": "client.createSnapshot()" }, - { - "lang": "Java", - "source": "client.createSnapshot();" - }, { "lang": "PHP", "source": "$client->createSnapshot();" @@ -12775,10 +12765,22 @@ "lang": "Python", "source": "client.create_snapshot()" }, + { + "lang": "Java", + "source": "client.createSnapshot();" + }, { "lang": "Ruby", "source": "client.create_snapshot" }, + { + "lang": "Go", + "source": "client.CreateSnapshot()" + }, + { + "lang": "C#", + "source": "await client.CreateSnapshotAsync();" + }, { "lang": "Rust", "source": "client\n .create_snapshot()\n .await\n .unwrap();" @@ -12786,10 +12788,6 @@ { "lang": "Swift", "source": "let task = try await self.client.createSnapshot()" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/snapshots'" } ] } @@ -12799,7 +12797,7 @@ "tags": [ "Stats" ], - "summary": "Get stats of all indexes.", + "summary": "Get stats of all indexes", "description": "Get stats of all indexes.", "operationId": "get_stats", "responses": { @@ -12859,25 +12857,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.GetStatsAsync();" - }, - { - "lang": "Dart", - "source": "await client.getStats();" - }, - { - "lang": "Go", - "source": "client.GetStats()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/stats'" }, { "lang": "JS", "source": "client.getStats()" }, - { - "lang": "Java", - "source": "client.getStats();" - }, { "lang": "PHP", "source": "$client->stats();" @@ -12886,21 +12872,33 @@ "lang": "Python", "source": "client.get_all_stats()" }, + { + "lang": "Java", + "source": "client.getStats();" + }, { "lang": "Ruby", "source": "client.stats" }, + { + "lang": "Go", + "source": "client.GetStats()" + }, + { + "lang": "C#", + "source": "await client.GetStatsAsync();" + }, { "lang": "Rust", "source": "let stats: ClientStats = client\n .get_stats()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.allStats { (result) in\n switch result {\n case .success(let stats):\n print(stats)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.getStats();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/stats'" + "lang": "Swift", + "source": "client.allStats { (result) in\n switch result {\n case .success(let stats):\n print(stats)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -12971,21 +12969,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.SwapIndexesAsync(new List { new IndexSwap(\"indexA\", \"indexB\"), new IndexSwap(\"indexX\", \"indexY\") } });" - }, - { - "lang": "Go", - "source": "client.SwapIndexes([]SwapIndexesParams{\n {Indexes: []string{\"indexA\", \"indexB\"}},\n {Indexes: []string{\"indexX\", \"indexY\"}},\n})" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/swap-indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"indexes\": [\n \"indexA\",\n \"indexB\"\n ]\n },\n {\n \"indexes\": [\n \"indexX\",\n \"indexY\"\n ]\n }\n ]'" }, { "lang": "JS", "source": "client.swapIndexes([\n { 'indexes': ['indexA', 'indexB'] },\n { 'indexes': ['indexX', 'indexY'] }\n])" }, - { - "lang": "Java", - "source": "SwapIndexesParams[] params =\n new SwapIndexesParams[] {\n new SwapIndexesParams().setIndexes(new String[] {\"indexA\", \"indexB\"}),\n new SwapIndexesParams().setIndexes(new String[] {\"indexX\", \"indexY\"})\n };\nTaskInfo task = client.swapIndexes(params);" - }, { "lang": "PHP", "source": "$client->swapIndexes([['indexA', 'indexB'], ['indexX', 'indexY']]);" @@ -12994,10 +12984,22 @@ "lang": "Python", "source": "client.swap_indexes([{'indexes': ['indexA', 'indexB']}, {'indexes': ['indexX', 'indexY']}])" }, + { + "lang": "Java", + "source": "SwapIndexesParams[] params =\n new SwapIndexesParams[] {\n new SwapIndexesParams().setIndexes(new String[] {\"indexA\", \"indexB\"}),\n new SwapIndexesParams().setIndexes(new String[] {\"indexX\", \"indexY\"})\n };\nTaskInfo task = client.swapIndexes(params);" + }, { "lang": "Ruby", "source": "client.swap_indexes(['indexA', 'indexB'], ['indexX', 'indexY'])" }, + { + "lang": "Go", + "source": "client.SwapIndexes([]SwapIndexesParams{\n {Indexes: []string{\"indexA\", \"indexB\"}},\n {Indexes: []string{\"indexX\", \"indexY\"}},\n})" + }, + { + "lang": "C#", + "source": "await client.SwapIndexesAsync(new List { new IndexSwap(\"indexA\", \"indexB\"), new IndexSwap(\"indexX\", \"indexY\") } });" + }, { "lang": "Rust", "source": "client.swap_indexes([\n &SwapIndexes {\n indexes: (\n \"indexA\".to_string(),\n \"indexB\".to_string(),\n ),\n }, &SwapIndexes {\n indexes: (\n \"indexX\".to_string(),\n \"indexY\".to_string(),\n ),\n}])" @@ -13005,10 +13007,6 @@ { "lang": "Swift", "source": "let task = try await self.client.swapIndexes([\n (\"indexA\", \"indexB\"),\n (\"indexX\", \"indexY\")\n])" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/swap-indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"indexes\": [\n \"indexA\",\n \"indexB\"\n ]\n },\n {\n \"indexes\": [\n \"indexX\",\n \"indexY\"\n ]\n }\n ]'" } ] } @@ -13016,16 +13014,16 @@ "/tasks": { "get": { "tags": [ - "Tasks" + "Async task management" ], - "summary": "Get all tasks", + "summary": "List tasks", "description": "Get all [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)", "operationId": "get_tasks", "parameters": [ { "name": "limit", "in": "query", - "description": "Maximum number of results to return.", + "description": "Maximum number of batches to return", "required": false, "schema": { "type": "integer", @@ -13038,7 +13036,7 @@ { "name": "from", "in": "query", - "description": "Fetch the next set of results from the given uid.", + "description": "`uid` of the first batch returned", "required": false, "schema": { "type": "integer", @@ -13050,7 +13048,7 @@ { "name": "reverse", "in": "query", - "description": "The order you want to retrieve the objects.", + "description": "If `true`, returns results in the reverse order, from oldest to most recent", "required": false, "schema": { "type": "boolean" @@ -13276,21 +13274,13 @@ ], "x-codeSamples": [ { - "lang": "Dart", - "source": "await client.getTasks();" - }, - { - "lang": "Go", - "source": "client.GetTasks(nil);" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks'" }, { "lang": "JS", "source": "client.tasks.getTasks()" }, - { - "lang": "Java", - "source": "client.getTasks();" - }, { "lang": "PHP", "source": "$client->getTasks();" @@ -13299,27 +13289,35 @@ "lang": "Python", "source": "client.get_tasks()" }, + { + "lang": "Java", + "source": "client.getTasks();" + }, { "lang": "Ruby", "source": "client.tasks" }, + { + "lang": "Go", + "source": "client.GetTasks(nil);" + }, { "lang": "Rust", "source": "let tasks: TasksResults = client\n .get_tasks()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.getTasks { (result) in\n switch result {\n case .success(let tasks):\n print(tasks)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.getTasks();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks'" + "lang": "Swift", + "source": "client.getTasks { (result) in\n switch result {\n case .success(let tasks):\n print(tasks)\n case .failure(let error):\n print(error)\n }\n}" } ] }, "delete": { "tags": [ - "Tasks" + "Async task management" ], "summary": "Delete tasks", "description": "Delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) on filter", @@ -13567,25 +13565,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.DeleteTasksAsync(new DeleteTasksQuery { Uids = new List { 1, 2 } });" - }, - { - "lang": "Dart", - "source": "await client.deleteTasks(params: DeleteTasksQuery(uids: [1, 2]));" - }, - { - "lang": "Go", - "source": "client.DeleteTaks(&meilisearch.DeleteTasksQuery{\n UIDS: []int64{1, 2},\n});" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/tasks?uids=1,2'" }, { "lang": "JS", "source": "client.tasks.deleteTasks({ uids: [1, 2] })" }, - { - "lang": "Java", - "source": "DeleteTasksQuery query = new DeleteTasksQuery().setUids(new int[] {1, 2})\nclient.deleteTasks(query);" - }, { "lang": "PHP", "source": "$client->deleteTasks((new DeleteTasksQuery())->setUids([1, 2]));" @@ -13594,21 +13580,33 @@ "lang": "Python", "source": "client.delete_tasks({'uids': ['1', '2']})" }, + { + "lang": "Java", + "source": "DeleteTasksQuery query = new DeleteTasksQuery().setUids(new int[] {1, 2})\nclient.deleteTasks(query);" + }, { "lang": "Ruby", "source": "client.delete_tasks(uids: [1, 2])" }, + { + "lang": "Go", + "source": "client.DeleteTaks(&meilisearch.DeleteTasksQuery{\n UIDS: []int64{1, 2},\n});" + }, + { + "lang": "C#", + "source": "await client.DeleteTasksAsync(new DeleteTasksQuery { Uids = new List { 1, 2 } });" + }, { "lang": "Rust", "source": "let mut query = tasks::TasksDeleteQuery::new(&client);\nquery.with_uids([1, 2]);\n\nlet res = client.delete_tasks_with(&query).await.unwrap();" }, { - "lang": "Swift", - "source": "client.deleteTasks(filter: DeleteTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.deleteTasks(params: DeleteTasksQuery(uids: [1, 2]));" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/tasks?uids=1,2'" + "lang": "Swift", + "source": "client.deleteTasks(filter: DeleteTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -13616,7 +13614,7 @@ "/tasks/cancel": { "post": { "tags": [ - "Tasks" + "Async task management" ], "summary": "Cancel tasks", "description": "Cancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", @@ -13864,25 +13862,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.CancelTasksAsync(new CancelTasksQuery { Uids = new List { 1, 2 } });" - }, - { - "lang": "Dart", - "source": "await client.cancelTasks(params: CancelTasksQuery(uids: [1, 2]));" - }, - { - "lang": "Go", - "source": "client.CancelTasks(&meilisearch.CancelTasksQuery{\n UIDS: []int64{1, 2},\n});" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/tasks/cancel?uids=1,2'" }, { "lang": "JS", "source": "client.tasks.cancelTasks({ uids: [1, 2] })" }, - { - "lang": "Java", - "source": "CancelTasksQuery query = new CancelTasksQuery().setUids(new int[] {1, 2})\nclient.cancelTasks(query);" - }, { "lang": "PHP", "source": "$client->cancelTasks((new CancelTasksQuery())->setUids([1, 2]));" @@ -13891,21 +13877,33 @@ "lang": "Python", "source": "client.cancel_tasks({'uids': ['1', '2']})" }, + { + "lang": "Java", + "source": "CancelTasksQuery query = new CancelTasksQuery().setUids(new int[] {1, 2})\nclient.cancelTasks(query);" + }, { "lang": "Ruby", "source": "client.cancel_tasks(uids: [1, 2])" }, + { + "lang": "Go", + "source": "client.CancelTasks(&meilisearch.CancelTasksQuery{\n UIDS: []int64{1, 2},\n});" + }, + { + "lang": "C#", + "source": "await client.CancelTasksAsync(new CancelTasksQuery { Uids = new List { 1, 2 } });" + }, { "lang": "Rust", "source": "let mut query = tasks::TasksCancelQuery::new(&client);\nquery.with_uids([1, 2]);\n\nlet res = client.cancel_task_with(&query).await.unwrap();" }, { - "lang": "Swift", - "source": "client.cancelTasks(filter: CancelTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.cancelTasks(params: CancelTasksQuery(uids: [1, 2]));" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/tasks/cancel?uids=1,2'" + "lang": "Swift", + "source": "client.cancelTasks(filter: CancelTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -13913,9 +13911,9 @@ "/tasks/{taskUid}": { "get": { "tags": [ - "Tasks" + "Async task management" ], - "summary": "Get a task", + "summary": "Get task", "description": "Get a [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", "operationId": "get_task", "parameters": [ @@ -13999,21 +13997,13 @@ ], "x-codeSamples": [ { - "lang": "Dart", - "source": "await client.getTask(1);" - }, - { - "lang": "Go", - "source": "client.GetTask(1);" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks/1'" }, { "lang": "JS", "source": "client.tasks.getTask(1)" }, - { - "lang": "Java", - "source": "client.getTask(1);" - }, { "lang": "PHP", "source": "$client->getTask(1);" @@ -14022,21 +14012,29 @@ "lang": "Python", "source": "client.get_task(1)" }, + { + "lang": "Java", + "source": "client.getTask(1);" + }, { "lang": "Ruby", "source": "client.task(1)" }, + { + "lang": "Go", + "source": "client.GetTask(1);" + }, { "lang": "Rust", "source": "let task: Task = client\n .get_task(1)\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.getTask(taskUid: 1) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" + "lang": "Dart", + "source": "await client.getTask(1);" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks/1'" + "lang": "Swift", + "source": "client.getTask(taskUid: 1) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" } ] } @@ -14092,25 +14090,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.GetVersionAsync();" - }, - { - "lang": "Dart", - "source": "await client.getVersion();" - }, - { - "lang": "Go", - "source": "client.GetVersion()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/version'" }, { "lang": "JS", "source": "client.getVersion()" }, - { - "lang": "Java", - "source": "client.getVersion();" - }, { "lang": "PHP", "source": "$client->version();" @@ -14119,21 +14105,33 @@ "lang": "Python", "source": "client.get_version()" }, + { + "lang": "Java", + "source": "client.getVersion();" + }, { "lang": "Ruby", "source": "client.version" }, + { + "lang": "Go", + "source": "client.GetVersion()" + }, + { + "lang": "C#", + "source": "await client.GetVersionAsync();" + }, { "lang": "Rust", "source": "let version: Version = client\n .get_version()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.version { (result) in\n switch result {\n case .success(let version):\n print(version)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.getVersion();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/version'" + "lang": "Swift", + "source": "client.version { (result) in\n switch result {\n case .success(let version):\n print(version)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -14203,8 +14201,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.ListWebhooks();" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks'" }, { "lang": "JS", @@ -14215,12 +14213,12 @@ "source": "client.get_webhooks()" }, { - "lang": "Rust", - "source": "let webhooks = client.get_webhooks().await.unwrap();" + "lang": "Go", + "source": "client.ListWebhooks();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks'" + "lang": "Rust", + "source": "let webhooks = client.get_webhooks().await.unwrap();" } ] }, @@ -14228,7 +14226,7 @@ "tags": [ "Webhooks" ], - "summary": "Create a webhook", + "summary": "Create webhook", "description": "Create a new webhook to receive task notifications.", "operationId": "post_webhook", "requestBody": { @@ -14292,8 +14290,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.AddWebhook(&meilisearch.AddWebhookRequest{\n URL: \"WEBHOOK_TARGET_URL\",\n Headers: map[string]string{\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n },\n});" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/webhooks' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"WEBHOOK_TARGET_URL\",\n \"headers\": {\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n }\n }'" }, { "lang": "JS", @@ -14304,12 +14302,12 @@ "source": "client.create_webhook({\n 'url': 'https://example.com/webhook',\n 'headers': {\"Authorization\":\"\", \"X-Custom-Header\":\"test\"},\n})" }, { - "lang": "Rust", - "source": "let mut payload = meilisearch_sdk::webhooks::WebhookCreate::new(\"WEBHOOK_TARGET_URL\");\npayload\n .insert_header(\"authorization\", \"SECURITY_KEY\")\n .insert_header(\"referer\", \"https://example.com\");\nlet webhook = client.create_webhook(&payload).await.unwrap();" + "lang": "Go", + "source": "client.AddWebhook(&meilisearch.AddWebhookRequest{\n URL: \"WEBHOOK_TARGET_URL\",\n Headers: map[string]string{\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n },\n});" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/webhooks' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"WEBHOOK_TARGET_URL\",\n \"headers\": {\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n }\n }'" + "lang": "Rust", + "source": "let mut payload = meilisearch_sdk::webhooks::WebhookCreate::new(\"WEBHOOK_TARGET_URL\");\npayload\n .insert_header(\"authorization\", \"SECURITY_KEY\")\n .insert_header(\"referer\", \"https://example.com\");\nlet webhook = client.create_webhook(&payload).await.unwrap();" } ] } @@ -14319,7 +14317,7 @@ "tags": [ "Webhooks" ], - "summary": "Get a webhook", + "summary": "Get webhook", "description": "Get a single webhook by its UUID.", "operationId": "get_webhook", "parameters": [ @@ -14386,8 +14384,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.GetWebhook(\"WEBHOOK_UUID\");" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID'" }, { "lang": "JS", @@ -14398,12 +14396,12 @@ "source": "client.get_webhook('WEBHOOK_UID')" }, { - "lang": "Rust", - "source": "let webhook = client.get_webhook(\"WEBHOOK_UUID\").await.unwrap();" + "lang": "Go", + "source": "client.GetWebhook(\"WEBHOOK_UUID\");" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID'" + "lang": "Rust", + "source": "let webhook = client.get_webhook(\"WEBHOOK_UUID\").await.unwrap();" } ] }, @@ -14411,7 +14409,7 @@ "tags": [ "Webhooks" ], - "summary": "Delete a webhook", + "summary": "Delete webhook", "description": "Delete an existing webhook by its UUID.", "operationId": "delete_webhook", "parameters": [ @@ -14462,8 +14460,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.DeleteWebhook(\"WEBHOOK_UUID\");" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID'" }, { "lang": "JS", @@ -14474,12 +14472,12 @@ "source": "client.delete_webhook('WEBHOOK_UID')" }, { - "lang": "Rust", - "source": "client.delete_webhook(\"WEBHOOK_UUID\").await.unwrap();" + "lang": "Go", + "source": "client.DeleteWebhook(\"WEBHOOK_UUID\");" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID'" + "lang": "Rust", + "source": "client.delete_webhook(\"WEBHOOK_UUID\").await.unwrap();" } ] }, @@ -14487,7 +14485,7 @@ "tags": [ "Webhooks" ], - "summary": "Update a webhook", + "summary": "Update webhook", "description": "Update an existing webhook's URL or headers.", "operationId": "patch_webhook", "parameters": [ @@ -14563,8 +14561,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.UpdateWebhook(\"WEBHOOK_UUID\", &meilisearch.UpdateWebhookRequest{\n Header: map[string]string{\n \"referer\": \"\"\n },\n});" + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"header\": {\n \"referer\": null\n }\n }'" }, { "lang": "JS", @@ -14575,12 +14573,12 @@ "source": "client.update_webhook('WEBHOOK_UID', {\n 'url': 'https://example.com/new-webhook',\n 'headers': {\"Authorization\":\"\", \"X-Custom-Header\":\"test\"},\n})" }, { - "lang": "Rust", - "source": "let mut update = meilisearch_sdk::webhooks::WebhookUpdate::new();\nupdate.remove_header(\"referer\");\nlet webhook = client\n .update_webhook(\"WEBHOOK_UUID\", &update)\n .await\n .unwrap();" + "lang": "Go", + "source": "client.UpdateWebhook(\"WEBHOOK_UUID\", &meilisearch.UpdateWebhookRequest{\n Header: map[string]string{\n \"referer\": \"\"\n },\n});" }, { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"header\": {\n \"referer\": null\n }\n }'" + "lang": "Rust", + "source": "let mut update = meilisearch_sdk::webhooks::WebhookUpdate::new();\nupdate.remove_header(\"referer\");\nlet webhook = client\n .update_webhook(\"WEBHOOK_UUID\", &update)\n .await\n .unwrap();" } ] } @@ -19893,7 +19891,7 @@ "type": "http", "scheme": "bearer", "bearerFormat": "Uuidv4, string or JWT", - "description": "An API key is a token that you provide when making API calls. Include the token in a header parameter called `Authorization`.\nExample: `Authorization: Bearer 8fece4405662dd830e4cb265e7e047aab2e79672a760a12712d2a263c9003509`" + "description": "An API key is a token that you provide when making API calls. Read more about [how to secure your project](https://www.meilisearch.com/docs/learn/security/basic_security).\n\nInclude the API key to the `Authorization` header, for instance:\n`Authorization: Bearer 6436fc5237b0d6e0d64253fbaac21d135012ecf1`.\n\nIf you use a SDK, ensure you instantiate the client with the API key, for instance with JS SDK:\n`const client = new MeiliSearch({ host: 'https://your-domain.com', apiKey: '6436fc5237b0d6e0d64253fbaac21d135012ecf1' })`" } } }, @@ -19910,131 +19908,65 @@ "name": "Version", "description": "Returns the version of the running Meilisearch instance." }, + { + "name": "Backups", + "description": "Meilisearch offers two types of backups: snapshots and dumps. Snapshots are mainly intended as a safeguard, while dumps are useful when migrating Meilisearch." + }, { "name": "Tasks", - "description": "The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html).", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/tasks" - } + "description": "The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)." }, { "name": "Batches", - "description": "The /batches route gives information about the progress of batches of asynchronous operations.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/batches" - } + "description": "The /batches route gives information about the progress of batches of asynchronous operations." }, { "name": "Indexes", - "description": "An index is an entity that gathers a set of [documents](https://www.meilisearch.com/docs/learn/getting_started/documents) with its own [settings](https://www.meilisearch.com/docs/reference/api/settings). Learn more about indexes.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/indexes" - } + "description": "An index is an entity that gathers a set of [documents](https://www.meilisearch.com/docs/learn/getting_started/documents) with its own [settings](https://www.meilisearch.com/docs/reference/api/settings). Learn more about indexes." }, { "name": "Documents", - "description": "Documents are objects composed of fields that can store any type of data. Each field contains an attribute and its associated value. Documents are stored inside [indexes](https://www.meilisearch.com/docs/learn/getting_started/indexes).", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/learn/getting_started/documents" - } + "description": "Documents are objects composed of fields that can store any type of data. Each field contains an attribute and its associated value. Documents are stored inside [indexes](https://www.meilisearch.com/docs/learn/getting_started/indexes)." }, { "name": "Facet Search", - "description": "The `/facet-search` route allows you to search for facet values. Facet search supports prefix search and typo tolerance. The returned hits are sorted lexicographically in ascending order. You can configure how facets are sorted using the sortFacetValuesBy property of the faceting index settings.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/facet_search" - } + "description": "The `/facet-search` route allows you to search for facet values. Facet search supports prefix search and typo tolerance. The returned hits are sorted lexicographically in ascending order. You can configure how facets are sorted using the sortFacetValuesBy property of the faceting index settings." }, { "name": "Similar documents", - "description": "The /similar route uses AI-powered search to return a number of documents similar to a target document.\n\nMeilisearch exposes two routes for retrieving similar documents: POST and GET. In the majority of cases, POST will offer better performance and ease of use.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/similar" - } + "description": "The /similar route uses AI-powered search to return a number of documents similar to a target document.\n\nMeilisearch exposes two routes for retrieving similar documents: POST and GET. In the majority of cases, POST will offer better performance and ease of use." }, { "name": "Settings", - "description": "Use the /settings route to customize search settings for a given index. You can either modify all index settings at once using the update settings endpoint, or use a child route to configure a single setting.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/settings" - } - }, - { - "name": "Compact an index", - "description": "The /compact route uses compacts the database to reorganize and make it smaller and more efficient.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/compact" - } + "description": "Use the /settings route to customize search settings for a given index. You can either modify all index settings at once using the update settings endpoint, or use a child route to configure a single setting." }, { "name": "Search", - "description": "Meilisearch exposes two routes to perform searches:\n\n- A POST route: this is the preferred route when using API authentication, as it allows [preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) caching and better performance.\n- A GET route: the usage of this route is discouraged, unless you have good reason to do otherwise (specific caching abilities for example)", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/search" - } - }, - { - "name": "Snapshots", - "description": "The snapshots route allows the creation of database snapshots. Snapshots are .snapshot files that can be used to launch Meilisearch.\nCreating a snapshot is also referred to as exporting it, whereas launching Meilisearch with a snapshot is referred to as importing it.\nDuring a snapshot export, all indexes of the current instance are exported—together with their documents and settings—and saved as a single .snapshot file.\nDuring a snapshot import, all indexes contained in the indicated .snapshot file are imported along with their associated documents and settings.\nSnapshot imports are performed at launch using an option.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/snapshots" - } - }, - { - "name": "Dumps", - "description": "The `dumps` route allows the creation of database dumps.\nDumps are `.dump` files that can be used to launch Meilisearch. Dumps are compatible between Meilisearch versions.\nCreating a dump is also referred to as exporting it, whereas launching Meilisearch with a dump is referred to as importing it.\nDuring a [dump export](https://www.meilisearch.com/docs/reference/api/dump#create-a-dump), all indexes of the current instance are\nexported—together with their documents and settings—and saved as a single `.dump` file. During a dump import,\nall indexes contained in the indicated `.dump` file are imported along with their associated documents and settings.\nAny existing index with the same uid as an index in the dump file will be overwritten.\nDump imports are [performed at launch](https://www.meilisearch.com/docs/learn/advanced/dumps#importing-a-dump) using an option.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/dump" - } + "description": "Meilisearch exposes two routes to perform searches:\n\n- A POST route: this is the preferred route when using API authentication, as it allows [preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) caching and better performance.\n- A GET route: the usage of this route is discouraged, unless you have good reason to do otherwise (specific caching abilities for example)" }, { "name": "Keys", - "description": "Manage API `keys` for a Meilisearch instance. Each key has a given set of permissions.\nYou must have the master key or the default admin key to access the keys route. More information about the keys and their rights.\nAccessing any route under `/keys` without having set a master key will result in an error.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/keys" - } + "description": "Manage API `keys` for a Meilisearch instance. Each key has a given set of permissions.\nYou must have the master key or the default admin key to access the keys route. More information about the keys and their rights.\nAccessing any route under `/keys` without having set a master key will result in an error." }, { "name": "Logs", - "description": "Everything about retrieving or customizing logs.\nCurrently [experimental](https://www.meilisearch.com/docs/learn/experimental/overview).", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/learn/experimental/log_customization" - } + "description": "Everything about retrieving or customizing logs.\nCurrently [experimental](https://www.meilisearch.com/docs/learn/experimental/overview)." }, { "name": "Multi-search", - "description": "The `/multi-search` route allows you to perform multiple search queries on one or more indexes by bundling them into a single HTTP request. Multi-search is also known as federated search.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/multi_search" - } + "description": "The `/multi-search` route allows you to perform multiple search queries on one or more indexes by bundling them into a single HTTP request. Multi-search is also known as federated search." }, { "name": "Experimental features", - "description": "The `/experimental-features` route allows you to activate or deactivate some of Meilisearch's experimental features.\n\nThis route is **synchronous**. This means that no task object will be returned, and any activated or deactivated features will be made available or unavailable immediately.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/experimental_features" - } - }, - { - "name": "Export", - "description": "The `/export` route allows you to trigger an export process to a remote Meilisearch instance.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/export" - } + "description": "The `/experimental-features` route allows you to activate or deactivate some of Meilisearch's experimental features.\n\nThis route is **synchronous**. This means that no task object will be returned, and any activated or deactivated features will be made available or unavailable immediately." }, { "name": "Network", - "description": "The `/network` route allows you to describe the topology of a network of Meilisearch instances.\n\nThis route is **synchronous**. This means that no task object will be returned, and any change to the network will be made available immediately.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/network" - } + "description": "The `/network` route allows you to describe the topology of a network of Meilisearch instances.\n\nThis route is **synchronous**. This means that no task object will be returned, and any change to the network will be made available immediately." }, { "name": "Webhooks", - "description": "The `/webhooks` route allows you to register endpoints to be called once tasks are processed.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/webhooks" - } + "description": "The `/webhooks` route allows you to register endpoints to be called once tasks are processed." } ] } \ No newline at end of file diff --git a/reference/api/authorization.mdx b/reference/api/authorization.mdx new file mode 100644 index 000000000..a4a954fef --- /dev/null +++ b/reference/api/authorization.mdx @@ -0,0 +1,26 @@ +--- +title: Authorization +sidebarTitle: Authorization +description: How to authenticate with the Meilisearch API using API keys and the Authorization header. +--- + +import CodeSamplesAuthorizationHeader1 from '/snippets/samples/code_samples_authorization_header_1.mdx'; +import CodeSamplesUpdatingGuideCheckVersionOldAuthorizationHeader from '/snippets/samples/code_samples_updating_guide_check_version_old_authorization_header.mdx'; + + +If you are new to Meilisearch, check out the [getting started guide](/learn/self_hosted/getting_started_with_self_hosted_meilisearch). + + +By [providing Meilisearch with a master key at launch](/learn/security/basic_security), you protect your instance from unauthorized requests. The provided master key must be at least 16 bytes. From then on, you must include the `Authorization` header along with a valid API key to access protected routes (all routes except [`/health`](/reference/api/health)). + + + +The [`/keys`](/reference/api/keys) route can only be accessed using the master key. For security reasons, we recommend using regular API keys for all other routes. + + +v0.24 and below use the `X-MEILI-API-KEY: apiKey` authorization header: + + + + +[To learn more about keys and security, refer to our security tutorial.](/learn/security/basic_security) diff --git a/reference/api/headers.mdx b/reference/api/headers.mdx new file mode 100644 index 000000000..9e1ccef83 --- /dev/null +++ b/reference/api/headers.mdx @@ -0,0 +1,85 @@ +--- +title: Headers +sidebarTitle: Headers +description: Content-Type, Content-Encoding, Accept-Encoding, and Meili-Include-Metadata headers for the Meilisearch API. +--- + +## Content type + +Any API request with a payload (`--data-binary`) requires a `Content-Type` header. Content type headers indicate the media type of the resource, helping the client process the response body correctly. + +Meilisearch currently supports the following formats: + +- `Content-Type: application/json` for JSON +- `Content-Type: application/x-ndjson` for NDJSON +- `Content-Type: text/csv` for CSV + +Only the [add documents](/reference/api/documents#add-or-replace-documents) and [update documents](/reference/api/documents#add-or-update-documents) endpoints accept NDJSON and CSV. For all others, use `Content-Type: application/json`. + +## Content encoding + +The `Content-Encoding` header indicates the media type is compressed by a given algorithm. Compression improves transfer speed and reduces bandwidth consumption by sending and receiving smaller payloads. The `Accept-Encoding` header, instead, indicates the compression algorithm the client understands. + +Meilisearch supports the following compression methods: + +- `br`: uses the [Brotli](https://en.wikipedia.org/wiki/Brotli) algorithm +- `deflate`: uses the [zlib](https://en.wikipedia.org/wiki/Zlib) structure with the [deflate](https://en.wikipedia.org/wiki/DEFLATE) compression algorithm +- `gzip`: uses the [gzip](https://en.wikipedia.org/wiki/Gzip) algorithm + +### Request compression + +The code sample below uses the `Content-Encoding: gzip` header, indicating that the request body is compressed using the `gzip` algorithm: + +``` + cat ~/movies.json | gzip | curl -X POST 'MEILISEARCH_URL/indexes/movies/documents' --data-binary @- -H 'Content-Type: application/json' -H 'Content-Encoding: gzip' +``` + +### Response compression + +Meilisearch compresses a response if the request contains the `Accept-Encoding` header. The code sample below uses the `gzip` algorithm: + +``` +curl -sH 'Accept-encoding: gzip' 'MEILISEARCH_URL/indexes/movies/search' | gzip - +``` + +## Search metadata + +You may use an optional `Meili-Include-Metadata` header when performing search and multi-search requests: + +``` +curl -X POST 'http://localhost:7700/indexes/INDEX_NAME/search' \ + -H 'Content-Type: application/json' \ + -H 'Authorization: Bearer MEILISEARCH_API_KEY' \ + -H 'Meili-Include-Metadata: true' \ + -d '{"q": ""}' +``` + +Meilisearch Cloud includes this header by default. + +Responses will include a `metadata` object: + +```json +{ + "hits": [ … ], + "metadata": { + "queryUid": "0199a41a-8186-70b3-b6e1-90e8cb582f35", + "indexUid": "INDEX_NAME", + "primaryKey": "INDEX_PRIMARY_KEY" + } +} +``` + +`metadata` contains the following fields: + +| Field | Type | Description | +|:------------:|:-------:|:----------------------------------------------------------:| +| `queryUid` | UUID v7 | Unique identifier for the query | +| `indexUid` | String | Index identifier | +| `primaryKey` | String | Primary key field name, if index has a primary key | +| `remote` | String | Remote instance name, if request targets a remote instance | + + +A search refers to a single HTTP search request. Every search request is assigned a `requestUid`. A query UID is a combination of `q` and `indexUid`. + +In the context of multi-search, for any given `searchUid` there may be multiple `queryUid` values. + diff --git a/reference/api/openapi.mdx b/reference/api/openapi.mdx new file mode 100644 index 000000000..8e36c3963 --- /dev/null +++ b/reference/api/openapi.mdx @@ -0,0 +1,7 @@ +--- +title: OpenAPI specifications +sidebarTitle: OpenAPI specifications +description: Meilisearch OpenAPI specifications and where to find them. +--- + +Meilisearch OpenAPI specifications (`meilisearch-openapi.json`) are attached to the [latest release of Meilisearch](https://github.com/meilisearch/meilisearch/releases/latest). diff --git a/reference/api/pagination.mdx b/reference/api/pagination.mdx new file mode 100644 index 000000000..a53a30c50 --- /dev/null +++ b/reference/api/pagination.mdx @@ -0,0 +1,19 @@ +--- +title: Pagination +sidebarTitle: Pagination +description: How Meilisearch paginates GET routes and the structure of paginated responses. +--- + +Meilisearch paginates all GET routes that return multiple resources, for example, GET `/indexes`, GET `/documents`, GET `/keys`, etc. This allows you to work with manageable chunks of data. All these routes return 20 results per page, but you can configure it using the `limit` query parameter. You can move between pages using `offset`. + +All paginated responses contain the following fields: + +| Name | Type | Description | +| :----------- | :------ | :--------------------------- | +| **`offset`** | Integer | Number of resources skipped | +| **`limit`** | Integer | Number of resources returned | +| **`total`** | Integer | Total number of resources | + +## `/tasks` endpoint + +Since the `/tasks` endpoint uses a different type of pagination, the response contains different fields. You can read more about it in the [tasks API reference](/reference/api/tasks#get-tasks). diff --git a/reference/api/parameters_and_requests.mdx b/reference/api/parameters_and_requests.mdx new file mode 100644 index 000000000..7a9e5644f --- /dev/null +++ b/reference/api/parameters_and_requests.mdx @@ -0,0 +1,51 @@ +--- +title: Parameters & Requests +sidebarTitle: Parameters & Requests +description: Parameters, request and response bodies, and data types for the Meilisearch API. +--- + +## Parameters + +Parameters are options you can pass to an API endpoint to modify its response. There are three main types of parameters in Meilisearch's API: request body parameters, path parameters, and query parameters. + +### Request body parameters + +These parameters are mandatory parts of POST, PUT, and PATCH requests. They accept a wide variety of values and data types depending on the resource you're modifying. You must add these parameters to your request's data payload. + +### Path parameters + +These are parameters you pass to the API in the endpoint's path. They are used to identify a resource uniquely. You can have multiple path parameters, for example, `/indexes/{index_uid}/documents/{document_id}`. + +If an endpoint does not take any path parameters, this section is not present in that endpoint's documentation. + +### Query parameters + +These optional parameters are a sequence of key-value pairs and appear after the question mark (`?`) in the endpoint. You can list multiple query parameters by separating them with an ampersand (`&`). The order of query parameters does not matter. They are mostly used with GET endpoints. + +If an endpoint does not take any query parameters, this section is not present in that endpoint's documentation. + +## Request body + +The request body is data sent to the API. It is used with PUT, POST, and PATCH methods to create or update a resource. You must provide request bodies in JSON. + +## Response body + +Meilisearch is an **asynchronous API**. This means that in response to most write requests, you will receive a summarized version of the `task` object: + +```json +{ + "taskUid": 1, + "indexUid": "movies", + "status": "enqueued", + "type": "indexUpdate", + "enqueuedAt": "2021-08-11T09:25:53.000000Z" +} +``` + +You can use this `taskUid` to get more details on [the status of the task](/reference/api/tasks#get-one-task). + +See more information about [asynchronous operations](/learn/async/asynchronous_operations). + +## Data types + +The Meilisearch API supports [JSON data types](https://www.w3schools.com/js/js_json_datatypes.asp). diff --git a/reference/errors/error_codes.mdx b/reference/errors/error_codes.mdx index 95055e7c8..cbb98aff6 100644 --- a/reference/errors/error_codes.mdx +++ b/reference/errors/error_codes.mdx @@ -168,7 +168,7 @@ The search query contains non-`null` values for both [`media`](/reference/api/se ## `invalid_content_type` -The [Content-Type header](/reference/api/overview#content-type) is not supported by Meilisearch. Currently, Meilisearch only supports JSON, CSV, and NDJSON. +The [Content-Type header](/reference/api/headers#content-type) is not supported by Meilisearch. Currently, Meilisearch only supports JSON, CSV, and NDJSON. ## `invalid_document_csv_delimiter` @@ -637,7 +637,7 @@ This error generally occurs when the host system has no space left on the device ## `malformed_payload` -The [Content-Type header](/reference/api/overview#content-type) does not match the request body payload format or the format is invalid. +The [Content-Type header](/reference/api/headers#content-type) does not match the request body payload format or the format is invalid. ## `missing_api_key_actions` @@ -660,7 +660,7 @@ This error happens if: ## `missing_content_type` -The payload does not contain a [Content-Type header](/reference/api/overview#content-type). Currently, Meilisearch only supports JSON, CSV, and NDJSON. +The payload does not contain a [Content-Type header](/reference/api/headers#content-type). Currently, Meilisearch only supports JSON, CSV, and NDJSON. ## `missing_document_filter` From 4535c6f62a4b722d38b214455028c873f518eb08 Mon Sep 17 00:00:00 2001 From: curquiza Date: Sun, 8 Feb 2026 21:21:06 +0100 Subject: [PATCH 15/45] Change name of section --- docs.json | 4 ++-- .../getting_started_with_self_hosted_meilisearch.mdx | 2 +- reference/api/{parameters_and_requests.mdx => requests.mdx} | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) rename reference/api/{parameters_and_requests.mdx => requests.mdx} (92%) diff --git a/docs.json b/docs.json index 0f16b7570..7cd6246ca 100644 --- a/docs.json +++ b/docs.json @@ -433,7 +433,7 @@ "pages": [ "reference/api/authorization", "reference/api/headers", - "reference/api/parameters_and_requests", + "reference/api/requests", "reference/api/pagination", "reference/api/openapi" ] @@ -959,7 +959,7 @@ }, { "source": "/reference", - "destination": "/reference/api/parameters_and_requests" + "destination": "/reference/api/request" }, { "source": "/guides/deployment/gcp", diff --git a/learn/self_hosted/getting_started_with_self_hosted_meilisearch.mdx b/learn/self_hosted/getting_started_with_self_hosted_meilisearch.mdx index 9192d8b02..6be082f56 100644 --- a/learn/self_hosted/getting_started_with_self_hosted_meilisearch.mdx +++ b/learn/self_hosted/getting_started_with_self_hosted_meilisearch.mdx @@ -191,4 +191,4 @@ You now know how to install Meilisearch, create an index, add documents, check t If you'd like to search through the documents you just added using a clean browser interface rather than the terminal, you can do so with [our built-in search preview](/learn/getting_started/search_preview). You can also [learn how to quickly build a front-end interface](/guides/front_end/front_end_integration) of your own. -For a more advanced approach, consult the [API reference](/reference/api/parameters_and_requests). +For a more advanced approach, consult the [API reference](/reference/api/request). diff --git a/reference/api/parameters_and_requests.mdx b/reference/api/requests.mdx similarity index 92% rename from reference/api/parameters_and_requests.mdx rename to reference/api/requests.mdx index 7a9e5644f..8770b50bf 100644 --- a/reference/api/parameters_and_requests.mdx +++ b/reference/api/requests.mdx @@ -1,7 +1,7 @@ --- -title: Parameters & Requests -sidebarTitle: Parameters & Requests -description: Parameters, request and response bodies, and data types for the Meilisearch API. +title: Requests +sidebarTitle: Requests +description: Parameters, requests & response bodies, and data types for the Meilisearch API. --- ## Parameters From 502facb730d6c9984af7995d482da2cf8ac51d3f Mon Sep 17 00:00:00 2001 From: curquiza Date: Sun, 8 Feb 2026 21:49:34 +0100 Subject: [PATCH 16/45] Test CI with no node version --- .github/workflows/pull-code-samples.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/pull-code-samples.yml b/.github/workflows/pull-code-samples.yml index 31e647bc1..8d1500904 100644 --- a/.github/workflows/pull-code-samples.yml +++ b/.github/workflows/pull-code-samples.yml @@ -15,9 +15,6 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v6 - with: - node-version: '18' - cache: 'npm' - name: Install dependencies run: npm install From 06b3f18fbc6e8c2e827a4ce3812fc17ab0341ce8 Mon Sep 17 00:00:00 2001 From: curquiza Date: Sun, 8 Feb 2026 21:51:53 +0100 Subject: [PATCH 17/45] Fix link --- docs.json | 2 +- .../getting_started_with_self_hosted_meilisearch.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs.json b/docs.json index 7cd6246ca..da4160244 100644 --- a/docs.json +++ b/docs.json @@ -959,7 +959,7 @@ }, { "source": "/reference", - "destination": "/reference/api/request" + "destination": "/reference/api/authorization" }, { "source": "/guides/deployment/gcp", diff --git a/learn/self_hosted/getting_started_with_self_hosted_meilisearch.mdx b/learn/self_hosted/getting_started_with_self_hosted_meilisearch.mdx index 6be082f56..19315ad87 100644 --- a/learn/self_hosted/getting_started_with_self_hosted_meilisearch.mdx +++ b/learn/self_hosted/getting_started_with_self_hosted_meilisearch.mdx @@ -191,4 +191,4 @@ You now know how to install Meilisearch, create an index, add documents, check t If you'd like to search through the documents you just added using a clean browser interface rather than the terminal, you can do so with [our built-in search preview](/learn/getting_started/search_preview). You can also [learn how to quickly build a front-end interface](/guides/front_end/front_end_integration) of your own. -For a more advanced approach, consult the [API reference](/reference/api/request). +For a more advanced approach, consult the [API reference](/reference/api/requests). From bd203b91281f1340772879159b528cce5d6e35bf Mon Sep 17 00:00:00 2001 From: curquiza Date: Sun, 8 Feb 2026 22:28:05 +0100 Subject: [PATCH 18/45] Test CI --- .github/workflows/post-deployment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/post-deployment.yml b/.github/workflows/post-deployment.yml index 5d98a712a..45d0f643d 100644 --- a/.github/workflows/post-deployment.yml +++ b/.github/workflows/post-deployment.yml @@ -39,9 +39,9 @@ jobs: if [[ $has_changes == "true" ]]; then echo "There are changes in the Git working directory." git config user.name "meili-bot" - git config user.email "meili-bot@meilisearch.com" + git config user.email "robot@meilisearch.com" git add snippets/ - git commit -m "Update code samples" + git commit -m "[AUTOMATION POST DEPLOYMENT] Update code samples" git push origin main else echo "No changes in the Git working directory." From f2d8e5ef69da1b3083a5f7972a40ecf4480da4ad Mon Sep 17 00:00:00 2001 From: curquiza Date: Sun, 8 Feb 2026 22:50:20 +0100 Subject: [PATCH 19/45] Update open api section --- reference/api/openapi.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reference/api/openapi.mdx b/reference/api/openapi.mdx index 8e36c3963..60ab73829 100644 --- a/reference/api/openapi.mdx +++ b/reference/api/openapi.mdx @@ -4,4 +4,6 @@ sidebarTitle: OpenAPI specifications description: Meilisearch OpenAPI specifications and where to find them. --- -Meilisearch OpenAPI specifications (`meilisearch-openapi.json`) are attached to the [latest release of Meilisearch](https://github.com/meilisearch/meilisearch/releases/latest). +You can download the OpenAPI specification for the latest Meilisearch version. + +For a specific Meilisearch version, get the specification from the [Meilisearch releases on GitHub](https://github.com/meilisearch/meilisearch/releases). Each release includes `meilisearch-openapi.json` in its assets. From 0ece54c5706c9191ecd7cc1a8c2560b75acebb40 Mon Sep 17 00:00:00 2001 From: curquiza Date: Sun, 8 Feb 2026 22:57:58 +0100 Subject: [PATCH 20/45] First version of open api CI --- .github/workflows/post-deployment.yml | 39 ++++++++++++- scripts/fetch-openapi.mjs | 84 +++++++++++++++++++++++++++ 2 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 scripts/fetch-openapi.mjs diff --git a/.github/workflows/post-deployment.yml b/.github/workflows/post-deployment.yml index 45d0f643d..24d7524f9 100644 --- a/.github/workflows/post-deployment.yml +++ b/.github/workflows/post-deployment.yml @@ -11,7 +11,7 @@ on: # - 'main' jobs: - update-samples: + fetch-code-samples: runs-on: ubuntu-latest steps: @@ -46,3 +46,40 @@ jobs: else echo "No changes in the Git working directory." fi + + # We need to wait for fetch-code-samples to commit first so we can push a separate commit + # (avoid stacking both changes in one run and keep history clear). + fetch-openapi-files: + runs-on: ubuntu-latest + needs: fetch-code-samples + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + with: + ref: main + token: ${{ secrets.GH_TOKEN }} + + - name: Setup Node.js + uses: actions/setup-node@v6 + + - name: Fetch latest OpenAPI files from Meilisearch release + run: node scripts/fetch-openapi.mjs + + - name: Check for changes + id: openapi_changes + run: | + echo "has_changes=$(git diff --quiet assets/open-api/ && echo "false" || echo "true")" >> "$GITHUB_ENV" + + - name: Commit changes + run: | + if [[ $has_changes == "true" ]]; then + echo "There are changes in the OpenAPI file." + git config user.name "meili-bot" + git config user.email "robot@meilisearch.com" + git add assets/open-api/ + git commit -m "[AUTOMATION POST DEPLOYMENT] Update OpenAPI files from latest Meilisearch release" + git push origin main + else + echo "No changes in the OpenAPI files." + fi diff --git a/scripts/fetch-openapi.mjs b/scripts/fetch-openapi.mjs new file mode 100644 index 000000000..9993da043 --- /dev/null +++ b/scripts/fetch-openapi.mjs @@ -0,0 +1,84 @@ +#!/usr/bin/env node + +/** + * Fetches the latest Meilisearch release from GitHub and replaces + * the OpenAPI assets in assets/open-api/ with those from that release: + * - meilisearch-openapi-mintlify.json + * - meilisearch-openapi.json + * + * Optional: set GITHUB_PAT or GH_TOKEN for higher API rate limits. + */ + +import fs from "fs"; +import path from "path"; +import { fileURLToPath } from "url"; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const REPO_ROOT = path.resolve(__dirname, ".."); +const OPENAPI_DIR = path.join(REPO_ROOT, "assets", "open-api"); + +const OPENAPI_ASSET_NAMES = [ + "meilisearch-openapi-mintlify.json", + "meilisearch-openapi.json", +]; + +const GITHUB_API_LATEST = + "https://api.github.com/repos/meilisearch/meilisearch/releases/latest"; + +function getHeaders(extra = {}) { + const token = process.env.GITHUB_PAT || process.env.GH_TOKEN; + const headers = { ...extra }; + if (token) headers.Authorization = `Bearer ${token}`; + return headers; +} + +async function request(url, { asJson = false, errorContext = "Request" } = {}) { + const headers = getHeaders( + asJson ? { Accept: "application/vnd.github+json" } : {} + ); + const res = await fetch(url, { headers }); + if (!res.ok) { + const body = await res.text(); + throw new Error( + `${errorContext} failed: ${res.status} ${res.statusText}${body ? `\n${body}` : ""}` + ); + } + return asJson ? res.json() : res.text(); +} + +async function main() { + console.log("Fetching latest Meilisearch release..."); + const release = await request(GITHUB_API_LATEST, { + asJson: true, + errorContext: "GitHub API", + }); + const tag = release.tag_name; + console.log(`Latest release: ${tag}`); + + if (!fs.existsSync(OPENAPI_DIR)) { + fs.mkdirSync(OPENAPI_DIR, { recursive: true }); + } + + const assetNames = release.assets?.map((a) => a.name) ?? []; + for (const filename of OPENAPI_ASSET_NAMES) { + const asset = release.assets?.find((a) => a.name === filename); + if (!asset) { + throw new Error( + `Asset "${filename}" not found in release ${tag}. Available: ${assetNames.join(", ") || "none"}` + ); + } + + console.log(`Downloading ${filename}...`); + const content = await request(asset.browser_download_url, { + errorContext: "Download asset", + }); + const targetPath = path.join(OPENAPI_DIR, filename); + fs.writeFileSync(targetPath, content, "utf8"); + console.log(`Written to ${targetPath}`); + } +} + +main().catch((err) => { + console.error(err); + process.exit(1); +}); From daa1bfff937fdb280876728d19d26c2b5e78a979 Mon Sep 17 00:00:00 2001 From: curquiza Date: Sun, 8 Feb 2026 23:03:35 +0100 Subject: [PATCH 21/45] v2 of CI --- .github/workflows/post-deployment.yml | 12 ++++++++++++ docs.json | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/post-deployment.yml b/.github/workflows/post-deployment.yml index 24d7524f9..acd63efd0 100644 --- a/.github/workflows/post-deployment.yml +++ b/.github/workflows/post-deployment.yml @@ -13,6 +13,8 @@ on: jobs: fetch-code-samples: runs-on: ubuntu-latest + outputs: + run_openapi_automation: ${{ steps.openapi_automation.outputs.run }} steps: - name: Checkout repository @@ -20,6 +22,12 @@ jobs: with: token: ${{ secrets.GH_TOKEN }} + - name: Get OpenAPI automation flag from docs.json + id: openapi_automation + run: | + value=$(jq -r '.. | select(type == "object" and has("internal-meili-fetch-automation")) | .["internal-meili-fetch-automation"] | select(. != null) | tostring' docs.json 2>/dev/null | head -1) + echo "run=${value:-false}" >> "$GITHUB_OUTPUT" + - name: Setup Node.js uses: actions/setup-node@v6 @@ -49,9 +57,13 @@ jobs: # We need to wait for fetch-code-samples to commit first so we can push a separate commit # (avoid stacking both changes in one run and keep history clear). + # Only runs when docs.json has "internal-meili-fetch-automation": true. + # In case of issues with the latest release OpenAPI file: fetch the desired OpenAPI file + # manually, then set "internal-meili-fetch-automation" to false to prevent this automation from running. fetch-openapi-files: runs-on: ubuntu-latest needs: fetch-code-samples + if: needs.fetch-code-samples.outputs.run_openapi_automation == 'true' steps: - name: Checkout repository diff --git a/docs.json b/docs.json index da4160244..09bb6f6e0 100644 --- a/docs.json +++ b/docs.json @@ -440,7 +440,8 @@ }, { "group": "API Routes", - "openapi": "openapi-curqui.json", + "openapi": "assets/open-api/meilisearch-openapi-mintlify.json", + "internal-meili-fetch-automation": true, "examples": { "languages": ["curl", "javascript", "php", "python", "java", "ruby", "go", "csharp", "rust", "dart", "swift"], "autogenerate": false From 3bd0cd815f412a62dfcde4b51c34ad4baac06f28 Mon Sep 17 00:00:00 2001 From: curquiza Date: Mon, 9 Feb 2026 22:42:13 +0100 Subject: [PATCH 22/45] Add CI to check code samples and open api file --- .../workflows/openapi-code-samples-check.yml | 34 ++++ scripts/check-openapi-code-samples.mjs | 146 ++++++++++++++++++ 2 files changed, 180 insertions(+) create mode 100644 .github/workflows/openapi-code-samples-check.yml create mode 100644 scripts/check-openapi-code-samples.mjs diff --git a/.github/workflows/openapi-code-samples-check.yml b/.github/workflows/openapi-code-samples-check.yml new file mode 100644 index 000000000..9c3112326 --- /dev/null +++ b/.github/workflows/openapi-code-samples-check.yml @@ -0,0 +1,34 @@ +# On every push to main, check meilisearch-openapi-mintlify.json for code samples: +# - Job 1: Ensure every route that has x-codeSamples includes a cURL sample (can fail). +# - Job 2: Informational only – list routes and all missing code sample languages (never fails). +name: OpenAPI code samples check + +on: + workflow_dispatch: + push: + branches: + - main + +jobs: + # Fails if any route with x-codeSamples has no cURL sample. + require-curl-samples: + name: Require cURL in x-codeSamples + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Check routes have cURL in x-codeSamples + run: | + node scripts/check-openapi-code-samples.mjs curl-check assets/open-api/meilisearch-openapi-mintlify.json + + # Informational only: list routes and missing code sample languages. + # This job never fails the workflow (information check only). + info-missing-code-samples: + name: "[Info only - never fails] Missing code samples per route" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: List routes and missing code samples (informational, never fails) + run: | + node scripts/check-openapi-code-samples.mjs info assets/open-api/meilisearch-openapi-mintlify.json || true diff --git a/scripts/check-openapi-code-samples.mjs b/scripts/check-openapi-code-samples.mjs new file mode 100644 index 000000000..731be9f0d --- /dev/null +++ b/scripts/check-openapi-code-samples.mjs @@ -0,0 +1,146 @@ +#!/usr/bin/env node +/** + * Checks OpenAPI Mintlify file for code samples. + * Usage: + * node check-openapi-code-samples.mjs curl-check [path-to-openapi] + * node check-openapi-code-samples.mjs info [path-to-openapi] + * + * curl-check: Exits 1 if any route (method + path) has no cURL code sample. + * info: Prints report of missing code sample langs per route (never exits with error). + */ + +import { readFileSync } from 'fs'; +import { resolve } from 'path'; + +const OPENAPI_PATH = resolve( + process.cwd(), + process.argv[3] || 'assets/open-api/meilisearch-openapi-mintlify.json' +); + +const spec = JSON.parse(readFileSync(OPENAPI_PATH, 'utf8')); +const paths = spec.paths || {}; +const HTTP_METHODS = ['get', 'post', 'put', 'patch', 'delete', 'head', 'options']; + +function getOperations() { + const ops = []; + for (const [path, pathItem] of Object.entries(paths)) { + if (typeof pathItem !== 'object' || pathItem === null) continue; + for (const method of HTTP_METHODS) { + const op = pathItem[method]; + if (op && typeof op === 'object') { + ops.push({ path, method, operation: op }); + } + } + } + return ops; +} + +function getLangs(samples) { + if (!Array.isArray(samples)) return []; + return samples.map((s) => s?.lang).filter(Boolean); +} + +function hasCurl(samples) { + return getLangs(samples).some((lang) => String(lang) === 'cURL'); +} + +// --- curl-check mode: fail if any route has no cURL sample +function runCurlCheck() { + const missing = []; + for (const { path, method, operation } of getOperations()) { + const samples = operation['x-codeSamples']; + if (!hasCurl(samples)) { + missing.push(`${method.toUpperCase()} ${path}`); + } + } + if (missing.length > 0) { + console.error('Routes missing a "cURL" code sample:\n'); + missing.forEach((r) => console.error(' -', r)); + process.exit(1); + } + console.log('OK: Every route includes a cURL code sample.'); +} + +// --- info mode: list all routes and missing code sample langs (never fail) +function runInfo() { + const allLangs = new Set(); + for (const { operation } of getOperations()) { + const samples = operation['x-codeSamples']; + if (Array.isArray(samples)) { + for (const s of samples) { + if (s?.lang) allLangs.add(String(s.lang)); + } + } + } + const sortedLangs = [...allLangs].sort(); + + const rows = []; + for (const { path, method, operation } of getOperations()) { + const samples = operation['x-codeSamples']; + const route = `${method.toUpperCase()} ${path}`; + if (!Array.isArray(samples) || samples.length === 0) { + rows.push({ + route, + missing: sortedLangs.length ? sortedLangs : [], + note: 'no x-codeSamples', + }); + continue; + } + const present = new Set(getLangs(samples)); + const missing = sortedLangs.filter((lang) => !present.has(lang)); + if (missing.length > 0) { + rows.push({ route, missing, note: null }); + } + } + + console.log('OpenAPI code samples – missing languages per route (informational only):\n'); + if (rows.length === 0) { + console.log('No routes with missing code samples.'); + return; + } + console.log('Reference languages in file:', sortedLangs.join(', ')); + console.log(''); + + // 1. Routes and their missing code samples + console.log('--- Routes and missing code samples ---\n'); + for (const { route, missing, note } of rows) { + if (note) { + console.log(`${route}`); + console.log(` → ${note}`); + } else { + console.log(`${route}`); + console.log(` → missing: ${missing.join(', ')}`); + } + } + + // 2. Routes missing per language + const routesByMissingLang = new Map(); + for (const lang of sortedLangs) { + routesByMissingLang.set(lang, []); + } + for (const { route, missing, note } of rows) { + for (const lang of missing) { + routesByMissingLang.get(lang).push(route); + } + } + console.log('\n--- Routes missing per language ---\n'); + for (const lang of sortedLangs) { + const routeList = routesByMissingLang.get(lang); + if (routeList.length === 0) continue; + console.log(`${lang}: ${routeList.length} examples missing`); + for (const r of routeList) { + console.log(` - ${r}`); + } + console.log(''); + } +} + +const mode = process.argv[2]; +if (mode === 'curl-check') { + runCurlCheck(); +} else if (mode === 'info') { + runInfo(); +} else { + console.error('Usage: check-openapi-code-samples.mjs [path-to-openapi]'); + process.exit(2); +} From de4ef1ee767790d8c79b3a47c9d2caf6e1c4d1d8 Mon Sep 17 00:00:00 2001 From: curquiza Date: Tue, 10 Feb 2026 14:04:11 +0100 Subject: [PATCH 23/45] Update script to pull code samples --- .github/workflows/post-deployment.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/post-deployment.yml b/.github/workflows/post-deployment.yml index acd63efd0..6ea5c9cf2 100644 --- a/.github/workflows/post-deployment.yml +++ b/.github/workflows/post-deployment.yml @@ -40,7 +40,11 @@ jobs: - name: Check for changes id: changes run: | - echo "has_changes=$(git diff --quiet snippets/ && echo "false" || echo "true")" >> "$GITHUB_ENV" + if git diff --quiet snippets/; then + echo "has_changes=false" >> "$GITHUB_ENV" + else + echo "has_changes=true" >> "$GITHUB_ENV" + fi - name: Commit changes run: | @@ -81,7 +85,11 @@ jobs: - name: Check for changes id: openapi_changes run: | - echo "has_changes=$(git diff --quiet assets/open-api/ && echo "false" || echo "true")" >> "$GITHUB_ENV" + if git diff --quiet assets/open-api/; then + echo "has_changes=false" >> "$GITHUB_ENV" + else + echo "has_changes=true" >> "$GITHUB_ENV" + fi - name: Commit changes run: | From f68e2313366aee7f5fb9887ef3ef494e1762bb8e Mon Sep 17 00:00:00 2001 From: curquiza Date: Tue, 10 Feb 2026 14:08:52 +0100 Subject: [PATCH 24/45] Add pull request template --- .github/PULL_REQUEST_TEMPLATE.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..9bed1fc03 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,13 @@ +## Description + + + +## Checklist + +For internal Meilisearch team member only: +- [ ] I checked and followed our [internal guidelines](https://www.notion.so/meilisearch/Updating-docs-for-engineers-3034b06b651f808da3c6c4f5e34914fc?source=copy_link) +- [ ] ⚠️ I updated the code samples according to our [internal guidelines](https://www.notion.so/meilisearch/Updating-docs-for-engineers-3034b06b651f808da3c6c4f5e34914fc?source=copy_link#3034b06b651f8026bd63cfa294dfa0c6) + +For external maintainers +- [ ] Did you use any AI tool while implementing this PR (code, tests, docs, etc.)? If yes, disclose it in the PR description and describe what it was used for. AI usage is allowed when it is disclosed. +- [ ] Have you made sure that the title is accurate and descriptive of the changes? From b88e4f79997bd9a38d2653d6f6b3f4f3758f8a16 Mon Sep 17 00:00:00 2001 From: curquiza Date: Tue, 10 Feb 2026 21:48:03 +0100 Subject: [PATCH 25/45] Add CI to check validity of SDK code samples for docs --- .github/workflows/sdk-code-samples-check.yml | 39 ++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/sdk-code-samples-check.yml diff --git a/.github/workflows/sdk-code-samples-check.yml b/.github/workflows/sdk-code-samples-check.yml new file mode 100644 index 000000000..e48c542e2 --- /dev/null +++ b/.github/workflows/sdk-code-samples-check.yml @@ -0,0 +1,39 @@ +# Runs daily and on workflow_dispatch. +# - Job 1: Fails if any SDK has code samples not present in the local .code-samples.meilisearch.yaml. +# - Job 2: Informational only (never fails) – lists local samples missing from each SDK. +name: Check SDK code samples for docs + +on: + workflow_dispatch: + schedule: + # Every day at 06:00 UTC + - cron: '0 6 * * *' + +jobs: + # Fails if an SDK's .code-samples.meilisearch.yaml contains keys absent from + # the local .code-samples.meilisearch.yaml (those SDK samples are useless). + unused-sdk-samples: + name: Unused code samples in SDKs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Install dependencies + run: npm ci + + - name: Check for unused SDK code samples + run: node scripts/check-unused-sdk-samples.mjs + + # Informational only – this job never fails. + # Lists local samples that are missing from each SDK. + missing-sdk-samples: + name: "[Info only - never fails] Missing SDK code samples" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Install dependencies + run: npm ci + + - name: List missing SDK code samples (informational, never fails) + run: node scripts/check-missing-sdk-samples.mjs From 9bd6bacee7027dd0d88b35f89b4ec8d564041b25 Mon Sep 17 00:00:00 2001 From: curquiza Date: Tue, 10 Feb 2026 22:16:30 +0100 Subject: [PATCH 26/45] Update code samples CI --- .github/workflows/sdk-code-samples-check.yml | 39 -------------------- 1 file changed, 39 deletions(-) delete mode 100644 .github/workflows/sdk-code-samples-check.yml diff --git a/.github/workflows/sdk-code-samples-check.yml b/.github/workflows/sdk-code-samples-check.yml deleted file mode 100644 index e48c542e2..000000000 --- a/.github/workflows/sdk-code-samples-check.yml +++ /dev/null @@ -1,39 +0,0 @@ -# Runs daily and on workflow_dispatch. -# - Job 1: Fails if any SDK has code samples not present in the local .code-samples.meilisearch.yaml. -# - Job 2: Informational only (never fails) – lists local samples missing from each SDK. -name: Check SDK code samples for docs - -on: - workflow_dispatch: - schedule: - # Every day at 06:00 UTC - - cron: '0 6 * * *' - -jobs: - # Fails if an SDK's .code-samples.meilisearch.yaml contains keys absent from - # the local .code-samples.meilisearch.yaml (those SDK samples are useless). - unused-sdk-samples: - name: Unused code samples in SDKs - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Install dependencies - run: npm ci - - - name: Check for unused SDK code samples - run: node scripts/check-unused-sdk-samples.mjs - - # Informational only – this job never fails. - # Lists local samples that are missing from each SDK. - missing-sdk-samples: - name: "[Info only - never fails] Missing SDK code samples" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Install dependencies - run: npm ci - - - name: List missing SDK code samples (informational, never fails) - run: node scripts/check-missing-sdk-samples.mjs From d0649074b03ac4f1fe2106da9f9820f5b5c412f0 Mon Sep 17 00:00:00 2001 From: curquiza Date: Tue, 10 Feb 2026 22:54:42 +0100 Subject: [PATCH 27/45] Add missing assets --- .../meilisearch-openapi-mintlify.json | 3246 ++-- assets/open-api/meilisearch-openapi.json | 15666 ++++++++++++++++ 2 files changed, 17323 insertions(+), 1589 deletions(-) create mode 100644 assets/open-api/meilisearch-openapi.json diff --git a/assets/open-api/meilisearch-openapi-mintlify.json b/assets/open-api/meilisearch-openapi-mintlify.json index 89051f2c4..8158e2a66 100644 --- a/assets/open-api/meilisearch-openapi-mintlify.json +++ b/assets/open-api/meilisearch-openapi-mintlify.json @@ -15,7 +15,7 @@ }, "servers": [ { - "url": "http://localhost:7700", + "url": "/", "description": "Local server" } ], @@ -23,16 +23,16 @@ "/batches": { "get": { "tags": [ - "Async task management" + "Batches" ], - "summary": "List batches", - "description": "The `/batches` route gives information about the progress of batches of [asynchronous operations](/learn/async/asynchronous_operations).\n\nBatches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first. Batch results are paginated and can be filtered with query parameters.", + "summary": "Get batches", + "description": "List all batches, regardless of index. The batch objects are contained in\nthe results array. Batches are always returned in descending order of uid.\nThis means that by default, the most recently created batch objects appear\nfirst. Batch results are paginated and can be filtered with query\nparameters.", "operationId": "get_batches", "parameters": [ { "name": "limit", "in": "query", - "description": "Maximum number of batches to return", + "description": "Maximum number of results to return.", "required": false, "schema": { "type": "integer", @@ -45,7 +45,7 @@ { "name": "from", "in": "query", - "description": "`uid` of the first batch returned", + "description": "Fetch the next set of results from the given uid.", "required": false, "schema": { "type": "integer", @@ -57,7 +57,7 @@ { "name": "reverse", "in": "query", - "description": "If `true`, returns results in the reverse order, from oldest to most recent", + "description": "The order you want to retrieve the objects.", "required": false, "schema": { "type": "boolean" @@ -259,10 +259,10 @@ "finishedAt": "2024-12-10T15:49:05.105404Z" } ], - "total": 1, - "limit": 20, - "from": 1, - "next": null + "total": 3, + "limit": 1, + "from": 2, + "next": 1 } } } @@ -295,8 +295,8 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches'" + "lang": "Go", + "source": "client.GetBatches();" }, { "lang": "JS", @@ -314,13 +314,13 @@ "lang": "Ruby", "source": "client.batches" }, - { - "lang": "Go", - "source": "client.GetBatches();" - }, { "lang": "Rust", "source": "let mut query = meilisearch_sdk::batches::BatchesQuery::new(&client);\nquery.with_limit(20);\nlet batches: meilisearch_sdk::batches::BatchesResults =\n client.get_batches_with(&query).await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches'" } ] } @@ -328,10 +328,10 @@ "/batches/{batchUid}": { "get": { "tags": [ - "Async task management" + "Batches" ], - "summary": "Get batch", - "description": "Get a single batch by its unique identifier.\n\nThe `/batches` route gives information about the progress of batches of [asynchronous operations](/learn/async/asynchronous_operations).", + "summary": "Get one batch", + "description": "Get a single batch.", "operationId": "get_batch", "parameters": [ { @@ -354,7 +354,7 @@ "$ref": "#/components/schemas/BatchView" }, "example": { - "uid": 0, + "uid": 1, "details": { "receivedDocuments": 1, "indexedDocuments": 1 @@ -408,8 +408,8 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches/BATCH_UID'" + "lang": "Go", + "source": "client.GetBatch(BATCH_UID);" }, { "lang": "JS", @@ -427,13 +427,13 @@ "lang": "Ruby", "source": "client.batch(BATCH_UID)" }, - { - "lang": "Go", - "source": "client.GetBatch(BATCH_UID);" - }, { "lang": "Rust", "source": "let uid: u32 = 42;\nlet batch: meilisearch_sdk::batches::Batch = client\n .get_batch(uid)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches/BATCH_UID'" } ] } @@ -441,9 +441,9 @@ "/dumps": { "post": { "tags": [ - "Backups" + "Dumps" ], - "summary": "Create dump", + "summary": "Create a dump", "description": "Triggers a dump creation process. Once the process is complete, a dump is created in the\n[dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory).\nIf the dump directory does not exist yet, it will be created.", "operationId": "create_dump", "responses": { @@ -492,48 +492,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/dumps'" + "lang": "C#", + "source": "await client.CreateDumpAsync();" }, { - "lang": "JS", - "source": "client.createDump()" + "lang": "Dart", + "source": "await client.createDump();" }, { - "lang": "PHP", - "source": "$client->createDump();" + "lang": "Go", + "source": "resp, err := client.CreateDump()" }, { - "lang": "Python", - "source": "client.create_dump()" + "lang": "JS", + "source": "client.createDump()" }, { "lang": "Java", "source": "client.createDump();" }, { - "lang": "Ruby", - "source": "client.create_dump" + "lang": "PHP", + "source": "$client->createDump();" }, { - "lang": "Go", - "source": "resp, err := client.CreateDump()" + "lang": "Python", + "source": "client.create_dump()" }, { - "lang": "C#", - "source": "await client.CreateDumpAsync();" + "lang": "Ruby", + "source": "client.create_dump" }, { "lang": "Rust", "source": "client\n .create_dump()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.createDump();" - }, { "lang": "Swift", "source": "client.createDump { result in\n switch result {\n case .success(let dumpStatus):\n print(dumpStatus)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/dumps'" } ] } @@ -543,7 +543,7 @@ "tags": [ "Experimental features" ], - "summary": "List experimental features", + "summary": "Get all experimental features", "description": "Get a list of all experimental features that can be activated via the\n/experimental-features route and whether or not they are currently\nactivated.", "operationId": "get_features", "responses": { @@ -597,20 +597,20 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/experimental-features/'" + "lang": "Go", + "source": "client.ExperimentalFeatures().Get()" }, { "lang": "Ruby", "source": "client.experimental_features" }, - { - "lang": "Go", - "source": "client.ExperimentalFeatures().Get()" - }, { "lang": "Rust", "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nlet res = features\n .get()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/experimental-features/'" } ] }, @@ -672,20 +672,20 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/experimental-features/' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"metrics\": true\n }'" + "lang": "Go", + "source": "client.ExperimentalFeatures().SetMetrics(true).Update()" }, { "lang": "Ruby", "source": "client.update_experimental_features(metrics: true)" }, - { - "lang": "Go", - "source": "client.ExperimentalFeatures().SetMetrics(true).Update()" - }, { "lang": "Rust", "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nfeatures.set_metrics(true)\nlet res = features\n .update()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/experimental-features/' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"metrics\": true\n }'" } ] } @@ -693,7 +693,7 @@ "/export": { "post": { "tags": [ - "Documents" + "Export" ], "summary": "Export to a remote Meilisearch", "description": "Triggers an export process to a remote Meilisearch instance. This allows you to send\ndocuments and settings from the current instance to another Meilisearch server.", @@ -751,13 +751,13 @@ } ], "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/export' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"TARGET_INSTANCE_URL\",\n \"indexes\": {\n \"*\": {\n \"overrideSettings\": true\n }\n }\n }'" - }, { "lang": "Java", "source": "Map indexes = new HashMap<>();\nindexes.put(\"*\", ExportIndexFilter.builder().overrideSettings(true).build());\nExportRequest request = ExportRequest.builder().url(\"TARGET_INSTANCE_URL\").indexes(indexes).build();\nclient.export(request);" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/export' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"TARGET_INSTANCE_URL\",\n \"indexes\": {\n \"*\": {\n \"overrideSettings\": true\n }\n }\n }'" } ] } @@ -767,7 +767,7 @@ "tags": [ "Health" ], - "summary": "Get health", + "summary": "Get Health", "description": "The health check endpoint enables you to periodically test the health of\nyour Meilisearch instance.", "operationId": "get_health", "responses": { @@ -787,19 +787,19 @@ }, "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/health'" + "lang": "C#", + "source": "await client.HealthAsync();" }, { - "lang": "JS", - "source": "client.health()" + "lang": "Dart", + "source": "await client.health();" }, { - "lang": "PHP", - "source": "$client->health();" + "lang": "Go", + "source": "client.Health()" }, { - "lang": "Python", + "lang": "JS", "source": "client.health()" }, { @@ -807,28 +807,28 @@ "source": "client.health();" }, { - "lang": "Ruby", - "source": "client.health" + "lang": "PHP", + "source": "$client->health();" }, { - "lang": "Go", - "source": "client.Health()" + "lang": "Python", + "source": "client.health()" }, { - "lang": "C#", - "source": "await client.HealthAsync();" + "lang": "Ruby", + "source": "client.health" }, { "lang": "Rust", "source": "// health() return an Err() if the server is not healthy, so this example would panic due to the unwrap\nclient\n .health()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.health();" - }, { "lang": "Swift", "source": "client.health { (result) in\n switch result {\n case .success:\n print(\"Healthy!\")\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/health'" } ] } @@ -918,48 +918,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes?limit=3'" + "lang": "C#", + "source": "await client.GetAllIndexesAsync(new IndexesQuery { Limit = 3 });" }, { - "lang": "JS", - "source": "client.getIndexes({ limit: 3 })" + "lang": "Dart", + "source": "await client.getIndexes(params: IndexesQuery(limit: 3));" }, { - "lang": "PHP", - "source": "$client->getIndexes((new IndexesQuery())->setLimit(3));" + "lang": "Go", + "source": "client.GetIndexes(&meilisearch.IndexesQuery{\n Limit: 3,\n})" }, { - "lang": "Python", - "source": "client.get_indexes({'limit': 3})" + "lang": "JS", + "source": "client.getIndexes({ limit: 3 })" }, { "lang": "Java", "source": "IndexesQuery query = new IndexesQuery().setLimit(3);\nclient.getIndexes(query);" }, { - "lang": "Ruby", - "source": "client.indexes(limit: 3)" + "lang": "PHP", + "source": "$client->getIndexes((new IndexesQuery())->setLimit(3));" }, { - "lang": "Go", - "source": "client.GetIndexes(&meilisearch.IndexesQuery{\n Limit: 3,\n})" + "lang": "Python", + "source": "client.get_indexes({'limit': 3})" }, { - "lang": "C#", - "source": "await client.GetAllIndexesAsync(new IndexesQuery { Limit = 3 });" + "lang": "Ruby", + "source": "client.indexes(limit: 3)" }, { "lang": "Rust", "source": "let mut indexes = IndexesQuery::new(&client)\n .with_limit(3)\n .execute()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.getIndexes(params: IndexesQuery(limit: 3));" - }, { "lang": "Swift", "source": "client.getIndexes { (result) in\n switch result {\n case .success(let indexes):\n print(indexes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes?limit=3'" } ] }, @@ -1026,48 +1026,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"uid\": \"movies\",\n \"primaryKey\": \"id\"\n }'" + "lang": "C#", + "source": "TaskInfo task = await client.CreateIndexAsync(\"movies\", \"id\");" }, { - "lang": "JS", - "source": "client.createIndex('movies', { primaryKey: 'id' })" + "lang": "Dart", + "source": "await client.createIndex('movies', primaryKey: 'id');" }, { - "lang": "PHP", - "source": "$client->createIndex('movies', ['primaryKey' => 'id']);" + "lang": "Go", + "source": "client.CreateIndex(&meilisearch.IndexConfig{\n Uid: \"movies\",\n PrimaryKey: \"id\",\n})" }, { - "lang": "Python", - "source": "client.create_index('movies', {'primaryKey': 'id'})" + "lang": "JS", + "source": "client.createIndex('movies', { primaryKey: 'id' })" }, { "lang": "Java", "source": "client.createIndex(\"movies\", \"id\");" }, { - "lang": "Ruby", - "source": "client.create_index('movies', primary_key: 'id')" + "lang": "PHP", + "source": "$client->createIndex('movies', ['primaryKey' => 'id']);" }, { - "lang": "Go", - "source": "client.CreateIndex(&meilisearch.IndexConfig{\n Uid: \"movies\",\n PrimaryKey: \"id\",\n})" + "lang": "Python", + "source": "client.create_index('movies', {'primaryKey': 'id'})" }, { - "lang": "C#", - "source": "TaskInfo task = await client.CreateIndexAsync(\"movies\", \"id\");" + "lang": "Ruby", + "source": "client.create_index('movies', primary_key: 'id')" }, { "lang": "Rust", "source": "client.create_index(\"movies\", Some(\"id\"))\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.createIndex('movies', primaryKey: 'id');" - }, { "lang": "Swift", "source": "client.createIndex(uid: \"movies\", primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"uid\": \"movies\",\n \"primaryKey\": \"id\"\n }'" } ] } @@ -1153,48 +1153,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies'" + "lang": "C#", + "source": "await client.GetIndexAsync(\"movies\");" }, { - "lang": "JS", - "source": "client.index('movies').getRawInfo()" + "lang": "Dart", + "source": "await client.getIndex('movies');" }, { - "lang": "PHP", - "source": "$client->index('movies')->fetchRawInfo();" + "lang": "Go", + "source": "client.GetIndex(\"movies\")" }, { - "lang": "Python", - "source": "client.get_index('movies')" + "lang": "JS", + "source": "client.index('movies').getRawInfo()" }, { "lang": "Java", "source": "client.getIndex(\"movies\");" }, { - "lang": "Ruby", - "source": "client.fetch_index('movies')" + "lang": "PHP", + "source": "$client->index('movies')->fetchRawInfo();" }, { - "lang": "Go", - "source": "client.GetIndex(\"movies\")" + "lang": "Python", + "source": "client.get_index('movies')" }, { - "lang": "C#", - "source": "await client.GetIndexAsync(\"movies\");" + "lang": "Ruby", + "source": "client.fetch_index('movies')" }, { "lang": "Rust", "source": "let movies: Index = client\n .get_index(\"movies\")\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.getIndex('movies');" - }, { "lang": "Swift", "source": "client.getIndex(\"movies\") { (result) in\n switch result {\n case .success(let index):\n print(index)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies'" } ] }, @@ -1263,13 +1263,25 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies'" + "lang": "C#", + "source": "await client.DeleteIndexAsync(\"movies\");" + }, + { + "lang": "Dart", + "source": "await client.index('movies').delete();\nt_one_document_1: \"await client.index('movies').getDocument(25684,\\n fields: ['id', 'title', 'poster', 'release_date']);\"" + }, + { + "lang": "Go", + "source": "client.DeleteIndex(\"movies\")\n// OR\nclient.Index(\"movies\").Delete()" }, { "lang": "JS", "source": "client.deleteIndex('movies')" }, + { + "lang": "Java", + "source": "client.deleteIndex(\"movies\");" + }, { "lang": "PHP", "source": "$client->deleteIndex('movies');" @@ -1278,33 +1290,21 @@ "lang": "Python", "source": "client.delete_index('movies')\n// OR\nclient.index('movies').delete()" }, - { - "lang": "Java", - "source": "client.deleteIndex(\"movies\");" - }, { "lang": "Ruby", "source": "client.delete_index('movies')" }, - { - "lang": "Go", - "source": "client.DeleteIndex(\"movies\")\n// OR\nclient.Index(\"movies\").Delete()" - }, - { - "lang": "C#", - "source": "await client.DeleteIndexAsync(\"movies\");" - }, { "lang": "Rust", "source": "client.index(\"movies\")\n .delete()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('movies').delete();\nt_one_document_1: \"await client.index('movies').getDocument(25684,\\n fields: ['id', 'title', 'poster', 'release_date']);\"" - }, { "lang": "Swift", "source": "client.index(\"movies\").delete { (result) in\n switch result {\n case .success:\n print(\"Index deleted\")\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies'" } ] }, @@ -1383,48 +1383,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"primaryKey\": \"id\" }'" + "lang": "C#", + "source": "TaskInfo task = await client.UpdateIndexAsync(\"movies\", \"id\");" }, { - "lang": "JS", - "source": "client.updateIndex('movies', { primaryKey: 'id' })" + "lang": "Dart", + "source": "await client.index('movies').update(primaryKey: 'id');" }, { - "lang": "PHP", - "source": "$client->updateIndex('movies', ['primaryKey' => 'id']);" + "lang": "Go", + "source": "client.Index(\"movies\").UpdateIndex(&meilisearch.UpdateIndexRequestParams{\n PrimaryKey: \"id\",\n})" }, { - "lang": "Python", - "source": "client.index('movies').update(primary_key='id')" + "lang": "JS", + "source": "client.updateIndex('movies', { primaryKey: 'id' })" }, { "lang": "Java", "source": "client.updateIndex(\"movies\", \"id\");" }, { - "lang": "Ruby", - "source": "client.index('movies').update(primary_key: 'movie_id')" + "lang": "PHP", + "source": "$client->updateIndex('movies', ['primaryKey' => 'id']);" }, { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateIndex(&meilisearch.UpdateIndexRequestParams{\n PrimaryKey: \"id\",\n})" + "lang": "Python", + "source": "client.index('movies').update(primary_key='id')" }, { - "lang": "C#", - "source": "TaskInfo task = await client.UpdateIndexAsync(\"movies\", \"id\");" + "lang": "Ruby", + "source": "client.index('movies').update(primary_key: 'movie_id')" }, { "lang": "Rust", "source": "let task = IndexUpdater::new(\"movies\", &client)\n .with_primary_key(\"movie_review_id\")\n .execute()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('movies').update(primaryKey: 'id');" - }, { "lang": "Swift", "source": "client.index(\"movies\").update(primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"primaryKey\": \"id\" }'" } ] } @@ -1432,9 +1432,9 @@ "/indexes/{indexUid}/compact": { "post": { "tags": [ - "Indexes" + "Compact an index" ], - "summary": "Compact index", + "summary": "Compact an index", "description": "Triggers a compaction process on the specified index. Compaction reorganizes the index database to make it smaller and more efficient.", "operationId": "compact", "parameters": [ @@ -1494,17 +1494,13 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_UID/compact'" + "lang": "Java", + "source": "client.index(\"INDEX_NAME\").compact();" }, { "lang": "Python", "source": "client.index('movies').compact()" }, - { - "lang": "Java", - "source": "client.index(\"INDEX_NAME\").compact();" - }, { "lang": "Ruby", "source": "client.index('INDEX_UID').compact" @@ -1512,6 +1508,10 @@ { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"INDEX_UID\")\n .compact()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_UID/compact'" } ] } @@ -1521,7 +1521,7 @@ "tags": [ "Documents" ], - "summary": "List documents with GET", + "summary": "Get documents", "description": "Get documents by batches.", "operationId": "get_documents", "parameters": [ @@ -1684,13 +1684,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents?limit=2&filter=genres=action'" + "lang": "C#", + "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() { Limit = 2, Filter = \"genres = action\" });" + }, + { + "lang": "Go", + "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"movies\").GetDocuments(&meilisearch.DocumentsQuery{\n Limit: 2,\n Filter: \"genres = action\",\n}, &result)" }, { "lang": "JS", "source": "client.index('movies').getDocuments({\n limit: 2,\n filter: 'genres = action',\n sort: ['release_date:desc']\n})" }, + { + "lang": "Java", + "source": "DocumentsQuery query = new DocumentsQuery().setLimit(2).setFilter(new String[] {\"genres = action\"});\nclient.index(\"movies\").getDocuments(query, TargetClassName.class);" + }, { "lang": "PHP", "source": "$client->index('movies')->getDocuments((new DocumentsQuery())->setFilter('genres = action')->setLimit(2));" @@ -1699,22 +1707,10 @@ "lang": "Python", "source": "client.index('movies').get_documents({\n 'limit':2, 'filter': 'genres=action',\n 'sort': ['rating:desc', 'release_date:asc'] # list format\n})" }, - { - "lang": "Java", - "source": "DocumentsQuery query = new DocumentsQuery().setLimit(2).setFilter(new String[] {\"genres = action\"});\nclient.index(\"movies\").getDocuments(query, TargetClassName.class);" - }, { "lang": "Ruby", "source": "client.index('movies').get_documents(limit: 2, filter: 'genres = action')" }, - { - "lang": "Go", - "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"movies\").GetDocuments(&meilisearch.DocumentsQuery{\n Limit: 2,\n Filter: \"genres = action\",\n}, &result)" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() { Limit = 2, Filter = \"genres = action\" });" - }, { "lang": "Rust", "source": "let index = client.index(\"movies\");\nlet documents: DocumentsResults = DocumentsQuery::new(&index)\n .with_filter(\"genres = action\")\n .with_limit(2)\n .execute::()\n .await\n .unwrap();" @@ -1722,6 +1718,10 @@ { "lang": "Swift", "source": "client.index(\"movies\").getDocuments(params: DocumentsQuery(limit: 2)) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let movies):\n print(movies)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents?limit=2&filter=genres=action'" } ] }, @@ -1839,13 +1839,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\"\n }\n ]'" + "lang": "C#", + "source": "var movie = new[]\n{\n new Movie { Id = \"287947\", Title = \"Shazam ⚡️\", Genres = \"comedy\" }\n};\nawait index.UpdateDocumentsAsync(movie);" + }, + { + "lang": "Go", + "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\",\n },\n}\noptions := &meilisearch.DocumentOptions{SkipCreation: true}\nclient.Index(\"movies\").UpdateDocuments(documents, options)" }, { "lang": "JS", "source": "client.index('movies').updateDocuments([{\n id: 287947,\n title: 'Shazam ⚡️',\n genres: 'comedy'\n}])" }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateDocuments(\"[{\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam ⚡️\\\",\"\n + \"\\\"genres\\\": \\\"comedy\\\"\"\n + \"}]\"\n);" + }, { "lang": "PHP", "source": "$client->index('movies')->updateDocuments([\n [\n 'id' => 287947,\n 'title' => 'Shazam ⚡️',\n 'genres' => 'comedy'\n ]\n]);" @@ -1854,22 +1862,10 @@ "lang": "Python", "source": "client.index('movies').update_documents([{\n 'id': 287947,\n 'title': 'Shazam ⚡️',\n 'genres': 'comedy'\n}], skip_creation=True)" }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateDocuments(\"[{\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam ⚡️\\\",\"\n + \"\\\"genres\\\": \\\"comedy\\\"\"\n + \"}]\"\n);" - }, { "lang": "Ruby", "source": "client.index('movies').update_documents([\n {\n id: 287947,\n title: 'Shazam ⚡️',\n genres: 'comedy'\n }\n])" }, - { - "lang": "Go", - "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\",\n },\n}\noptions := &meilisearch.DocumentOptions{SkipCreation: true}\nclient.Index(\"movies\").UpdateDocuments(documents, options)" - }, - { - "lang": "C#", - "source": "var movie = new[]\n{\n new Movie { Id = \"287947\", Title = \"Shazam ⚡️\", Genres = \"comedy\" }\n};\nawait index.UpdateDocumentsAsync(movie);" - }, { "lang": "Rust", "source": "// Define the type of our documents\n#[derive(Serialize, Deserialize)]\nstruct IncompleteMovie {\n id: usize,\n title: String,\n genres: String\n}\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .add_or_update(&[\n IncompleteMovie {\n id: 287947,\n title: \"Shazam ⚡️\".to_string(),\n genres: \"comedy\".to_string()\n }\n ], None)\n .await\n .unwrap();" @@ -1877,6 +1873,10 @@ { "lang": "Swift", "source": "let documentJsonString = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\"\n }\n]\n\"\"\"\nlet documents: Data = documentJsonString.data(using: .utf8)!\n\nclient.index(\"movies\").updateDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\"\n }\n ]'" } ] }, @@ -1994,48 +1994,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n ]'" + "lang": "C#", + "source": "var movie = new[]\n{\n new Movie\n {\n Id = \"287947\",\n Title = \"Shazam\",\n Poster = \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n Overview = \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n ReleaseDate = \"2019-03-23\"\n }\n};\nawait index.AddDocumentsAsync(movie);" }, { - "lang": "JS", - "source": "client.index('movies').addDocuments([{\n id: 287947,\n title: 'Shazam',\n poster: 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n overview: 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n release_date: '2019-03-23'\n}])" + "lang": "Dart", + "source": "await client.index('movies').addDocuments([\n {\n 'id': 287947,\n 'title': 'Shazam',\n 'poster':\n 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview':\n 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n }\n]);\nd_or_update_documents_1: \"await client.index('movies').updateDocuments([\\n {\\n 'id': 287947,\\n 'title': 'Shazam ⚡️',\\n 'genres': 'comedy',\\n }\\n]);\"" }, { - "lang": "PHP", - "source": "$client->index('movies')->addDocuments([\n [\n 'id' => 287947,\n 'title' => 'Shazam',\n 'poster' => 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview' => 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date' => '2019-03-23'\n ]\n]);" + "lang": "Go", + "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\",\n },\n}\noptions := &meilisearch.DocumentOptions{SkipCreation: false}\nclient.Index(\"movies\").AddDocuments(documents, options)" }, { - "lang": "Python", - "source": "client.index('movies').add_documents([{\n 'id': 287947,\n 'title': 'Shazam',\n 'poster': 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview': 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n}], skip_creation=True)" + "lang": "JS", + "source": "client.index('movies').addDocuments([{\n id: 287947,\n title: 'Shazam',\n poster: 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n overview: 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n release_date: '2019-03-23'\n}])" }, { "lang": "Java", "source": "client.index(\"movies\").addDocuments(\"[{\"\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam\\\",\"\n + \"\\\"poster\\\": \\\"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\\\",\"\n + \"\\\"overview\\\": \\\"A boy is given the ability to become an adult superhero in times of need with a single magic word.\\\",\"\n + \"\\\"release_date\\\": \\\"2019-03-23\\\"\"\n + \"}]\"\n);" }, { - "lang": "Ruby", - "source": "client.index('movies').add_documents([\n {\n id: 287947,\n title: 'Shazam',\n poster: 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n overview: 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n release_date: '2019-03-23'\n }\n])" + "lang": "PHP", + "source": "$client->index('movies')->addDocuments([\n [\n 'id' => 287947,\n 'title' => 'Shazam',\n 'poster' => 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview' => 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date' => '2019-03-23'\n ]\n]);" }, { - "lang": "Go", - "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\",\n },\n}\noptions := &meilisearch.DocumentOptions{SkipCreation: false}\nclient.Index(\"movies\").AddDocuments(documents, options)" + "lang": "Python", + "source": "client.index('movies').add_documents([{\n 'id': 287947,\n 'title': 'Shazam',\n 'poster': 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview': 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n}], skip_creation=True)" }, { - "lang": "C#", - "source": "var movie = new[]\n{\n new Movie\n {\n Id = \"287947\",\n Title = \"Shazam\",\n Poster = \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n Overview = \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n ReleaseDate = \"2019-03-23\"\n }\n};\nawait index.AddDocumentsAsync(movie);" + "lang": "Ruby", + "source": "client.index('movies').add_documents([\n {\n id: 287947,\n title: 'Shazam',\n poster: 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n overview: 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n release_date: '2019-03-23'\n }\n])" }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .add_or_replace(&[\n Movie {\n id: 287947,\n title: \"Shazam\".to_string(),\n poster: \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\".to_string(),\n overview: \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\".to_string(),\n release_date: \"2019-03-23\".to_string(),\n }\n ], None)\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('movies').addDocuments([\n {\n 'id': 287947,\n 'title': 'Shazam',\n 'poster':\n 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview':\n 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n }\n]);\nd_or_update_documents_1: \"await client.index('movies').updateDocuments([\\n {\\n 'id': 287947,\\n 'title': 'Shazam ⚡️',\\n 'genres': 'comedy',\\n }\\n]);\"" - }, { "lang": "Swift", "source": "let documentJsonString = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n]\n\"\"\"\nlet documents: Data = documentJsonString.data(using: .utf8)!\n\nclient.index(\"movies\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n ]'" } ] }, @@ -2104,48 +2104,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/documents'" + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteAllDocumentsAsync();" }, { - "lang": "JS", - "source": "client.index('movies').deleteAllDocuments()" + "lang": "Dart", + "source": "await client.index('movies').deleteAllDocuments();" }, { - "lang": "PHP", - "source": "$client->index('movies')->deleteAllDocuments();" + "lang": "Go", + "source": "client.Index(\"movies\").DeleteAllDocuments()" }, { - "lang": "Python", - "source": "client.index('movies').delete_all_documents()" + "lang": "JS", + "source": "client.index('movies').deleteAllDocuments()" }, { "lang": "Java", "source": "client.index(\"movies\").deleteAllDocuments();" }, { - "lang": "Ruby", - "source": "client.index('movies').delete_all_documents" + "lang": "PHP", + "source": "$client->index('movies')->deleteAllDocuments();" }, { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteAllDocuments()" + "lang": "Python", + "source": "client.index('movies').delete_all_documents()" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteAllDocumentsAsync();" + "lang": "Ruby", + "source": "client.index('movies').delete_all_documents" }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_all_documents()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('movies').deleteAllDocuments();" - }, { "lang": "Swift", "source": "client.index(\"movies\").deleteAllDocuments() { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/documents'" } ] } @@ -2226,13 +2226,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/movies/documents/delete \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"genres = action OR genres = adventure\"\n }'" + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new DeleteDocumentsQuery() { Filter = \"genres = action OR genres = adventure\" });" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").DeleteDocumentsByFilter(\"genres=action OR genres=adventure\")" }, { "lang": "JS", "source": "client.index('movies').deleteDocuments({\n filter: 'genres = action OR genres = adventure'\n})" }, + { + "lang": "Java", + "source": "String filter = \"genres = action OR genres = adventure\";\nclient.index(\"movies\").deleteDocumentsByFilter(filter);" + }, { "lang": "PHP", "source": "$client->index('movies')->deleteDocuments(['filter' => 'genres = action OR genres = adventure']);" @@ -2241,25 +2249,17 @@ "lang": "Python", "source": "client.index('movies').delete_documents(filter='genres=action OR genres=adventure')" }, - { - "lang": "Java", - "source": "String filter = \"genres = action OR genres = adventure\";\nclient.index(\"movies\").deleteDocumentsByFilter(filter);" - }, { "lang": "Ruby", "source": "client.index('movies').delete_documents(filter: 'genres = action OR genres = adventure')" }, - { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteDocumentsByFilter(\"genres=action OR genres=adventure\")" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new DeleteDocumentsQuery() { Filter = \"genres = action OR genres = adventure\" });" - }, { "lang": "Rust", "source": "let index = client.index(\"movies\");\nlet task = DocumentDeletionQuery::new(&index)\n .with_filter(\"genres = action OR genres = adventure\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/movies/documents/delete \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"genres = action OR genres = adventure\"\n }'" } ] } @@ -2341,13 +2341,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents/delete-batch' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n 23488,\n 153738,\n 437035,\n 363869\n ]'" + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new[] { \"23488\", \"153738\", \"437035\", \"363869\" });" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").DeleteDocuments([]string{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\",\n})" }, { "lang": "JS", "source": "client.index('movies').deleteDocuments([23488, 153738, 437035, 363869])" }, + { + "lang": "Java", + "source": "client.index(\"movies\").deleteDocuments(Arrays.asList(new String[]\n{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\"\n}));" + }, { "lang": "PHP", "source": "$client->index('movies')->deleteDocuments([23488, 153738, 437035, 363869]);" @@ -2356,25 +2364,17 @@ "lang": "Python", "source": "client.index('movies').delete_documents([23488, 153738, 437035, 363869])" }, - { - "lang": "Java", - "source": "client.index(\"movies\").deleteDocuments(Arrays.asList(new String[]\n{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\"\n}));" - }, { "lang": "Ruby", "source": "client.index('movies').delete_documents([23488, 153738, 437035, 363869])" }, - { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteDocuments([]string{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\",\n})" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new[] { \"23488\", \"153738\", \"437035\", \"363869\" });" - }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_documents(&[23488, 153738, 437035, 363869])\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents/delete-batch' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n 23488,\n 153738,\n 437035,\n 363869\n ]'" } ] } @@ -2384,7 +2384,7 @@ "tags": [ "Documents" ], - "summary": "Edit documents by function", + "summary": "Edit documents by function.", "description": "Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to\nedit one or more documents directly in Meilisearch.", "operationId": "edit_documents_by_function", "parameters": [ @@ -2465,7 +2465,7 @@ "tags": [ "Documents" ], - "summary": "List documents with POST", + "summary": "Get documents with POST", "description": "Get a set of documents.", "operationId": "documents_by_query_post", "parameters": [ @@ -2556,13 +2556,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/books/documents/fetch \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n \"fields\": [\"title\", \"genres\", \"rating\", \"language\"],\n \"limit\": 3\n }'" - }, + "lang": "C#", + "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() {\n Limit = 3,\n Fields = new List { \"title\", \"genres\", \"rating\", \"language\"},\n Filter = \"(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English\"\n});" + }, + { + "lang": "Go", + "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"books\").GetDocuments(&meilisearch.DocumentsQuery{\n Fields: []string{\"title\", \"genres\", \"rating\", \"language\"},\n Filter: \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n}, &result)" + }, { "lang": "JS", "source": "client.index('books').getDocuments({\n filter: '(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English',\n fields: ['title', 'genres', 'rating', 'language'],\n limit: 3,\n sort: ['release_date:desc']\n})" }, + { + "lang": "Java", + "source": "DocumentsQuery query = new DocumentsQuery()\n .setFilter(new String[] {\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\"})\n .setFields(new String[] {\"title\", \"genres\", \"rating\", \"language\"})\n .setLimit(3);\nclient.index(\"books\").getDocuments(query, TargetClassName.class);" + }, { "lang": "PHP", "source": "$client->index('books')->getDocuments(\n (new DocumentsQuery())\n ->setFilter('(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English')\n ->setLimit(3)\n ->setFields(['title', 'genres', 'rating', 'language'])\n);" @@ -2571,25 +2579,17 @@ "lang": "Python", "source": "client.index('books').get_documents({\n 'limit':3,\n 'fields': ['title', 'genres', 'rating', 'language'],\n 'filter': '(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English',\n 'sort': 'rating:desc, title:asc' # comma-separated string format\n})" }, - { - "lang": "Java", - "source": "DocumentsQuery query = new DocumentsQuery()\n .setFilter(new String[] {\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\"})\n .setFields(new String[] {\"title\", \"genres\", \"rating\", \"language\"})\n .setLimit(3);\nclient.index(\"books\").getDocuments(query, TargetClassName.class);" - }, { "lang": "Ruby", "source": "client.index('books').get_documents(\n filter: '(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English',\n limit: 3,\n fields: ['title', 'genres', 'rating', 'language']\n)" }, - { - "lang": "Go", - "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"books\").GetDocuments(&meilisearch.DocumentsQuery{\n Fields: []string{\"title\", \"genres\", \"rating\", \"language\"},\n Filter: \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n}, &result)" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() {\n Limit = 3,\n Fields = new List { \"title\", \"genres\", \"rating\", \"language\"},\n Filter = \"(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English\"\n});" - }, { "lang": "Rust", "source": "let index = client.index(\"books\");\nlet documents: DocumentsResults = DocumentsQuery::new(&index)\n .with_filter(\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\")\n .with_fields([\"title\", \"genres\", \"rating\", \"language\"])\n .with_limit(2)\n .execute::()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/books/documents/fetch \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n \"fields\": [\"title\", \"genres\", \"rating\", \"language\"],\n \"limit\": 3\n }'" } ] } @@ -2599,7 +2599,7 @@ "tags": [ "Documents" ], - "summary": "Get document", + "summary": "Get one document", "description": "Get one document from its primary key.", "operationId": "get_document", "parameters": [ @@ -2705,13 +2705,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents/25684?fields=id,title,poster,release_date'" + "lang": "C#", + "source": "await client.Index(\"movies\").GetDocumentAsync(25684, new List { \"id\", \"title\", \"poster\", \"release_date\" });" + }, + { + "lang": "Go", + "source": "var a interface{}\nclient.Index(\"movies\").GetDocument(\"25684\",&meilisearch.DocumentQuery{\n Fields: []string{\"id\", \"title\", \"poster\", \"release_date\"},\n}, &a)" }, { "lang": "JS", "source": "client\n .index('movies')\n .getDocument(25684, { fields: ['id', 'title', 'poster', 'release_date'] })" }, + { + "lang": "Java", + "source": "DocumentQuery query = new DocumentQuery().setFields(new String[] {\"id\", \"title\", \"poster\", \"release_date\"});\nclient.index(\"movies\").getDocument(\"25684\", query);" + }, { "lang": "PHP", "source": "$client->index('movies')->getDocument(25684, ['id', 'title', 'poster', 'release_date']);" @@ -2720,22 +2728,10 @@ "lang": "Python", "source": "client.index('movies').get_document(25684, {\n 'fields': ['id', 'title', 'poster', 'release_date']\n})" }, - { - "lang": "Java", - "source": "DocumentQuery query = new DocumentQuery().setFields(new String[] {\"id\", \"title\", \"poster\", \"release_date\"});\nclient.index(\"movies\").getDocument(\"25684\", query);" - }, { "lang": "Ruby", "source": "client.index('movies').document(25684, fields: ['id', 'title', 'poster', 'release_date'])" }, - { - "lang": "Go", - "source": "var a interface{}\nclient.Index(\"movies\").GetDocument(\"25684\",&meilisearch.DocumentQuery{\n Fields: []string{\"id\", \"title\", \"poster\", \"release_date\"},\n}, &a)" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDocumentAsync(25684, new List { \"id\", \"title\", \"poster\", \"release_date\" });" - }, { "lang": "Rust", "source": "let index = client\n .index(\"movies\");\nlet document = DocumentQuery::new(&index)\n .with_fields([\"id\", \"title\", \"poster\", \"release_date\"])\n .execute::(\"25684\")\n .await\n .unwrap();" @@ -2743,6 +2739,10 @@ { "lang": "Swift", "source": "client.index(\"movies\").getDocument(25684) { (result: Result) in\n switch result {\n case .success(let movie):\n print(movie)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents/25684?fields=id,title,poster,release_date'" } ] }, @@ -2750,7 +2750,7 @@ "tags": [ "Documents" ], - "summary": "Delete document", + "summary": "Delete a document", "description": "Delete a single document by id.", "operationId": "delete_document", "parameters": [ @@ -2821,48 +2821,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/documents/25684'" + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteOneDocumentAsync(\"25684\");" }, { - "lang": "JS", - "source": "client.index('movies').deleteDocument(25684)" + "lang": "Dart", + "source": "await client.index('movies').deleteDocument(25684);\nlete_documents_by_batch_1: \"await client.index('movies').deleteDocuments(\\n DeleteDocumentsQuery(\\n ids: [23488, 153738, 437035, 363869],\\n ),\\n );\"" }, { - "lang": "PHP", - "source": "$client->index('movies')->deleteDocument(25684);" + "lang": "Go", + "source": "client.Index(\"movies\").DeleteDocument(\"25684\")" }, { - "lang": "Python", - "source": "client.index('movies').delete_document(25684)" + "lang": "JS", + "source": "client.index('movies').deleteDocument(25684)" }, { "lang": "Java", "source": "client.index(\"movies\").deleteDocument(\"25684\");" }, { - "lang": "Ruby", - "source": "client.index('movies').delete_document(25684)" + "lang": "PHP", + "source": "$client->index('movies')->deleteDocument(25684);" }, { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteDocument(\"25684\")" + "lang": "Python", + "source": "client.index('movies').delete_document(25684)" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteOneDocumentAsync(\"25684\");" + "lang": "Ruby", + "source": "client.index('movies').delete_document(25684)" }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_document(25684)\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('movies').deleteDocument(25684);\nlete_documents_by_batch_1: \"await client.index('movies').deleteDocuments(\\n DeleteDocumentsQuery(\\n ids: [23488, 153738, 437035, 363869],\\n ),\\n );\"" - }, { "lang": "Swift", "source": "client.index(\"movies\").deleteDocument(\"25684\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/documents/25684'" } ] } @@ -2872,7 +2872,7 @@ "tags": [ "Facet Search" ], - "summary": "Search in facets", + "summary": "Perform a facet search", "description": "Search for a facet value within a given facet.", "operationId": "search", "parameters": [ @@ -2974,13 +2974,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"facetQuery\": \"fiction\",\n \"facetName\": \"genres\",\n \"filter\": \"rating > 3\"\n }'" + "lang": "C#", + "source": "var query = new SearchFacetsQuery()\n{\n FacetQuery = \"fiction\",\n Filter = \"rating > 3\"\n};\nawait client.Index(\"books\").FacetSearchAsync(\"genres\", query);" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").FacetSearch(&meilisearch.FacetSearchRequest{\n FacetQuery: \"fiction\",\n FacetName: \"genres\",\n Filter: \"rating > 3\",\n})" }, { "lang": "JS", "source": "client.index('books').searchForFacetValues({\n facetQuery: 'fiction',\n facetName: 'genres'\n filter: 'rating > 3'\n})" }, + { + "lang": "Java", + "source": "FacetSearchRequest fsr = FacetSearchRequest.builder().facetName(\"genres\").facetQuery(\"fiction\").filter(new String[]{\"rating > 3\"}).build();\nclient.index(\"books\").facetSearch(fsr);" + }, { "lang": "PHP", "source": "$client->index('books')->facetSearch(\n (new FacetSearchQuery())\n ->setFacetQuery('fiction')\n ->setFacetName('genres')\n ->setFilter(['rating > 3'])\n);" @@ -2989,25 +2997,17 @@ "lang": "Python", "source": "client.index('books').facet_search('genres', 'fiction', {\n 'filter': 'rating > 3'\n})" }, - { - "lang": "Java", - "source": "FacetSearchRequest fsr = FacetSearchRequest.builder().facetName(\"genres\").facetQuery(\"fiction\").filter(new String[]{\"rating > 3\"}).build();\nclient.index(\"books\").facetSearch(fsr);" - }, { "lang": "Ruby", "source": "client.index('books').facet_search('genres', 'fiction', filter: 'rating > 3')" }, - { - "lang": "Go", - "source": "client.Index(\"books\").FacetSearch(&meilisearch.FacetSearchRequest{\n FacetQuery: \"fiction\",\n FacetName: \"genres\",\n Filter: \"rating > 3\",\n})" - }, - { - "lang": "C#", - "source": "var query = new SearchFacetsQuery()\n{\n FacetQuery = \"fiction\",\n Filter = \"rating > 3\"\n};\nawait client.Index(\"books\").FacetSearchAsync(\"genres\", query);" - }, { "lang": "Rust", "source": "let res = client.index(\"books\")\n .facet_search(\"genres\")\n .with_facet_query(\"fiction\")\n .with_filter(\"rating > 3\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"facetQuery\": \"fiction\",\n \"facetName\": \"genres\",\n \"filter\": \"rating > 3\"\n }'" } ] } @@ -3015,9 +3015,10 @@ "/indexes/{indexUid}/search": { "get": { "tags": [ + "Indexes", "Search" ], - "summary": "Search with GET", + "summary": "Search an index with GET", "description": "Search for documents matching a specific query in the given index.", "operationId": "search_with_url_query", "parameters": [ @@ -3419,18 +3420,19 @@ } ], "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/search?q=american%20ninja'" - }, { "lang": "JS", "source": "client.index('movies').searchGet('American ninja')" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/search?q=american%20ninja'" } ] }, "post": { "tags": [ + "Indexes", "Search" ], "summary": "Search with POST", @@ -3535,19 +3537,19 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"american ninja\" }'" + "lang": "C#", + "source": "await client.Index(\"movies\").SearchAsync(\"American ninja\");\nt_task_1: |\nTaskInfo task = await client.GetTaskAsync(1);\nt_all_tasks_1: |\nResourceResults taskResult = await client.GetTasksAsync();" }, { - "lang": "JS", - "source": "client.index('movies').search('American ninja')" + "lang": "Dart", + "source": "await client.index('movies').search('American ninja');" }, { - "lang": "PHP", - "source": "$client->index('movies')->search('american ninja');" + "lang": "Go", + "source": "client.Index(\"movies\").Search(\"american ninja\", &meilisearch.SearchRequest{})" }, { - "lang": "Python", + "lang": "JS", "source": "client.index('movies').search('American ninja')" }, { @@ -3555,28 +3557,28 @@ "source": "client.index(\"movies\").search(\"American ninja\");" }, { - "lang": "Ruby", - "source": "client.index('movies').search('american ninja')" + "lang": "PHP", + "source": "$client->index('movies')->search('american ninja');" }, { - "lang": "Go", - "source": "client.Index(\"movies\").Search(\"american ninja\", &meilisearch.SearchRequest{})" + "lang": "Python", + "source": "client.index('movies').search('American ninja')" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").SearchAsync(\"American ninja\");\nt_task_1: |\nTaskInfo task = await client.GetTaskAsync(1);\nt_all_tasks_1: |\nResourceResults taskResult = await client.GetTasksAsync();" + "lang": "Ruby", + "source": "client.index('movies').search('american ninja')" }, { "lang": "Rust", "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"american ninja\")\n .execute()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('movies').search('American ninja');" - }, { "lang": "Swift", "source": "let searchParameters = SearchParameters(query: \"American ninja\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"american ninja\" }'" } ] } @@ -3586,7 +3588,7 @@ "tags": [ "Settings" ], - "summary": "List settings", + "summary": "All settings", "description": "This route allows you to retrieve, configure, or reset all of an index's settings at once.", "operationId": "get_all", "parameters": [ @@ -3641,48 +3643,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings'" + "lang": "C#", + "source": "await client.Index(\"movies\").GetSettingsAsync();" }, { - "lang": "JS", - "source": "client.index('movies').getSettings()" + "lang": "Dart", + "source": "await client.index('movies').getSettings();\ndate_settings_1: \"await client.index('movies').updateSettings(\\n IndexSettings(\\n rankingRules: [\\n 'words',\\n 'typo',\\n 'proximity',\\n 'attribute',\\n 'sort',\\n 'exactness',\\n 'release_date:desc',\\n 'rank:desc'\\n ],\\n distinctAttribute: 'movie_id',\\n searchableAttributes: ['title', 'overview', 'genres'],\\n displayedAttributes: [\\n 'title',\\n 'overview',\\n 'genres',\\n 'release_date'\\n ],\\n stopWords: ['the', 'a', 'an'],\\n sortableAttributes: ['title', 'release_date'],\\n synonyms: {\\n 'wolverine': ['xmen', 'logan'],\\n 'logan': ['wolverine'],\\n },\\n ),\\n );\"" }, { - "lang": "PHP", - "source": "$client->index('movies')->getSettings();" + "lang": "Go", + "source": "client.Index(\"movies\").GetSettings()" }, { - "lang": "Python", - "source": "client.index('movies').get_settings()" + "lang": "JS", + "source": "client.index('movies').getSettings()" }, { "lang": "Java", "source": "client.index(\"movies\").getSettings();" }, { - "lang": "Ruby", - "source": "client.index('movies').settings" + "lang": "PHP", + "source": "$client->index('movies')->getSettings();" }, { - "lang": "Go", - "source": "client.Index(\"movies\").GetSettings()" + "lang": "Python", + "source": "client.index('movies').get_settings()" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSettingsAsync();" + "lang": "Ruby", + "source": "client.index('movies').settings" }, { "lang": "Rust", "source": "let settings: Settings = client\n .index(\"movies\")\n .get_settings()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('movies').getSettings();\ndate_settings_1: \"await client.index('movies').updateSettings(\\n IndexSettings(\\n rankingRules: [\\n 'words',\\n 'typo',\\n 'proximity',\\n 'attribute',\\n 'sort',\\n 'exactness',\\n 'release_date:desc',\\n 'rank:desc'\\n ],\\n distinctAttribute: 'movie_id',\\n searchableAttributes: ['title', 'overview', 'genres'],\\n displayedAttributes: [\\n 'title',\\n 'overview',\\n 'genres',\\n 'release_date'\\n ],\\n stopWords: ['the', 'a', 'an'],\\n sortableAttributes: ['title', 'release_date'],\\n synonyms: {\\n 'wolverine': ['xmen', 'logan'],\\n 'logan': ['wolverine'],\\n },\\n ),\\n );\"" - }, { "lang": "Swift", "source": "client.index(\"movies\").getSettings { (result) in\n switch result {\n case .success(let setting):\n print(setting)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings'" } ] }, @@ -3751,48 +3753,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings'" + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSettingsAsync();" }, { - "lang": "JS", - "source": "client.index('movies').resetSettings()" + "lang": "Dart", + "source": "await client.index('movies').resetSettings();" }, { - "lang": "PHP", - "source": "$client->index('movies')->resetSettings();" + "lang": "Go", + "source": "client.Index(\"movies\").ResetSettings()" }, { - "lang": "Python", - "source": "client.index('movies').reset_settings()" + "lang": "JS", + "source": "client.index('movies').resetSettings()" }, { "lang": "Java", "source": "client.index(\"movies\").resetSettings();" }, { - "lang": "Ruby", - "source": "client.index('movies').reset_settings" + "lang": "PHP", + "source": "$client->index('movies')->resetSettings();" }, { - "lang": "Go", - "source": "client.Index(\"movies\").ResetSettings()" + "lang": "Python", + "source": "client.index('movies').reset_settings()" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSettingsAsync();" + "lang": "Ruby", + "source": "client.index('movies').reset_settings" }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_settings()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('movies').resetSettings();" - }, { "lang": "Swift", "source": "client.index(\"movies\").resetSettings { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings'" } ] }, @@ -3871,13 +3873,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"rankingRules\": [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ],\n \"distinctAttribute\": \"movie_id\",\n \"searchableAttributes\": [\n \"title\",\n \"overview\",\n \"genres\"\n ],\n \"displayedAttributes\": [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ],\n \"stopWords\": [\n \"the\",\n \"a\",\n \"an\"\n ],\n \"sortableAttributes\": [\n \"title\",\n \"release_date\"\n ],\n \"synonyms\": {\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\"wolverine\"]\n },\n \"typoTolerance\": {\n \"minWordSizeForTypos\": {\n \"oneTypo\": 8,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n },\n \"pagination\": {\n \"maxTotalHits\": 5000\n },\n \"faceting\": {\n \"maxValuesPerFacet\": 200\n },\n \"searchCutoffMs\": 150\n }'" + "lang": "C#", + "source": "Settings newSettings = new Settings\n{\n RankingRules = new string[]\n {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n },\n DistinctAttribute = \"movie_id\",\n SearchableAttributes = new string[] { \"title\", \"overview\", \"genres\" },\n DisplayedAttributes = new string[] { \"title\", \"overview\", \"genres\", \"release_date\" },\n SortableAttributes = new string[] { \"title\", \"release_date\" },\n StopWords = new string[] { \"the\", \"a\", \"an\" },\n Synonyms = new Dictionary>\n {\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\" } },\n },\n FilterableAttributes = new string[] { },\n TypoTolerance = new TypoTolerance\n {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeForTypos = new TypoTolerance.TypoSize\n {\n OneTypo = 8,\n TwoTypos = 10\n }\n },\n SearchCutoffMs = 150\n};\nTaskInfo task = await client.Index(\"movies\").UpdateSettingsAsync(newFilters);" + }, + { + "lang": "Go", + "source": "distinctAttribute := \"movie_id\"\nsettings := meilisearch.Settings{\n RankingRules: []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\",\n },\n DistinctAttribute: &distinctAttribute,\n SearchableAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n },\n DisplayedAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n },\n StopWords: []string{\n \"the\",\n \"a\",\n \"an\",\n },\n SortableAttributes: []string{\n \"title\",\n \"release_date\",\n },\n Synonyms: map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\"},\n },\n TypoTolerance: &meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 8,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n },\n Pagination: &meilisearch.Pagination{\n MaxTotalHits: 5000,\n },\n Faceting: &meilisearch.Faceting{\n MaxValuesPerFacet: 200,\n },\n SearchCutoffMs: 150,\n}\nclient.Index(\"movies\").UpdateSettings(&settings)" }, { "lang": "JS", "source": "client.index('movies').updateSettings({\n rankingRules: [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n distinctAttribute: 'movie_id',\n searchableAttributes: [\n 'title',\n 'overview',\n 'genres'\n ],\n displayedAttributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n stopWords: [\n 'the',\n 'a',\n 'an'\n ],\n sortableAttributes: [\n 'title',\n 'release_date'\n ],\n synonyms: {\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine']\n },\n typoTolerance: {\n 'minWordSizeForTypos': {\n 'oneTypo': 8,\n 'twoTypos': 10\n },\n 'disableOnAttributes': [\n 'title'\n ]\n },\n pagination: {\n maxTotalHits: 5000\n },\n faceting: {\n maxValuesPerFacet: 200\n },\n searchCutoffMs: 150\n})" }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setRankingRules(\n new String[] {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n });\nsettings.setDistinctAttribute(\"movie_id\");\nsettings.setSearchableAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\"\n });\nsettings.setDisplayedAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n });\nsettings.setStopWords(\n new String[] {\n \"the\",\n \"a\",\n \"an\"\n });\nsettings.setSortableAttributes(\n new String[] {\n \"title\",\n \"release_date\"\n });\n\nHashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nsettings.setSynonyms(synonyms);\n\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 8);\n put(\"twoTypos\", 10);\n }\n };\nTypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\nsettings.setTypoTolerance(typoTolerance);\nsettings.setSearchCutoffMs(150);\nclient.index(\"movies\").updateSettings(settings);" + }, { "lang": "PHP", "source": "$client->index('movies')->updateSettings([\n 'rankingRules' => [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n 'distinctAttribute' => 'movie_id',\n 'searchableAttributes' => [\n 'title',\n 'overview',\n 'genres'\n ],\n 'displayedAttributes' => [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n 'stopWords' => [\n 'the',\n 'a',\n 'an'\n ],\n 'sortableAttributes' => [\n 'title',\n 'release_date'\n ],\n 'synonyms' => [\n 'wolverine' => ['xmen', 'logan'],\n 'logan' => ['wolverine']\n ],\n 'typoTolerance' => [\n 'minWordSizeForTypos' => [\n 'oneTypo' => 8,\n 'twoTypos' => 10\n ],\n 'disableOnAttributes' => ['title']\n ],\n 'pagination' => [\n 'maxTotalHits' => 5000\n ],\n 'faceting' => [\n 'maxValuesPerFacet' => 200\n ],\n 'searchCutoffMs' => 150\n]);" @@ -3886,29 +3896,21 @@ "lang": "Python", "source": "client.index('movies').update_settings({\n 'rankingRules': [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n 'distinctAttribute': 'movie_id',\n 'searchableAttributes': [\n 'title',\n 'overview',\n 'genres'\n ],\n 'displayedAttributes': [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n 'sortableAttributes': [\n 'title',\n 'release_date'\n ],\n 'stopWords': [\n 'the',\n 'a',\n 'an'\n ],\n 'synonyms': {\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine']\n },\n 'typoTolerance': {\n 'minWordSizeForTypos': {\n 'oneTypo': 8,\n 'twoTypos': 10\n },\n 'disableOnAttributes': ['title']\n },\n 'pagination': {\n 'maxTotalHits': 5000\n },\n 'faceting': {\n 'maxValuesPerFacet': 200\n },\n 'searchCutoffMs': 150\n})" }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setRankingRules(\n new String[] {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n });\nsettings.setDistinctAttribute(\"movie_id\");\nsettings.setSearchableAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\"\n });\nsettings.setDisplayedAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n });\nsettings.setStopWords(\n new String[] {\n \"the\",\n \"a\",\n \"an\"\n });\nsettings.setSortableAttributes(\n new String[] {\n \"title\",\n \"release_date\"\n });\n\nHashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nsettings.setSynonyms(synonyms);\n\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 8);\n put(\"twoTypos\", 10);\n }\n };\nTypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\nsettings.setTypoTolerance(typoTolerance);\nsettings.setSearchCutoffMs(150);\nclient.index(\"movies\").updateSettings(settings);" - }, { "lang": "Ruby", "source": "client.index('movies').update_settings({\n ranking_rules: [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n distinct_attribute: 'movie_id',\n searchable_attributes: [\n 'title',\n 'overview',\n 'genres'\n ],\n displayed_attributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n stop_words: [\n 'the',\n 'a',\n 'an'\n ],\n sortable_attributes: [\n 'title',\n 'release_date'\n ],\n synonyms: {\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine']\n },\n pagination: {\n max_total_hits: 5000\n },\n faceting: {\n max_values_per_facet: 200\n },\n search_cutoff_ms: 150\n})" }, { - "lang": "Go", - "source": "distinctAttribute := \"movie_id\"\nsettings := meilisearch.Settings{\n RankingRules: []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\",\n },\n DistinctAttribute: &distinctAttribute,\n SearchableAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n },\n DisplayedAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n },\n StopWords: []string{\n \"the\",\n \"a\",\n \"an\",\n },\n SortableAttributes: []string{\n \"title\",\n \"release_date\",\n },\n Synonyms: map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\"},\n },\n TypoTolerance: &meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 8,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n },\n Pagination: &meilisearch.Pagination{\n MaxTotalHits: 5000,\n },\n Faceting: &meilisearch.Faceting{\n MaxValuesPerFacet: 200,\n },\n SearchCutoffMs: 150,\n}\nclient.Index(\"movies\").UpdateSettings(&settings)" - }, - { - "lang": "C#", - "source": "Settings newSettings = new Settings\n{\n RankingRules = new string[]\n {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n },\n DistinctAttribute = \"movie_id\",\n SearchableAttributes = new string[] { \"title\", \"overview\", \"genres\" },\n DisplayedAttributes = new string[] { \"title\", \"overview\", \"genres\", \"release_date\" },\n SortableAttributes = new string[] { \"title\", \"release_date\" },\n StopWords = new string[] { \"the\", \"a\", \"an\" },\n Synonyms = new Dictionary>\n {\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\" } },\n },\n FilterableAttributes = new string[] { },\n TypoTolerance = new TypoTolerance\n {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeForTypos = new TypoTolerance.TypoSize\n {\n OneTypo = 8,\n TwoTypos = 10\n }\n },\n SearchCutoffMs = 150\n};\nTaskInfo task = await client.Index(\"movies\").UpdateSettingsAsync(newFilters);" - }, - { - "lang": "Rust", - "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"wolverine\"), vec![\"xmen\", \"logan\"]);\nsynonyms.insert(String::from(\"logan\"), vec![\"wolverine\"]);\n\nlet min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(4),\n two_typos; Some(12)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![\"title\".to_string()]),\n disable_on_words: Some(vec![])\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet settings = Settings::new()\n .with_ranking_rules([\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ])\n .with_distinct_attribute(Some(\"movie_id\"))\n .with_searchable_attributes([\n \"title\",\n \"overview\",\n \"genres\"\n ])\n .with_displayed_attributes([\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ])\n .with_stop_words([\n \"the\",\n \"a\",\n \"an\"\n ])\n .with_sortable_attributes([\n \"title\",\n \"release_date\"\n ])\n .with_synonyms(synonyms)\n .with_typo_tolerance(typo_tolerance)\n .with_search_cutoff(150);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_settings(&settings)\n .await\n .unwrap();" + "lang": "Rust", + "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"wolverine\"), vec![\"xmen\", \"logan\"]);\nsynonyms.insert(String::from(\"logan\"), vec![\"wolverine\"]);\n\nlet min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(4),\n two_typos; Some(12)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![\"title\".to_string()]),\n disable_on_words: Some(vec![])\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet settings = Settings::new()\n .with_ranking_rules([\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ])\n .with_distinct_attribute(Some(\"movie_id\"))\n .with_searchable_attributes([\n \"title\",\n \"overview\",\n \"genres\"\n ])\n .with_displayed_attributes([\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ])\n .with_stop_words([\n \"the\",\n \"a\",\n \"an\"\n ])\n .with_sortable_attributes([\n \"title\",\n \"release_date\"\n ])\n .with_synonyms(synonyms)\n .with_typo_tolerance(typo_tolerance)\n .with_search_cutoff(150);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_settings(&settings)\n .await\n .unwrap();" }, { "lang": "Swift", "source": "let settings = Setting(rankingRules: [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n], searchableAttributes: [\n \"title\",\n \"overview\",\n \"genres\"\n], displayedAttributes: [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n], stopWords: [\n \"the\",\n \"a\",\n \"an\"\n], synonyms: [\n \"wolverine\": [\"xmen\", \"logan\"],\n \"logan\": [\"wolverine\"]\n], distinctAttribute: \"movie_id\",\nsortableAttributes: [\n \"title\",\n \"release_date\"\n])\nclient.index(\"movies\").updateSettings(settings) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"rankingRules\": [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ],\n \"distinctAttribute\": \"movie_id\",\n \"searchableAttributes\": [\n \"title\",\n \"overview\",\n \"genres\"\n ],\n \"displayedAttributes\": [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ],\n \"stopWords\": [\n \"the\",\n \"a\",\n \"an\"\n ],\n \"sortableAttributes\": [\n \"title\",\n \"release_date\"\n ],\n \"synonyms\": {\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\"wolverine\"]\n },\n \"typoTolerance\": {\n \"minWordSizeForTypos\": {\n \"oneTypo\": 8,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n },\n \"pagination\": {\n \"maxTotalHits\": 5000\n },\n \"faceting\": {\n \"maxValuesPerFacet\": 200\n },\n \"searchCutoffMs\": 150\n }'" } ] } @@ -4203,13 +4205,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/dictionary'" + "lang": "C#", + "source": "var indexDictionary = await client.Index(\"books\").GetDictionaryAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetDictionary()" }, { "lang": "JS", "source": "client.index('books').getDictionary()" }, + { + "lang": "Java", + "source": "client.index(\"books\").getDictionarySettings();" + }, { "lang": "PHP", "source": "$client->index('books')->getDictionary();" @@ -4218,22 +4228,10 @@ "lang": "Python", "source": "client.index('books').get_dictionary()" }, - { - "lang": "Java", - "source": "client.index(\"books\").getDictionarySettings();" - }, { "lang": "Ruby", "source": "client.index('books').dictionary" }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetDictionary()" - }, - { - "lang": "C#", - "source": "var indexDictionary = await client.Index(\"books\").GetDictionaryAsync();" - }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('books')\n .get_dictionary()\n .await\n .unwrap();" @@ -4241,6 +4239,10 @@ { "lang": "Swift", "source": "client.index(\"books\").getDictionary { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/dictionary'" } ] }, @@ -4323,13 +4325,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/dictionary' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"J. R. R.\",\n \"W. E. B.\"\n ]'" + "lang": "C#", + "source": "var newDictionary = new string[] { \"J. R. R.\", \"W. E. B.\" };\nawait client.Index(\"books\").UpdateDictionaryAsync(newDictionary);" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateDictionary([]string{\n \"J. R. R.\",\n \"W. E. B.\",\n})" }, { "lang": "JS", "source": "client.index('books').updateDictionary(['J. R. R.', 'W. E. B.'])" }, + { + "lang": "Java", + "source": "client.index(\"books\").updateDictionarySettings(new String[] {\"J. R. R.\", \"W. E. B.\"});" + }, { "lang": "PHP", "source": "$client->index('books')->updateDictionary(['J. R. R.', 'W. E. B.']);" @@ -4338,22 +4348,10 @@ "lang": "Python", "source": "client.index('books').update_dictionary([\"J. R. R.\", \"W. E. B.\"])" }, - { - "lang": "Java", - "source": "client.index(\"books\").updateDictionarySettings(new String[] {\"J. R. R.\", \"W. E. B.\"});" - }, { "lang": "Ruby", "source": "client.index('books').update_dictionary(['J. R. R.', 'W. E. B.'])" }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateDictionary([]string{\n \"J. R. R.\",\n \"W. E. B.\",\n})" - }, - { - "lang": "C#", - "source": "var newDictionary = new string[] { \"J. R. R.\", \"W. E. B.\" };\nawait client.Index(\"books\").UpdateDictionaryAsync(newDictionary);" - }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('books')\n .set_dictionary(['J. R. R.', 'W. E. B.'])\n .await\n .unwrap();" @@ -4361,6 +4359,10 @@ { "lang": "Swift", "source": "client.index(\"books\").updateDictionary([\"J. R. R.\", \"W. E. B.\"]) { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/dictionary' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"J. R. R.\",\n \"W. E. B.\"\n ]'" } ] }, @@ -4443,13 +4445,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/dictionary'" + "lang": "C#", + "source": "await client.Index(\"books\").ResetDictionaryAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetDictionary()" }, { "lang": "JS", "source": "client.index('books').resetDictionary()" }, + { + "lang": "Java", + "source": "client.index(\"books\").resetDictionarySettings();" + }, { "lang": "PHP", "source": "$client->index('books')->resetDictionary();" @@ -4458,22 +4468,10 @@ "lang": "Python", "source": "client.index('books').reset_dictionary()" }, - { - "lang": "Java", - "source": "client.index(\"books\").resetDictionarySettings();" - }, { "lang": "Ruby", "source": "client.index('books').reset_dictionary" }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetDictionary()" - }, - { - "lang": "C#", - "source": "await client.Index(\"books\").ResetDictionaryAsync();" - }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('books')\n .reset_dictionary()\n .await\n .unwrap();" @@ -4481,6 +4479,10 @@ { "lang": "Swift", "source": "client.index(\"books\").resetDictionary { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/dictionary'" } ] } @@ -4548,48 +4550,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" + "lang": "C#", + "source": "await client.Index(\"movies\").GetDisplayedAttributesAsync();" }, { - "lang": "JS", - "source": "client.index('movies').getDisplayedAttributes()" + "lang": "Dart", + "source": "await client.index('movies').getDisplayedAttributes();\ndate_displayed_attributes_1: \"await client.index('movies').updateDisplayedAttributes([\\n 'title',\\n 'overview',\\n 'genres',\\n 'release_date',\\n]);\"" }, { - "lang": "PHP", - "source": "$client->index('movies')->getDisplayedAttributes();" + "lang": "Go", + "source": "client.Index(\"movies\").GetDisplayedAttributes()" }, { - "lang": "Python", - "source": "client.index('movies').get_displayed_attributes()" + "lang": "JS", + "source": "client.index('movies').getDisplayedAttributes()" }, { "lang": "Java", "source": "client.index(\"movies\").getDisplayedAttributesSettings();" }, { - "lang": "Ruby", - "source": "client.index('movies').get_displayed_attributes" + "lang": "PHP", + "source": "$client->index('movies')->getDisplayedAttributes();" }, { - "lang": "Go", - "source": "client.Index(\"movies\").GetDisplayedAttributes()" + "lang": "Python", + "source": "client.index('movies').get_displayed_attributes()" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDisplayedAttributesAsync();" + "lang": "Ruby", + "source": "client.index('movies').get_displayed_attributes" }, { "lang": "Rust", "source": "let displayed_attributes: Vec = client\n .index(\"movies\")\n .get_displayed_attributes()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('movies').getDisplayedAttributes();\ndate_displayed_attributes_1: \"await client.index('movies').updateDisplayedAttributes([\\n 'title',\\n 'overview',\\n 'genres',\\n 'release_date',\\n]);\"" - }, { "lang": "Swift", "source": "client.index(\"movies\").getDisplayedAttributes { (result) in\n switch result {\n case .success(let displayedAttributes):\n print(displayedAttributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" } ] }, @@ -4671,13 +4673,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ]'" + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateDisplayedAttributesAsync(new[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" + }, + { + "lang": "Go", + "source": "displayedAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n}\nclient.Index(\"movies\").UpdateDisplayedAttributes(&displayedAttributes)" }, { "lang": "JS", "source": "client.index('movies').updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateDisplayedAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" + }, { "lang": "PHP", "source": "$client->index('movies')->updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n]);" @@ -4686,22 +4696,10 @@ "lang": "Python", "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateDisplayedAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" - }, { "lang": "Ruby", "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" }, - { - "lang": "Go", - "source": "displayedAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n}\nclient.Index(\"movies\").UpdateDisplayedAttributes(&displayedAttributes)" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateDisplayedAttributesAsync(new[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" - }, { "lang": "Rust", "source": "let displayed_attributes = [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_displayed_attributes(&displayed_attributes)\n .await\n .unwrap();" @@ -4709,6 +4707,10 @@ { "lang": "Swift", "source": "let displayedAttributes: [String] = [\"title\", \"overview\", \"genres\", \"release_date\"]\nclient.index(\"movies\").updateDisplayedAttributes(displayedAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ]'" } ] }, @@ -4790,48 +4792,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" + "lang": "C#", + "source": "await client.Index(\"movies\").ResetDisplayedAttributesAsync();" }, { - "lang": "JS", - "source": "client.index('movies').resetDisplayedAttributes()" + "lang": "Dart", + "source": "await client.index('movies').resetDisplayedAttributes();" }, { - "lang": "PHP", - "source": "$client->index('movies')->resetDisplayedAttributes();" + "lang": "Go", + "source": "client.Index(\"movies\").ResetDisplayedAttributes()" }, { - "lang": "Python", - "source": "client.index('movies').reset_displayed_attributes()" + "lang": "JS", + "source": "client.index('movies').resetDisplayedAttributes()" }, { "lang": "Java", "source": "client.index(\"movies\").resetDisplayedAttributesSettings();" }, { - "lang": "Ruby", - "source": "client.index('movies').reset_displayed_attributes" + "lang": "PHP", + "source": "$client->index('movies')->resetDisplayedAttributes();" }, { - "lang": "Go", - "source": "client.Index(\"movies\").ResetDisplayedAttributes()" + "lang": "Python", + "source": "client.index('movies').reset_displayed_attributes()" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetDisplayedAttributesAsync();" + "lang": "Ruby", + "source": "client.index('movies').reset_displayed_attributes" }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_displayed_attributes()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('movies').resetDisplayedAttributes();" - }, { "lang": "Swift", "source": "client.index(\"movies\").resetDisplayedAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" } ] } @@ -4896,48 +4898,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" + "lang": "C#", + "source": "string result = await client.Index(\"shoes\").GetDistinctAttributeAsync();" }, { - "lang": "JS", - "source": "client.index('shoes').getDistinctAttribute()" + "lang": "Dart", + "source": "await client.index('shoes').getDistinctAttribute();" }, { - "lang": "PHP", - "source": "$client->index('shoes')->getDistinctAttribute();" + "lang": "Go", + "source": "client.Index(\"shoes\").GetDistinctAttribute()" }, { - "lang": "Python", - "source": "client.index('shoes').get_distinct_attribute()" + "lang": "JS", + "source": "client.index('shoes').getDistinctAttribute()" }, { "lang": "Java", "source": "client.index(\"shoes\").getDistinctAttributeSettings();" }, { - "lang": "Ruby", - "source": "client.index('shoes').distinct_attribute" + "lang": "PHP", + "source": "$client->index('shoes')->getDistinctAttribute();" }, { - "lang": "Go", - "source": "client.Index(\"shoes\").GetDistinctAttribute()" + "lang": "Python", + "source": "client.index('shoes').get_distinct_attribute()" }, { - "lang": "C#", - "source": "string result = await client.Index(\"shoes\").GetDistinctAttributeAsync();" + "lang": "Ruby", + "source": "client.index('shoes').distinct_attribute" }, { "lang": "Rust", "source": "let distinct_attribute: Option = client\n .index(\"shoes\")\n .get_distinct_attribute()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('shoes').getDistinctAttribute();" - }, { "lang": "Swift", "source": "client.index(\"shoes\").getDistinctAttribute { (result) in\n switch result {\n case .success(let distinctAttribute):\n print(distinctAttribute)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" } ] }, @@ -5016,13 +5018,25 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"skuid\"'" + "lang": "C#", + "source": "TaskInfo result = await client.Index(\"shoes\").UpdateDistinctAttributeAsync(\"skuid\");" + }, + { + "lang": "Dart", + "source": "await client.index('shoes').updateDistinctAttribute('skuid');" + }, + { + "lang": "Go", + "source": "client.Index(\"shoes\").UpdateDistinctAttribute(\"skuid\")" }, { "lang": "JS", "source": "client.index('shoes').updateDistinctAttribute('skuid')" }, + { + "lang": "Java", + "source": "client.index(\"shoes\").updateDistinctAttributeSettings(\"skuid\");" + }, { "lang": "PHP", "source": "$client->index('shoes')->updateDistinctAttribute('skuid');" @@ -5031,33 +5045,21 @@ "lang": "Python", "source": "client.index('shoes').update_distinct_attribute('skuid')" }, - { - "lang": "Java", - "source": "client.index(\"shoes\").updateDistinctAttributeSettings(\"skuid\");" - }, { "lang": "Ruby", "source": "client.index('shoes').update_distinct_attribute('skuid')" }, { - "lang": "Go", - "source": "client.Index(\"shoes\").UpdateDistinctAttribute(\"skuid\")" - }, - { - "lang": "C#", - "source": "TaskInfo result = await client.Index(\"shoes\").UpdateDistinctAttributeAsync(\"skuid\");" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"shoes\")\n .set_distinct_attribute(\"skuid\")\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('shoes').updateDistinctAttribute('skuid');" + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"shoes\")\n .set_distinct_attribute(\"skuid\")\n .await\n .unwrap();" }, { "lang": "Swift", "source": "client.index(\"shoes\").updateDistinctAttribute(\"skuid\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"skuid\"'" } ] }, @@ -5136,48 +5138,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" + "lang": "C#", + "source": "TaskInfo result = await client.Index(\"shoes\").ResetDistinctAttributeAsync();" }, { - "lang": "JS", - "source": "client.index('shoes').resetDistinctAttribute()" + "lang": "Dart", + "source": "await client.index('shoes').resetDistinctAttribute();" }, { - "lang": "PHP", - "source": "$client->index('shoes')->resetDistinctAttribute();" + "lang": "Go", + "source": "client.Index(\"shoes\").ResetDistinctAttribute()" }, { - "lang": "Python", - "source": "client.index('shoes').reset_distinct_attribute()" + "lang": "JS", + "source": "client.index('shoes').resetDistinctAttribute()" }, { "lang": "Java", "source": "client.index(\"shoes\").resetDistinctAttributeSettings();" }, { - "lang": "Ruby", - "source": "client.index('shoes').reset_distinct_attribute" + "lang": "PHP", + "source": "$client->index('shoes')->resetDistinctAttribute();" }, { - "lang": "Go", - "source": "client.Index(\"shoes\").ResetDistinctAttribute()" + "lang": "Python", + "source": "client.index('shoes').reset_distinct_attribute()" }, { - "lang": "C#", - "source": "TaskInfo result = await client.Index(\"shoes\").ResetDistinctAttributeAsync();" + "lang": "Ruby", + "source": "client.index('shoes').reset_distinct_attribute" }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"shoes\")\n .reset_distinct_attribute()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('shoes').resetDistinctAttribute();" - }, { "lang": "Swift", "source": "client.index(\"shoes\").resetDistinctAttribute { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" } ] } @@ -5247,10 +5249,6 @@ } ], "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" - }, { "lang": "Ruby", "source": "client.index('INDEX_NAME').embedders" @@ -5258,6 +5256,10 @@ { "lang": "Rust", "source": "let embedders = index.get_embedders().await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" } ] }, @@ -5341,10 +5343,6 @@ } ], "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" - }, { "lang": "Ruby", "source": "client.index('INDEX_NAME').reset_embedders" @@ -5352,6 +5350,10 @@ { "lang": "Rust", "source": "index.reset_embedders().await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" } ] }, @@ -5435,10 +5437,6 @@ } ], "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"default\": {\n \"source\": \"openAi\",\n \"apiKey\": \"OPEN_AI_API_KEY\",\n \"model\": \"text-embedding-3-small\",\n \"documentTemplate\": \"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\"\n }\n }'" - }, { "lang": "JS", "source": "client.index('INDEX_NAME').updateEmbedders({\n default: {\n source: 'openAi',\n apiKey: 'OPEN_AI_API_KEY',\n model: 'text-embedding-3-small',\n documentTemplate: 'A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}'\n }\n});" @@ -5454,6 +5452,10 @@ { "lang": "Rust", "source": "let embedders = HashMap::from([(\n String::from(\"default\"),\n Embedder {\n source: EmbedderSource::OpenAi,\n api_key: Some(String::from(\"OPEN_AI_API_KEY\")),\n model: Some(String::from(\"text-embedding-3-small\")),\n document_template: Some(String::from(\"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\")),\n ..Embedder::default()\n }\n)]);\nlet task = index\n .set_embedders(&embedders)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"default\": {\n \"source\": \"openAi\",\n \"apiKey\": \"OPEN_AI_API_KEY\",\n \"model\": \"text-embedding-3-small\",\n \"documentTemplate\": \"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\"\n }\n }'" } ] } @@ -5518,8 +5520,8 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" + "lang": "Go", + "source": "client.Index(\"books\").GetFacetSearch()" }, { "lang": "JS", @@ -5537,13 +5539,13 @@ "lang": "Ruby", "source": "client.index('INDEX_UID').facet_search_setting" }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetFacetSearch()" - }, { "lang": "Rust", "source": "let facet_search: bool = client\n .index(INDEX_UID)\n .get_facet_search()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" } ] }, @@ -5622,8 +5624,8 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary 'false'" + "lang": "Go", + "source": "client.Index(\"books\").UpdateFacetSearch(false)" }, { "lang": "JS", @@ -5641,13 +5643,13 @@ "lang": "Ruby", "source": "client.index('INDEX_UID').update_facet_search_setting(false)" }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateFacetSearch(false)" - }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_facet_search(false)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary 'false'" } ] }, @@ -5726,8 +5728,8 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" + "lang": "Go", + "source": "client.Index(\"books\").ResetFacetSearch()" }, { "lang": "JS", @@ -5745,13 +5747,13 @@ "lang": "Ruby", "source": "client.index('INDEX_UID').reset_facet_search_setting" }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetFacetSearch()" - }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_facet_search()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" } ] } @@ -5816,44 +5818,44 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/faceting'" + "lang": "C#", + "source": "await client.Index(\"movies\").GetFacetingAsync();" }, { - "lang": "JS", - "source": "client.index('books').getFaceting()" + "lang": "Dart", + "source": "await client.index('movies').getFaceting();\ndate_faceting_settings_1: \"await client.index('books').updateFaceting(Faceting(\\n maxValuesPerFacet: 2,\\n sortFacetValuesBy: {\\n '*': FacetingSortTypes.alpha,\\n 'genres': FacetingSortTypes.count\\n }));\"" }, { - "lang": "PHP", - "source": "$client->index('books')->getFaceting();" + "lang": "Go", + "source": "client.Index(\"books\").GetFaceting()" }, { - "lang": "Python", - "source": "client.index('books').get_faceting_settings()" + "lang": "JS", + "source": "client.index('books').getFaceting()" }, { "lang": "Java", "source": "client.index(\"books\").getFacetingSettings();" }, { - "lang": "Ruby", - "source": "client.index('books').faceting" + "lang": "PHP", + "source": "$client->index('books')->getFaceting();" }, { - "lang": "Go", - "source": "client.Index(\"books\").GetFaceting()" + "lang": "Python", + "source": "client.index('books').get_faceting_settings()" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").GetFacetingAsync();" + "lang": "Ruby", + "source": "client.index('books').faceting" }, { "lang": "Rust", "source": "let faceting: FacetingSettings = client\n .index(\"books\")\n .get_faceting()\n .await\n .unwrap();" }, { - "lang": "Dart", - "source": "await client.index('movies').getFaceting();\ndate_faceting_settings_1: \"await client.index('books').updateFaceting(Faceting(\\n maxValuesPerFacet: 2,\\n sortFacetValuesBy: {\\n '*': FacetingSortTypes.alpha,\\n 'genres': FacetingSortTypes.count\\n }));\"" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/faceting'" } ] }, @@ -5932,44 +5934,44 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/faceting'" + "lang": "C#", + "source": "await client.Index(\"movies\").ResetFacetingAsync();" }, { - "lang": "JS", - "source": "client.index('books').resetFaceting()" + "lang": "Dart", + "source": "await client.index('movies').resetFaceting();" }, { - "lang": "PHP", - "source": "$client->index('books')->resetFaceting();" + "lang": "Go", + "source": "client.Index(\"books\").ResetFaceting()" }, { - "lang": "Python", - "source": "client.index('books').reset_faceting_settings()" + "lang": "JS", + "source": "client.index('books').resetFaceting()" }, { "lang": "Java", "source": "client.index(\"books\").resetFacetingSettings();" }, { - "lang": "Ruby", - "source": "index('books').reset_faceting" + "lang": "PHP", + "source": "$client->index('books')->resetFaceting();" }, { - "lang": "Go", - "source": "client.Index(\"books\").ResetFaceting()" + "lang": "Python", + "source": "client.index('books').reset_faceting_settings()" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetFacetingAsync();" + "lang": "Ruby", + "source": "index('books').reset_faceting" }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_faceting()\n .await\n .unwrap();" }, { - "lang": "Dart", - "source": "await client.index('movies').resetFaceting();" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/faceting'" } ] }, @@ -6048,13 +6050,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/faceting' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxValuesPerFacet\": 2,\n \"sortFacetValuesBy\": {\n \"*\": \"alpha\",\n \"genres\": \"count\"\n }\n }'" + "lang": "C#", + "source": "var faceting = new Faceting\n{\n MaxValuesPerFacet = 2,\n SortFacetValuesBy = new Dictionary\n {\n [\"*\"] = SortFacetValuesByType.Alpha,\n [\"genres\"] = SortFacetValuesByType.Count\n }\n};\nawait client.Index(\"books\").UpdateFacetingAsync(faceting);" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateFaceting(&meilisearch.Faceting{\n MaxValuesPerFacet: 2,\n SortFacetValuesBy: {\n \"*\": SortFacetTypeAlpha,\n \"genres\": SortFacetTypeCount,\n }\n})" }, { "lang": "JS", "source": "client.index('books').updateFaceting({\n maxValuesPerFacet: 2\n sortFacetValuesBy: {\n '*': 'alpha',\n genres: 'count'\n }\n})" }, + { + "lang": "Java", + "source": "Faceting newFaceting = new Faceting();\nnewFaceting.setMaxValuesPerFacet(2);\nHashMap facetSortValues = new HashMap<>();\nfacetSortValues.put(\"*\", FacetSortValue.ALPHA);\nfacetSortValues.put(\"genres\", FacetSortValue.COUNT);\nnewFaceting.setSortFacetValuesBy(facetSortValues);\nclient.index(\"books\").updateFacetingSettings(newFaceting);" + }, { "lang": "PHP", "source": "$client->index('books')->updateFaceting([\n 'maxValuesPerFacet' => 2,\n 'sortFacetValuesBy' => ['*' => 'alpha', 'genres' => 'count']\n]);" @@ -6063,25 +6073,17 @@ "lang": "Python", "source": "params = {\n 'maxValuesPerFacet': 2,\n 'sortFacetValuesBy': {\n '*': 'count',\n 'genres': 'count'\n }\n}\nclient.index('books').update_faceting_settings(params)" }, - { - "lang": "Java", - "source": "Faceting newFaceting = new Faceting();\nnewFaceting.setMaxValuesPerFacet(2);\nHashMap facetSortValues = new HashMap<>();\nfacetSortValues.put(\"*\", FacetSortValue.ALPHA);\nfacetSortValues.put(\"genres\", FacetSortValue.COUNT);\nnewFaceting.setSortFacetValuesBy(facetSortValues);\nclient.index(\"books\").updateFacetingSettings(newFaceting);" - }, { "lang": "Ruby", "source": "client.index('books').update_faceting({\n max_values_per_facet: 2,\n sort_facet_values_by: {\n '*': 'alpha',\n genres: 'count'\n }\n})" }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateFaceting(&meilisearch.Faceting{\n MaxValuesPerFacet: 2,\n SortFacetValuesBy: {\n \"*\": SortFacetTypeAlpha,\n \"genres\": SortFacetTypeCount,\n }\n})" - }, - { - "lang": "C#", - "source": "var faceting = new Faceting\n{\n MaxValuesPerFacet = 2,\n SortFacetValuesBy = new Dictionary\n {\n [\"*\"] = SortFacetValuesByType.Alpha,\n [\"genres\"] = SortFacetValuesByType.Count\n }\n};\nawait client.Index(\"books\").UpdateFacetingAsync(faceting);" - }, { "lang": "Rust", "source": "let mut facet_sort_setting = BTreeMap::new();\nfacet_sort_setting.insert(String::from(\"*\"), FacetSortValue::Alpha);\nfacet_sort_setting.insert(String::from(\"genres\"), FacetSortValue::Count);\nlet mut faceting = FacetingSettings {\n max_values_per_facet: 2,\n sort_facet_values_by: Some(facet_sort_setting),\n};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_faceting(&faceting)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/faceting' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxValuesPerFacet\": 2,\n \"sortFacetValuesBy\": {\n \"*\": \"alpha\",\n \"genres\": \"count\"\n }\n }'" } ] } @@ -6149,48 +6151,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" + "lang": "C#", + "source": "IEnumerable attributes = await client.Index(\"movies\").GetFilterableAttributesAsync();" }, { - "lang": "JS", - "source": "client.index('movies').getFilterableAttributes()" + "lang": "Dart", + "source": "await client.index('movies').getFilterableAttributes();\ndate_filterable_attributes_1: \"await client\\n .index('movies')\\n .updateFilterableAttributes(['genres', 'director']);\"" }, { - "lang": "PHP", - "source": "$client->index('movies')->getFilterableAttributes();" + "lang": "Go", + "source": "client.Index(\"movies\").GetFilterableAttributes()" }, { - "lang": "Python", - "source": "client.index('movies').get_filterable_attributes()" + "lang": "JS", + "source": "client.index('movies').getFilterableAttributes()" }, { "lang": "Java", "source": "// Granular filterable attributes API (v1.14+)\nclient.index(\"movies\").getGranularFilterableAttributesSettings();\n// Legacy String[] API\nclient.index(\"movies\").getFilterableAttributesSettings();" }, { - "lang": "Ruby", - "source": "client.index('movies').filterable_attributes" + "lang": "PHP", + "source": "$client->index('movies')->getFilterableAttributes();" }, { - "lang": "Go", - "source": "client.Index(\"movies\").GetFilterableAttributes()" + "lang": "Python", + "source": "client.index('movies').get_filterable_attributes()" }, { - "lang": "C#", - "source": "IEnumerable attributes = await client.Index(\"movies\").GetFilterableAttributesAsync();" + "lang": "Ruby", + "source": "client.index('movies').filterable_attributes" }, { "lang": "Rust", "source": "let filterable_attributes: Vec = client\n .index(\"movies\")\n .get_filterable_attributes()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('movies').getFilterableAttributes();\ndate_filterable_attributes_1: \"await client\\n .index('movies')\\n .updateFilterableAttributes(['genres', 'director']);\"" - }, { "lang": "Swift", "source": "client.index(\"movies\").getFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" } ] }, @@ -6272,13 +6274,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"genres\",\n \"director\",\n {\n \"attributePatterns\": [\"*_ratings\"],\n \"features\": {\n \"facetSearch\": false,\n \"filter\": {\n \"equality\": true,\n \"comparison\": false\n }\n }\n }\n ]'" + "lang": "C#", + "source": "List attributes = new() { \"genres\", \"director\" };\nTaskInfo result = await client.Index(\"movies\").UpdateFilterableAttributesAsync(attributes);" + }, + { + "lang": "Go", + "source": "filterableAttributes := []interface{}{\n \"genres\",\n \"director\",\n AttributeRule{\n AttributePatterns: []string{\"tag\"}\n Features: AttributeFeatures{\n FacetSearch: false,\n Filter: FilterFeatures{\n Equality: true,\n Comparison: false,\n }\n }\n },\n map[string]interface{}{\n \"attributePatterns\": []interface{}{\"year\"}\n \"features\": map[string]interface{}{\n \"facetSearch\": false,\n \"filter\": map[string]interface{}{\n \"equality\": true,\n \"comparison\": true,\n }\n }\n }\n}\nclient.Index(\"movies\").UpdateFilterableAttributes(&filterableAttributes)" }, { "lang": "JS", "source": "client.index('movies')\n .updateFilterableAttributes([\n \"genres\",\n {\n attributePatterns: [\"genre\"],\n features: {\n facetSearch: true,\n filter: { equality: true, comparison: false },\n },\n }\n ])" }, + { + "lang": "Java", + "source": "FilterableAttributesConfig genres = FilterableAttributesConfig.simple(\"genres\");\n\nFilterableAttributesFilter directorFilter = new FilterableAttributesFilter();\ndirectorFilter.setEquality(true);\ndirectorFilter.setComparison(false);\n\nFilterableAttributesFeatures directorFeatures = new FilterableAttributesFeatures();\ndirectorFeatures.setFacetSearch(true);\ndirectorFeatures.setFilter(directorFilter);\n\nFilterableAttributesConfig director = new FilterableAttributesConfig();\ndirector.setAttributePatterns(new String[] {\"director\"});\ndirector.setFeatures(directorFeatures);\n\n// Update settings\nclient.index(\"movies\").updateGranularFilterableAttributesSettings(\n new FilterableAttributesConfig[] {genres, director});" + }, { "lang": "PHP", "source": "$client->index('movies')->updateFilterableAttributes([\n 'author',\n [\n 'attributePatterns' => ['genres'],\n 'features' => [\n 'facetSearch' => true,\n 'filter' => [\n 'equality' => true,\n 'comparison' => false,\n ],\n ],\n ],\n]);" @@ -6287,22 +6297,10 @@ "lang": "Python", "source": "client.index('movies').update_filterable_attributes([\n 'genres',\n 'director'\n])" }, - { - "lang": "Java", - "source": "FilterableAttributesConfig genres = FilterableAttributesConfig.simple(\"genres\");\n\nFilterableAttributesFilter directorFilter = new FilterableAttributesFilter();\ndirectorFilter.setEquality(true);\ndirectorFilter.setComparison(false);\n\nFilterableAttributesFeatures directorFeatures = new FilterableAttributesFeatures();\ndirectorFeatures.setFacetSearch(true);\ndirectorFeatures.setFilter(directorFilter);\n\nFilterableAttributesConfig director = new FilterableAttributesConfig();\ndirector.setAttributePatterns(new String[] {\"director\"});\ndirector.setFeatures(directorFeatures);\n\n// Update settings\nclient.index(\"movies\").updateGranularFilterableAttributesSettings(\n new FilterableAttributesConfig[] {genres, director});" - }, { "lang": "Ruby", "source": "client.index('movies').update_filterable_attributes([\n 'genres',\n 'director'\n])" }, - { - "lang": "Go", - "source": "filterableAttributes := []interface{}{\n \"genres\",\n \"director\",\n AttributeRule{\n AttributePatterns: []string{\"tag\"}\n Features: AttributeFeatures{\n FacetSearch: false,\n Filter: FilterFeatures{\n Equality: true,\n Comparison: false,\n }\n }\n },\n map[string]interface{}{\n \"attributePatterns\": []interface{}{\"year\"}\n \"features\": map[string]interface{}{\n \"facetSearch\": false,\n \"filter\": map[string]interface{}{\n \"equality\": true,\n \"comparison\": true,\n }\n }\n }\n}\nclient.Index(\"movies\").UpdateFilterableAttributes(&filterableAttributes)" - }, - { - "lang": "C#", - "source": "List attributes = new() { \"genres\", \"director\" };\nTaskInfo result = await client.Index(\"movies\").UpdateFilterableAttributesAsync(attributes);" - }, { "lang": "Rust", "source": "use meilisearch_sdk::settings::{\n FilterableAttribute,\n FilterableAttributesSettings,\n FilterFeatures,\n FilterFeatureModes,\n};\n\n// Mixed legacy + new syntax\nlet filterable_attributes: Vec = vec![\n // legacy: plain attribute name\n \"author\".into(),\n // new syntax: settings object\n FilterableAttribute::Settings(FilterableAttributesSettings {\n attribute_patterns: vec![\"genre\".to_string()],\n features: FilterFeatures {\n facet_search: true,\n filter: FilterFeatureModes { equality: true, comparison: false },\n },\n }),\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_filterable_attributes_advanced(filterable_attributes)\n .await\n .unwrap();" @@ -6310,6 +6308,10 @@ { "lang": "Swift", "source": "client.index(\"movies\").updateFilterableAttributes([\"genre\", \"director\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"genres\",\n \"director\",\n {\n \"attributePatterns\": [\"*_ratings\"],\n \"features\": {\n \"facetSearch\": false,\n \"filter\": {\n \"equality\": true,\n \"comparison\": false\n }\n }\n }\n ]'" } ] }, @@ -6391,48 +6393,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" + "lang": "C#", + "source": "TaskInfo result = await client.Index(\"movies\").ResetFilterableAttributesAsync();" }, { - "lang": "JS", - "source": "client.index('movies').resetFilterableAttributes()" + "lang": "Dart", + "source": "await client.index('movies').resetFilterableAttributes();" }, { - "lang": "PHP", - "source": "$client->index('movies')->resetFilterableAttributes();" + "lang": "Go", + "source": "client.Index(\"movies\").ResetFilterableAttributes()" }, { - "lang": "Python", - "source": "client.index('movies').reset_filterable_attributes()" + "lang": "JS", + "source": "client.index('movies').resetFilterableAttributes()" }, { "lang": "Java", "source": "client.index(\"movies\").resetFilterableAttributesSettings();" }, { - "lang": "Ruby", - "source": "client.index('movies').reset_filterable_attributes" + "lang": "PHP", + "source": "$client->index('movies')->resetFilterableAttributes();" }, { - "lang": "Go", - "source": "client.Index(\"movies\").ResetFilterableAttributes()" + "lang": "Python", + "source": "client.index('movies').reset_filterable_attributes()" }, { - "lang": "C#", - "source": "TaskInfo result = await client.Index(\"movies\").ResetFilterableAttributesAsync();" + "lang": "Ruby", + "source": "client.index('movies').reset_filterable_attributes" }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_filterable_attributes()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('movies').resetFilterableAttributes();" - }, { "lang": "Swift", "source": "client.index(\"movies\").resetFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" } ] } @@ -6500,13 +6502,17 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" + "lang": "Go", + "source": "client.index(\"INDEX_NAME\").GetLocalizedAttributes()" }, { "lang": "JS", "source": "client.index('INDEX_NAME').getLocalizedAttributes()" }, + { + "lang": "Java", + "source": "client.index(\"INDEX_NAME\").getLocalizedAttributesSettings();" + }, { "lang": "PHP", "source": "$client->index('INDEX_NAME')->getLocalizedAttributes();" @@ -6515,21 +6521,17 @@ "lang": "Python", "source": "client.index('INDEX_NAME').get_localized_attributes()" }, - { - "lang": "Java", - "source": "client.index(\"INDEX_NAME\").getLocalizedAttributesSettings();" - }, { "lang": "Ruby", "source": "client.index('INDEX_NAME').localized_attributes" }, - { - "lang": "Go", - "source": "client.index(\"INDEX_NAME\").GetLocalizedAttributes()" - }, { "lang": "Rust", "source": "let localized_attributes: Option> = client\n .index(\"books\")\n .get_localized_attributes()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" } ] }, @@ -6611,13 +6613,17 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\"locales\": [\"jpn\"], \"attributePatterns\": [\"*_ja\"]}\n ]'" + "lang": "Go", + "source": "client.index(\"INDEX_NAME\").UpdateLocalizedAttributes([]*LocalizedAttributes{\n { AttributePatterns: [\"*_ja\"], Locales: [\"jpn\"] },\n})" }, { "lang": "JS", "source": "client.index('INDEX_NAME').updateLocalizedAttributes([\n { attributePatterns: ['*_ja'], locales: ['jpn'] },\n])" }, + { + "lang": "Java", + "source": "LocalizedAttribute attribute = new LocalizedAttribute();\nattribute.setAttributePatterns(new String[] {\"jpn\"});\nattribute.setLocales(new String[] {\"*_ja\"});\n\nclient.index(\"INDEX_NAME\").updateLocalizedAttributesSettings(\n new LocalizedAttributes[] {attribute}\n);" + }, { "lang": "PHP", "source": "$client->index('INDEX_NAME')->updateLocalizedAttributes([\n 'locales' => ['jpn'],\n 'attributePatterns' => ['*_ja']\n]);" @@ -6626,21 +6632,17 @@ "lang": "Python", "source": "client.index('INDEX_NAME').update_localized_attributes([\n {'attribute_patterns': ['*_ja'], 'locales': ['jpn']}\n])" }, - { - "lang": "Java", - "source": "LocalizedAttribute attribute = new LocalizedAttribute();\nattribute.setAttributePatterns(new String[] {\"jpn\"});\nattribute.setLocales(new String[] {\"*_ja\"});\n\nclient.index(\"INDEX_NAME\").updateLocalizedAttributesSettings(\n new LocalizedAttributes[] {attribute}\n);" - }, { "lang": "Ruby", "source": "client.index('INDEX_NAME').update_localized_attributes([\n { attribute_patterns: ['*_ja'], locales: ['jpn'] },\n])" }, - { - "lang": "Go", - "source": "client.index(\"INDEX_NAME\").UpdateLocalizedAttributes([]*LocalizedAttributes{\n { AttributePatterns: [\"*_ja\"], Locales: [\"jpn\"] },\n})" - }, { "lang": "Rust", "source": "let localized_attributes = vec![LocalizedAttributes {\n locales: vec![\"jpn\".to_string()],\n attribute_patterns: vec![\"*_ja\".to_string()],\n}];\nlet task: TaskInfo = client\n .index(\"books\")\n .set_localized_attributes(&localizced_attributes)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\"locales\": [\"jpn\"], \"attributePatterns\": [\"*_ja\"]}\n ]'" } ] }, @@ -6722,13 +6724,17 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" + "lang": "Go", + "source": "client.index(\"INDEX_NAME\").ResetLocalizedAttributes()" }, { "lang": "JS", "source": "client.index('INDEX_NAME').resetLocalizedAttributes()" }, + { + "lang": "Java", + "source": "client.index(\"INDEX_NAME\").resetLocalizedAttributesSettings();" + }, { "lang": "PHP", "source": "$client->index('INDEX_NAME')->resetLocalizedAttributes();" @@ -6737,21 +6743,17 @@ "lang": "Python", "source": "client.index('INDEX_NAME').reset_localized_attributes()" }, - { - "lang": "Java", - "source": "client.index(\"INDEX_NAME\").resetLocalizedAttributesSettings();" - }, { "lang": "Ruby", "source": "client.index('INDEX_NAME').reset_localized_attributes" }, - { - "lang": "Go", - "source": "client.index(\"INDEX_NAME\").ResetLocalizedAttributes()" - }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_localized_attributes()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" } ] } @@ -6820,13 +6822,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" + "lang": "C#", + "source": "await client.Index(\"movies\").GetNonSeparatorTokensAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").GetNonSeparatorTokens()" }, { "lang": "JS", "source": "client.index('books').getNonSeparatorTokens()" }, + { + "lang": "Java", + "source": "client.index(\"articles\").getNonSeparatorTokensSettings();" + }, { "lang": "PHP", "source": "$client->index('articles')->getNonSeparatorTokens();" @@ -6835,22 +6845,10 @@ "lang": "Python", "source": "client.index('articles').get_non_separator_tokens()" }, - { - "lang": "Java", - "source": "client.index(\"articles\").getNonSeparatorTokensSettings();" - }, { "lang": "Ruby", "source": "client.index('articles').non_separator_tokens" }, - { - "lang": "Go", - "source": "client.Index(\"articles\").GetNonSeparatorTokens()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetNonSeparatorTokensAsync();" - }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('articles')\n .get_non_separator_tokens()\n .await\n .unwrap();" @@ -6858,6 +6856,10 @@ { "lang": "Swift", "source": "client.index(\"books\").getNonSeparatorTokens { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" } ] }, @@ -6940,13 +6942,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"@\", \"#\"]'" + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateNonSeparatorTokensAsync(new[] { \"@\", \"#\" });" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").UpdateNonSeparatorTokens([]string{\n \"@\",\n \"#\",\n})" }, { "lang": "JS", "source": "client.index('books').updateNonSeparatorTokens(['@', '#'])" }, + { + "lang": "Java", + "source": "String[] newSeparatorTokens = { \"@\", \"#\" };\nclient.index(\"articles\").updateNonSeparatorTokensSettings(newSeparatorTokens);" + }, { "lang": "PHP", "source": "$client->index('articles')->updateNonSeparatorTokens(['@', '#']);" @@ -6955,22 +6965,10 @@ "lang": "Python", "source": "client.index('articles').update_non_separator_tokens([\"@\", \"#\"])" }, - { - "lang": "Java", - "source": "String[] newSeparatorTokens = { \"@\", \"#\" };\nclient.index(\"articles\").updateNonSeparatorTokensSettings(newSeparatorTokens);" - }, { "lang": "Ruby", "source": "client.index('articles').update_non_separator_tokens(['@', '#'])" }, - { - "lang": "Go", - "source": "client.Index(\"articles\").UpdateNonSeparatorTokens([]string{\n \"@\",\n \"#\",\n})" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateNonSeparatorTokensAsync(new[] { \"@\", \"#\" });" - }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('articles')\n .set_non_separator_tokens(&vec!['@'.to_string(), '#'.to_string()])\n .await\n .unwrap();" @@ -6978,6 +6976,10 @@ { "lang": "Swift", "source": "client.index(\"books\").updateNonSeparatorTokens([\"@\", \"#\"]) { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"@\", \"#\"]'" } ] }, @@ -7060,13 +7062,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" + "lang": "C#", + "source": "await client.Index(\"movies\").ResetNonSeparatorTokensAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").ResetNonSeparatorTokens()" }, { "lang": "JS", "source": "client.index('books').resetNonSeparatorTokens()" }, + { + "lang": "Java", + "source": "client.index(\"articles\").resetNonSeparatorTokensSettings();" + }, { "lang": "PHP", "source": "$client->index('articles')->resetNonSeparatorTokens();" @@ -7075,22 +7085,10 @@ "lang": "Python", "source": "client.index('articles').reset_non_separator_tokens()" }, - { - "lang": "Java", - "source": "client.index(\"articles\").resetNonSeparatorTokensSettings();" - }, { "lang": "Ruby", "source": "client.index('articles').reset_non_separator_tokens" }, - { - "lang": "Go", - "source": "client.Index(\"articles\").ResetNonSeparatorTokens()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetNonSeparatorTokensAsync();" - }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('articles')\n .reset_non_separator_tokens()\n .await\n .unwrap();" @@ -7098,6 +7096,10 @@ { "lang": "Swift", "source": "client.index(\"books\").resetNonSeparatorTokens { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" } ] } @@ -7162,44 +7164,44 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/pagination'" + "lang": "C#", + "source": "await client.Index(\"movies\").GetPaginationAsync();" }, { - "lang": "JS", - "source": "client.index('books').getPagination()" + "lang": "Dart", + "source": "await client.index('movies').getPagination();\ndate_pagination_settings_1: \"await client\\n .index('books')\\n .updatePagination(Pagination(maxTotalHits: 100));\"" }, { - "lang": "PHP", - "source": "$client->index('books')->getPagination();" + "lang": "Go", + "source": "client.Index(\"books\").GetPagination()" }, { - "lang": "Python", - "source": "client.index('books').get_pagination_settings()" + "lang": "JS", + "source": "client.index('books').getPagination()" }, { "lang": "Java", "source": "client.index(\"books\").getPaginationSettings();" }, { - "lang": "Ruby", - "source": "index('books').pagination" + "lang": "PHP", + "source": "$client->index('books')->getPagination();" }, { - "lang": "Go", - "source": "client.Index(\"books\").GetPagination()" + "lang": "Python", + "source": "client.index('books').get_pagination_settings()" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").GetPaginationAsync();" + "lang": "Ruby", + "source": "index('books').pagination" }, { "lang": "Rust", "source": "let pagination: PaginationSetting = client\n .index(\"books\")\n .get_pagination()\n .await\n .unwrap();" }, { - "lang": "Dart", - "source": "await client.index('movies').getPagination();\ndate_pagination_settings_1: \"await client\\n .index('books')\\n .updatePagination(Pagination(maxTotalHits: 100));\"" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/pagination'" } ] }, @@ -7278,44 +7280,44 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/pagination'" + "lang": "C#", + "source": "await client.Index(\"movies\").ResetPaginationAsync();" }, { - "lang": "JS", - "source": "client.index('books').resetPagination()" + "lang": "Dart", + "source": "await client.index('movies').resetPagination();" }, { - "lang": "PHP", - "source": "$client->index('books')->resetPagination();" + "lang": "Go", + "source": "client.Index(\"books\").ResetPagination()" }, { - "lang": "Python", - "source": "client.index('books').reset_pagination_settings()" + "lang": "JS", + "source": "client.index('books').resetPagination()" }, { "lang": "Java", "source": "client.index(\"books\").resetPaginationSettings();" }, { - "lang": "Ruby", - "source": "index('books').reset_pagination" + "lang": "PHP", + "source": "$client->index('books')->resetPagination();" }, { - "lang": "Go", - "source": "client.Index(\"books\").ResetPagination()" + "lang": "Python", + "source": "client.index('books').reset_pagination_settings()" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetPaginationAsync();" + "lang": "Ruby", + "source": "index('books').reset_pagination" }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_pagination()\n .await\n .unwrap();" }, { - "lang": "Dart", - "source": "await client.index('movies').resetPagination();" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/pagination'" } ] }, @@ -7394,13 +7396,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/pagination' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxTotalHits\": 100\n }'" - }, + "lang": "C#", + "source": "var pagination = new Pagination {\n MaxTotalHits = 20\n};\nawait client.Index(\"movies\").UpdatePaginationAsync(pagination);" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdatePagination(&meilisearch.Pagination{\n MaxTotalHits: 100,\n})" + }, { "lang": "JS", "source": "client.index('books').updateSettings({ pagination: { maxTotalHits: 100 }})" }, + { + "lang": "Java", + "source": "Pagination newPagination = new Pagination();\nnewPagination.setMaxTotalHits(100);\nclient.index(\"books\").updatePaginationSettings(newPagination);" + }, { "lang": "PHP", "source": "$client->index('books')->updateSettings([\n 'pagination' => [\n 'maxTotalHits' => 100\n ]\n]);" @@ -7409,25 +7419,17 @@ "lang": "Python", "source": "client.index('books').update_pagination_settings({'maxTotalHits': 100})" }, - { - "lang": "Java", - "source": "Pagination newPagination = new Pagination();\nnewPagination.setMaxTotalHits(100);\nclient.index(\"books\").updatePaginationSettings(newPagination);" - }, { "lang": "Ruby", "source": "index('books').update_pagination({ max_total_hits: 100 })" }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdatePagination(&meilisearch.Pagination{\n MaxTotalHits: 100,\n})" - }, - { - "lang": "C#", - "source": "var pagination = new Pagination {\n MaxTotalHits = 20\n};\nawait client.Index(\"movies\").UpdatePaginationAsync(pagination);" - }, { "lang": "Rust", "source": "let pagination = PaginationSetting {max_total_hits:100};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_pagination(pagination)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/pagination' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxTotalHits\": 100\n }'" } ] } @@ -7492,8 +7494,8 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" + "lang": "Go", + "source": "client.Index(\"books\").GetPrefixSearch()" }, { "lang": "JS", @@ -7511,13 +7513,13 @@ "lang": "Ruby", "source": "client.index('INDEX_UID').prefix_search" }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetPrefixSearch()" - }, { "lang": "Rust", "source": "let prefix_search: PrefixSearchSettings = client\n .index(INDEX_UID)\n .get_prefix_search()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" } ] }, @@ -7596,8 +7598,8 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"disabled\"'" + "lang": "Go", + "source": "client.Index(\"books\").UpdatePrefixSearch(\"disabled\")" }, { "lang": "JS", @@ -7615,13 +7617,13 @@ "lang": "Ruby", "source": "client.index('INDEX_UID').update_prefix_search('disabled')" }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdatePrefixSearch(\"disabled\")" - }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_prefix_search(PrefixSearchSettings::Disabled)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"disabled\"'" } ] }, @@ -7700,8 +7702,8 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" + "lang": "Go", + "source": "client.Index(\"books\").ResetPrefixSearch()" }, { "lang": "JS", @@ -7719,13 +7721,13 @@ "lang": "Ruby", "source": "client.index('INDEX_UID').reset_prefix_search" }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetPrefixSearch()" - }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_prefix_search()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" } ] } @@ -7790,13 +7792,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" + "lang": "C#", + "source": "await client.Index(\"books\").GetProximityPrecisionAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetProximityPrecision()" }, { "lang": "JS", "source": "client.index('books').getProximityPrecision()" }, + { + "lang": "Java", + "source": "client.index(\"books\").getProximityPrecisionSettings();" + }, { "lang": "PHP", "source": "$client->index('books')->getProximityPrecision();" @@ -7805,22 +7815,10 @@ "lang": "Python", "source": "client.index('books').get_proximity_precision()" }, - { - "lang": "Java", - "source": "client.index(\"books\").getProximityPrecisionSettings();" - }, { "lang": "Ruby", "source": "client.index('books').proximity_precision" }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetProximityPrecision()" - }, - { - "lang": "C#", - "source": "await client.Index(\"books\").GetProximityPrecisionAsync();" - }, { "lang": "Rust", "source": "let proximity_precision: String = client\n .index(\"books\")\n .get_proximity_precision()\n .await\n .unwrap();" @@ -7828,6 +7826,10 @@ { "lang": "Swift", "source": "let precisionValue = try await self.client.index(\"books\").getProximityPrecision()" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" } ] }, @@ -7906,13 +7908,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/proximity-precision' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"byAttribute\"'" + "lang": "C#", + "source": "await client.Index(\"books\").UpdateProximityPrecisionAsync(\"byAttribute\");" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateProximityPrecision(ByAttribute)" }, { "lang": "JS", "source": "client.index('books').updateProximityPrecision('byAttribute')" }, + { + "lang": "Java", + "source": "client.index(\"books\").updateProximityPrecisionSettings(\"byAttribute\");" + }, { "lang": "PHP", "source": "$client->index('books')->updateProximityPrecision('byAttribute');" @@ -7921,22 +7931,10 @@ "lang": "Python", "source": "client.index('books').update_proximity_precision(ProximityPrecision.BY_ATTRIBUTE)" }, - { - "lang": "Java", - "source": "client.index(\"books\").updateProximityPrecisionSettings(\"byAttribute\");" - }, { "lang": "Ruby", "source": "client.index('books').update_proximity_precision('byAttribute')" }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateProximityPrecision(ByAttribute)" - }, - { - "lang": "C#", - "source": "await client.Index(\"books\").UpdateProximityPrecisionAsync(\"byAttribute\");" - }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"books\")\n .set_proximity_precision(\"byAttribute\".to_string())\n .await\n .unwrap();" @@ -7944,6 +7942,10 @@ { "lang": "Swift", "source": "let task = try await self.client.index(\"books\").updateProximityPrecision(.byWord)" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/proximity-precision' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"byAttribute\"'" } ] }, @@ -8022,13 +8024,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" + "lang": "C#", + "source": "await client.Index(\"books\").ResetProximityPrecisionAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetProximityPrecision()" }, { "lang": "JS", "source": "client.index('books').resetProximityPrecision()" }, + { + "lang": "Java", + "source": "client.index(\"books\").resetProximityPrecisionSettings();" + }, { "lang": "PHP", "source": "$client->index('books')->resetProximityPrecision();" @@ -8037,22 +8047,10 @@ "lang": "Python", "source": "client.index('books').reset_proximity_precision()" }, - { - "lang": "Java", - "source": "client.index(\"books\").resetProximityPrecisionSettings();" - }, { "lang": "Ruby", "source": "client.index('books').reset_proximity_precision" }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetProximityPrecision()" - }, - { - "lang": "C#", - "source": "await client.Index(\"books\").ResetProximityPrecisionAsync();" - }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_proximity_precision()\n .await\n .unwrap();" @@ -8060,6 +8058,10 @@ { "lang": "Swift", "source": "let task = try await self.client.index(\"books\").resetProximityPrecision()" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" } ] } @@ -8127,48 +8129,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" + "lang": "C#", + "source": "await client.Index(\"movies\").GetRankingRulesAsync();" }, { - "lang": "JS", - "source": "client.index('movies').getRankingRules()" + "lang": "Dart", + "source": "await client.index('movies').getRankingRules();\ndate_ranking_rules_1: \"await client.index('movies').updateRankingRules([\\n 'words',\\n 'typo',\\n 'proximity',\\n 'attribute',\\n 'sort',\\n 'exactness',\\n 'release_date:asc',\\n 'rank:desc',\\n]);\"" }, { - "lang": "PHP", - "source": "$client->index('movies')->getRankingRules();" + "lang": "Go", + "source": "client.Index(\"movies\").GetRankingRules()" }, { - "lang": "Python", - "source": "client.index('movies').get_ranking_rules()" + "lang": "JS", + "source": "client.index('movies').getRankingRules()" }, { "lang": "Java", "source": "client.index(\"movies\").getRankingRulesSettings();" }, { - "lang": "Ruby", - "source": "client.index('movies').ranking_rules" + "lang": "PHP", + "source": "$client->index('movies')->getRankingRules();" }, { - "lang": "Go", - "source": "client.Index(\"movies\").GetRankingRules()" + "lang": "Python", + "source": "client.index('movies').get_ranking_rules()" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").GetRankingRulesAsync();" + "lang": "Ruby", + "source": "client.index('movies').ranking_rules" }, { "lang": "Rust", "source": "let ranking_rules: Vec = client\n .index(\"movies\")\n .get_ranking_rules()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('movies').getRankingRules();\ndate_ranking_rules_1: \"await client.index('movies').updateRankingRules([\\n 'words',\\n 'typo',\\n 'proximity',\\n 'attribute',\\n 'sort',\\n 'exactness',\\n 'release_date:asc',\\n 'rank:desc',\\n]);\"" - }, { "lang": "Swift", "source": "client.index(\"movies\").getRankingRules { (result) in\n switch result {\n case .success(let rankingRules):\n print(rankingRules)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" } ] }, @@ -8250,13 +8252,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n ]'" + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateRankingRulesAsync(new[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});" + }, + { + "lang": "Go", + "source": "rankingRules := []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\",\n}\nclient.Index(\"movies\").UpdateRankingRules(&rankingRules)" }, { "lang": "JS", "source": "client.index('movies').updateRankingRules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setRankingRules(new String[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});\nclient.index(\"movies\").updateSettings(settings);" + }, { "lang": "PHP", "source": "$client->index('movies')->updateRankingRules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n]);" @@ -8265,22 +8275,10 @@ "lang": "Python", "source": "client.index('movies').update_ranking_rules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setRankingRules(new String[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});\nclient.index(\"movies\").updateSettings(settings);" - }, { "lang": "Ruby", "source": "client.index('movies').update_ranking_rules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" }, - { - "lang": "Go", - "source": "rankingRules := []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\",\n}\nclient.Index(\"movies\").UpdateRankingRules(&rankingRules)" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateRankingRulesAsync(new[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});" - }, { "lang": "Rust", "source": "let ranking_rules = [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\",\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_ranking_rules(&ranking_rules)\n .await\n .unwrap();" @@ -8288,6 +8286,10 @@ { "lang": "Swift", "source": "let rankingRules: [String] = [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n]\nclient.index(\"movies\").updateRankingRules(rankingRules) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n ]'" } ] }, @@ -8369,48 +8371,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" + "lang": "C#", + "source": "await client.Index(\"movies\").ResetRankingRulesAsync();" }, { - "lang": "JS", - "source": "client.index('movies').resetRankingRules()" + "lang": "Dart", + "source": "await client.index('movies').resetRankingRules();" }, { - "lang": "PHP", - "source": "$client->index('movies')->resetRankingRules();" + "lang": "Go", + "source": "client.Index(\"movies\").ResetRankingRules()" }, { - "lang": "Python", - "source": "client.index('movies').reset_ranking_rules()" + "lang": "JS", + "source": "client.index('movies').resetRankingRules()" }, { "lang": "Java", "source": "client.index(\"movies\").resetRankingRulesSettings();" }, { - "lang": "Ruby", - "source": "client.index('movies').reset_ranking_rules" + "lang": "PHP", + "source": "$client->index('movies')->resetRankingRules();" }, { - "lang": "Go", - "source": "client.Index(\"movies\").ResetRankingRules()" + "lang": "Python", + "source": "client.index('movies').reset_ranking_rules()" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetRankingRulesAsync();" + "lang": "Ruby", + "source": "client.index('movies').reset_ranking_rules" }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_ranking_rules()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('movies').resetRankingRules();" - }, { "lang": "Swift", "source": "client.index(\"movies\").resetRankingRules { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" } ] } @@ -8477,37 +8479,33 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" + "lang": "C#", + "source": "var searchCutoff = await client.Index(\"movies\").GetSearchCutoffMsAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetSearchCutoffMs()" }, { "lang": "JS", "source": "client.index('movies').getSearchCutoffMs()" }, { - "lang": "PHP", + "lang": "Java", + "source": "client.index(\"movies\").getSearchCutoffMsSettings();" + }, + { + "lang": "PHP", "source": "$client->index('movies')->getSearchCutoffMs();" }, { "lang": "Python", "source": "client.index('movies').get_search_cutoff_ms()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").getSearchCutoffMsSettings();" - }, { "lang": "Ruby", "source": "client.index('movies').search_cutoff_ms" }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSearchCutoffMs()" - }, - { - "lang": "C#", - "source": "var searchCutoff = await client.Index(\"movies\").GetSearchCutoffMsAsync();" - }, { "lang": "Rust", "source": "let search_cutoff_ms: String = client\n .index(\"movies\")\n .get_search_cutoff_ms()\n .await\n .unwrap();" @@ -8515,6 +8513,10 @@ { "lang": "Swift", "source": "let precisionValue = try await self.client.index(\"books\").getSearchCutoffMs()" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" } ] }, @@ -8595,13 +8597,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '150'" + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSearchCutoffMsAsync(150);" + }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateSearchCutoffMs(150)" }, { "lang": "JS", "source": "client.index('movies').updateSearchCutoffMs(150)" }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateSearchCutoffMsSettings(150);" + }, { "lang": "PHP", "source": "$client->index('movies')->updateSearchCutoffMs(150);" @@ -8610,22 +8620,10 @@ "lang": "Python", "source": "client.index('movies').update_search_cutoff_ms(150)" }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateSearchCutoffMsSettings(150);" - }, { "lang": "Ruby", "source": "client.index('movies').update_search_cutoff_ms(150)" }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateSearchCutoffMs(150)" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSearchCutoffMsAsync(150);" - }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .set_search_cutoff_ms(Some(150))\n .await\n .unwrap();" @@ -8633,6 +8631,10 @@ { "lang": "Swift", "source": "let task = try await self.client.index(\"books\").updateSearchCutoffMs(150)" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '150'" } ] }, @@ -8713,13 +8715,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSearchCutoffMsAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetSearchCutoffMs()" }, { "lang": "JS", "source": "client.index('movies').resetSearchCutoffMs()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetSearchCutoffMsSettings();" + }, { "lang": "PHP", "source": "$client->index('movies')->resetSearchCutoffMs();" @@ -8728,22 +8738,10 @@ "lang": "Python", "source": "client.index('movies').reset_search_cutoff_ms()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetSearchCutoffMsSettings();" - }, { "lang": "Ruby", "source": "client.index('movies').reset_search_cutoff_ms" }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetSearchCutoffMs()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSearchCutoffMsAsync();" - }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_search_cutoff_ms()\n .await\n .unwrap();" @@ -8751,6 +8749,10 @@ { "lang": "Swift", "source": "let task = try await self.client.index(\"books\").resetSearchCutoffMs()" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" } ] } @@ -8818,48 +8820,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" + "lang": "C#", + "source": "await client.Index(\"movies\").GetSearchableAttributesAsync();" }, { - "lang": "JS", - "source": "client.index('movies').getSearchableAttributes()" + "lang": "Dart", + "source": "await client.index('movies').getSearchableAttributes();\ndate_searchable_attributes_1: \"await client\\n .index('movies')\\n .updateSearchableAttributes(['title', 'overview', 'genres']);\"" }, { - "lang": "PHP", - "source": "$client->index('movies')->getSearchableAttributes();" + "lang": "Go", + "source": "client.Index(\"movies\").GetSearchableAttributes()" }, { - "lang": "Python", - "source": "client.index('movies').get_searchable_attributes()" + "lang": "JS", + "source": "client.index('movies').getSearchableAttributes()" }, { "lang": "Java", "source": "client.index(\"movies\").getSearchableAttributesSettings();" }, { - "lang": "Ruby", - "source": "client.index('movies').searchable_attributes" + "lang": "PHP", + "source": "$client->index('movies')->getSearchableAttributes();" }, { - "lang": "Go", - "source": "client.Index(\"movies\").GetSearchableAttributes()" + "lang": "Python", + "source": "client.index('movies').get_searchable_attributes()" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSearchableAttributesAsync();" + "lang": "Ruby", + "source": "client.index('movies').searchable_attributes" }, { "lang": "Rust", "source": "let searchable_attributes: Vec = client\n .index(\"movies\")\n .get_searchable_attributes()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('movies').getSearchableAttributes();\ndate_searchable_attributes_1: \"await client\\n .index('movies')\\n .updateSearchableAttributes(['title', 'overview', 'genres']);\"" - }, { "lang": "Swift", "source": "client.index(\"movies\").getSearchableAttributes { (result) in\n switch result {\n case .success(let searchableAttributes):\n print(searchableAttributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" } ] }, @@ -8941,13 +8943,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\"\n ]'" + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSearchableAttributesAsync(new[] {\"title\", \"overview\", \"genres\"});" + }, + { + "lang": "Go", + "source": "searchableAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n}\nclient.Index(\"movies\").UpdateSearchableAttributes(&searchableAttributes)" }, { "lang": "JS", "source": "client.index('movies').updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n])" }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateSearchableAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\"\n});" + }, { "lang": "PHP", "source": "$client->index('movies')->updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n]);" @@ -8956,22 +8966,10 @@ "lang": "Python", "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateSearchableAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\"\n});" - }, { "lang": "Ruby", "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" }, - { - "lang": "Go", - "source": "searchableAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n}\nclient.Index(\"movies\").UpdateSearchableAttributes(&searchableAttributes)" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSearchableAttributesAsync(new[] {\"title\", \"overview\", \"genres\"});" - }, { "lang": "Rust", "source": "let searchable_attributes = [\n \"title\",\n \"overview\",\n \"genres\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_searchable_attributes(&searchable_attributes)\n .await\n .unwrap();" @@ -8979,6 +8977,10 @@ { "lang": "Swift", "source": "let searchableAttributes: [String] = [\"title\", \"overview\", \"genres\"]\nclient.index(\"movies\").updateSearchableAttributes(searchableAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\"\n ]'" } ] }, @@ -9060,48 +9062,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSearchableAttributesAsync();" }, { - "lang": "JS", - "source": "client.index('movies').resetSearchableAttributes()" + "lang": "Dart", + "source": "await client.index('movies').resetSearchableAttributes();" }, { - "lang": "PHP", - "source": "$client->index('movies')->resetSearchableAttributes();" + "lang": "Go", + "source": "client.Index(\"movies\").ResetSearchableAttributes()" }, { - "lang": "Python", - "source": "client.index('movies').reset_searchable_attributes()" + "lang": "JS", + "source": "client.index('movies').resetSearchableAttributes()" }, { "lang": "Java", "source": "client.index(\"movies\").resetSearchableAttributesSettings();" }, { - "lang": "Ruby", - "source": "client.index('movies').reset_searchable_attributes" + "lang": "PHP", + "source": "$client->index('movies')->resetSearchableAttributes();" }, { - "lang": "Go", - "source": "client.Index(\"movies\").ResetSearchableAttributes()" + "lang": "Python", + "source": "client.index('movies').reset_searchable_attributes()" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSearchableAttributesAsync();" + "lang": "Ruby", + "source": "client.index('movies').reset_searchable_attributes" }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_searchable_attributes()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('movies').resetSearchableAttributes();" - }, { "lang": "Swift", "source": "client.index(\"movies\").resetSearchableAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" } ] } @@ -9170,13 +9172,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" + "lang": "C#", + "source": "await client.Index(\"movies\").GetSeparatorTokensAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").GetSeparatorTokens()" }, { "lang": "JS", "source": "client.index('books').getSeparatorTokens()" }, + { + "lang": "Java", + "source": "client.index(\"articles\").getSeparatorTokensSettings();" + }, { "lang": "PHP", "source": "$client->index('articles')->getSeparatorTokens();" @@ -9185,22 +9195,10 @@ "lang": "Python", "source": "client.index('articles').get_separator_tokens()" }, - { - "lang": "Java", - "source": "client.index(\"articles\").getSeparatorTokensSettings();" - }, { "lang": "Ruby", "source": "client.index('articles').separator_tokens" }, - { - "lang": "Go", - "source": "client.Index(\"articles\").GetSeparatorTokens()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSeparatorTokensAsync();" - }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('articles')\n .get_separator_tokens()\n .await\n .unwrap();" @@ -9208,6 +9206,10 @@ { "lang": "Swift", "source": "client.index(\"books\").getSeparatorTokens { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" } ] }, @@ -9290,13 +9292,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"|\", \"…\"]'" + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSeparatorTokensAsync(new[] { \"|\", \"…\" });" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").UpdateSeparatorTokens([]string{\n \"|\",\n \"…\",\n})" }, { "lang": "JS", "source": "client.index('books').updateSeparatorTokens(['|', '…'])" }, + { + "lang": "Java", + "source": "String[] newSeparatorTokens = { \"|\", \"…\" };\nclient.index(\"articles\").updateSeparatorTokensSettings(newSeparatorTokens);" + }, { "lang": "PHP", "source": "$client->index('articles')->updateSeparatorTokens(['|', '…']);" @@ -9305,22 +9315,10 @@ "lang": "Python", "source": "client.index('articles').update_separator_tokens([\"|\", \"…\"])" }, - { - "lang": "Java", - "source": "String[] newSeparatorTokens = { \"|\", \"…\" };\nclient.index(\"articles\").updateSeparatorTokensSettings(newSeparatorTokens);" - }, { "lang": "Ruby", "source": "client.index('articles').update_separator_tokens(['|', '…'])" }, - { - "lang": "Go", - "source": "client.Index(\"articles\").UpdateSeparatorTokens([]string{\n \"|\",\n \"…\",\n})" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSeparatorTokensAsync(new[] { \"|\", \"…\" });" - }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('articles')\n .set_separator_tokens(&vec!['|'.to_string(), '…'.to_string()])\n .await\n .unwrap();" @@ -9328,6 +9326,10 @@ { "lang": "Swift", "source": "client.index(\"books\").updateSeparatorTokens([\"|\", \"…\"]) { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"|\", \"…\"]'" } ] }, @@ -9410,13 +9412,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSeparatorTokensAsync();" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").ResetSeparatorTokens()" }, { "lang": "JS", "source": "client.index('books').resetSeparatorTokens()" }, + { + "lang": "Java", + "source": "client.index(\"articles\").resetSeparatorTokensSettings();" + }, { "lang": "PHP", "source": "$client->index('articles')->resetSeparatorTokens();" @@ -9425,22 +9435,10 @@ "lang": "Python", "source": "client.index('articles').reset_separator_tokens()" }, - { - "lang": "Java", - "source": "client.index(\"articles\").resetSeparatorTokensSettings();" - }, { "lang": "Ruby", "source": "client.index('articles').reset_separator_tokens" }, - { - "lang": "Go", - "source": "client.Index(\"articles\").ResetSeparatorTokens()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSeparatorTokensAsync();" - }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('articles')\n .reset_separator_tokens()\n .await\n .unwrap();" @@ -9448,6 +9446,10 @@ { "lang": "Swift", "source": "client.index(\"books\").resetSeparatorTokens { result in\n // handle result\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" } ] } @@ -9516,48 +9518,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" + "lang": "C#", + "source": "await client.Index(\"books\").GetSortableAttributesAsync();" }, { - "lang": "JS", - "source": "client.index('books').getSortableAttributes()" + "lang": "Dart", + "source": "await client.index('books').getSortableAttributes();\ndate_sortable_attributes_1: \"await client.index('books').updateSortableAttributes(['price', 'author']);\"" }, { - "lang": "PHP", - "source": "$client->index('books')->getSortableAttributes();" + "lang": "Go", + "source": "client.Index(\"books\").GetSortableAttributes()" }, { - "lang": "Python", - "source": "client.index('books').get_sortable_attributes()" + "lang": "JS", + "source": "client.index('books').getSortableAttributes()" }, { "lang": "Java", "source": "client.index(\"books\").getSortableAttributesSettings();" }, { - "lang": "Ruby", - "source": "client.index('books').sortable_attributes" + "lang": "PHP", + "source": "$client->index('books')->getSortableAttributes();" }, { - "lang": "Go", - "source": "client.Index(\"books\").GetSortableAttributes()" + "lang": "Python", + "source": "client.index('books').get_sortable_attributes()" }, { - "lang": "C#", - "source": "await client.Index(\"books\").GetSortableAttributesAsync();" + "lang": "Ruby", + "source": "client.index('books').sortable_attributes" }, { "lang": "Rust", "source": "let sortable_attributes: Vec = client\n .index(\"books\")\n .get_sortable_attributes()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('books').getSortableAttributes();\ndate_sortable_attributes_1: \"await client.index('books').updateSortableAttributes(['price', 'author']);\"" - }, { "lang": "Swift", "source": "client.index(\"books\").getSortableAttributes { (result: Result, Swift.Error>) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" } ] }, @@ -9640,13 +9642,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"price\",\n \"author\"\n ]'" + "lang": "C#", + "source": "await client.Index(\"books\").UpdateSortableAttributesAsync(new [] { \"price\", \"author\" });" + }, + { + "lang": "Go", + "source": "sortableAttributes := []string{\n \"price\",\n \"author\",\n}\nclient.Index(\"books\").UpdateSortableAttributes(&sortableAttributes)" }, { "lang": "JS", "source": "client.index('books')\n .updateSortableAttributes([\n 'price',\n 'author'\n ])" }, + { + "lang": "Java", + "source": "client.index(\"books\").updateSortableAttributesSettings(new String[] {\"price\", \"author\"});" + }, { "lang": "PHP", "source": "$client->index('books')->updateSortableAttributes([\n 'price',\n 'author'\n]);" @@ -9655,22 +9665,10 @@ "lang": "Python", "source": "client.index('books').update_sortable_attributes([\n 'price',\n 'author'\n])" }, - { - "lang": "Java", - "source": "client.index(\"books\").updateSortableAttributesSettings(new String[] {\"price\", \"author\"});" - }, { "lang": "Ruby", "source": "client.index('books').update_sortable_attributes([\n 'price',\n 'author'\n])" }, - { - "lang": "Go", - "source": "sortableAttributes := []string{\n \"price\",\n \"author\",\n}\nclient.Index(\"books\").UpdateSortableAttributes(&sortableAttributes)" - }, - { - "lang": "C#", - "source": "await client.Index(\"books\").UpdateSortableAttributesAsync(new [] { \"price\", \"author\" });" - }, { "lang": "Rust", "source": "let sortable_attributes = [\n \"price\",\n \"author\"\n];\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_sortable_attributes(&sortable_attributes)\n .await\n .unwrap();" @@ -9678,6 +9676,10 @@ { "lang": "Swift", "source": "client.index(\"books\").updateSortableAttributes([\"price\", \"author\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"price\",\n \"author\"\n ]'" } ] }, @@ -9760,48 +9762,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" + "lang": "C#", + "source": "await client.Index(\"books\").ResetSortableAttributesAsync();" }, { - "lang": "JS", - "source": "client.index('books').resetSortableAttributes()" + "lang": "Dart", + "source": "await client.index('books').resetSortableAttributes();\narch_parameter_guide_sort_1: \"await client\\n .index('books')\\n .search('science fiction', SearchQuery(sort: ['price:asc']));\"" }, { - "lang": "PHP", - "source": "$client->index('books')->resetSortableAttributes();" + "lang": "Go", + "source": "client.Index(\"books\").ResetSortableAttributes()" }, { - "lang": "Python", - "source": "client.index('books').reset_sortable_attributes()" + "lang": "JS", + "source": "client.index('books').resetSortableAttributes()" }, { "lang": "Java", "source": "client.index(\"books\").resetSortableAttributesSettings();" }, { - "lang": "Ruby", - "source": "client.index('books').reset_sortable_attributes" + "lang": "PHP", + "source": "$client->index('books')->resetSortableAttributes();" }, { - "lang": "Go", - "source": "client.Index(\"books\").ResetSortableAttributes()" + "lang": "Python", + "source": "client.index('books').reset_sortable_attributes()" }, { - "lang": "C#", - "source": "await client.Index(\"books\").ResetSortableAttributesAsync();" + "lang": "Ruby", + "source": "client.index('books').reset_sortable_attributes" }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_sortable_attributes()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('books').resetSortableAttributes();\narch_parameter_guide_sort_1: \"await client\\n .index('books')\\n .search('science fiction', SearchQuery(sort: ['price:asc']));\"" - }, { "lang": "Swift", "source": "client.index(\"books\").resetSortableAttributes() { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" } ] } @@ -9870,48 +9872,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" + "lang": "C#", + "source": "await client.Index(\"movies\").GetStopWordsAsync();" }, { - "lang": "JS", - "source": "client.index('movies').getStopWords()" + "lang": "Dart", + "source": "await client.index('movies').getStopWords();" }, { - "lang": "PHP", - "source": "$client->index('movies')->getStopWords();" + "lang": "Go", + "source": "client.Index(\"movies\").GetStopWords()" }, { - "lang": "Python", - "source": "client.index('movies').get_stop_words()" + "lang": "JS", + "source": "client.index('movies').getStopWords()" }, { "lang": "Java", "source": "client.index(\"movies\").getStopWordsSettings();" }, { - "lang": "Ruby", - "source": "client.index('movies').stop_words" + "lang": "PHP", + "source": "$client->index('movies')->getStopWords();" }, { - "lang": "Go", - "source": "client.Index(\"movies\").GetStopWords()" + "lang": "Python", + "source": "client.index('movies').get_stop_words()" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").GetStopWordsAsync();" + "lang": "Ruby", + "source": "client.index('movies').stop_words" }, { "lang": "Rust", "source": "let stop_words: Vec = client\n .index(\"movies\")\n .get_stop_words()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('movies').getStopWords();" - }, { "lang": "Swift", "source": "client.index(\"movies\").getStopWords { (result) in\n switch result {\n case .success(let stopWords):\n print(stopWords)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" } ] }, @@ -9994,48 +9996,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/stop-words' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"the\",\n \"of\",\n \"to\"\n ]'" + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateStopWordsAsync(new[] {\"of\", \"the\", \"to\"});" }, { - "lang": "JS", - "source": "client.index('movies').updateStopWords(['of', 'the', 'to'])" + "lang": "Dart", + "source": "await client.index('movies').updateStopWords(['of', 'the', 'to']);" }, { - "lang": "PHP", - "source": "$client->index('movies')->updateStopWords(['the', 'of', 'to']);" + "lang": "Go", + "source": "stopWords := []string{\"of\", \"the\", \"to\"}\nclient.Index(\"movies\").UpdateStopWords(&stopWords)" }, { - "lang": "Python", - "source": "client.index('movies').update_stop_words(['of', 'the', 'to'])" + "lang": "JS", + "source": "client.index('movies').updateStopWords(['of', 'the', 'to'])" }, { "lang": "Java", "source": "client.index(\"movies\").updateStopWordsSettings(new String[] {\"of\", \"the\", \"to\"});" }, { - "lang": "Ruby", - "source": "client.index('movies').update_stop_words(['of', 'the', 'to'])" + "lang": "PHP", + "source": "$client->index('movies')->updateStopWords(['the', 'of', 'to']);" }, { - "lang": "Go", - "source": "stopWords := []string{\"of\", \"the\", \"to\"}\nclient.Index(\"movies\").UpdateStopWords(&stopWords)" + "lang": "Python", + "source": "client.index('movies').update_stop_words(['of', 'the', 'to'])" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateStopWordsAsync(new[] {\"of\", \"the\", \"to\"});" + "lang": "Ruby", + "source": "client.index('movies').update_stop_words(['of', 'the', 'to'])" }, { "lang": "Rust", "source": "let stop_words = [\"of\", \"the\", \"to\"];\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_stop_words(&stop_words)\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('movies').updateStopWords(['of', 'the', 'to']);" - }, { "lang": "Swift", "source": "let stopWords: [String] = [\"of\", \"the\", \"to\"]\nclient.index(\"movies\").updateStopWords(stopWords) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/stop-words' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"the\",\n \"of\",\n \"to\"\n ]'" } ] }, @@ -10118,48 +10120,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" + "lang": "C#", + "source": "await client.Index(\"movies\").ResetStopWordsAsync();" }, { - "lang": "JS", - "source": "client.index('movies').resetStopWords()" + "lang": "Dart", + "source": "await client.index('movies').resetStopWords();" }, { - "lang": "PHP", - "source": "$client->index('movies')->resetStopWords();" + "lang": "Go", + "source": "client.Index(\"movies\").ResetStopWords()" }, { - "lang": "Python", - "source": "client.index('movies').reset_stop_words()" + "lang": "JS", + "source": "client.index('movies').resetStopWords()" }, { "lang": "Java", "source": "client.index(\"movies\").resetStopWordsSettings();" }, { - "lang": "Ruby", - "source": "client.index('movies').reset_stop_words" + "lang": "PHP", + "source": "$client->index('movies')->resetStopWords();" }, { - "lang": "Go", - "source": "client.Index(\"movies\").ResetStopWords()" + "lang": "Python", + "source": "client.index('movies').reset_stop_words()" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetStopWordsAsync();" + "lang": "Ruby", + "source": "client.index('movies').reset_stop_words" }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_stop_words()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('movies').resetStopWords();" - }, { "lang": "Swift", "source": "client.index(\"movies\").resetStopWords { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" } ] } @@ -10233,48 +10235,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" + "lang": "C#", + "source": "await client.Index(\"movies\").GetSynonymsAsync();" }, { - "lang": "JS", - "source": "client.index('movies').getSynonyms()" + "lang": "Dart", + "source": "await client.index('movies').getSynonyms();\ndate_synonyms_1: \"await client.index('movies').updateSynonyms({\\n 'wolverine': ['xmen', 'logan'],\\n 'logan': ['wolverine', 'xmen'],\\n 'wow': ['world of warcraft'],\\n});\"" }, { - "lang": "PHP", - "source": "$client->index('movies')->getSynonyms();" + "lang": "Go", + "source": "client.Index(\"movies\").GetSynonyms()" }, { - "lang": "Python", - "source": "client.index('movies').get_synonyms()" + "lang": "JS", + "source": "client.index('movies').getSynonyms()" }, { "lang": "Java", "source": "client.index(\"movies\").getSynonymsSettings();" }, { - "lang": "Ruby", - "source": "client.index('movies').synonyms" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSynonyms()" + "lang": "PHP", + "source": "$client->index('movies')->getSynonyms();" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSynonymsAsync();" + "lang": "Python", + "source": "client.index('movies').get_synonyms()" }, { - "lang": "Rust", - "source": "let synonyms: HashMap> = client\n .index(\"movies\")\n .get_synonyms()\n .await\n .unwrap();" + "lang": "Ruby", + "source": "client.index('movies').synonyms" }, { - "lang": "Dart", - "source": "await client.index('movies').getSynonyms();\ndate_synonyms_1: \"await client.index('movies').updateSynonyms({\\n 'wolverine': ['xmen', 'logan'],\\n 'logan': ['wolverine', 'xmen'],\\n 'wow': ['world of warcraft'],\\n});\"" + "lang": "Rust", + "source": "let synonyms: HashMap> = client\n .index(\"movies\")\n .get_synonyms()\n .await\n .unwrap();" }, { "lang": "Swift", "source": "client.index(\"movies\").getSynonyms { (result) in\n switch result {\n case .success(let synonyms):\n print(synonyms)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" } ] }, @@ -10362,13 +10364,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/synonyms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\n \"wolverine\",\n \"xmen\"\n ],\n \"wow\": [\"world of warcraft\"]\n }'" + "lang": "C#", + "source": "var synonyms = new Dictionary>\n{\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\", \"xmen\" } },\n { \"wow\", new string[] { \"world of warcraft\" } }\n};\nawait client.Index(\"movies\").UpdateSynonymsAsync(synonyms);" + }, + { + "lang": "Go", + "source": "synonyms := map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\", \"xmen\"},\n \"wow\": []string{\"world of warcraft\"},\n}\nclient.Index(\"movies\").UpdateSynonyms(&synonyms)" }, { "lang": "JS", "source": "client.index('movies').updateSynonyms({\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine', 'xmen'],\n wow: ['world of warcraft']\n})" }, + { + "lang": "Java", + "source": "HashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nclient.index(\"movies\").updateSynonymsSettings(synonyms);" + }, { "lang": "PHP", "source": "$client->index('movies')->updateSynonyms([\n 'wolverine' => ['xmen', 'logan'],\n 'logan' => ['wolverine', 'xmen'],\n 'wow' => ['world of warcraft']\n]);" @@ -10377,22 +10387,10 @@ "lang": "Python", "source": "client.index('movies').update_synonyms({\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine', 'xmen'],\n 'wow': ['world of warcraft']\n})" }, - { - "lang": "Java", - "source": "HashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nclient.index(\"movies\").updateSynonymsSettings(synonyms);" - }, { "lang": "Ruby", "source": "client.index('movies').update_synonyms({\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine', 'xmen'],\n wow: ['world of warcraft']\n})" }, - { - "lang": "Go", - "source": "synonyms := map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\", \"xmen\"},\n \"wow\": []string{\"world of warcraft\"},\n}\nclient.Index(\"movies\").UpdateSynonyms(&synonyms)" - }, - { - "lang": "C#", - "source": "var synonyms = new Dictionary>\n{\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\", \"xmen\" } },\n { \"wow\", new string[] { \"world of warcraft\" } }\n};\nawait client.Index(\"movies\").UpdateSynonymsAsync(synonyms);" - }, { "lang": "Rust", "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"wolverine\"), vec![String::from(\"xmen\"), String::from(\"logan\")]);\nsynonyms.insert(String::from(\"logan\"), vec![String::from(\"xmen\"), String::from(\"wolverine\")]);\nsynonyms.insert(String::from(\"wow\"), vec![String::from(\"world of warcraft\")]);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_synonyms(&synonyms)\n .await\n .unwrap();" @@ -10400,6 +10398,10 @@ { "lang": "Swift", "source": "let synonyms: [String: [String]] = [\n \"wolverine\": [\"xmen\", \"logan\"],\n \"logan\": [\"wolverine\", \"xmen\"],\n \"wow\": [\"world of warcraft\"]\n]\nclient.index(\"movies\").updateSynonyms(synonyms) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/synonyms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\n \"wolverine\",\n \"xmen\"\n ],\n \"wow\": [\"world of warcraft\"]\n }'" } ] }, @@ -10487,48 +10489,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSynonymsAsync();" }, { - "lang": "JS", - "source": "client.index('movies').resetSynonyms()" + "lang": "Dart", + "source": "await client.index('movies').resetSynonyms();" }, { - "lang": "PHP", - "source": "$client->index('movies')->resetSynonyms();" + "lang": "Go", + "source": "client.Index(\"movies\").ResetSynonyms()" }, { - "lang": "Python", - "source": "client.index('movies').reset_synonyms()" + "lang": "JS", + "source": "client.index('movies').resetSynonyms()" }, { "lang": "Java", "source": "client.index(\"movies\").resetSynonymsSettings();" }, { - "lang": "Ruby", - "source": "client.index('movies').reset_synonyms" + "lang": "PHP", + "source": "$client->index('movies')->resetSynonyms();" }, { - "lang": "Go", - "source": "client.Index(\"movies\").ResetSynonyms()" + "lang": "Python", + "source": "client.index('movies').reset_synonyms()" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSynonymsAsync();" + "lang": "Ruby", + "source": "client.index('movies').reset_synonyms" }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_synonyms()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('movies').resetSynonyms();" - }, { "lang": "Swift", "source": "client.index(\"movies\").resetSynonyms { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" } ] } @@ -10593,8 +10595,12 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" + "lang": "Dart", + "source": "await client.index('books').getTypoTolerance();" + }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetTypoTolerance()" }, { "lang": "JS", @@ -10612,17 +10618,13 @@ "lang": "Ruby", "source": "index('books').typo_tolerance" }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetTypoTolerance()" - }, { "lang": "Rust", "source": "let typo_tolerance: TypoToleranceSettings = client\n .index(\"books\")\n .get_typo_tolerance()\n .await\n .unwrap();" }, { - "lang": "Dart", - "source": "await client.index('books').getTypoTolerance();" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" } ] }, @@ -10701,44 +10703,44 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" + "lang": "C#", + "source": "await client.Index(\"books\").ResetTypoToleranceAsync();" }, { - "lang": "JS", - "source": "client.index('books').resetTypoTolerance()" + "lang": "Dart", + "source": "await client.index('books').resetTypoTolerance();" }, { - "lang": "PHP", - "source": "$client->index('books')->resetTypoTolerance();" + "lang": "Go", + "source": "client.Index(\"books\").ResetTypoTolerance()" }, { - "lang": "Python", - "source": "client.index('books').reset_typo_tolerance()" + "lang": "JS", + "source": "client.index('books').resetTypoTolerance()" }, { "lang": "Java", "source": "client.index(\"books\").resetTypoToleranceSettings();" }, { - "lang": "Ruby", - "source": "index('books').reset_typo_tolerance" + "lang": "PHP", + "source": "$client->index('books')->resetTypoTolerance();" }, { - "lang": "Go", - "source": "client.Index(\"books\").ResetTypoTolerance()" + "lang": "Python", + "source": "client.index('books').reset_typo_tolerance()" }, { - "lang": "C#", - "source": "await client.Index(\"books\").ResetTypoToleranceAsync();" + "lang": "Ruby", + "source": "index('books').reset_typo_tolerance" }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_typo_tolerance()\n .await\n .unwrap();" }, { - "lang": "Dart", - "source": "await client.index('books').resetTypoTolerance();" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" } ] }, @@ -10817,44 +10819,44 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"minWordSizeForTypos\": {\n \"oneTypo\": 4,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n }'" + "lang": "C#", + "source": "var typoTolerance = new TypoTolerance {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeTypos = new TypoTolerance.TypoSize {\n OneTypo = 4,\n TwoTypos = 10\n }\n};\n\nawait client.Index(\"books\").UpdateTypoToleranceAsync(typoTolerance);" }, { - "lang": "JS", - "source": "client.index('books').updateTypoTolerance({\n minWordSizeForTypos: {\n oneTypo: 4,\n twoTypos: 10\n },\n disableOnAttributes: [\n 'title'\n ]\n})" + "lang": "Dart", + "source": "final toUpdate = TypoTolerance(\n minWordSizeForTypos: MinWordSizeForTypos(\n oneTypo: 4,\n twoTypos: 10,\n ),\n disableOnAttributes: ['title'],\n);\nawait client.index('books').updateTypoTolerance(toUpdate);" }, { - "lang": "PHP", - "source": "$client->index('books')->updateTypoTolerance([\n 'minWordSizeForTypos' => [\n 'oneTypo' => 4,\n 'twoTypos' => 10\n ],\n 'disableOnAttributes' => [\n 'title'\n ]\n]);" + "lang": "Go", + "source": "client.Index(\"books\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 4,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n})" }, { - "lang": "Python", - "source": "client.index('books').update_typo_tolerance({\n 'minWordSizeForTypos': {\n 'oneTypo': 4,\n 'twoTypos': 10\n },\n 'disableOnAttributes': [\n 'title'\n ]\n})" + "lang": "JS", + "source": "client.index('books').updateTypoTolerance({\n minWordSizeForTypos: {\n oneTypo: 4,\n twoTypos: 10\n },\n disableOnAttributes: [\n 'title'\n ]\n})" }, { "lang": "Java", "source": "TypoTolerance typoTolerance = new TypoTolerance();\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 4);\n put(\"twoTypos\", 10);\n }\n };\n\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\ntypoTolerance.setDisableOnAttributes(new String[] {\"title\"});\n\nclient.index(\"books\").updateTypoToleranceSettings(typoTolerance);" }, { - "lang": "Ruby", - "source": "index('books').update_typo_tolerance({\n min_word_size_for_typos: {\n one_typo: 4,\n two_typos: 10\n },\n disable_on_attributes: ['title']\n})" + "lang": "PHP", + "source": "$client->index('books')->updateTypoTolerance([\n 'minWordSizeForTypos' => [\n 'oneTypo' => 4,\n 'twoTypos' => 10\n ],\n 'disableOnAttributes' => [\n 'title'\n ]\n]);" }, { - "lang": "Go", - "source": "client.Index(\"books\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 4,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n})" + "lang": "Python", + "source": "client.index('books').update_typo_tolerance({\n 'minWordSizeForTypos': {\n 'oneTypo': 4,\n 'twoTypos': 10\n },\n 'disableOnAttributes': [\n 'title'\n ]\n})" }, { - "lang": "C#", - "source": "var typoTolerance = new TypoTolerance {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeTypos = new TypoTolerance.TypoSize {\n OneTypo = 4,\n TwoTypos = 10\n }\n};\n\nawait client.Index(\"books\").UpdateTypoToleranceAsync(typoTolerance);" + "lang": "Ruby", + "source": "index('books').update_typo_tolerance({\n min_word_size_for_typos: {\n one_typo: 4,\n two_typos: 10\n },\n disable_on_attributes: ['title']\n})" }, { "lang": "Rust", "source": "let typo_tolerance = TypoToleranceSettings {\n enabled: Some(false),\n disable_on_attributes: None,\n disable_on_words: None,\n min_word_size_for_typos: None,\n};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" }, { - "lang": "Dart", - "source": "final toUpdate = TypoTolerance(\n minWordSizeForTypos: MinWordSizeForTypos(\n oneTypo: 4,\n twoTypos: 10,\n ),\n disableOnAttributes: ['title'],\n);\nawait client.index('books').updateTypoTolerance(toUpdate);" + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"minWordSizeForTypos\": {\n \"oneTypo\": 4,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n }'" } ] } @@ -11400,8 +11402,8 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/similar' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"id\": TARGET_DOCUMENT_ID,\n \"embedder\": \"EMBEDDER_NAME\"\n }'" + "lang": "Go", + "source": "resp := new(meilisearch.SimilarDocumentResult)\nclient.Index(\"INDEX_NAME\").SearchSimilarDocuments(&meilisearch.SimilarDocumentQuery{\n Id: \"TARGET_DOCUMENT_ID\",\n Embedder: \"default\",\n}, resp)" }, { "lang": "JS", @@ -11419,13 +11421,13 @@ "lang": "Ruby", "source": "client.index('INDEX_NAME').search_similar_documents('TARGET_DOCUMENT_ID', embedder: 'default')" }, - { - "lang": "Go", - "source": "resp := new(meilisearch.SimilarDocumentResult)\nclient.Index(\"INDEX_NAME\").SearchSimilarDocuments(&meilisearch.SimilarDocumentQuery{\n Id: \"TARGET_DOCUMENT_ID\",\n Embedder: \"default\",\n}, resp)" - }, { "lang": "Rust", "source": "let results = index\n .similar_search(\"TARGET_DOCUMENT_ID\", \"EMBEDDER_NAME\")\n .execute()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/similar' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"id\": TARGET_DOCUMENT_ID,\n \"embedder\": \"EMBEDDER_NAME\"\n }'" } ] } @@ -11517,48 +11519,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/stats'" + "lang": "C#", + "source": "await client.Index(\"movies\").GetStatsAsync();" }, { - "lang": "JS", - "source": "client.index('movies').getStats()" + "lang": "Dart", + "source": "await client.index('movies').getStats();" }, { - "lang": "PHP", - "source": "$client->index('movies')->stats();" + "lang": "Go", + "source": "client.Index(\"movies\").GetStats()" }, { - "lang": "Python", - "source": "client.index('movies').get_stats()" + "lang": "JS", + "source": "client.index('movies').getStats()" }, { "lang": "Java", "source": "client.index(\"movies\").getStats();" }, { - "lang": "Ruby", - "source": "client.index('movies').stats" + "lang": "PHP", + "source": "$client->index('movies')->stats();" }, { - "lang": "Go", - "source": "client.Index(\"movies\").GetStats()" + "lang": "Python", + "source": "client.index('movies').get_stats()" }, { - "lang": "C#", - "source": "await client.Index(\"movies\").GetStatsAsync();" + "lang": "Ruby", + "source": "client.index('movies').stats" }, { "lang": "Rust", "source": "let stats: IndexStats = client\n .index(\"movies\")\n .get_stats()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.index('movies').getStats();" - }, { "lang": "Swift", "source": "client.index(\"movies\").stats { (result) in\n switch result {\n case .success(let stats):\n print(stats)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/stats'" } ] } @@ -11568,8 +11570,8 @@ "tags": [ "Keys" ], - "summary": "List API keys", - "description": "List all API keys", + "summary": "Get API Keys", + "description": "List all API Keys", "operationId": "list_api_keys", "parameters": [ { @@ -11656,48 +11658,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys?limit=3' \\\n -H 'Authorization: Bearer MASTER_KEY'" + "lang": "C#", + "source": "ResourceResults keyResult = await client.GetKeysAsync(new KeysQuery { Limit = 3 });" }, { - "lang": "JS", - "source": "client.getKeys({ limit: 3 })" + "lang": "Dart", + "source": "await client.getKeys(params: KeysQuery(limit: 3));\neate_a_key_1: \"await client.createKey(\\n description: 'Add documents: Products API key',\\n actions: ['documents.add'],\\n indexes: ['products'],\\n expiresAt: DateTime(2042, 04, 02));\"\ndate_a_key_1: \"await client.updateKey(\\n '6062abda-a5aa-4414-ac91-ecd7944c0f8d',\\n description: 'Manage documents: Products\\/Reviews API key',\\n name: 'Products\\/Reviews API key',\\n);\"" }, { - "lang": "PHP", - "source": "$client->getKeys((new KeysQuery())->setLimit(3));" + "lang": "Go", + "source": "client.GetKeys(&meilisearch.KeysQuery{\n Limit: 3\n});" }, { - "lang": "Python", - "source": "client.get_keys({'limit': 3})" + "lang": "JS", + "source": "client.getKeys({ limit: 3 })" }, { "lang": "Java", "source": "KeysQuery query = new KeysQuery().setLimit(3);\nclient.getKeys(query);" }, { - "lang": "Ruby", - "source": "client.keys(limit: 3)" + "lang": "PHP", + "source": "$client->getKeys((new KeysQuery())->setLimit(3));" }, { - "lang": "Go", - "source": "client.GetKeys(&meilisearch.KeysQuery{\n Limit: 3\n});" + "lang": "Python", + "source": "client.get_keys({'limit': 3})" }, { - "lang": "C#", - "source": "ResourceResults keyResult = await client.GetKeysAsync(new KeysQuery { Limit = 3 });" + "lang": "Ruby", + "source": "client.keys(limit: 3)" }, { "lang": "Rust", "source": "let mut query = KeysQuery::new()\n .with_limit(3)\n .execute(&client)\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.getKeys(params: KeysQuery(limit: 3));\neate_a_key_1: \"await client.createKey(\\n description: 'Add documents: Products API key',\\n actions: ['documents.add'],\\n indexes: ['products'],\\n expiresAt: DateTime(2042, 04, 02));\"\ndate_a_key_1: \"await client.updateKey(\\n '6062abda-a5aa-4414-ac91-ecd7944c0f8d',\\n description: 'Manage documents: Products\\/Reviews API key',\\n name: 'Products\\/Reviews API key',\\n);\"" - }, { "lang": "Swift", "source": "client.getKeys(params: KeysQuery(limit: 3)) { result in\n switch result {\n case .success(let keys):\n print(keys)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys?limit=3' \\\n -H 'Authorization: Bearer MASTER_KEY'" } ] }, @@ -11705,7 +11707,7 @@ "tags": [ "Keys" ], - "summary": "Create API key", + "summary": "Create an API Key", "description": "Create an API Key.", "operationId": "create_api_key", "requestBody": { @@ -11772,36 +11774,32 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/keys' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"description\": \"Add documents: Products API key\",\n \"actions\": [\"documents.add\"],\n \"indexes\": [\"products\"],\n \"expiresAt\": \"2042-04-02T00:42:42Z\"\n }'" - }, - { - "lang": "JS", - "source": "client.createKey({\n description: 'Add documents: Products API key',\n actions: ['documents.add'],\n indexes: ['products'],\n expiresAt: '2021-11-13T00:00:00Z'\n})" + "lang": "C#", + "source": "Key keyOptions = new Key\n{\n Description = \"Add documents: Products API key\",\n Actions = new KeyAction[] { KeyAction.DocumentsAdd },\n Indexes = new string[] { \"products\" },\n ExpiresAt = DateTime.Parse(\"2042-04-02T00:42:42Z\")\n};\nKey createdKey = await this.client.CreateKeyAsync(keyOptions);" }, { - "lang": "PHP", - "source": "$client->createKey([\n 'description' => 'Add documents: Products API key',\n 'actions' => ['documents.add'],\n 'indexes' => ['products'],\n 'expiresAt' => '2042-04-02T00:42:42Z',\n]);" + "lang": "Go", + "source": "client.CreateKey(&meilisearch.Key{\n Description: \"Add documents: Products API key\",\n Actions: []string{\"documents.add\"},\n Indexes: []string{\"products\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" }, { - "lang": "Python", - "source": "client.create_key(options={\n 'description': 'Add documents: Products API key',\n 'actions': ['documents.add'],\n 'indexes': ['products'],\n 'expiresAt': '2042-04-02T00:42:42Z'\n})" + "lang": "JS", + "source": "client.createKey({\n description: 'Add documents: Products API key',\n actions: ['documents.add'],\n indexes: ['products'],\n expiresAt: '2021-11-13T00:00:00Z'\n})" }, { "lang": "Java", "source": "SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\nDate dateParsed = format.parse(\"2042-04-02T00:42:42Z\");\n\nKey keyInfo = new Key();\n\nkeyInfo.setDescription(\"Add documents: Products API key\");\nkeyInfo.setActions(new String[] {\"documents.add\"});\nkeyInfo.setIndexes(new String[] {\"products\"});\nkeyInfo.setExpiresAt(dateParsed);\n\nclient.createKey(keyInfo);" }, { - "lang": "Ruby", - "source": "client.create_key(\n description: 'Add documents: Products API key',\n actions: ['documents.add'],\n indexes: ['products'],\n expires_at: '2042-04-02T00:42:42Z'\n)" + "lang": "PHP", + "source": "$client->createKey([\n 'description' => 'Add documents: Products API key',\n 'actions' => ['documents.add'],\n 'indexes' => ['products'],\n 'expiresAt' => '2042-04-02T00:42:42Z',\n]);" }, { - "lang": "Go", - "source": "client.CreateKey(&meilisearch.Key{\n Description: \"Add documents: Products API key\",\n Actions: []string{\"documents.add\"},\n Indexes: []string{\"products\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" + "lang": "Python", + "source": "client.create_key(options={\n 'description': 'Add documents: Products API key',\n 'actions': ['documents.add'],\n 'indexes': ['products'],\n 'expiresAt': '2042-04-02T00:42:42Z'\n})" }, { - "lang": "C#", - "source": "Key keyOptions = new Key\n{\n Description = \"Add documents: Products API key\",\n Actions = new KeyAction[] { KeyAction.DocumentsAdd },\n Indexes = new string[] { \"products\" },\n ExpiresAt = DateTime.Parse(\"2042-04-02T00:42:42Z\")\n};\nKey createdKey = await this.client.CreateKeyAsync(keyOptions);" + "lang": "Ruby", + "source": "client.create_key(\n description: 'Add documents: Products API key',\n actions: ['documents.add'],\n indexes: ['products'],\n expires_at: '2042-04-02T00:42:42Z'\n)" }, { "lang": "Rust", @@ -11810,6 +11808,10 @@ { "lang": "Swift", "source": "let keyParams = KeyParams(\n description: \"Add documents: Products API key\",\n actions: [\"documents.add\"],\n indexes: [\"products\"],\n expiresAt: \"2042-04-02T00:42:42Z\"\n)\nclient.createKey(keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/keys' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"description\": \"Add documents: Products API key\",\n \"actions\": [\"documents.add\"],\n \"indexes\": [\"products\"],\n \"expiresAt\": \"2042-04-02T00:42:42Z\"\n }'" } ] } @@ -11819,7 +11821,7 @@ "tags": [ "Keys" ], - "summary": "Get API key", + "summary": "Get an API Key", "description": "Get an API key from its `uid` or its `key` field.", "operationId": "get_api_key", "parameters": [ @@ -11889,48 +11891,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" + "lang": "C#", + "source": "Key key = await client.GetKeyAsync(\"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4\");" }, { - "lang": "JS", - "source": "client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + "lang": "Dart", + "source": "await client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" }, { - "lang": "PHP", - "source": "$client->getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" + "lang": "Go", + "source": "client.GetKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" }, { - "lang": "Python", - "source": "client.get_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + "lang": "JS", + "source": "client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" }, { "lang": "Java", "source": "client.getKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\");" }, { - "lang": "Ruby", - "source": "client.key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + "lang": "PHP", + "source": "$client->getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" }, { - "lang": "Go", - "source": "client.GetKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + "lang": "Python", + "source": "client.get_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" }, { - "lang": "C#", - "source": "Key key = await client.GetKeyAsync(\"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4\");" + "lang": "Ruby", + "source": "client.key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" }, { "lang": "Rust", "source": "let key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" - }, { "lang": "Swift", "source": "client.getKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" } ] }, @@ -11938,7 +11940,7 @@ "tags": [ "Keys" ], - "summary": "Delete API key", + "summary": "Delete a key", "description": "Delete the specified API key.", "operationId": "delete_api_key", "parameters": [ @@ -11986,48 +11988,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" + "lang": "C#", + "source": "client.DeleteKeyAsync(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" }, { - "lang": "JS", - "source": "client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + "lang": "Dart", + "source": "await client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" }, { - "lang": "PHP", - "source": "$client->deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" + "lang": "Go", + "source": "client.DeleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" }, { - "lang": "Python", - "source": "client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + "lang": "JS", + "source": "client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" }, { "lang": "Java", "source": "client.deleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" }, { - "lang": "Ruby", - "source": "client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" + "lang": "PHP", + "source": "$client->deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" }, { - "lang": "Go", - "source": "client.DeleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + "lang": "Python", + "source": "client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" }, { - "lang": "C#", - "source": "client.DeleteKeyAsync(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + "lang": "Ruby", + "source": "client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" }, { "lang": "Rust", "source": "let key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();\nclient\n .delete_key(&key)\n .await?;\nthorization_header_1:\nlet client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet keys = client\n.get_keys()\n.await\n.unwrap();" }, - { - "lang": "Dart", - "source": "await client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" - }, { "lang": "Swift", "source": "client.deleteKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success:\n print(\"success\")\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" } ] }, @@ -12035,7 +12037,7 @@ "tags": [ "Keys" ], - "summary": "Update API key", + "summary": "Update a Key", "description": "Update the name and description of an API key. Updates to keys are partial.\nThis means you should provide only the fields you intend to update, as any\nfields not present in the payload will remain unchanged.", "operationId": "patch_api_key", "parameters": [ @@ -12115,13 +12117,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"name\": \"Products/Reviews API key\",\n \"description\": \"Manage documents: Products/Reviews API key\"\n }'" + "lang": "C#", + "source": "await client.UpdateKeyAsync(\n \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\",\n description: \"Manage documents: Products/Reviews API key\",\n name: \"Products/Reviews API key\"\n)" + }, + { + "lang": "Go", + "source": "client.UpdateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", &meilisearch.Key{\n Description: \"Manage documents: Products/Reviews API key\",\n Actions: []string{\"documents.add\", \"document.delete\"},\n Indexes: []string{\"products\", \"reviews\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" }, { "lang": "JS", "source": "client.updateKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d', {\n name: 'Products/Reviews API key',\n description: 'Manage documents: Products/Reviews API key',\n})" }, + { + "lang": "Java", + "source": "KeyUpdate keyChanges = new KeyUpdate();\nkeyChanges.setName(\"Products/Reviews API key\");\nkeyChanges.setDescription(\"Manage documents: Products/Reviews API key\");\n\nclient.updateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", keyChanges);" + }, { "lang": "PHP", "source": "$client->updateKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n [\n 'name' => 'Products/Reviews API key',\n 'description' => 'Manage documents: Products/Reviews API key'\n ]);" @@ -12130,22 +12140,10 @@ "lang": "Python", "source": "client.update_key(key_or_uid='6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n options={\n 'name': 'Products/Reviews API key',\n 'description': 'Manage documents: Products/Reviews API key'\n})" }, - { - "lang": "Java", - "source": "KeyUpdate keyChanges = new KeyUpdate();\nkeyChanges.setName(\"Products/Reviews API key\");\nkeyChanges.setDescription(\"Manage documents: Products/Reviews API key\");\n\nclient.updateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", keyChanges);" - }, { "lang": "Ruby", "source": "client.update_key(\n '6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n {\n description: 'Manage documents: Products/Reviews API key',\n name: 'Products/Reviews API key'\n }\n)" }, - { - "lang": "Go", - "source": "client.UpdateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", &meilisearch.Key{\n Description: \"Manage documents: Products/Reviews API key\",\n Actions: []string{\"documents.add\", \"document.delete\"},\n Indexes: []string{\"products\", \"reviews\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" - }, - { - "lang": "C#", - "source": "await client.UpdateKeyAsync(\n \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\",\n description: \"Manage documents: Products/Reviews API key\",\n name: \"Products/Reviews API key\"\n)" - }, { "lang": "Rust", "source": "let mut key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();\nkey\n .with_description(\"Manage documents: Products/Reviews API key\".to_string())\n .with_name(\"Products/Reviews API key\".to_string())\n .update(&client)\n .await\n .unwrap();" @@ -12153,6 +12151,10 @@ { "lang": "Swift", "source": "let keyParams = KeyUpdateParams(\n description: \"Manage documents: Products/Reviews API key\",\n name: \"Products/Reviews API key\"\n)\n\nclient.updateKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", keyParams: keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"name\": \"Products/Reviews API key\",\n \"description\": \"Manage documents: Products/Reviews API key\"\n }'" } ] } @@ -12160,7 +12162,7 @@ "/logs/stderr": { "post": { "tags": [ - "Experimental features" + "Logs" ], "summary": "Update target of the console logs", "description": "This route lets you specify at runtime the level of the console logs\noutputted on stderr.", @@ -12216,7 +12218,7 @@ "/logs/stream": { "post": { "tags": [ - "Experimental features" + "Logs" ], "summary": "Retrieve logs", "description": "Stream logs over HTTP. The format of the logs depends on the\nconfiguration specified in the payload. The logs are sent as multi-part,\nand the stream never stops, so make sure your clients correctly handle\nthat. To make the server stop sending you logs, you can call the `DELETE\n/logs/stream` route.\n\nThere can only be one listener at a timeand an error will be returned if\nyou call this route while it's being used by another client.", @@ -12294,7 +12296,7 @@ }, "delete": { "tags": [ - "Experimental features" + "Logs" ], "summary": "Stop retrieving logs", "description": "Call this route to make the engine stops sending logs through the `POST\n/logs/stream` route.", @@ -12394,7 +12396,7 @@ "/multi-search": { "post": { "tags": [ - "Search" + "Multi-search" ], "summary": "Perform a multi-search", "description": "Bundle multiple search queries in a single API request. Use this endpoint\nto search through multiple indexes at once.", @@ -12474,13 +12476,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/multi-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"queries\": [\n {\n \"indexUid\": \"movies\",\n \"q\": \"pooh\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movies\",\n \"q\": \"nemo\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movie_ratings\",\n \"q\": \"us\"\n }\n ]\n }'" + "lang": "C#", + "source": "await client.MultiSearchAsync(new MultiSearchQuery()\n{\n Queries = new System.Collections.Generic.List()\n {\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"booh\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"nemo\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movie_ratings\",\n Q = \"us\",\n },\n }\n});" + }, + { + "lang": "Go", + "source": "client.MultiSearch(&MultiSearchRequest{\n Queries: []SearchRequest{\n {\n IndexUID: \"movies\",\n Query: \"pooh\",\n Limit: 5,\n },\n {\n IndexUID: \"movies\",\n Query: \"nemo\",\n Limit: 5,\n },\n {\n IndexUID: \"movie_ratings\",\n Query: \"us\",\n },\n },\n})" }, { "lang": "JS", "source": "client.multiSearch({ queries: [\n {\n indexUid: 'movies',\n q: 'pooh',\n limit: 5,\n },\n {\n indexUid: 'movies',\n q: 'nemo',\n limit: 5,\n },\n {\n indexUid: 'movie_ratings',\n q: 'us',\n },\n]})" }, + { + "lang": "Java", + "source": "MultiSearchRequest multiSearchRequest = new MultiSearchRequest();\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"pooh\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"nemo\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movie_ratings\").setQuery(\"us\"));\n\nclient.multiSearch(multiSearchRequest);\nt_similar_post_1:\nSimilarDocumentRequest query = new SimilarDocumentRequest()\n .setId(\"143\")\n .setEmbedder(\"manual\");\nclient.index(\"movies\").searchSimilarDocuments(query)" + }, { "lang": "PHP", "source": "$client->multiSearch([\n (new SearchQuery())\n ->setIndexUid('movies')\n ->setQuery('pooh')\n ->setLimit(5),\n (new SearchQuery())\n ->setIndexUid('movies')\n ->setQuery('nemo')\n ->setLimit(5),\n (new SearchQuery())\n ->setIndexUid('movie_ratings')\n ->setQuery('us')\n ]);" @@ -12489,25 +12499,17 @@ "lang": "Python", "source": "client.multi_search(\n [\n {'indexUid': 'movies', 'q': 'pooh', 'limit': 5},\n {'indexUid': 'movies', 'q': 'nemo', 'limit': 5},\n {'indexUid': 'movie_ratings', 'q': 'us'}\n ]\n)" }, - { - "lang": "Java", - "source": "MultiSearchRequest multiSearchRequest = new MultiSearchRequest();\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"pooh\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"nemo\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movie_ratings\").setQuery(\"us\"));\n\nclient.multiSearch(multiSearchRequest);\nt_similar_post_1:\nSimilarDocumentRequest query = new SimilarDocumentRequest()\n .setId(\"143\")\n .setEmbedder(\"manual\");\nclient.index(\"movies\").searchSimilarDocuments(query)" - }, { "lang": "Ruby", "source": "client.multi_search([\n { index_uid: 'books', q: 'prince' },\n { index_uid: 'movies', q: 'pooh', limit: 5 }\n { index_uid: 'movies', q: 'nemo', limit: 5 }\n { index_uid: 'movie_ratings', q: 'us' }\n])" }, - { - "lang": "Go", - "source": "client.MultiSearch(&MultiSearchRequest{\n Queries: []SearchRequest{\n {\n IndexUID: \"movies\",\n Query: \"pooh\",\n Limit: 5,\n },\n {\n IndexUID: \"movies\",\n Query: \"nemo\",\n Limit: 5,\n },\n {\n IndexUID: \"movie_ratings\",\n Query: \"us\",\n },\n },\n})" - }, - { - "lang": "C#", - "source": "await client.MultiSearchAsync(new MultiSearchQuery()\n{\n Queries = new System.Collections.Generic.List()\n {\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"booh\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"nemo\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movie_ratings\",\n Q = \"us\",\n },\n }\n});" - }, { "lang": "Rust", "source": "let movie = client.index(\"movie\");\nlet movie_ratings = client.index(\"movie_ratings\");\n\nlet search_query_1 = SearchQuery::new(&movie)\n .with_query(\"pooh\")\n .with_limit(5)\n .build();\nlet search_query_2 = SearchQuery::new(&movie)\n .with_query(\"nemo\")\n .with_limit(5)\n .build();\nlet search_query_3 = SearchQuery::new(&movie_ratings)\n .with_query(\"us\")\n .build();\n\nlet response = client\n .multi_search()\n .with_search_query(search_query_1)\n .with_search_query(search_query_2)\n .with_search_query(search_query_3)\n .execute::()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/multi-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"queries\": [\n {\n \"indexUid\": \"movies\",\n \"q\": \"pooh\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movies\",\n \"q\": \"nemo\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movie_ratings\",\n \"q\": \"us\"\n }\n ]\n }'" } ] } @@ -12515,7 +12517,7 @@ "/network": { "get": { "tags": [ - "Experimental features" + "Network" ], "summary": "Get network topology", "description": "Get a list of all Meilisearch instances currently known to this instance.", @@ -12578,8 +12580,8 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/network'" + "lang": "Go", + "source": "client.GetNetwork();" }, { "lang": "PHP", @@ -12589,21 +12591,21 @@ "lang": "Python", "source": "client.get_all_networks()" }, - { - "lang": "Go", - "source": "client.GetNetwork();" - }, { "lang": "Rust", "source": "let network = client\n .get_network_state()\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/network'" } ] }, "patch": { "tags": [ - "Experimental features" + "Network" ], - "summary": "Configure network topology", + "summary": "Configure Network", "description": "Add or remove nodes from network.", "operationId": "patch_network", "requestBody": { @@ -12674,8 +12676,8 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/network' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"self\": \"ms-00\",\n \"remotes\": {\n \"ms-00\": {\n \"url\": \"http://INSTANCE_URL\",\n \"searchApiKey\": \"INSTANCE_API_KEY\"\n },\n \"ms-01\": {\n \"url\": \"http://ANOTHER_INSTANCE_URL\",\n \"searchApiKey\": \"ANOTHER_INSTANCE_API_KEY\"\n }\n }\n }'" + "lang": "Go", + "source": "client.UpdateNetwork(&meilisearch.UpdateNetworkRequest{\n Self: meilisearch.String(\"ms-00\"),\n Leader: meilisearch.String(\"ms-00\"),\n Remotes: meilisearch.NewOpt(map[string]meilisearch.Opt[meilisearch.Remote]{\n \"ms-00\": meilisearch.NewOpt(meilisearch.Remote{\n URL: meilisearch.String(\"https://meilisearch.com\"),\n SearchAPIKey: meilisearch.String(\"ReadKey\"),\n WriteAPIKey: meilisearch.String(\"WriteKey\"),\n },\n },\n});" }, { "lang": "PHP", @@ -12685,13 +12687,13 @@ "lang": "Python", "source": "client.add_or_update_networks({\n \"remotes\": {\n \"http://localhost:7700\": {\n \"searchApiKey\": \"masterKey\"\n }\n },\n \"leader\": None\n})" }, - { - "lang": "Go", - "source": "client.UpdateNetwork(&meilisearch.UpdateNetworkRequest{\n Self: meilisearch.String(\"ms-00\"),\n Leader: meilisearch.String(\"ms-00\"),\n Remotes: meilisearch.NewOpt(map[string]meilisearch.Opt[meilisearch.Remote]{\n \"ms-00\": meilisearch.NewOpt(meilisearch.Remote{\n URL: meilisearch.String(\"https://meilisearch.com\"),\n SearchAPIKey: meilisearch.String(\"ReadKey\"),\n WriteAPIKey: meilisearch.String(\"WriteKey\"),\n },\n },\n});" - }, { "lang": "Rust", "source": "let mut remotes = std::collections::HashMap::new();\nremotes.insert(String::from(\"ms-01\"), Some(meilisearch_sdk::network::RemoteConfig {\n url: \"https://ms-01.enterprise.meilisearch.com\".to_string(),\n search_api_key: \"SEARCH_API_KEY\".to_string(),\n write_api_key: Some(\"WRITE_API_KEY\".to_string()),\n}));\n// Remove ms-00 from the topology\nremotes.insert(String::from(\"ms-00\"), None);\n\nlet update = meilisearch_sdk::network::NetworkUpdate {\n leader: Some(\"ms-01\".to_string()),\n remotes: Some(remotes),\n ..meilisearch_sdk::network::NetworkUpdate::default()\n};\n\nlet task: TaskInfo = client\n .update_network_state(&update)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/network' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"self\": \"ms-00\",\n \"remotes\": {\n \"ms-00\": {\n \"url\": \"http://INSTANCE_URL\",\n \"searchApiKey\": \"INSTANCE_API_KEY\"\n },\n \"ms-01\": {\n \"url\": \"http://ANOTHER_INSTANCE_URL\",\n \"searchApiKey\": \"ANOTHER_INSTANCE_API_KEY\"\n }\n }\n }'" } ] } @@ -12699,9 +12701,9 @@ "/snapshots": { "post": { "tags": [ - "Backups" + "Snapshots" ], - "summary": "Create snapshot", + "summary": "Create a snapshot", "description": "Triggers a snapshot creation process. Once the process is complete, a snapshot is created in the snapshot directory. If the snapshot directory does not exist yet, it will be created.", "operationId": "create_snapshot", "responses": { @@ -12750,13 +12752,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/snapshots'" + "lang": "C#", + "source": "await client.CreateSnapshotAsync();" + }, + { + "lang": "Go", + "source": "client.CreateSnapshot()" }, { "lang": "JS", "source": "client.createSnapshot()" }, + { + "lang": "Java", + "source": "client.createSnapshot();" + }, { "lang": "PHP", "source": "$client->createSnapshot();" @@ -12765,22 +12775,10 @@ "lang": "Python", "source": "client.create_snapshot()" }, - { - "lang": "Java", - "source": "client.createSnapshot();" - }, { "lang": "Ruby", "source": "client.create_snapshot" }, - { - "lang": "Go", - "source": "client.CreateSnapshot()" - }, - { - "lang": "C#", - "source": "await client.CreateSnapshotAsync();" - }, { "lang": "Rust", "source": "client\n .create_snapshot()\n .await\n .unwrap();" @@ -12788,6 +12786,10 @@ { "lang": "Swift", "source": "let task = try await self.client.createSnapshot()" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/snapshots'" } ] } @@ -12797,7 +12799,7 @@ "tags": [ "Stats" ], - "summary": "Get stats of all indexes", + "summary": "Get stats of all indexes.", "description": "Get stats of all indexes.", "operationId": "get_stats", "responses": { @@ -12857,48 +12859,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/stats'" + "lang": "C#", + "source": "await client.GetStatsAsync();" }, { - "lang": "JS", - "source": "client.getStats()" + "lang": "Dart", + "source": "await client.getStats();" }, { - "lang": "PHP", - "source": "$client->stats();" + "lang": "Go", + "source": "client.GetStats()" }, { - "lang": "Python", - "source": "client.get_all_stats()" + "lang": "JS", + "source": "client.getStats()" }, { "lang": "Java", "source": "client.getStats();" }, { - "lang": "Ruby", - "source": "client.stats" + "lang": "PHP", + "source": "$client->stats();" }, { - "lang": "Go", - "source": "client.GetStats()" + "lang": "Python", + "source": "client.get_all_stats()" }, { - "lang": "C#", - "source": "await client.GetStatsAsync();" + "lang": "Ruby", + "source": "client.stats" }, { "lang": "Rust", "source": "let stats: ClientStats = client\n .get_stats()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.getStats();" - }, { "lang": "Swift", "source": "client.allStats { (result) in\n switch result {\n case .success(let stats):\n print(stats)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/stats'" } ] } @@ -12969,13 +12971,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/swap-indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"indexes\": [\n \"indexA\",\n \"indexB\"\n ]\n },\n {\n \"indexes\": [\n \"indexX\",\n \"indexY\"\n ]\n }\n ]'" + "lang": "C#", + "source": "await client.SwapIndexesAsync(new List { new IndexSwap(\"indexA\", \"indexB\"), new IndexSwap(\"indexX\", \"indexY\") } });" + }, + { + "lang": "Go", + "source": "client.SwapIndexes([]SwapIndexesParams{\n {Indexes: []string{\"indexA\", \"indexB\"}},\n {Indexes: []string{\"indexX\", \"indexY\"}},\n})" }, { "lang": "JS", "source": "client.swapIndexes([\n { 'indexes': ['indexA', 'indexB'] },\n { 'indexes': ['indexX', 'indexY'] }\n])" }, + { + "lang": "Java", + "source": "SwapIndexesParams[] params =\n new SwapIndexesParams[] {\n new SwapIndexesParams().setIndexes(new String[] {\"indexA\", \"indexB\"}),\n new SwapIndexesParams().setIndexes(new String[] {\"indexX\", \"indexY\"})\n };\nTaskInfo task = client.swapIndexes(params);" + }, { "lang": "PHP", "source": "$client->swapIndexes([['indexA', 'indexB'], ['indexX', 'indexY']]);" @@ -12984,22 +12994,10 @@ "lang": "Python", "source": "client.swap_indexes([{'indexes': ['indexA', 'indexB']}, {'indexes': ['indexX', 'indexY']}])" }, - { - "lang": "Java", - "source": "SwapIndexesParams[] params =\n new SwapIndexesParams[] {\n new SwapIndexesParams().setIndexes(new String[] {\"indexA\", \"indexB\"}),\n new SwapIndexesParams().setIndexes(new String[] {\"indexX\", \"indexY\"})\n };\nTaskInfo task = client.swapIndexes(params);" - }, { "lang": "Ruby", "source": "client.swap_indexes(['indexA', 'indexB'], ['indexX', 'indexY'])" }, - { - "lang": "Go", - "source": "client.SwapIndexes([]SwapIndexesParams{\n {Indexes: []string{\"indexA\", \"indexB\"}},\n {Indexes: []string{\"indexX\", \"indexY\"}},\n})" - }, - { - "lang": "C#", - "source": "await client.SwapIndexesAsync(new List { new IndexSwap(\"indexA\", \"indexB\"), new IndexSwap(\"indexX\", \"indexY\") } });" - }, { "lang": "Rust", "source": "client.swap_indexes([\n &SwapIndexes {\n indexes: (\n \"indexA\".to_string(),\n \"indexB\".to_string(),\n ),\n }, &SwapIndexes {\n indexes: (\n \"indexX\".to_string(),\n \"indexY\".to_string(),\n ),\n}])" @@ -13007,6 +13005,10 @@ { "lang": "Swift", "source": "let task = try await self.client.swapIndexes([\n (\"indexA\", \"indexB\"),\n (\"indexX\", \"indexY\")\n])" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/swap-indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"indexes\": [\n \"indexA\",\n \"indexB\"\n ]\n },\n {\n \"indexes\": [\n \"indexX\",\n \"indexY\"\n ]\n }\n ]'" } ] } @@ -13014,16 +13016,16 @@ "/tasks": { "get": { "tags": [ - "Async task management" + "Tasks" ], - "summary": "List tasks", + "summary": "Get all tasks", "description": "Get all [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)", "operationId": "get_tasks", "parameters": [ { "name": "limit", "in": "query", - "description": "Maximum number of batches to return", + "description": "Maximum number of results to return.", "required": false, "schema": { "type": "integer", @@ -13036,7 +13038,7 @@ { "name": "from", "in": "query", - "description": "`uid` of the first batch returned", + "description": "Fetch the next set of results from the given uid.", "required": false, "schema": { "type": "integer", @@ -13048,7 +13050,7 @@ { "name": "reverse", "in": "query", - "description": "If `true`, returns results in the reverse order, from oldest to most recent", + "description": "The order you want to retrieve the objects.", "required": false, "schema": { "type": "boolean" @@ -13274,13 +13276,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks'" + "lang": "Dart", + "source": "await client.getTasks();" + }, + { + "lang": "Go", + "source": "client.GetTasks(nil);" }, { "lang": "JS", "source": "client.tasks.getTasks()" }, + { + "lang": "Java", + "source": "client.getTasks();" + }, { "lang": "PHP", "source": "$client->getTasks();" @@ -13289,35 +13299,27 @@ "lang": "Python", "source": "client.get_tasks()" }, - { - "lang": "Java", - "source": "client.getTasks();" - }, { "lang": "Ruby", "source": "client.tasks" }, - { - "lang": "Go", - "source": "client.GetTasks(nil);" - }, { "lang": "Rust", "source": "let tasks: TasksResults = client\n .get_tasks()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.getTasks();" - }, { "lang": "Swift", "source": "client.getTasks { (result) in\n switch result {\n case .success(let tasks):\n print(tasks)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks'" } ] }, "delete": { "tags": [ - "Async task management" + "Tasks" ], "summary": "Delete tasks", "description": "Delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) on filter", @@ -13565,48 +13567,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/tasks?uids=1,2'" + "lang": "C#", + "source": "await client.DeleteTasksAsync(new DeleteTasksQuery { Uids = new List { 1, 2 } });" }, { - "lang": "JS", - "source": "client.tasks.deleteTasks({ uids: [1, 2] })" + "lang": "Dart", + "source": "await client.deleteTasks(params: DeleteTasksQuery(uids: [1, 2]));" }, { - "lang": "PHP", - "source": "$client->deleteTasks((new DeleteTasksQuery())->setUids([1, 2]));" + "lang": "Go", + "source": "client.DeleteTaks(&meilisearch.DeleteTasksQuery{\n UIDS: []int64{1, 2},\n});" }, { - "lang": "Python", - "source": "client.delete_tasks({'uids': ['1', '2']})" + "lang": "JS", + "source": "client.tasks.deleteTasks({ uids: [1, 2] })" }, { "lang": "Java", "source": "DeleteTasksQuery query = new DeleteTasksQuery().setUids(new int[] {1, 2})\nclient.deleteTasks(query);" }, { - "lang": "Ruby", - "source": "client.delete_tasks(uids: [1, 2])" + "lang": "PHP", + "source": "$client->deleteTasks((new DeleteTasksQuery())->setUids([1, 2]));" }, { - "lang": "Go", - "source": "client.DeleteTaks(&meilisearch.DeleteTasksQuery{\n UIDS: []int64{1, 2},\n});" + "lang": "Python", + "source": "client.delete_tasks({'uids': ['1', '2']})" }, { - "lang": "C#", - "source": "await client.DeleteTasksAsync(new DeleteTasksQuery { Uids = new List { 1, 2 } });" + "lang": "Ruby", + "source": "client.delete_tasks(uids: [1, 2])" }, { "lang": "Rust", "source": "let mut query = tasks::TasksDeleteQuery::new(&client);\nquery.with_uids([1, 2]);\n\nlet res = client.delete_tasks_with(&query).await.unwrap();" }, - { - "lang": "Dart", - "source": "await client.deleteTasks(params: DeleteTasksQuery(uids: [1, 2]));" - }, { "lang": "Swift", "source": "client.deleteTasks(filter: DeleteTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/tasks?uids=1,2'" } ] } @@ -13614,7 +13616,7 @@ "/tasks/cancel": { "post": { "tags": [ - "Async task management" + "Tasks" ], "summary": "Cancel tasks", "description": "Cancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", @@ -13862,48 +13864,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/tasks/cancel?uids=1,2'" + "lang": "C#", + "source": "await client.CancelTasksAsync(new CancelTasksQuery { Uids = new List { 1, 2 } });" }, { - "lang": "JS", - "source": "client.tasks.cancelTasks({ uids: [1, 2] })" + "lang": "Dart", + "source": "await client.cancelTasks(params: CancelTasksQuery(uids: [1, 2]));" }, { - "lang": "PHP", - "source": "$client->cancelTasks((new CancelTasksQuery())->setUids([1, 2]));" + "lang": "Go", + "source": "client.CancelTasks(&meilisearch.CancelTasksQuery{\n UIDS: []int64{1, 2},\n});" }, { - "lang": "Python", - "source": "client.cancel_tasks({'uids': ['1', '2']})" + "lang": "JS", + "source": "client.tasks.cancelTasks({ uids: [1, 2] })" }, { "lang": "Java", "source": "CancelTasksQuery query = new CancelTasksQuery().setUids(new int[] {1, 2})\nclient.cancelTasks(query);" }, { - "lang": "Ruby", - "source": "client.cancel_tasks(uids: [1, 2])" + "lang": "PHP", + "source": "$client->cancelTasks((new CancelTasksQuery())->setUids([1, 2]));" }, { - "lang": "Go", - "source": "client.CancelTasks(&meilisearch.CancelTasksQuery{\n UIDS: []int64{1, 2},\n});" + "lang": "Python", + "source": "client.cancel_tasks({'uids': ['1', '2']})" }, { - "lang": "C#", - "source": "await client.CancelTasksAsync(new CancelTasksQuery { Uids = new List { 1, 2 } });" + "lang": "Ruby", + "source": "client.cancel_tasks(uids: [1, 2])" }, { "lang": "Rust", "source": "let mut query = tasks::TasksCancelQuery::new(&client);\nquery.with_uids([1, 2]);\n\nlet res = client.cancel_task_with(&query).await.unwrap();" }, - { - "lang": "Dart", - "source": "await client.cancelTasks(params: CancelTasksQuery(uids: [1, 2]));" - }, { "lang": "Swift", "source": "client.cancelTasks(filter: CancelTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/tasks/cancel?uids=1,2'" } ] } @@ -13911,9 +13913,9 @@ "/tasks/{taskUid}": { "get": { "tags": [ - "Async task management" + "Tasks" ], - "summary": "Get task", + "summary": "Get a task", "description": "Get a [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", "operationId": "get_task", "parameters": [ @@ -13997,13 +13999,21 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks/1'" + "lang": "Dart", + "source": "await client.getTask(1);" + }, + { + "lang": "Go", + "source": "client.GetTask(1);" }, { "lang": "JS", "source": "client.tasks.getTask(1)" }, + { + "lang": "Java", + "source": "client.getTask(1);" + }, { "lang": "PHP", "source": "$client->getTask(1);" @@ -14012,29 +14022,21 @@ "lang": "Python", "source": "client.get_task(1)" }, - { - "lang": "Java", - "source": "client.getTask(1);" - }, { "lang": "Ruby", "source": "client.task(1)" }, - { - "lang": "Go", - "source": "client.GetTask(1);" - }, { "lang": "Rust", "source": "let task: Task = client\n .get_task(1)\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.getTask(1);" - }, { "lang": "Swift", "source": "client.getTask(taskUid: 1) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks/1'" } ] } @@ -14090,48 +14092,48 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/version'" + "lang": "C#", + "source": "await client.GetVersionAsync();" }, { - "lang": "JS", - "source": "client.getVersion()" + "lang": "Dart", + "source": "await client.getVersion();" }, { - "lang": "PHP", - "source": "$client->version();" + "lang": "Go", + "source": "client.GetVersion()" }, { - "lang": "Python", - "source": "client.get_version()" + "lang": "JS", + "source": "client.getVersion()" }, { "lang": "Java", "source": "client.getVersion();" }, { - "lang": "Ruby", - "source": "client.version" + "lang": "PHP", + "source": "$client->version();" }, { - "lang": "Go", - "source": "client.GetVersion()" + "lang": "Python", + "source": "client.get_version()" }, { - "lang": "C#", - "source": "await client.GetVersionAsync();" + "lang": "Ruby", + "source": "client.version" }, { "lang": "Rust", "source": "let version: Version = client\n .get_version()\n .await\n .unwrap();" }, - { - "lang": "Dart", - "source": "await client.getVersion();" - }, { "lang": "Swift", "source": "client.version { (result) in\n switch result {\n case .success(let version):\n print(version)\n case .failure(let error):\n print(error)\n }\n}" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/version'" } ] } @@ -14201,8 +14203,8 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks'" + "lang": "Go", + "source": "client.ListWebhooks();" }, { "lang": "JS", @@ -14212,13 +14214,13 @@ "lang": "Python", "source": "client.get_webhooks()" }, - { - "lang": "Go", - "source": "client.ListWebhooks();" - }, { "lang": "Rust", "source": "let webhooks = client.get_webhooks().await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks'" } ] }, @@ -14226,7 +14228,7 @@ "tags": [ "Webhooks" ], - "summary": "Create webhook", + "summary": "Create a webhook", "description": "Create a new webhook to receive task notifications.", "operationId": "post_webhook", "requestBody": { @@ -14290,8 +14292,8 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/webhooks' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"WEBHOOK_TARGET_URL\",\n \"headers\": {\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n }\n }'" + "lang": "Go", + "source": "client.AddWebhook(&meilisearch.AddWebhookRequest{\n URL: \"WEBHOOK_TARGET_URL\",\n Headers: map[string]string{\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n },\n});" }, { "lang": "JS", @@ -14301,13 +14303,13 @@ "lang": "Python", "source": "client.create_webhook({\n 'url': 'https://example.com/webhook',\n 'headers': {\"Authorization\":\"\", \"X-Custom-Header\":\"test\"},\n})" }, - { - "lang": "Go", - "source": "client.AddWebhook(&meilisearch.AddWebhookRequest{\n URL: \"WEBHOOK_TARGET_URL\",\n Headers: map[string]string{\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n },\n});" - }, { "lang": "Rust", "source": "let mut payload = meilisearch_sdk::webhooks::WebhookCreate::new(\"WEBHOOK_TARGET_URL\");\npayload\n .insert_header(\"authorization\", \"SECURITY_KEY\")\n .insert_header(\"referer\", \"https://example.com\");\nlet webhook = client.create_webhook(&payload).await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/webhooks' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"WEBHOOK_TARGET_URL\",\n \"headers\": {\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n }\n }'" } ] } @@ -14317,7 +14319,7 @@ "tags": [ "Webhooks" ], - "summary": "Get webhook", + "summary": "Get a webhook", "description": "Get a single webhook by its UUID.", "operationId": "get_webhook", "parameters": [ @@ -14384,8 +14386,8 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID'" + "lang": "Go", + "source": "client.GetWebhook(\"WEBHOOK_UUID\");" }, { "lang": "JS", @@ -14395,13 +14397,13 @@ "lang": "Python", "source": "client.get_webhook('WEBHOOK_UID')" }, - { - "lang": "Go", - "source": "client.GetWebhook(\"WEBHOOK_UUID\");" - }, { "lang": "Rust", "source": "let webhook = client.get_webhook(\"WEBHOOK_UUID\").await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID'" } ] }, @@ -14409,7 +14411,7 @@ "tags": [ "Webhooks" ], - "summary": "Delete webhook", + "summary": "Delete a webhook", "description": "Delete an existing webhook by its UUID.", "operationId": "delete_webhook", "parameters": [ @@ -14460,8 +14462,8 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID'" + "lang": "Go", + "source": "client.DeleteWebhook(\"WEBHOOK_UUID\");" }, { "lang": "JS", @@ -14471,13 +14473,13 @@ "lang": "Python", "source": "client.delete_webhook('WEBHOOK_UID')" }, - { - "lang": "Go", - "source": "client.DeleteWebhook(\"WEBHOOK_UUID\");" - }, { "lang": "Rust", "source": "client.delete_webhook(\"WEBHOOK_UUID\").await.unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID'" } ] }, @@ -14485,7 +14487,7 @@ "tags": [ "Webhooks" ], - "summary": "Update webhook", + "summary": "Update a webhook", "description": "Update an existing webhook's URL or headers.", "operationId": "patch_webhook", "parameters": [ @@ -14561,8 +14563,8 @@ ], "x-codeSamples": [ { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"header\": {\n \"referer\": null\n }\n }'" + "lang": "Go", + "source": "client.UpdateWebhook(\"WEBHOOK_UUID\", &meilisearch.UpdateWebhookRequest{\n Header: map[string]string{\n \"referer\": \"\"\n },\n});" }, { "lang": "JS", @@ -14572,13 +14574,13 @@ "lang": "Python", "source": "client.update_webhook('WEBHOOK_UID', {\n 'url': 'https://example.com/new-webhook',\n 'headers': {\"Authorization\":\"\", \"X-Custom-Header\":\"test\"},\n})" }, - { - "lang": "Go", - "source": "client.UpdateWebhook(\"WEBHOOK_UUID\", &meilisearch.UpdateWebhookRequest{\n Header: map[string]string{\n \"referer\": \"\"\n },\n});" - }, { "lang": "Rust", "source": "let mut update = meilisearch_sdk::webhooks::WebhookUpdate::new();\nupdate.remove_header(\"referer\");\nlet webhook = client\n .update_webhook(\"WEBHOOK_UUID\", &update)\n .await\n .unwrap();" + }, + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"header\": {\n \"referer\": null\n }\n }'" } ] } @@ -19891,7 +19893,7 @@ "type": "http", "scheme": "bearer", "bearerFormat": "Uuidv4, string or JWT", - "description": "An API key is a token that you provide when making API calls. Read more about [how to secure your project](https://www.meilisearch.com/docs/learn/security/basic_security).\n\nInclude the API key to the `Authorization` header, for instance:\n`Authorization: Bearer 6436fc5237b0d6e0d64253fbaac21d135012ecf1`.\n\nIf you use a SDK, ensure you instantiate the client with the API key, for instance with JS SDK:\n`const client = new MeiliSearch({ host: 'https://your-domain.com', apiKey: '6436fc5237b0d6e0d64253fbaac21d135012ecf1' })`" + "description": "An API key is a token that you provide when making API calls. Include the token in a header parameter called `Authorization`.\nExample: `Authorization: Bearer 8fece4405662dd830e4cb265e7e047aab2e79672a760a12712d2a263c9003509`" } } }, @@ -19908,65 +19910,131 @@ "name": "Version", "description": "Returns the version of the running Meilisearch instance." }, - { - "name": "Backups", - "description": "Meilisearch offers two types of backups: snapshots and dumps. Snapshots are mainly intended as a safeguard, while dumps are useful when migrating Meilisearch." - }, { "name": "Tasks", - "description": "The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)." + "description": "The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html).", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/tasks" + } }, { "name": "Batches", - "description": "The /batches route gives information about the progress of batches of asynchronous operations." + "description": "The /batches route gives information about the progress of batches of asynchronous operations.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/batches" + } }, { "name": "Indexes", - "description": "An index is an entity that gathers a set of [documents](https://www.meilisearch.com/docs/learn/getting_started/documents) with its own [settings](https://www.meilisearch.com/docs/reference/api/settings). Learn more about indexes." + "description": "An index is an entity that gathers a set of [documents](https://www.meilisearch.com/docs/learn/getting_started/documents) with its own [settings](https://www.meilisearch.com/docs/reference/api/settings). Learn more about indexes.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/indexes" + } }, { "name": "Documents", - "description": "Documents are objects composed of fields that can store any type of data. Each field contains an attribute and its associated value. Documents are stored inside [indexes](https://www.meilisearch.com/docs/learn/getting_started/indexes)." + "description": "Documents are objects composed of fields that can store any type of data. Each field contains an attribute and its associated value. Documents are stored inside [indexes](https://www.meilisearch.com/docs/learn/getting_started/indexes).", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/learn/getting_started/documents" + } }, { "name": "Facet Search", - "description": "The `/facet-search` route allows you to search for facet values. Facet search supports prefix search and typo tolerance. The returned hits are sorted lexicographically in ascending order. You can configure how facets are sorted using the sortFacetValuesBy property of the faceting index settings." + "description": "The `/facet-search` route allows you to search for facet values. Facet search supports prefix search and typo tolerance. The returned hits are sorted lexicographically in ascending order. You can configure how facets are sorted using the sortFacetValuesBy property of the faceting index settings.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/facet_search" + } }, { "name": "Similar documents", - "description": "The /similar route uses AI-powered search to return a number of documents similar to a target document.\n\nMeilisearch exposes two routes for retrieving similar documents: POST and GET. In the majority of cases, POST will offer better performance and ease of use." + "description": "The /similar route uses AI-powered search to return a number of documents similar to a target document.\n\nMeilisearch exposes two routes for retrieving similar documents: POST and GET. In the majority of cases, POST will offer better performance and ease of use.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/similar" + } }, { "name": "Settings", - "description": "Use the /settings route to customize search settings for a given index. You can either modify all index settings at once using the update settings endpoint, or use a child route to configure a single setting." + "description": "Use the /settings route to customize search settings for a given index. You can either modify all index settings at once using the update settings endpoint, or use a child route to configure a single setting.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/settings" + } + }, + { + "name": "Compact an index", + "description": "The /compact route uses compacts the database to reorganize and make it smaller and more efficient.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/compact" + } }, { "name": "Search", - "description": "Meilisearch exposes two routes to perform searches:\n\n- A POST route: this is the preferred route when using API authentication, as it allows [preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) caching and better performance.\n- A GET route: the usage of this route is discouraged, unless you have good reason to do otherwise (specific caching abilities for example)" + "description": "Meilisearch exposes two routes to perform searches:\n\n- A POST route: this is the preferred route when using API authentication, as it allows [preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) caching and better performance.\n- A GET route: the usage of this route is discouraged, unless you have good reason to do otherwise (specific caching abilities for example)", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/search" + } + }, + { + "name": "Snapshots", + "description": "The snapshots route allows the creation of database snapshots. Snapshots are .snapshot files that can be used to launch Meilisearch.\nCreating a snapshot is also referred to as exporting it, whereas launching Meilisearch with a snapshot is referred to as importing it.\nDuring a snapshot export, all indexes of the current instance are exported—together with their documents and settings—and saved as a single .snapshot file.\nDuring a snapshot import, all indexes contained in the indicated .snapshot file are imported along with their associated documents and settings.\nSnapshot imports are performed at launch using an option.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/snapshots" + } + }, + { + "name": "Dumps", + "description": "The `dumps` route allows the creation of database dumps.\nDumps are `.dump` files that can be used to launch Meilisearch. Dumps are compatible between Meilisearch versions.\nCreating a dump is also referred to as exporting it, whereas launching Meilisearch with a dump is referred to as importing it.\nDuring a [dump export](https://www.meilisearch.com/docs/reference/api/dump#create-a-dump), all indexes of the current instance are\nexported—together with their documents and settings—and saved as a single `.dump` file. During a dump import,\nall indexes contained in the indicated `.dump` file are imported along with their associated documents and settings.\nAny existing index with the same uid as an index in the dump file will be overwritten.\nDump imports are [performed at launch](https://www.meilisearch.com/docs/learn/advanced/dumps#importing-a-dump) using an option.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/dump" + } }, { "name": "Keys", - "description": "Manage API `keys` for a Meilisearch instance. Each key has a given set of permissions.\nYou must have the master key or the default admin key to access the keys route. More information about the keys and their rights.\nAccessing any route under `/keys` without having set a master key will result in an error." + "description": "Manage API `keys` for a Meilisearch instance. Each key has a given set of permissions.\nYou must have the master key or the default admin key to access the keys route. More information about the keys and their rights.\nAccessing any route under `/keys` without having set a master key will result in an error.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/keys" + } }, { "name": "Logs", - "description": "Everything about retrieving or customizing logs.\nCurrently [experimental](https://www.meilisearch.com/docs/learn/experimental/overview)." + "description": "Everything about retrieving or customizing logs.\nCurrently [experimental](https://www.meilisearch.com/docs/learn/experimental/overview).", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/learn/experimental/log_customization" + } }, { "name": "Multi-search", - "description": "The `/multi-search` route allows you to perform multiple search queries on one or more indexes by bundling them into a single HTTP request. Multi-search is also known as federated search." + "description": "The `/multi-search` route allows you to perform multiple search queries on one or more indexes by bundling them into a single HTTP request. Multi-search is also known as federated search.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/multi_search" + } }, { "name": "Experimental features", - "description": "The `/experimental-features` route allows you to activate or deactivate some of Meilisearch's experimental features.\n\nThis route is **synchronous**. This means that no task object will be returned, and any activated or deactivated features will be made available or unavailable immediately." + "description": "The `/experimental-features` route allows you to activate or deactivate some of Meilisearch's experimental features.\n\nThis route is **synchronous**. This means that no task object will be returned, and any activated or deactivated features will be made available or unavailable immediately.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/experimental_features" + } + }, + { + "name": "Export", + "description": "The `/export` route allows you to trigger an export process to a remote Meilisearch instance.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/export" + } }, { "name": "Network", - "description": "The `/network` route allows you to describe the topology of a network of Meilisearch instances.\n\nThis route is **synchronous**. This means that no task object will be returned, and any change to the network will be made available immediately." + "description": "The `/network` route allows you to describe the topology of a network of Meilisearch instances.\n\nThis route is **synchronous**. This means that no task object will be returned, and any change to the network will be made available immediately.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/network" + } }, { "name": "Webhooks", - "description": "The `/webhooks` route allows you to register endpoints to be called once tasks are processed." + "description": "The `/webhooks` route allows you to register endpoints to be called once tasks are processed.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/webhooks" + } } ] } \ No newline at end of file diff --git a/assets/open-api/meilisearch-openapi.json b/assets/open-api/meilisearch-openapi.json new file mode 100644 index 000000000..5539f6fa8 --- /dev/null +++ b/assets/open-api/meilisearch-openapi.json @@ -0,0 +1,15666 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "meilisearch", + "description": "Meilisearch HTTP server", + "contact": { + "name": "Quentin de Quelen", + "email": "quentin@dequelen.me" + }, + "license": { + "name": "MIT", + "identifier": "MIT" + }, + "version": "1.35.0" + }, + "servers": [ + { + "url": "/", + "description": "Local server" + } + ], + "paths": { + "/batches": { + "get": { + "tags": [ + "Batches" + ], + "summary": "Get batches", + "description": "List all batches, regardless of index. The batch objects are contained in\nthe results array. Batches are always returned in descending order of uid.\nThis means that by default, the most recently created batch objects appear\nfirst. Batch results are paginated and can be filtered with query\nparameters.", + "operationId": "get_batches", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "Maximum number of results to return.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "default": 20, + "minimum": 0 + }, + "example": 12 + }, + { + "name": "from", + "in": "query", + "description": "Fetch the next set of results from the given uid.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "example": 12421 + }, + { + "name": "reverse", + "in": "query", + "description": "The order you want to retrieve the objects.", + "required": false, + "schema": { + "type": "boolean" + }, + "example": true + }, + { + "name": "batchUids", + "in": "query", + "description": "Permits to filter tasks by their batch uid. By default, when the\n`batchUids` query parameter is not set, all task uids are returned.\nIt's possible to specify several batch uids by separating them with\nthe `,` character.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "example": 12421 + }, + { + "name": "uids", + "in": "query", + "description": "Permits to filter tasks by their uid. By default, when the uids query\nparameter is not set, all task uids are returned. It's possible to\nspecify several uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598 + ] + }, + { + "name": "canceledBy", + "in": "query", + "description": "Permits to filter tasks using the uid of the task that canceled them.\nIt's possible to specify several task uids by separating them with\nthe `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 374 + ] + }, + { + "name": "types", + "in": "query", + "description": "Permits to filter tasks by their related type. By default, when `types`\nquery parameter is not set, all task types are returned. It's possible\nto specify several types by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "documentAdditionOrUpdate" + ] + }, + { + "name": "statuses", + "in": "query", + "description": "Permits to filter tasks by their status. By default, when `statuses`\nquery parameter is not set, all task statuses are returned. It's\npossible to specify several statuses by separating them with the `,`\ncharacter.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Status" + } + }, + "example": [ + "succeeded", + "failed", + "canceled", + "enqueued", + "processing" + ] + }, + { + "name": "indexUids", + "in": "query", + "description": "Permits to filter tasks by their related index. By default, when\n`indexUids` query parameter is not set, the tasks of all the indexes\nare returned. It is possible to specify several indexes by separating\nthem with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "movies", + "theater" + ] + }, + { + "name": "afterEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + }, + { + "name": "beforeEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + }, + { + "name": "afterStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + }, + { + "name": "beforeStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + }, + { + "name": "afterFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + }, + { + "name": "beforeFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + } + ], + "responses": { + "200": { + "description": "Return the batches", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AllBatches" + }, + "example": { + "results": [ + { + "uid": 2, + "details": { + "stopWords": [ + "of", + "the" + ] + }, + "progress": null, + "stats": { + "totalNbTasks": 1, + "status": { + "succeeded": 1 + }, + "types": { + "settingsUpdate": 1 + }, + "indexUids": { + "INDEX_NAME": 1 + } + }, + "duration": "PT0.110083S", + "startedAt": "2024-12-10T15:49:04.995321Z", + "finishedAt": "2024-12-10T15:49:05.105404Z" + } + ], + "total": 3, + "limit": 1, + "from": 2, + "next": 1 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.get", + "tasks.*", + "*" + ] + } + ] + } + }, + "/batches/{batchUid}": { + "get": { + "tags": [ + "Batches" + ], + "summary": "Get one batch", + "description": "Get a single batch.", + "operationId": "get_batch", + "parameters": [ + { + "name": "batchUid", + "in": "path", + "description": "The unique batch id", + "required": true, + "schema": { + "type": "string" + }, + "example": "8685" + } + ], + "responses": { + "200": { + "description": "Return the batch", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchView" + }, + "example": { + "uid": 1, + "details": { + "receivedDocuments": 1, + "indexedDocuments": 1 + }, + "progress": null, + "stats": { + "totalNbTasks": 1, + "status": { + "succeeded": 1 + }, + "types": { + "documentAdditionOrUpdate": 1 + }, + "indexUids": { + "INDEX_NAME": 1 + } + }, + "duration": "PT0.364788S", + "startedAt": "2024-12-10T15:48:49.672141Z", + "finishedAt": "2024-12-10T15:48:50.036929Z", + "batchStrategy": "batched all enqueued tasks" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.get", + "tasks.*", + "*" + ] + } + ] + } + }, + "/dumps": { + "post": { + "tags": [ + "Dumps" + ], + "summary": "Create a dump", + "description": "Triggers a dump creation process. Once the process is complete, a dump is created in the\n[dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory).\nIf the dump directory does not exist yet, it will be created.", + "operationId": "create_dump", + "responses": { + "202": { + "description": "Dump is being created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 0, + "indexUid": null, + "status": "enqueued", + "type": "dumpCreation", + "enqueuedAt": "2021-01-01T09:39:00.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "dumps.create", + "dumps.*", + "*" + ] + } + ] + } + }, + "/experimental-features": { + "get": { + "tags": [ + "Experimental features" + ], + "summary": "Get all experimental features", + "description": "Get a list of all experimental features that can be activated via the\n/experimental-features route and whether or not they are currently\nactivated.", + "operationId": "get_features", + "responses": { + "200": { + "description": "Experimental features are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuntimeTogglableFeatures" + }, + "example": { + "metrics": true, + "logsRoute": false, + "editDocumentsByFunction": false, + "containsFilter": false, + "network": false, + "getTaskDocumentsRoute": false, + "compositeEmbedders": false, + "chatCompletions": false, + "multimodal": false, + "vectorStoreSetting": false + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "experimental_features.get", + "experimental_features.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Experimental features" + ], + "summary": "Configure experimental features", + "description": "Activate or deactivate experimental features.", + "operationId": "patch_features", + "responses": { + "200": { + "description": "Experimental features are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuntimeTogglableFeatures" + }, + "example": { + "metrics": true, + "logsRoute": false, + "editDocumentsByFunction": false, + "containsFilter": false, + "network": false, + "getTaskDocumentsRoute": false, + "compositeEmbedders": false, + "chatCompletions": false, + "multimodal": false, + "vectorStoreSetting": false + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "experimental_features.update", + "experimental_features.*", + "*" + ] + } + ] + } + }, + "/export": { + "post": { + "tags": [ + "Export" + ], + "summary": "Export to a remote Meilisearch", + "description": "Triggers an export process to a remote Meilisearch instance. This allows you to send\ndocuments and settings from the current instance to another Meilisearch server.", + "operationId": "export", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Export" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Export successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 1, + "status": "enqueued", + "type": "export", + "enqueuedAt": "2021-08-11T09:25:53.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "export", + "*" + ] + } + ] + } + }, + "/health": { + "get": { + "tags": [ + "Health" + ], + "summary": "Get Health", + "description": "The health check endpoint enables you to periodically test the health of\nyour Meilisearch instance.", + "operationId": "get_health", + "responses": { + "200": { + "description": "Instance is healthy", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HealthResponse" + }, + "example": { + "status": "available" + } + } + } + } + } + } + }, + "/indexes": { + "get": { + "tags": [ + "Indexes" + ], + "summary": "List indexes", + "description": "List all indexes.", + "operationId": "list_indexes", + "parameters": [ + { + "name": "offset", + "in": "query", + "description": "The number of indexes to skip before starting to retrieve anything", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "example": 100 + }, + { + "name": "limit", + "in": "query", + "description": "The number of indexes to retrieve", + "required": false, + "schema": { + "type": "integer", + "default": 20, + "minimum": 0 + }, + "example": 1 + } + ], + "responses": { + "200": { + "description": "Indexes are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationView_IndexView" + }, + "example": { + "results": [ + { + "uid": "movies", + "primaryKey": "movie_id", + "createdAt": "2019-11-20T09:40:33.711324Z", + "updatedAt": "2019-11-20T09:40:33.711324Z" + } + ], + "limit": 1, + "offset": 0, + "total": 1 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "indexes.get", + "indexes.*", + "*" + ] + } + ] + }, + "post": { + "tags": [ + "Indexes" + ], + "summary": "Create index", + "description": "Create an index.", + "operationId": "create_index", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IndexCreateRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "indexCreation", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "indexes.create", + "indexes.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}": { + "get": { + "tags": [ + "Indexes" + ], + "summary": "Get index", + "description": "Get information about an index.", + "operationId": "get_index", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "The index is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IndexView" + }, + "example": { + "uid": "movies", + "primaryKey": "movie_id", + "createdAt": "2019-11-20T09:40:33.711324Z", + "updatedAt": "2019-11-20T09:40:33.711324Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "indexes.get", + "indexes.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Indexes" + ], + "summary": "Delete index", + "description": "Delete an index.", + "operationId": "delete_index", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "202": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 0, + "indexUid": "movies", + "status": "enqueued", + "type": "indexDeletion", + "enqueuedAt": "2021-01-01T09:39:00.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "indexes.delete", + "indexes.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Indexes" + ], + "summary": "Update index", + "description": "Update the `primaryKey` of an index.\nReturn an error if the index doesn't exists yet or if it contains\ndocuments.", + "operationId": "update_index", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateIndexRequest" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 0, + "indexUid": "movies", + "status": "enqueued", + "type": "indexUpdate", + "enqueuedAt": "2021-01-01T09:39:00.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "indexes.update", + "indexes.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/compact": { + "post": { + "tags": [ + "Compact an index" + ], + "summary": "Compact an index", + "description": "Triggers a compaction process on the specified index. Compaction reorganizes the index database to make it smaller and more efficient.", + "operationId": "compact", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "202": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentDeletion", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/documents": { + "get": { + "tags": [ + "Documents" + ], + "summary": "Get documents", + "description": "Get documents by batches.", + "operationId": "get_documents", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "offset", + "in": "query", + "description": "Number of documents to skip in the response. Use this parameter\ntogether with `limit` to paginate through large document sets. For\nexample, to get documents 21-40, set `offset=20` and `limit=20`.\nDefaults to `0`.", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of documents to return in a single response. Use\ntogether with `offset` for pagination. Defaults to `20`.", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "fields", + "in": "query", + "description": "Comma-separated list of document attributes to include in the\nresponse. Use `*` to retrieve all attributes. By default, all\nattributes are returned. Example: `title,description,price`.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "retrieveVectors", + "in": "query", + "description": "When `true`, includes vector embeddings in the response for documents\nthat have them. This is useful when you need to inspect or export\nvector data. Defaults to `false`.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ids", + "in": "query", + "description": "Comma-separated list of document IDs to retrieve. Only documents with\nmatching IDs will be returned. If not specified, all documents\nmatching other criteria are returned.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "filter", + "in": "query", + "description": "Filter expression to select which documents to return. Uses the same\nsyntax as search filters. Only documents matching the filter will be\nincluded in the response. Example: `genres = action AND rating > 4`.", + "required": false, + "schema": { + "type": "string" + }, + "example": "popularity > 1000" + }, + { + "name": "sort", + "in": "query", + "description": "Attribute(s) to sort the documents by. Format: `attribute:asc` or\n`attribute:desc`. Multiple sort criteria can be comma-separated.\nExample: `price:asc,rating:desc`.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationView_Value" + }, + "example": { + "results": [ + { + "id": 25684, + "title": "American Ninja 5", + "poster": "https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg", + "overview": "When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.", + "release_date": 725846400 + }, + { + "id": 45881, + "title": "The Bridge of San Luis Rey", + "poster": "https://image.tmdb.org/t/p/w500/4X7quIcdkc24Cveg5XdpfRqxtYA.jpg", + "overview": "The Bridge of San Luis Rey is American author Thornton Wilder's second novel, first published in 1927 to worldwide acclaim. It tells the story of several interrelated people who die in the collapse of an Inca rope-fiber suspension bridge in Peru, and the events that lead up to their being on the bridge.[ A friar who has witnessed the tragic accident then goes about inquiring into the lives of the victims, seeking some sort of cosmic answer to the question of why each had to die. The novel won the Pulitzer Prize in 1928.", + "release_date": 1072915200 + } + ], + "limit": 20, + "offset": 0, + "total": 2 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.get", + "documents.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Documents" + ], + "summary": "Add or update documents", + "description": "Add a list of documents or update them if they already exist.\nIf you send an already existing document (same id) the old document will\nbe only partially updated according to the fields of the new document.\nThus, any fields not present in the new document are kept and remained\nunchanged.\nTo completely overwrite a document, see Add or replace documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document.\n> `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved\n> `_vectors` field in your documents. It can accept an array of floats,\n> multiple arrays of floats in an outer array or an object. This object\n> accepts keys corresponding to the different embedders defined your index\n> settings.", + "operationId": "update_documents", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "primaryKey", + "in": "query", + "description": "The primary key of the documents. primaryKey is optional. If you want\nto set the primary key of your index through this route, it only has\nto be done the first time you add documents to the index. After which\nit will be ignored if given.", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "csvDelimiter", + "in": "query", + "description": "Customize the csv delimiter when importing CSV documents.", + "required": true, + "schema": { + "type": "string", + "default": "," + }, + "example": ";" + }, + { + "name": "customMetadata", + "in": "query", + "description": "A string that can be used to identify and filter tasks. This metadata\nis stored with the task and returned in task responses. Useful for\ntracking tasks from external systems or associating tasks with\nspecific operations in your application.", + "required": false, + "schema": { + "type": "string" + }, + "example": "custom" + }, + { + "name": "skipCreation", + "in": "query", + "description": "When set to `true`, only updates existing documents and skips creating\nnew ones. Documents that don't already exist in the index will be\nignored. This is useful for partial updates where you only want to\nmodify existing records without adding new ones.", + "required": false, + "schema": { + "type": "boolean" + }, + "example": true + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentAdditionOrUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.add", + "documents.*", + "*" + ] + } + ] + }, + "post": { + "tags": [ + "Documents" + ], + "summary": "Add or replace documents", + "description": "Add a list of documents or replace them if they already exist.\n\nIf you send an already existing document (same id) the whole existing\ndocument will be overwritten by the new document. Fields previously in the\ndocument not present in the new document are removed.\n\nFor a partial update of the document see Add or update documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document.\n> `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved\n> `_vectors` field in your documents. It can accept an array of floats,\n> multiple arrays of floats in an outer array or an object. This object\n> accepts keys corresponding to the different embedders defined your index\n> settings.", + "operationId": "replace_documents", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "primaryKey", + "in": "query", + "description": "The primary key of the documents. primaryKey is optional. If you want\nto set the primary key of your index through this route, it only has\nto be done the first time you add documents to the index. After which\nit will be ignored if given.", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "csvDelimiter", + "in": "query", + "description": "Customize the csv delimiter when importing CSV documents.", + "required": true, + "schema": { + "type": "string", + "default": "," + }, + "example": ";" + }, + { + "name": "customMetadata", + "in": "query", + "description": "A string that can be used to identify and filter tasks. This metadata\nis stored with the task and returned in task responses. Useful for\ntracking tasks from external systems or associating tasks with\nspecific operations in your application.", + "required": false, + "schema": { + "type": "string" + }, + "example": "custom" + }, + { + "name": "skipCreation", + "in": "query", + "description": "When set to `true`, only updates existing documents and skips creating\nnew ones. Documents that don't already exist in the index will be\nignored. This is useful for partial updates where you only want to\nmodify existing records without adding new ones.", + "required": false, + "schema": { + "type": "boolean" + }, + "example": true + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentAdditionOrUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.add", + "documents.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Documents" + ], + "summary": "Delete all documents", + "description": "Delete all documents in the specified index.", + "operationId": "clear_all_documents", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentDeletion", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.delete", + "documents.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/documents/delete": { + "post": { + "tags": [ + "Documents" + ], + "summary": "Delete documents by filter", + "description": "Delete a set of documents based on a filter.", + "operationId": "delete_documents_by_filter", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentDeletionByFilter" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentDeletion", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.delete", + "documents.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/documents/delete-batch": { + "post": { + "tags": [ + "Documents" + ], + "summary": "Delete documents by batch", + "description": "Delete a set of documents based on an array of document ids.", + "operationId": "delete_documents_batch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": {} + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentAdditionOrUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.delete", + "documents.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/documents/edit": { + "post": { + "tags": [ + "Documents" + ], + "summary": "Edit documents by function.", + "description": "Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to\nedit one or more documents directly in Meilisearch.", + "operationId": "edit_documents_by_function", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentEditionByFunction" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentDeletion", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/documents/fetch": { + "post": { + "tags": [ + "Documents" + ], + "summary": "Get documents with POST", + "description": "Get a set of documents.", + "operationId": "documents_by_query_post", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BrowseQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationView_Value" + }, + "example": { + "results": [ + { + "title": "The Travels of Ibn Battuta", + "genres": [ + "Travel", + "Adventure" + ], + "language": "English", + "rating": 4.5 + }, + { + "title": "Pride and Prejudice", + "genres": [ + "Classics", + "Fiction", + "Romance", + "Literature" + ], + "language": "English", + "rating": 4 + } + ], + "offset": 0, + "limit": 2, + "total": 5 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.delete", + "documents.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/documents/{documentId}": { + "get": { + "tags": [ + "Documents" + ], + "summary": "Get one document", + "description": "Get one document from its primary key.", + "operationId": "get_document", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "documentId", + "in": "path", + "description": "The document identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "85087" + }, + { + "name": "fields", + "in": "query", + "description": "Comma-separated list of document attributes to include in the\nresponse. Use `*` to retrieve all attributes. By default, all\nattributes listed in the `displayedAttributes` setting are returned.\nExample: `title,description,price`.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "retrieveVectors", + "in": "query", + "description": "When `true`, includes the vector embeddings in the response for this\ndocument. This is useful when you need to inspect or export vector\ndata. Note that this can significantly increase response size if the\ndocument has multiple embedders configured. Defaults to `false`.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "The document is returned", + "content": { + "application/json": { + "schema": {}, + "example": { + "id": 25684, + "title": "American Ninja 5", + "poster": "https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg", + "overview": "When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.", + "release_date": 725846400 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Document not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Document `a` not found.", + "code": "document_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#document_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.get", + "documents.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Documents" + ], + "summary": "Delete a document", + "description": "Delete a single document by id.", + "operationId": "delete_document", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "documentId", + "in": "path", + "description": "Document Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "853" + } + ], + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "documentAdditionOrUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "documents.delete", + "documents.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/facet-search": { + "post": { + "tags": [ + "Facet Search" + ], + "summary": "Perform a facet search", + "description": "Search for a facet value within a given facet.", + "operationId": "search", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacetSearchQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchResult" + }, + "example": { + "hits": [ + { + "id": 2770, + "title": "American Pie 2", + "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", + "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", + "release_date": 997405200 + }, + { + "id": 190859, + "title": "American Sniper", + "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", + "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", + "release_date": 1418256000 + } + ], + "offset": 0, + "limit": 2, + "estimatedTotalHits": 976, + "processingTimeMs": 35, + "query": "american " + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/search": { + "get": { + "tags": [ + "Indexes", + "Search" + ], + "summary": "Search an index with GET", + "description": "Search for documents matching a specific query in the given index.", + "operationId": "search_with_url_query", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "q", + "in": "query", + "description": "The search query string. Meilisearch will return documents that match\nthis query. Supports prefix search (words matching the beginning of\nthe query) and typo tolerance. Leave empty to match all documents.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "vector", + "in": "query", + "description": "A vector of floating-point numbers for semantic/vector search. The\ndimensions must match the embedder configuration. When provided,\ndocuments are ranked by vector similarity. Can be combined with `q`\nfor hybrid search.", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "explode": false + }, + { + "name": "offset", + "in": "query", + "description": "Number of search results to skip. Use together with `limit` for\npagination. For example, to get results 21-40, set `offset=20` and\n`limit=20`. Defaults to `0`. Cannot be used with `page`/`hitsPerPage`.", + "required": true, + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of search results to return. Use together with `offset`\nfor pagination. Defaults to `20`. Cannot be used with\n`page`/`hitsPerPage`.", + "required": true, + "schema": { + "type": "integer", + "default": 20, + "minimum": 0 + } + }, + { + "name": "page", + "in": "query", + "description": "Request a specific page of results (1-indexed). Use together with\n`hitsPerPage` for page-based pagination. Cannot be used with\n`offset`/`limit`.", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "hitsPerPage", + "in": "query", + "description": "Number of results per page when using page-based pagination. Use\ntogether with `page`. Cannot be used with `offset`/`limit`.", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "attributesToRetrieve", + "in": "query", + "description": "Comma-separated list of attributes to include in the returned\ndocuments. Use `*` to return all attributes. By default, returns\nattributes from the `displayedAttributes` setting.", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false + }, + { + "name": "retrieveVectors", + "in": "query", + "description": "When `true`, includes vector embeddings in the response for documents\nthat have them. Defaults to `false`.", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "attributesToCrop", + "in": "query", + "description": "Comma-separated list of attributes whose values should be cropped to\nfit within `cropLength`. Useful for displaying long text attributes\nin search results. Format: `attribute` or `attribute:length`.", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false + }, + { + "name": "cropLength", + "in": "query", + "description": "Maximum number of words to keep when cropping attribute values. The\ncropped text will be centered around the matching terms. Defaults to\n`10`.", + "required": true, + "schema": { + "type": "integer", + "default": 10, + "minimum": 0 + } + }, + { + "name": "attributesToHighlight", + "in": "query", + "description": "Comma-separated list of attributes whose matching terms should be\nhighlighted with `highlightPreTag` and `highlightPostTag`. Use `*` to\nhighlight all searchable attributes.", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false + }, + { + "name": "filter", + "in": "query", + "description": "Filter expression to narrow down search results. Uses SQL-like syntax.\nExample: `genres = action AND rating > 4`. Only attributes in\n`filterableAttributes` can be used.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "description": "Comma-separated list of attributes to sort by. Format: `attribute:asc`\nor `attribute:desc`. Only attributes in `sortableAttributes` can be\nused. Custom ranking rules can also affect sort order.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "distinct", + "in": "query", + "description": "Attribute used to ensure only one document with each unique value is\nreturned. Useful for deduplication. Only attributes in\n`filterableAttributes` can be used.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "showMatchesPosition", + "in": "query", + "description": "When `true`, returns the position (start and length) of each matched\nterm in the original document attributes. Useful for custom\nhighlighting implementations.", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "showRankingScore", + "in": "query", + "description": "When `true`, includes a `_rankingScore` field (0.0 to 1.0) in each\ndocument indicating how well it matches the query. Higher scores mean\nbetter matches.", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "showRankingScoreDetails", + "in": "query", + "description": "When `true`, includes a `_rankingScoreDetails` object showing the\ncontribution of each ranking rule to the final score. Useful for\ndebugging relevancy.", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "showPerformanceDetails", + "in": "query", + "description": "When `true`, includes a `_performanceDetails` object showing the\nperformance details of the search.", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "facets", + "in": "query", + "description": "Comma-separated list of attributes for which to return facet\ndistribution (value counts). Only attributes in `filterableAttributes`\ncan be used. Returns the count of documents matching each facet value.", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false + }, + { + "name": "highlightPreTag", + "in": "query", + "description": "HTML tag or string to insert before highlighted matching terms.\nDefaults to ``.", + "required": true, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "highlightPostTag", + "in": "query", + "description": "HTML tag or string to insert after highlighted matching terms.\nDefaults to ``.", + "required": true, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "cropMarker", + "in": "query", + "description": "String used to indicate truncated content when cropping. Defaults to\n`…` (ellipsis).", + "required": true, + "schema": { + "type": "string", + "default": "…" + } + }, + { + "name": "matchingStrategy", + "in": "query", + "description": "Strategy for matching query terms. `last` (default): all terms must\nmatch, removing terms from the end if needed. `all`: all terms must\nmatch exactly. `frequency`: prioritizes matching frequent terms.", + "required": true, + "schema": { + "$ref": "#/components/schemas/MatchingStrategy" + } + }, + { + "name": "attributesToSearchOn", + "in": "query", + "description": "Comma-separated list of attributes to search in. By default, searches\nall `searchableAttributes`. Use this to restrict search to specific\nfields for better performance or relevance.", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false + }, + { + "name": "hybridEmbedder", + "in": "query", + "description": "Name of the embedder to use for hybrid/semantic search. Must match an\nembedder configured in the index settings.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "hybridSemanticRatio", + "in": "query", + "description": "Balance between keyword search (0.0) and semantic/vector search (1.0)\nin hybrid search. A value of 0.5 gives equal weight to both. Defaults\nto `0.5`.", + "required": true, + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "rankingScoreThreshold", + "in": "query", + "description": "Minimum ranking score (0.0 to 1.0) a document must have to be\nincluded in results. Documents with lower scores are excluded. Useful\nfor filtering out poor matches.", + "required": true, + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "locales", + "in": "query", + "description": "Comma-separated list of language locales to use for tokenization and\nprocessing. Useful for multilingual content. Example: `en,fr,de`.", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Locale" + } + }, + "explode": false + }, + { + "name": "personalizeUserContext", + "in": "query", + "description": "User-specific context for personalized search results. The format\ndepends on your personalization configuration.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "useNetwork", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchResult" + }, + "example": { + "hits": [ + { + "id": 2770, + "title": "American Pie 2", + "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", + "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", + "release_date": 997405200 + }, + { + "id": 190859, + "title": "American Sniper", + "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", + "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", + "release_date": 1418256000 + } + ], + "offset": 0, + "limit": 2, + "estimatedTotalHits": 976, + "processingTimeMs": 35, + "query": "american " + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ] + }, + "post": { + "tags": [ + "Indexes", + "Search" + ], + "summary": "Search with POST", + "description": "Search for documents matching a specific query in the given index.", + "operationId": "search_with_post", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchResult" + }, + "example": { + "hits": [ + { + "id": 2770, + "title": "American Pie 2", + "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", + "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", + "release_date": 997405200 + }, + { + "id": 190859, + "title": "American Sniper", + "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", + "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", + "release_date": 1418256000 + } + ], + "offset": 0, + "limit": 2, + "estimatedTotalHits": 976, + "processingTimeMs": 35, + "query": "american " + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings": { + "get": { + "tags": [ + "Settings" + ], + "summary": "All settings", + "description": "This route allows you to retrieve, configure, or reset all of an index's settings at once.", + "operationId": "get_all", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "Settings are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Settings_Unchecked" + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset settings", + "description": "Reset all the settings of an index to their default value.", + "operationId": "delete_all", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update settings", + "description": "Update the settings of an index.\nPassing null to an index setting will reset it to its default value.\nUpdates in the settings route are partial. This means that any parameters not provided in the body will be left unchanged.\nIf the provided index does not exist, it will be created.", + "operationId": "update_all", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Settings_Unchecked" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/chat": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get chat", + "description": "Get an user defined chat", + "operationId": "getchat", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "chat is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChatSettings" + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset chat", + "description": "Reset an index's chat to its default value", + "operationId": "deletechat", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChatSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update chat", + "description": "Update an index's user defined chat", + "operationId": "patchchat", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChatSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/dictionary": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get dictionary", + "description": "Get an user defined dictionary", + "operationId": "getdictionary", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "dictionary is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update dictionary", + "description": "Update an index's user defined dictionary", + "operationId": "putdictionary", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset dictionary", + "description": "Reset an index's dictionary to its default value", + "operationId": "deletedictionary", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/displayed-attributes": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get displayedAttributes", + "description": "Get an user defined displayedAttributes", + "operationId": "getdisplayedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "displayedAttributes is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update displayedAttributes", + "description": "Update an index's user defined displayedAttributes", + "operationId": "putdisplayedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset displayedAttributes", + "description": "Reset an index's displayedAttributes to its default value", + "operationId": "deletedisplayedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/distinct-attribute": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get distinctAttribute", + "description": "Get an user defined distinctAttribute", + "operationId": "getdistinctAttribute", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "distinctAttribute is returned", + "content": { + "application/json": { + "schema": { + "type": "string" + }, + "example": "" + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update distinctAttribute", + "description": "Update an index's user defined distinctAttribute", + "operationId": "putdistinctAttribute", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset distinctAttribute", + "description": "Reset an index's distinctAttribute to its default value", + "operationId": "deletedistinctAttribute", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/embedders": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get embedders", + "description": "Get an user defined embedders", + "operationId": "getembedders", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "embedders is returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SettingEmbeddingSettings" + }, + "propertyNames": { + "type": "string" + } + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset embedders", + "description": "Reset an index's embedders to its default value", + "operationId": "deleteembedders", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SettingEmbeddingSettings" + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update embedders", + "description": "Update an index's user defined embedders", + "operationId": "patchembedders", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SettingEmbeddingSettings" + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/facet-search": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get facetSearch", + "description": "Get an user defined facetSearch", + "operationId": "getfacetSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "facetSearch is returned", + "content": { + "application/json": { + "schema": { + "type": "boolean" + }, + "example": false + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update facetSearch", + "description": "Update an index's user defined facetSearch", + "operationId": "putfacetSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "boolean" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset facetSearch", + "description": "Reset an index's facetSearch to its default value", + "operationId": "deletefacetSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "boolean" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/faceting": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get faceting", + "description": "Get an user defined faceting", + "operationId": "getfaceting", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "faceting is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacetingSettings" + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset faceting", + "description": "Reset an index's faceting to its default value", + "operationId": "deletefaceting", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacetingSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update faceting", + "description": "Update an index's user defined faceting", + "operationId": "patchfaceting", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacetingSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/filterable-attributes": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get filterableAttributes", + "description": "Get an user defined filterableAttributes", + "operationId": "getfilterableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "filterableAttributes is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FilterableAttributesRule" + } + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update filterableAttributes", + "description": "Update an index's user defined filterableAttributes", + "operationId": "putfilterableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FilterableAttributesRule" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset filterableAttributes", + "description": "Reset an index's filterableAttributes to its default value", + "operationId": "deletefilterableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FilterableAttributesRule" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/localized-attributes": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get localizedAttributes", + "description": "Get an user defined localizedAttributes", + "operationId": "getlocalizedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "localizedAttributes is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalizedAttributesRuleView" + } + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update localizedAttributes", + "description": "Update an index's user defined localizedAttributes", + "operationId": "putlocalizedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalizedAttributesRuleView" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset localizedAttributes", + "description": "Reset an index's localizedAttributes to its default value", + "operationId": "deletelocalizedAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalizedAttributesRuleView" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/non-separator-tokens": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get nonSeparatorTokens", + "description": "Get an user defined nonSeparatorTokens", + "operationId": "getnonSeparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "nonSeparatorTokens is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update nonSeparatorTokens", + "description": "Update an index's user defined nonSeparatorTokens", + "operationId": "putnonSeparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset nonSeparatorTokens", + "description": "Reset an index's nonSeparatorTokens to its default value", + "operationId": "deletenonSeparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/pagination": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get pagination", + "description": "Get an user defined pagination", + "operationId": "getpagination", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "pagination is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationSettings" + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset pagination", + "description": "Reset an index's pagination to its default value", + "operationId": "deletepagination", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update pagination", + "description": "Update an index's user defined pagination", + "operationId": "patchpagination", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/prefix-search": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get prefixSearch", + "description": "Get an user defined prefixSearch", + "operationId": "getprefixSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "prefixSearch is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrefixSearchSettings" + }, + "example": "indexingTime" + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update prefixSearch", + "description": "Update an index's user defined prefixSearch", + "operationId": "putprefixSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrefixSearchSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset prefixSearch", + "description": "Reset an index's prefixSearch to its default value", + "operationId": "deleteprefixSearch", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrefixSearchSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/proximity-precision": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get proximityPrecision", + "description": "Get an user defined proximityPrecision", + "operationId": "getproximityPrecision", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "proximityPrecision is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProximityPrecisionView" + }, + "example": "byWord" + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update proximityPrecision", + "description": "Update an index's user defined proximityPrecision", + "operationId": "putproximityPrecision", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProximityPrecisionView" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset proximityPrecision", + "description": "Reset an index's proximityPrecision to its default value", + "operationId": "deleteproximityPrecision", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProximityPrecisionView" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/ranking-rules": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get rankingRules", + "description": "Get an user defined rankingRules", + "operationId": "getrankingRules", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "rankingRules is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RankingRuleView" + } + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update rankingRules", + "description": "Update an index's user defined rankingRules", + "operationId": "putrankingRules", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RankingRuleView" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset rankingRules", + "description": "Reset an index's rankingRules to its default value", + "operationId": "deleterankingRules", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RankingRuleView" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/search-cutoff-ms": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get searchCutoffMs", + "description": "Get an user defined searchCutoffMs", + "operationId": "getsearchCutoffMs", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "searchCutoffMs is returned", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + }, + "example": 0 + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update searchCutoffMs", + "description": "Update an index's user defined searchCutoffMs", + "operationId": "putsearchCutoffMs", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset searchCutoffMs", + "description": "Reset an index's searchCutoffMs to its default value", + "operationId": "deletesearchCutoffMs", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/searchable-attributes": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get searchableAttributes", + "description": "Get an user defined searchableAttributes", + "operationId": "getsearchableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "searchableAttributes is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update searchableAttributes", + "description": "Update an index's user defined searchableAttributes", + "operationId": "putsearchableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset searchableAttributes", + "description": "Reset an index's searchableAttributes to its default value", + "operationId": "deletesearchableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/separator-tokens": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get separatorTokens", + "description": "Get an user defined separatorTokens", + "operationId": "getseparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "separatorTokens is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update separatorTokens", + "description": "Update an index's user defined separatorTokens", + "operationId": "putseparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset separatorTokens", + "description": "Reset an index's separatorTokens to its default value", + "operationId": "deleteseparatorTokens", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/sortable-attributes": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get sortableAttributes", + "description": "Get an user defined sortableAttributes", + "operationId": "getsortableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "sortableAttributes is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update sortableAttributes", + "description": "Update an index's user defined sortableAttributes", + "operationId": "putsortableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset sortableAttributes", + "description": "Reset an index's sortableAttributes to its default value", + "operationId": "deletesortableAttributes", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/stop-words": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get stopWords", + "description": "Get an user defined stopWords", + "operationId": "getstopWords", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "stopWords is returned", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "example": [] + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update stopWords", + "description": "Update an index's user defined stopWords", + "operationId": "putstopWords", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset stopWords", + "description": "Reset an index's stopWords to its default value", + "operationId": "deletestopWords", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/synonyms": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get synonyms", + "description": "Get an user defined synonyms", + "operationId": "getsynonyms", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "synonyms is returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + } + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "put": { + "tags": [ + "Settings" + ], + "summary": "Update synonyms", + "description": "Update an index's user defined synonyms", + "operationId": "putsynonyms", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset synonyms", + "description": "Reset an index's synonyms to its default value", + "operationId": "deletesynonyms", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/typo-tolerance": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get typoTolerance", + "description": "Get an user defined typoTolerance", + "operationId": "gettypoTolerance", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "typoTolerance is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TypoSettings" + }, + "example": {} + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset typoTolerance", + "description": "Reset an index's typoTolerance to its default value", + "operationId": "deletetypoTolerance", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TypoSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update typoTolerance", + "description": "Update an index's user defined typoTolerance", + "operationId": "patchtypoTolerance", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TypoSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/settings/vector-store": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Get vectorStore", + "description": "Get an user defined vectorStore", + "operationId": "getvectorStore", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "vectorStore is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VectorStoreBackend" + }, + "example": "stable" + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.get", + "settings.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Settings" + ], + "summary": "Reset vectorStore", + "description": "Reset an index's vectorStore to its default value", + "operationId": "deletevectorStore", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VectorStoreBackend" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update vectorStore", + "description": "Update an index's user defined vectorStore", + "operationId": "patchvectorStore", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VectorStoreBackend" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": "movies", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/similar": { + "get": { + "tags": [ + "Similar documents" + ], + "summary": "Get similar documents with GET", + "description": "Retrieve documents similar to a specific search result.", + "operationId": "similar_get", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + }, + { + "name": "id", + "in": "query", + "description": "The unique identifier (primary key value) of the target document.\nMeilisearch will find and return documents that are semantically\nsimilar to this document based on their vector embeddings. This is a\nrequired parameter.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "offset", + "in": "query", + "description": "Number of similar documents to skip in the response. Use together with\n`limit` for pagination through large result sets. For example, to get\nsimilar documents 21-40, set `offset=20` and `limit=20`. Defaults to\n`0`.", + "required": true, + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of similar documents to return in a single response. Use\ntogether with `offset` for pagination. Higher values return more\nresults but may increase response time. Defaults to `20`.", + "required": true, + "schema": { + "type": "integer", + "default": 20, + "minimum": 0 + } + }, + { + "name": "attributes_to_retrieve", + "in": "query", + "description": "Comma-separated list of document attributes to include in the response.\nUse `*` to retrieve all attributes. By default, all attributes listed\nin the `displayedAttributes` setting are returned. Example:\n`title,description,price`.", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "retrieve_vectors", + "in": "query", + "description": "When `true`, includes the vector embeddings for each returned document.\nUseful for debugging or when you need to inspect the vector data. Note\nthat this can significantly increase response size. Defaults to\n`false`.", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "filter", + "in": "query", + "description": "Filter expression to narrow down which documents can be returned as\nsimilar. Uses the same syntax as search filters. Only documents\nmatching this filter will be considered when finding similar documents.\nExample: `genres = action AND year > 2000`.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "show_ranking_score", + "in": "query", + "description": "When `true`, includes a global `_rankingScore` field in each document\nshowing how similar it is to the target document. The score is a value\nbetween 0 and 1, where higher values indicate greater similarity.\nDefaults to `false`.", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "show_ranking_score_details", + "in": "query", + "description": "When `true`, includes a detailed `_rankingScoreDetails` object in each\ndocument breaking down how the similarity score was calculated. Useful\nfor debugging and understanding why certain documents are considered\nmore similar. Defaults to `false`.", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "show_performance_details", + "in": "query", + "description": "When `true`, includes a `_performanceDetails` object showing the\nperformance details of the search.", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "ranking_score_threshold", + "in": "query", + "description": "Minimum ranking score threshold (between 0.0 and 1.0) that documents\nmust meet to be included in results. Documents with a similarity score\nbelow this threshold will be excluded. Useful for ensuring only highly\nsimilar documents are returned.", + "required": false, + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "embedder", + "in": "query", + "description": "The name of the embedder to use for finding similar documents. This\nmust match one of the embedders configured in your index settings. The\nembedder determines how document similarity is calculated based on\nvector embeddings.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimilarResult" + }, + "example": { + "hits": [ + { + "id": 2770, + "title": "American Pie 2", + "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", + "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", + "release_date": 997405200 + }, + { + "id": 190859, + "title": "American Sniper", + "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", + "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", + "release_date": 1418256000 + } + ], + "id": "143", + "offset": 0, + "limit": 2, + "estimatedTotalHits": 976, + "processingTimeMs": 35 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ] + }, + "post": { + "tags": [ + "Similar documents" + ], + "summary": "Get similar documents with POST", + "description": "Retrieve documents similar to a specific search result.", + "operationId": "similar_post", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimilarQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "The documents are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimilarResult" + }, + "example": { + "hits": [ + { + "id": 2770, + "title": "American Pie 2", + "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", + "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", + "release_date": 997405200 + }, + { + "id": 190859, + "title": "American Sniper", + "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", + "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", + "release_date": 1418256000 + } + ], + "id": "143", + "offset": 0, + "limit": 2, + "estimatedTotalHits": 976, + "processingTimeMs": 35 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ] + } + }, + "/indexes/{indexUid}/stats": { + "get": { + "tags": [ + "Stats" + ], + "summary": "Get stats of index", + "description": "Get the stats of an index.", + "operationId": "get_index_stats", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Index Unique Identifier", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "responses": { + "200": { + "description": "The stats of the index", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IndexStats" + }, + "example": { + "numberOfDocuments": 10, + "rawDocumentDbSize": 10, + "avgDocumentSize": 10, + "numberOfEmbeddings": 10, + "numberOfEmbeddedDocuments": 10, + "isIndexing": true, + "fieldDistribution": { + "genre": 10, + "author": 9 + } + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "stats.get", + "stats.*", + "*" + ] + } + ] + } + }, + "/keys": { + "get": { + "tags": [ + "Keys" + ], + "summary": "Get API Keys", + "description": "List all API Keys", + "operationId": "list_api_keys", + "parameters": [ + { + "name": "offset", + "in": "query", + "description": "Number of API keys to skip in the response. Use together with `limit`\nfor pagination through large sets of keys. For example, to get keys\n21-40, set `offset=20` and `limit=20`. Defaults to `0`.", + "required": true, + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of API keys to return in a single response. Use together\nwith `offset` for pagination. Defaults to `20`.", + "required": true, + "schema": { + "type": "integer", + "default": 20, + "minimum": 0 + } + } + ], + "responses": { + "202": { + "description": "List of keys", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationView_KeyView" + }, + "example": { + "results": [ + { + "uid": "01b4bc42-eb33-4041-b481-254d00cce834", + "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", + "name": "An API Key", + "description": null, + "actions": [ + "documents.add" + ], + "indexes": [ + "movies" + ], + "expiresAt": "2022-11-12T10:00:00Z", + "createdAt": "2021-11-12T10:00:00Z", + "updatedAt": "2021-11-12T10:00:00Z" + } + ], + "limit": 20, + "offset": 0, + "total": 1 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "keys.get", + "keys.*", + "*" + ] + } + ] + }, + "post": { + "tags": [ + "Keys" + ], + "summary": "Create an API Key", + "description": "Create an API Key.", + "operationId": "create_api_key", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateApiKey" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Key has been created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeyView" + }, + "example": { + "uid": "01b4bc42-eb33-4041-b481-254d00cce834", + "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", + "name": "Indexing Products API key", + "description": null, + "actions": [ + "documents.add" + ], + "indexes": [ + "products" + ], + "expiresAt": "2021-11-13T00:00:00Z", + "createdAt": "2021-11-12T10:00:00Z", + "updatedAt": "2021-11-12T10:00:00Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "keys.create", + "keys.*", + "*" + ] + } + ] + } + }, + "/keys/{uidOrKey}": { + "get": { + "tags": [ + "Keys" + ], + "summary": "Get an API Key", + "description": "Get an API key from its `uid` or its `key` field.", + "operationId": "get_api_key", + "parameters": [ + { + "name": "uidOrKey", + "in": "path", + "description": "The `uid` or `key` field of an existing API key", + "required": true, + "schema": { + "type": "string", + "format": "password" + }, + "example": "7b198a7f-52a0-4188-8762-9ad93cd608b2" + } + ], + "responses": { + "200": { + "description": "The key is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeyView" + }, + "example": { + "uid": "01b4bc42-eb33-4041-b481-254d00cce834", + "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", + "name": "An API Key", + "description": null, + "actions": [ + "documents.add" + ], + "indexes": [ + "movies" + ], + "expiresAt": "2022-11-12T10:00:00Z", + "createdAt": "2021-11-12T10:00:00Z", + "updatedAt": "2021-11-12T10:00:00Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "keys.get", + "keys.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Keys" + ], + "summary": "Delete a key", + "description": "Delete the specified API key.", + "operationId": "delete_api_key", + "parameters": [ + { + "name": "uidOrKey", + "in": "path", + "description": "The `uid` or `key` field of an existing API key", + "required": true, + "schema": { + "type": "string", + "format": "password" + }, + "example": "7b198a7f-52a0-4188-8762-9ad93cd608b2" + } + ], + "responses": { + "204": { + "description": "The key have been removed" + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "keys.delete", + "keys.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Keys" + ], + "summary": "Update a Key", + "description": "Update the name and description of an API key. Updates to keys are partial.\nThis means you should provide only the fields you intend to update, as any\nfields not present in the payload will remain unchanged.", + "operationId": "patch_api_key", + "parameters": [ + { + "name": "uidOrKey", + "in": "path", + "description": "The `uid` or `key` field of an existing API key", + "required": true, + "schema": { + "type": "string", + "format": "password" + }, + "example": "7b198a7f-52a0-4188-8762-9ad93cd608b2" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchApiKey" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "The key have been updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeyView" + }, + "example": { + "uid": "01b4bc42-eb33-4041-b481-254d00cce834", + "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", + "name": "An API Key", + "description": null, + "actions": [ + "documents.add" + ], + "indexes": [ + "movies" + ], + "expiresAt": "2022-11-12T10:00:00Z", + "createdAt": "2021-11-12T10:00:00Z", + "updatedAt": "2021-11-12T10:00:00Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "keys.update", + "keys.*", + "*" + ] + } + ] + } + }, + "/logs/stderr": { + "post": { + "tags": [ + "Logs" + ], + "summary": "Update target of the console logs", + "description": "This route lets you specify at runtime the level of the console logs\noutputted on stderr.", + "operationId": "update_stderr_target", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateStderrLogs" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "The console logs have been updated" + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "metrics.get", + "metrics.*", + "*" + ] + } + ] + } + }, + "/logs/stream": { + "post": { + "tags": [ + "Logs" + ], + "summary": "Retrieve logs", + "description": "Stream logs over HTTP. The format of the logs depends on the\nconfiguration specified in the payload. The logs are sent as multi-part,\nand the stream never stops, so make sure your clients correctly handle\nthat. To make the server stop sending you logs, you can call the `DELETE\n/logs/stream` route.\n\nThere can only be one listener at a timeand an error will be returned if\nyou call this route while it's being used by another client.", + "operationId": "get_logs", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetLogs" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Logs are being returned", + "content": { + "application/json": { + "schema": { + "type": "string" + }, + "example": "\n2024-10-08T13:35:02.643750Z WARN HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: tracing_actix_web::middleware: Error encountered while processing the incoming HTTP request: ResponseError { code: 400, message: \"Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625\", error_code: \"feature_not_enabled\", error_type: \"invalid_request\", error_link: \"https://docs.meilisearch.com/errors#feature_not_enabled\" }\n2024-10-08T13:35:02.644191Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: meilisearch: close time.busy=1.66ms time.idle=658µs\n2024-10-08T13:35:18.564152Z INFO HTTP request{method=PATCH host=\"localhost:7700\" route=/experimental-features query_parameters= user_agent=curl/8.6.0 status_code=200}: meilisearch: close time.busy=1.17ms time.idle=127µs\n2024-10-08T13:35:23.094987Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=200}: meilisearch: close time.busy=2.12ms time.idle=595µs\n" + } + } + }, + "400": { + "description": "The route is already being used", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The `/logs/stream` route is currently in use by someone else.", + "code": "bad_request", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#bad_request" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "metrics.get", + "metrics.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Logs" + ], + "summary": "Stop retrieving logs", + "description": "Call this route to make the engine stops sending logs through the `POST\n/logs/stream` route.", + "operationId": "cancel_logs", + "responses": { + "204": { + "description": "Logs are being returned" + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "metrics.get", + "metrics.*", + "*" + ] + } + ] + } + }, + "/metrics": { + "get": { + "tags": [ + "Stats" + ], + "summary": "Get prometheus metrics", + "description": "Retrieve metrics on the engine. See https://www.meilisearch.com/docs/learn/experimental/metrics\nCurrently, [the feature is experimental](https://www.meilisearch.com/docs/learn/experimental/overview)\nwhich means it must be enabled.", + "operationId": "get_metrics", + "responses": { + "200": { + "description": "The metrics of the instance", + "content": { + "text/plain": { + "schema": { + "type": "string" + }, + "example": "\n# HELP meilisearch_db_size_bytes Meilisearch DB Size In Bytes\n# TYPE meilisearch_db_size_bytes gauge\nmeilisearch_db_size_bytes 1130496\n# HELP meilisearch_batch_running_progress_trace The currently running progress trace\n# TYPE meilisearch_batch_running_progress_trace gauge\nmeilisearch_batch_running_progress_trace{batch_uid=\"0\",step_name=\"document\"} 0.710618582519409\nmeilisearch_batch_running_progress_trace{batch_uid=\"0\",step_name=\"extracting word proximity\"} 0.2222222222222222\nmeilisearch_batch_running_progress_trace{batch_uid=\"0\",step_name=\"indexing\"} 0.6666666666666666\nmeilisearch_batch_running_progress_trace{batch_uid=\"0\",step_name=\"processing tasks\"} 0\n# HELP meilisearch_http_requests_total Meilisearch HTTP requests total\n# TYPE meilisearch_http_requests_total counter\nmeilisearch_http_requests_total{method=\"GET\",path=\"/metrics\",status=\"400\"} 1\nmeilisearch_http_requests_total{method=\"PATCH\",path=\"/experimental-features\",status=\"200\"} 1\n# HELP meilisearch_http_response_time_seconds Meilisearch HTTP response times\n# TYPE meilisearch_http_response_time_seconds histogram\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.005\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.01\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.025\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.05\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.075\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.25\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.75\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"2.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"7.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"10\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"+Inf\"} 0\nmeilisearch_http_response_time_seconds_sum{method=\"GET\",path=\"/metrics\"} 0\nmeilisearch_http_response_time_seconds_count{method=\"GET\",path=\"/metrics\"} 0\n# HELP meilisearch_last_finished_batches_progress_trace_ms The last few batches progress trace in milliseconds\n# TYPE meilisearch_last_finished_batches_progress_trace_ms gauge\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks\"} 19360\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks > computing document changes\"} 368\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks > computing document changes > preparing payloads\"} 367\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks > computing document changes > preparing payloads > payload\"} 367\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks > indexing\"} 18970\n# HELP meilisearch_index_count Meilisearch Index Count\n# TYPE meilisearch_index_count gauge\nmeilisearch_index_count 1\n# HELP meilisearch_index_docs_count Meilisearch Index Docs Count\n# TYPE meilisearch_index_docs_count gauge\nmeilisearch_index_docs_count{index=\"mieli\"} 2\n# HELP meilisearch_is_indexing Meilisearch Is Indexing\n# TYPE meilisearch_is_indexing gauge\nmeilisearch_is_indexing 0\n# HELP meilisearch_last_update Meilisearch Last Update\n# TYPE meilisearch_last_update gauge\nmeilisearch_last_update 1726675964\n# HELP meilisearch_nb_tasks Meilisearch Number of tasks\n# TYPE meilisearch_nb_tasks gauge\nmeilisearch_nb_tasks{kind=\"indexes\",value=\"mieli\"} 39\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"canceled\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"enqueued\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"failed\"} 4\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"processing\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"succeeded\"} 35\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentAdditionOrUpdate\"} 9\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentDeletion\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentEdition\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"dumpCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexDeletion\"} 8\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexSwap\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexUpdate\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"settingsUpdate\"} 22\nmeilisearch_nb_tasks{kind=\"types\",value=\"snapshotCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskCancelation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskDeletion\"} 0\n# HELP meilisearch_used_db_size_bytes Meilisearch Used DB Size In Bytes\n# TYPE meilisearch_used_db_size_bytes gauge\nmeilisearch_used_db_size_bytes 409600\n" + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "metrics.get", + "metrics.*", + "*" + ] + } + ] + } + }, + "/multi-search": { + "post": { + "tags": [ + "Multi-search" + ], + "summary": "Perform a multi-search", + "description": "Bundle multiple search queries in a single API request. Use this endpoint\nto search through multiple indexes at once.", + "operationId": "multi_search_with_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FederatedSearch" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Federated multi-search", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FederatedSearchResult" + }, + "example": { + "hits": [ + { + "id": 42, + "title": "Batman returns", + "overview": "The overview of batman returns", + "_federation": { + "indexUid": "movies", + "queriesPosition": 0 + } + }, + { + "comicsId": "batman-killing-joke", + "description": "This comic is really awesome", + "title": "Batman: the killing joke", + "_federation": { + "indexUid": "comics", + "queriesPosition": 1 + } + } + ], + "processingTimeMs": 0, + "limit": 20, + "offset": 0, + "estimatedTotalHits": 2, + "semanticHitCount": 0 + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ] + } + }, + "/network": { + "get": { + "tags": [ + "Network" + ], + "summary": "Get network topology", + "description": "Get a list of all Meilisearch instances currently known to this instance.", + "operationId": "get_network", + "responses": { + "200": { + "description": "Known nodes are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Network" + }, + "example": { + "self": "ms-0", + "remotes": { + "ms-0": { + "url": "http://localhost:7700", + "searchApiKey": null, + "writeApiKey": null + }, + "ms-1": { + "url": "http://localhost:7701", + "searchApiKey": "foo", + "writeApiKey": "bar" + }, + "ms-2": { + "url": "http://localhost:7702", + "searchApiKey": "bar", + "writeApiKey": "foo" + } + } + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "network.get", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Network" + ], + "summary": "Configure Network", + "description": "Add or remove nodes from network.", + "operationId": "patch_network", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Network" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "New network state is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Network" + }, + "example": { + "self": "ms-0", + "remotes": { + "ms-0": { + "url": "http://localhost:7700", + "searchApiKey": null, + "writeApiKey": null + }, + "ms-1": { + "url": "http://localhost:7701", + "searchApiKey": "foo", + "writeApiKey": "bar" + }, + "ms-2": { + "url": "http://localhost:7702", + "searchApiKey": "bar", + "writeApiKey": "foo" + } + } + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "network.update", + "*" + ] + } + ] + } + }, + "/snapshots": { + "post": { + "tags": [ + "Snapshots" + ], + "summary": "Create a snapshot", + "description": "Triggers a snapshot creation process. Once the process is complete, a snapshot is created in the snapshot directory. If the snapshot directory does not exist yet, it will be created.", + "operationId": "create_snapshot", + "responses": { + "202": { + "description": "Snapshot is being created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 0, + "indexUid": null, + "status": "enqueued", + "type": "snapshotCreation", + "enqueuedAt": "2021-01-01T09:39:00.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "snapshots.create", + "snapshots.*", + "*" + ] + } + ] + } + }, + "/stats": { + "get": { + "tags": [ + "Stats" + ], + "summary": "Get stats of all indexes.", + "description": "Get stats of all indexes.", + "operationId": "get_stats", + "responses": { + "200": { + "description": "The stats of the instance", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Stats" + }, + "example": { + "databaseSize": 567, + "usedDatabaseSize": 456, + "lastUpdate": "2019-11-20T09:40:33.711324Z", + "indexes": { + "movies": { + "numberOfDocuments": 10, + "rawDocumentDbSize": 100, + "maxDocumentSize": 16, + "avgDocumentSize": 10, + "isIndexing": true, + "fieldDistribution": { + "genre": 10, + "author": 9 + } + } + } + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "stats.get", + "stats.*", + "*" + ] + } + ] + } + }, + "/swap-indexes": { + "post": { + "tags": [ + "Indexes" + ], + "summary": "Swap indexes", + "description": "Swap the documents, settings, and task history of two or more indexes.\nYou can only swap indexes in pairs. However, a single request can swap as\nmany index pairs as you wish. Swapping indexes is an atomic transaction:\neither all indexes are successfully swapped, or none are. Swapping indexA\nand indexB will also replace every mention of indexA by indexB and\nvice-versa in the task history. enqueued tasks are left unmodified.", + "operationId": "swap_indexes", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SwapIndexesPayload" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 3, + "indexUid": null, + "status": "enqueued", + "type": "indexSwap", + "enqueuedAt": "2021-08-12T10:00:00.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "search", + "*" + ] + } + ] + } + }, + "/tasks": { + "get": { + "tags": [ + "Tasks" + ], + "summary": "Get all tasks", + "description": "Get all [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)", + "operationId": "get_tasks", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "Maximum number of results to return.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "default": 20, + "minimum": 0 + }, + "example": 12 + }, + { + "name": "from", + "in": "query", + "description": "Fetch the next set of results from the given uid.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "example": 12421 + }, + { + "name": "reverse", + "in": "query", + "description": "The order you want to retrieve the objects.", + "required": false, + "schema": { + "type": "boolean" + }, + "example": true + }, + { + "name": "batchUids", + "in": "query", + "description": "Permits to filter tasks by their batch uid. By default, when the\n`batchUids` query parameter is not set, all task uids are returned.\nIt's possible to specify several batch uids by separating them with\nthe `,` character.", + "required": false, + "schema": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "example": 12421 + }, + { + "name": "uids", + "in": "query", + "description": "Permits to filter tasks by their uid. By default, when the uids query\nparameter is not set, all task uids are returned. It's possible to\nspecify several uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598 + ] + }, + { + "name": "canceledBy", + "in": "query", + "description": "Permits to filter tasks using the uid of the task that canceled them.\nIt's possible to specify several task uids by separating them with\nthe `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 374 + ] + }, + { + "name": "types", + "in": "query", + "description": "Permits to filter tasks by their related type. By default, when `types`\nquery parameter is not set, all task types are returned. It's possible\nto specify several types by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "documentAdditionOrUpdate" + ] + }, + { + "name": "statuses", + "in": "query", + "description": "Permits to filter tasks by their status. By default, when `statuses`\nquery parameter is not set, all task statuses are returned. It's\npossible to specify several statuses by separating them with the `,`\ncharacter.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Status" + } + }, + "example": [ + "succeeded", + "failed", + "canceled", + "enqueued", + "processing" + ] + }, + { + "name": "indexUids", + "in": "query", + "description": "Permits to filter tasks by their related index. By default, when\n`indexUids` query parameter is not set, the tasks of all the indexes\nare returned. It is possible to specify several indexes by separating\nthem with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "movies", + "theater" + ] + }, + { + "name": "afterEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + }, + { + "name": "beforeEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + }, + { + "name": "afterStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + }, + { + "name": "beforeStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + }, + { + "name": "afterFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + }, + { + "name": "beforeFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + } + ], + "responses": { + "200": { + "description": "Get all tasks", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AllTasks" + }, + "example": { + "results": [ + { + "uid": 144, + "indexUid": "mieli", + "status": "succeeded", + "type": "indexCreation", + "canceledBy": null, + "details": null, + "error": null, + "duration": "PT0.009330S", + "enqueuedAt": "2024-08-08T09:01:13.348471Z", + "startedAt": "2024-08-08T09:01:13.349442Z", + "finishedAt": "2024-08-08T09:01:13.358772Z" + } + ], + "total": 1, + "limit": 1, + "from": 144, + "next": null + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.get", + "tasks.*", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Tasks" + ], + "summary": "Delete tasks", + "description": "Delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) on filter", + "operationId": "delete_tasks", + "parameters": [ + { + "name": "uids", + "in": "query", + "description": "Permits to filter tasks by their uid. By default, when the `uids` query\nparameter is not set, all task uids are returned. It's possible to\nspecify several uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598 + ] + }, + { + "name": "batchUids", + "in": "query", + "description": "Lets you filter tasks by their `batchUid`.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598 + ] + }, + { + "name": "canceledBy", + "in": "query", + "description": "Permits to filter tasks using the uid of the task that canceled them.\nIt's possible to specify several task uids by separating them with\nthe `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 374 + ] + }, + { + "name": "types", + "in": "query", + "description": "Permits to filter tasks by their related type. By default, when `types`\nquery parameter is not set, all task types are returned. It's possible\nto specify several types by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Kind" + } + }, + "example": [ + "documentDeletion" + ] + }, + { + "name": "statuses", + "in": "query", + "description": "Permits to filter tasks by their status. By default, when `statuses`\nquery parameter is not set, all task statuses are returned. It's\npossible to specify several statuses by separating them with the `,`\ncharacter.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Status" + } + }, + "example": [ + "succeeded", + "failed", + "canceled" + ] + }, + { + "name": "indexUids", + "in": "query", + "description": "Permits to filter tasks by their related index. By default, when\n`indexUids` query parameter is not set, the tasks of all the indexes\nare returned. It is possible to specify several indexes by separating\nthem with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "movies", + "theater" + ] + }, + { + "name": "afterEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + }, + { + "name": "beforeEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + }, + { + "name": "afterStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + }, + { + "name": "beforeStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + }, + { + "name": "afterFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + }, + { + "name": "beforeFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + } + ], + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "taskDeletion", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "400": { + "description": "A filter is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Query parameters to filter the tasks to delete are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.", + "code": "missing_task_filters", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#missing_task_filters" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "The task uid does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Task :taskUid not found.", + "code": "task_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors/#task_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.delete", + "tasks.*", + "*" + ] + } + ] + } + }, + "/tasks/cancel": { + "post": { + "tags": [ + "Tasks" + ], + "summary": "Cancel tasks", + "description": "Cancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", + "operationId": "cancel_tasks", + "parameters": [ + { + "name": "uids", + "in": "query", + "description": "Permits to filter tasks by their uid. By default, when the `uids` query\nparameter is not set, all task uids are returned. It's possible to\nspecify several uids by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598 + ] + }, + { + "name": "batchUids", + "in": "query", + "description": "Lets you filter tasks by their `batchUid`.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 231, + 423, + 598 + ] + }, + { + "name": "canceledBy", + "in": "query", + "description": "Permits to filter tasks using the uid of the task that canceled them.\nIt's possible to specify several task uids by separating them with\nthe `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "example": [ + 374 + ] + }, + { + "name": "types", + "in": "query", + "description": "Permits to filter tasks by their related type. By default, when `types`\nquery parameter is not set, all task types are returned. It's possible\nto specify several types by separating them with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Kind" + } + }, + "example": [ + "documentDeletion" + ] + }, + { + "name": "statuses", + "in": "query", + "description": "Permits to filter tasks by their status. By default, when `statuses`\nquery parameter is not set, all task statuses are returned. It's\npossible to specify several statuses by separating them with the `,`\ncharacter.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Status" + } + }, + "example": [ + "succeeded", + "failed", + "canceled" + ] + }, + { + "name": "indexUids", + "in": "query", + "description": "Permits to filter tasks by their related index. By default, when\n`indexUids` query parameter is not set, the tasks of all the indexes\nare returned. It is possible to specify several indexes by separating\nthem with the `,` character.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "movies", + "theater" + ] + }, + { + "name": "afterEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + }, + { + "name": "beforeEnqueuedAt", + "in": "query", + "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + }, + { + "name": "afterStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + }, + { + "name": "beforeStartedAt", + "in": "query", + "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + }, + { + "name": "afterFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished after the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + }, + { + "name": "beforeFinishedAt", + "in": "query", + "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished before the given date. Supports RFC 3339 date format.", + "required": false, + "schema": { + "type": "string" + }, + "example": "2024-08-08T16:37:09.971Z" + } + ], + "responses": { + "200": { + "description": "Task successfully enqueued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SummarizedTaskView" + }, + "example": { + "taskUid": 147, + "indexUid": null, + "status": "enqueued", + "type": "taskCancelation", + "enqueuedAt": "2024-08-08T17:05:55.791772Z" + } + } + } + }, + "400": { + "description": "A filter is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Query parameters to filter the tasks to cancel are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.", + "code": "missing_task_filters", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#missing_task_filters" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "The task uid does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Task :taskUid not found.", + "code": "task_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors/#task_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.cancel", + "tasks.*", + "*" + ] + } + ] + } + }, + "/tasks/{taskUid}": { + "get": { + "tags": [ + "Tasks" + ], + "summary": "Get a task", + "description": "Get a [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", + "operationId": "get_task", + "parameters": [ + { + "name": "taskUid", + "in": "path", + "description": "The task identifier", + "required": true, + "schema": { + "type": "string", + "format": "u-int32" + }, + "example": "0" + } + ], + "responses": { + "200": { + "description": "Task successfully retrieved", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskView" + }, + "example": { + "uid": 1, + "indexUid": "movies", + "status": "succeeded", + "type": "indexCreation", + "canceledBy": null, + "details": null, + "error": null, + "duration": "PT1S", + "enqueuedAt": "2021-01-01T09:39:00.000000Z", + "startedAt": "2021-01-01T09:39:01.000000Z", + "finishedAt": "2021-01-01T09:39:02.000000Z" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "The task uid does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Task :taskUid not found.", + "code": "task_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors/#task_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "tasks.get", + "tasks.*", + "*" + ] + } + ] + } + }, + "/version": { + "get": { + "tags": [ + "Version" + ], + "summary": "Get version", + "description": "Current version of Meilisearch.", + "operationId": "get_version", + "responses": { + "200": { + "description": "Instance is healthy", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionResponse" + }, + "example": { + "commitSha": "b46889b5f0f2f8b91438a08a358ba8f05fc09fc1", + "commitDate": "2021-07-08", + "pkgVersion": "0.23.0" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "version", + "*" + ] + } + ] + } + }, + "/webhooks": { + "get": { + "tags": [ + "Webhooks" + ], + "summary": "List webhooks", + "description": "Get the list of all registered webhooks.", + "operationId": "get_webhooks", + "responses": { + "200": { + "description": "Webhooks are returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookResults" + }, + "example": { + "results": [ + { + "uuid": "550e8400-e29b-41d4-a716-446655440000", + "url": "https://your.site/on-tasks-completed", + "headers": { + "Authorization": "Bearer a-secret-token" + }, + "isEditable": true + }, + { + "uuid": "550e8400-e29b-41d4-a716-446655440001", + "url": "https://another.site/on-tasks-completed", + "isEditable": true + } + ] + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "webhooks.get", + "webhooks.*", + "*.get", + "*" + ] + } + ] + }, + "post": { + "tags": [ + "Webhooks" + ], + "summary": "Create a webhook", + "description": "Create a new webhook to receive task notifications.", + "operationId": "post_webhook", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookSettings" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Webhook created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" + }, + "example": { + "uuid": "550e8400-e29b-41d4-a716-446655440000", + "url": "https://your.site/on-tasks-completed", + "headers": { + "Authorization": "Bearer a-secret-token" + }, + "isEditable": true + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "webhooks.create", + "webhooks.*", + "*" + ] + } + ] + } + }, + "/webhooks/{uuid}": { + "get": { + "tags": [ + "Webhooks" + ], + "summary": "Get a webhook", + "description": "Get a single webhook by its UUID.", + "operationId": "get_webhook", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "The universally unique identifier of the webhook", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Webhook found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" + }, + "example": { + "uuid": "550e8400-e29b-41d4-a716-446655440000", + "url": "https://your.site/on-tasks-completed", + "headers": { + "Authorization": "Bearer a-secret" + }, + "isEditable": true + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + }, + "404": { + "description": "Webhook not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "webhooks.get", + "webhooks.*", + "*.get", + "*" + ] + } + ] + }, + "delete": { + "tags": [ + "Webhooks" + ], + "summary": "Delete a webhook", + "description": "Delete an existing webhook by its UUID.", + "operationId": "delete_webhook", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "The universally unique identifier of the webhook", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "Webhook deleted successfully" + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + }, + "404": { + "description": "Webhook not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "webhooks.delete", + "webhooks.*", + "*" + ] + } + ] + }, + "patch": { + "tags": [ + "Webhooks" + ], + "summary": "Update a webhook", + "description": "Update an existing webhook's URL or headers.", + "operationId": "patch_webhook", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "The universally unique identifier of the webhook", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Webhook updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" + }, + "example": { + "uuid": "550e8400-e29b-41d4-a716-446655440000", + "url": "https://your.site/on-tasks-completed", + "headers": { + "Authorization": "Bearer a-secret-token" + }, + "isEditable": true + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + }, + "401": { + "description": "The authorization header is missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "webhooks.update", + "webhooks.*", + "*" + ] + } + ] + } + } + }, + "components": { + "schemas": { + "Action": { + "type": "string", + "enum": [ + "*", + "search", + "documents.*", + "documents.add", + "documents.get", + "documents.delete", + "indexes.*", + "indexes.create", + "indexes.get", + "indexes.update", + "indexes.delete", + "indexes.swap", + "tasks.*", + "tasks.cancel", + "tasks.delete", + "tasks.get", + "settings.*", + "settings.get", + "settings.update", + "stats.*", + "stats.get", + "metrics.*", + "metrics.get", + "dumps.*", + "dumps.create", + "snapshots.*", + "snapshots.create", + "version", + "keys.create", + "keys.get", + "keys.update", + "keys.delete", + "experimental.get", + "experimental.update", + "export", + "network.get", + "network.update", + "chatCompletions", + "chats.*", + "chats.get", + "chats.delete", + "chatsSettings.*", + "chatsSettings.get", + "chatsSettings.update", + "*.get", + "webhooks.get", + "webhooks.update", + "webhooks.delete", + "webhooks.create", + "webhooks.*", + "indexes.compact", + "fields.post" + ] + }, + "AllBatches": { + "type": "object", + "description": "Response containing a paginated list of batches", + "required": [ + "results", + "total", + "limit" + ], + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BatchView" + }, + "description": "Array of batch objects" + }, + "total": { + "type": "integer", + "format": "u-int64", + "description": "Total number of batches", + "minimum": 0 + }, + "limit": { + "type": "integer", + "format": "u-int32", + "description": "Maximum number of batches returned", + "minimum": 0 + }, + "from": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "description": "The first batch uid returned", + "minimum": 0 + }, + "next": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "description": "Value to send in from to fetch the next slice of results", + "minimum": 0 + } + } + }, + "AllTasks": { + "type": "object", + "description": "Response containing a paginated list of tasks", + "required": [ + "results", + "total", + "limit" + ], + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskView" + }, + "description": "Array of task objects matching the query" + }, + "total": { + "type": "integer", + "format": "u-int64", + "description": "Total number of tasks matching the query", + "minimum": 0 + }, + "limit": { + "type": "integer", + "format": "u-int32", + "description": "Maximum number of tasks returned", + "minimum": 0 + }, + "from": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "description": "The first task uid returned", + "minimum": 0 + }, + "next": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "description": "Value to send in from to fetch the next slice of results. Null when all data has been browsed", + "minimum": 0 + } + } + }, + "AttributePatterns": { + "type": "object", + "description": "A collection of patterns used to match attribute names. Patterns can\ninclude wildcards (`*`) for flexible matching. For example, `title`\nmatches exactly, `overview_*` matches any attribute starting with\n`overview_`, and `*_date` matches any attribute ending with `_date`.", + "required": [ + "patterns" + ], + "properties": { + "patterns": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of attribute name patterns. Each pattern can be an exact\nattribute name, or include wildcards (`*`) at the start, end, or\nboth. Examples: `[\"title\", \"description_*\", \"*_date\", \"*content*\"]`.", + "example": [ + "title", + "overview_*", + "release_date" + ] + } + } + }, + "BatchStats": { + "type": "object", + "description": "Statistics for a batch of tasks", + "required": [ + "totalNbTasks", + "status", + "types", + "indexUids" + ], + "properties": { + "totalNbTasks": { + "$ref": "#/components/schemas/u32", + "description": "Total number of tasks in the batch" + }, + "status": { + "type": "object", + "description": "Count of tasks by status", + "additionalProperties": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "propertyNames": { + "type": "string", + "description": "The status of a task.", + "enum": [ + "enqueued", + "processing", + "succeeded", + "failed", + "canceled" + ], + "example": "processing" + } + }, + "types": { + "type": "object", + "description": "Count of tasks by type", + "additionalProperties": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "propertyNames": { + "type": "string", + "description": "The type of the task.", + "enum": [ + "documentAdditionOrUpdate", + "documentEdition", + "documentDeletion", + "settingsUpdate", + "indexCreation", + "indexDeletion", + "indexUpdate", + "indexSwap", + "taskCancelation", + "taskDeletion", + "dumpCreation", + "snapshotCreation", + "export", + "upgradeDatabase", + "indexCompaction", + "networkTopologyChange" + ], + "example": "documentAdditionOrUpdate" + } + }, + "indexUids": { + "type": "object", + "description": "Count of tasks by index UID", + "additionalProperties": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + }, + "propertyNames": { + "type": "string" + } + }, + "progressTrace": { + "type": "object", + "description": "Detailed progress trace information", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "writeChannelCongestion": { + "type": [ + "object", + "null" + ], + "description": "Write channel congestion metrics", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "internalDatabaseSizes": { + "type": "object", + "description": "Internal database size information", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + } + } + }, + "BatchStatsView": { + "allOf": [ + { + "$ref": "#/components/schemas/BatchStats", + "description": "Core batch statistics including the total number of tasks, counts by\nstatus (succeeded, failed, canceled), task types included, and which\nindexes were affected by this batch." + }, + { + "type": "object", + "properties": { + "embedderRequests": { + "$ref": "#/components/schemas/EmbedderStatsView", + "description": "Statistics about AI embedder API requests made during batch processing.\nIncludes total requests, successful/failed counts, and response times.\nOnly present when the batch involved vector embedding operations." + } + } + } + ], + "description": "Provides comprehensive statistics about a batch's execution.\n\nIncludes task counts, status breakdowns, and AI embedder usage. This\ninformation is useful for monitoring system performance and understanding\nbatch composition." + }, + "BatchView": { + "type": "object", + "description": "Represents a batch of tasks that were processed together.\n\nMeilisearch groups compatible tasks into batches for efficient processing.\nFor example, multiple document additions to the same index may be batched\ntogether. Use this view to monitor batch progress and performance.", + "required": [ + "uid", + "details", + "stats" + ], + "properties": { + "uid": { + "$ref": "#/components/schemas/u32", + "description": "The unique sequential identifier assigned to this batch. Batch UIDs\nare assigned in order of creation and can be used to retrieve specific\nbatch information or correlate tasks that were processed together." + }, + "progress": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ProgressView", + "description": "Real-time progress information for the batch if it's currently being\nprocessed. Contains details about which step is executing and the\npercentage of completion. This is `null` for completed batches." + } + ] + }, + "details": { + "type": "object", + "description": "Aggregated details from all tasks in this batch. For example, if the\nbatch contains multiple document addition tasks, this will show the\ntotal number of documents received and indexed across all tasks." + }, + "stats": { + "$ref": "#/components/schemas/BatchStatsView", + "description": "Statistical information about the batch, including the number of tasks\nby status, the types of tasks included, and the indexes affected.\nUseful for understanding the composition and outcome of the batch." + }, + "duration": { + "type": [ + "string", + "null" + ], + "description": "The total time spent processing this batch, formatted as an ISO-8601\nduration (e.g., `PT2.5S` for 2.5 seconds). This is `null` for batches\nthat haven't finished processing yet." + }, + "startedAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp when Meilisearch began processing this batch, formatted\nas an RFC 3339 date-time string. All batches have a start time as it's\nset when processing begins." + }, + "finishedAt": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "The timestamp when this batch finished processing, formatted as an\nRFC 3339 date-time string. This is `null` for batches that are still\nbeing processed." + }, + "batchStrategy": { + "type": "string", + "description": "Explains why the batch was finalized and stopped accepting more tasks.\nCommon reasons include reaching the maximum batch size, encountering\nincompatible tasks, or processing being explicitly triggered." + } + } + }, + "BrowseQuery": { + "type": "object", + "description": "Request body for browsing and retrieving documents from an index. Use\nthis to fetch documents with optional filtering, sorting, and pagination.\nThis is useful for displaying document lists, exporting data, or\ninspecting index contents.", + "required": [ + "offset", + "limit", + "retrieveVectors" + ], + "properties": { + "offset": { + "type": "integer", + "description": "Number of documents to skip in the response. Use together with `limit`\nfor pagination through large document sets. For example, to get\ndocuments 151-170, set `offset=150` and `limit=20`. Defaults to `0`.", + "example": 150, + "minimum": 0 + }, + "limit": { + "type": "integer", + "description": "Maximum number of documents to return in a single response. Use\ntogether with `offset` for pagination. Higher values return more\nresults but may increase response time and memory usage. Defaults to\n`20`.", + "default": 20, + "example": 1, + "minimum": 0 + }, + "fields": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Array of document attributes to include in the response. If not\nspecified, all attributes listed in the `displayedAttributes` setting\nare returned. Use this to reduce response size by only requesting the\nfields you need. Example: `[\"title\", \"description\", \"price\"]`.", + "example": [ + "title, description" + ] + }, + "retrieveVectors": { + "type": "boolean", + "description": "When `true`, includes the vector embeddings in the response for\ndocuments that have them. This is useful when you need to inspect or\nexport vector data. Note that this can significantly increase response\nsize. Defaults to `false`.", + "example": true + }, + "ids": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Array of specific document IDs to retrieve. Only documents with\nmatching primary key values will be returned. If not specified, all\ndocuments matching other criteria are returned. This is useful for\nfetching specific known documents.", + "example": [ + "cody", + "finn", + "brandy", + "gambit" + ] + }, + "filter": { + "description": "Filter expression to select which documents to return. Uses the same\nsyntax as search filters. Only documents matching the filter will be\nincluded in the response. Example: `\"genres = action AND rating > 4\"`\nor as an array `[[\"genres = action\"], \"rating > 4\"]`." + }, + "sort": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Array of attributes to sort the documents by. Each entry should be in\nthe format `attribute:direction` where direction is either `asc`\n(ascending) or `desc` (descending). Example: `[\"price:asc\",\n\"rating:desc\"]` sorts by price ascending, then by rating descending.", + "example": [ + "title:asc", + "rating:desc" + ] + } + } + }, + "ChatSearchParams": { + "type": "object", + "description": "Search parameters that control how the LLM queries this index.\n\nThese settings are applied automatically when the chat system\nperforms searches.", + "properties": { + "hybrid": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/HybridQuery", + "description": "Configuration for hybrid search combining keyword and semantic search.\nSet the `semanticRatio` to balance between keyword matching (0.0) and\nsemantic similarity (1.0). Requires an embedder to be configured." + } + ] + }, + "limit": { + "type": [ + "integer", + "null" + ], + "description": "Maximum number of documents to return when the LLM queries this index.\nHigher values provide more context to the LLM but may increase\nresponse time and token usage.", + "minimum": 0 + }, + "sort": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Sort criteria for ordering search results before presenting to the LLM.\nEach entry should be in the format `attribute:asc` or `attribute:desc`.\nExample: `[\"price:asc\", \"rating:desc\"]`." + }, + "distinct": { + "type": [ + "string", + "null" + ], + "description": "The attribute used for deduplicating results. When set, only one\ndocument per unique value of this attribute is returned. Useful for\navoiding duplicate content in LLM responses." + }, + "matchingStrategy": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/MatchingStrategy", + "description": "Strategy for matching query terms. `last` (default) matches all words\nand returns documents matching at least the last word. `all` requires\nall words to match. `frequency` prioritizes less frequent words." + } + ] + }, + "attributesToSearchOn": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Restricts the search to only the specified attributes. If not set, all\nsearchable attributes are searched.\nExample: `[\"title\", \"description\"]` searches only these two fields." + }, + "rankingScoreThreshold": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/RankingScoreThreshold", + "description": "Minimum ranking score (0.0 to 1.0) that documents must achieve to be\nincluded in results. Documents below this threshold are excluded.\nUseful for filtering out low-relevance results." + } + ] + } + }, + "additionalProperties": false + }, + "ChatSettings": { + "type": "object", + "description": "Configuration settings for AI-powered chat and search functionality.\n\nThese settings control how documents are presented to the LLM and what\nsearch parameters are used when the LLM queries the index.", + "properties": { + "description": { + "type": [ + "string", + "null" + ], + "description": "A description of this index that helps the LLM understand its contents\nand purpose. This description is provided to the LLM to help it decide\nwhen and how to query this index.\nExample: \"Contains product catalog with prices and descriptions\"." + }, + "documentTemplate": { + "type": [ + "string", + "null" + ], + "description": "A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text." + }, + "documentTemplateMaxBytes": { + "type": [ + "integer", + "null" + ], + "description": "Maximum size in bytes for the rendered document text. Texts longer than\nthis limit are truncated. This prevents very large documents from\nconsuming too much context in the LLM conversation.\nDefaults to `400` bytes.", + "minimum": 0 + }, + "searchParameters": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ChatSearchParams", + "description": "Default search parameters used when the LLM queries this index.\nThese settings control how search results are retrieved and ranked.\nIf not specified, standard search defaults are used." + } + ] + } + }, + "additionalProperties": false + }, + "Code": { + "type": "string", + "enum": [ + "api_key_already_exists", + "api_key_not_found", + "bad_parameter", + "bad_request", + "database_size_limit_reached", + "document_not_found", + "dump_already_processing", + "dump_not_found", + "dump_process_failed", + "duplicate_index_found", + "immutable_api_key_actions", + "immutable_api_key_created_at", + "immutable_api_key_expires_at", + "immutable_api_key_indexes", + "immutable_api_key_key", + "immutable_api_key_uid", + "immutable_api_key_updated_at", + "immutable_index_created_at", + "immutable_index_updated_at", + "import_task_already_received", + "import_task_unknown_remote", + "import_task_without_network_task", + "index_already_exists", + "index_creation_failed", + "index_not_found", + "index_primary_key_already_exists", + "index_primary_key_multiple_candidates_found", + "index_primary_key_no_candidate_found", + "internal", + "invalid_api_key", + "invalid_api_key_actions", + "invalid_api_key_description", + "invalid_api_key_expires_at", + "invalid_api_key_indexes", + "invalid_api_key_limit", + "invalid_api_key_name", + "invalid_api_key_offset", + "invalid_api_key_uid", + "invalid_content_type", + "invalid_document_csv_delimiter", + "invalid_document_fields", + "invalid_document_retrieve_vectors", + "missing_document_filter", + "missing_document_edition_function", + "inconsistent_document_change_headers", + "invalid_document_filter", + "invalid_document_sort", + "invalid_document_geo_field", + "invalid_document_geojson_field", + "invalid_header_value", + "invalid_vector_dimensions", + "invalid_vectors_type", + "invalid_document_id", + "invalid_document_ids", + "invalid_document_limit", + "invalid_document_offset", + "invalid_search_embedder", + "invalid_similar_embedder", + "invalid_search_hybrid_query", + "invalid_index_limit", + "invalid_index_offset", + "invalid_index_primary_key", + "invalid_index_custom_metadata", + "invalid_skip_creation", + "invalid_index_uid", + "invalid_multi_search_facets", + "invalid_multi_search_facets_by_index", + "invalid_multi_search_facet_order", + "invalid_multi_search_query_personalization", + "invalid_multi_search_query_show_performance_details", + "invalid_multi_search_federated", + "invalid_multi_search_federation_options", + "invalid_multi_search_max_values_per_facet", + "invalid_multi_search_merge_facets", + "invalid_multi_search_query_facets", + "invalid_multi_search_query_pagination", + "invalid_multi_search_query_ranking_rules", + "invalid_multi_search_query_position", + "invalid_multi_search_remote", + "invalid_multi_search_weight", + "invalid_network_leader", + "invalid_network_remotes", + "invalid_network_self", + "invalid_network_search_api_key", + "invalid_network_write_api_key", + "invalid_network_url", + "invalid_search_attributes_to_search_on", + "invalid_search_attributes_to_crop", + "invalid_search_attributes_to_highlight", + "invalid_similar_attributes_to_retrieve", + "invalid_similar_retrieve_vectors", + "invalid_search_attributes_to_retrieve", + "invalid_search_ranking_score_threshold", + "invalid_similar_ranking_score_threshold", + "invalid_search_retrieve_vectors", + "invalid_search_crop_length", + "invalid_search_crop_marker", + "invalid_search_facets", + "invalid_search_semantic_ratio", + "invalid_search_locales", + "invalid_facet_search_exhaustive_facet_count", + "invalid_facet_search_facet_name", + "invalid_similar_id", + "invalid_search_filter", + "invalid_similar_filter", + "invalid_search_highlight_post_tag", + "invalid_search_highlight_pre_tag", + "invalid_search_hits_per_page", + "invalid_similar_limit", + "invalid_search_limit", + "invalid_search_matching_strategy", + "invalid_similar_offset", + "invalid_search_offset", + "invalid_search_page", + "invalid_search_q", + "invalid_facet_search_query", + "invalid_facet_search_name", + "facet_search_disabled", + "invalid_search_vector", + "invalid_search_media", + "invalid_search_show_matches_position", + "invalid_search_show_ranking_score", + "invalid_similar_show_ranking_score", + "invalid_search_show_ranking_score_details", + "invalid_search_show_performance_details", + "invalid_search_use_network", + "invalid_similar_show_ranking_score_details", + "invalid_similar_show_performance_details", + "invalid_search_sort", + "invalid_search_distinct", + "invalid_search_personalize", + "invalid_search_personalize_user_context", + "invalid_search_media_and_vector", + "invalid_settings_displayed_attributes", + "invalid_settings_distinct_attribute", + "invalid_settings_proximity_precision", + "invalid_settings_facet_search", + "invalid_settings_prefix_search", + "invalid_settings_faceting", + "invalid_settings_filterable_attributes", + "invalid_settings_pagination", + "invalid_settings_search_cutoff_ms", + "invalid_settings_embedders", + "invalid_settings_ranking_rules", + "invalid_settings_searchable_attributes", + "invalid_settings_sortable_attributes", + "invalid_settings_stop_words", + "invalid_settings_non_separator_tokens", + "invalid_settings_separator_tokens", + "invalid_settings_dictionary", + "invalid_settings_synonyms", + "invalid_settings_typo_tolerance", + "invalid_settings_localized_attributes", + "invalid_state", + "invalid_store_file", + "invalid_swap_duplicate_index_found", + "invalid_swap_indexes", + "invalid_swap_rename", + "invalid_task_after_enqueued_at", + "invalid_task_after_finished_at", + "invalid_task_after_started_at", + "invalid_task_before_enqueued_at", + "invalid_task_before_finished_at", + "invalid_task_before_started_at", + "invalid_task_canceled_by", + "invalid_task_from", + "invalid_task_limit", + "invalid_task_reverse", + "invalid_task_statuses", + "invalid_task_types", + "invalid_task_uids", + "invalid_batch_uids", + "io_error", + "feature_not_enabled", + "malformed_payload", + "max_fields_limit_exceeded", + "missing_api_key_actions", + "missing_api_key_expires_at", + "missing_api_key_indexes", + "missing_authorization_header", + "missing_content_type", + "missing_document_id", + "missing_facet_search_facet_name", + "missing_index_uid", + "missing_master_key", + "missing_network_url", + "missing_payload", + "missing_search_hybrid", + "missing_swap_indexes", + "missing_task_filters", + "network_version_mismatch", + "no_space_left_on_device", + "not_leader", + "payload_too_large", + "remote_bad_response", + "remote_bad_request", + "remote_could_not_send_request", + "remote_invalid_api_key", + "remote_remote_error", + "remote_timeout", + "too_many_search_requests", + "task_not_found", + "task_file_not_found", + "batch_not_found", + "too_many_open_files", + "too_many_vectors", + "unexpected_network_previous_remotes", + "network_version_too_old", + "unprocessed_network_task", + "unretrievable_document", + "unretrievable_error_code", + "unsupported_media_type", + "invalid_s3_snapshot_request", + "invalid_s3_snapshot_parameters", + "s3_snapshot_server_error", + "vector_embedding_error", + "not_found_similar_id", + "invalid_document_edition_context", + "invalid_document_edition_function_filter", + "edit_documents_by_function_error", + "invalid_settings_index_chat", + "invalid_settings_vector_store", + "invalid_export_url", + "invalid_export_api_key", + "invalid_export_payload_size", + "invalid_export_indexes_patterns", + "invalid_export_index_filter", + "invalid_export_index_override_settings", + "unimplemented_external_function_calling", + "unimplemented_non_streaming_chat_completions", + "unimplemented_multi_choice_chat_completions", + "chat_not_found", + "invalid_chat_setting_document_template", + "invalid_chat_completion_org_id", + "invalid_chat_completion_project_id", + "invalid_chat_completion_api_version", + "invalid_chat_completion_deployment_id", + "invalid_chat_completion_source", + "invalid_chat_completion_base_api", + "invalid_chat_completion_api_key", + "invalid_chat_completion_prompts", + "invalid_chat_completion_system_prompt", + "invalid_chat_completion_search_description_prompt", + "invalid_chat_completion_search_query_param_prompt", + "invalid_chat_completion_search_filter_param_prompt", + "invalid_chat_completion_search_index_uid_param_prompt", + "invalid_chat_completion_pre_query_prompt", + "invalid_index_fields_filter", + "invalid_index_fields_filter_attribute_patterns", + "invalid_index_fields_filter_displayed", + "invalid_index_fields_filter_searchable", + "invalid_index_fields_filter_sortable", + "invalid_index_fields_filter_distinct", + "invalid_index_fields_filter_ranking_rule", + "invalid_index_fields_filter_filterable", + "requires_enterprise_edition", + "invalid_webhooks", + "invalid_webhook_url", + "invalid_webhook_headers", + "immutable_webhook", + "invalid_webhook_uuid", + "webhook_not_found", + "immutable_webhook_uuid", + "immutable_webhook_is_editable" + ] + }, + "ComputedFacets": { + "type": "object", + "description": "Computed facet data from a search", + "required": [ + "distribution", + "stats" + ], + "properties": { + "distribution": { + "type": "object", + "description": "Count of documents for each facet value", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + }, + "propertyNames": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + } + }, + "stats": { + "type": "object", + "description": "Numeric statistics for each facet", + "additionalProperties": { + "$ref": "#/components/schemas/FacetStats" + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "CreateApiKey": { + "type": "object", + "required": [ + "actions", + "indexes" + ], + "properties": { + "description": { + "type": [ + "string", + "null" + ], + "description": "A description for the key. `null` if empty.", + "example": null + }, + "name": { + "type": [ + "string", + "null" + ], + "description": "A human-readable name for the key. `null` if empty.", + "example": "Indexing Products API key" + }, + "uid": { + "type": [ + "string", + "null" + ], + "description": "A uuid v4 to identify the API Key. If not specified, it's generated by Meilisearch.", + "example": "01b4bc42-eb33-4041-b481-254d00cce834" + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Action" + }, + "description": "A list of actions permitted for the key. `[\"*\"]` for all actions. The\n`*` character can be used as a wildcard when located at the last\nposition. e.g. `documents.*` to authorize access on all documents\nendpoints.", + "example": [ + "documents.add" + ] + }, + "indexes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of accessible indexes permitted for the key. `[\"*\"]` for all\nindexes. The `*` character can be used as a wildcard when located at\nthe last position. e.g. `products_*` to allow access to all indexes\nwhose names start with `products_`.", + "example": [ + "products" + ] + }, + "expiresAt": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "Represent the expiration date and time as RFC 3339 format. `null`\nequals to no expiration time." + } + } + }, + "DbTaskNetwork": { + "oneOf": [ + { + "type": "object", + "description": "Tasks that were duplicated from `origin`", + "required": [ + "origin" + ], + "properties": { + "origin": { + "$ref": "#/components/schemas/Origin" + } + } + }, + { + "type": "object", + "description": "Tasks that were duplicated as `remote_tasks`", + "required": [ + "remote_tasks" + ], + "properties": { + "remote_tasks": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/RemoteTask" + }, + "propertyNames": { + "type": "string" + } + }, + "network_version": { + "type": "string", + "format": "uuid" + } + } + }, + { + "type": "object", + "description": "Document import tasks sent in the context of `network_change`", + "required": [ + "import_from", + "network_change" + ], + "properties": { + "import_from": { + "$ref": "#/components/schemas/ImportData" + }, + "network_change": { + "$ref": "#/components/schemas/Origin" + } + } + } + ] + }, + "DetailsExportIndexSettings": { + "allOf": [ + { + "$ref": "#/components/schemas/ExportIndexSettings" + }, + { + "type": "object", + "properties": { + "matchedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "minimum": 0 + } + } + } + ] + }, + "DetailsView": { + "allOf": [ + { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/Settings_Unchecked", + "description": "The complete settings object that was applied by a `settingsUpdate`\ntask. Only the settings that were modified are included in this\nobject." + } + ] + }, + { + "type": "object", + "properties": { + "receivedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "The number of documents that were sent in the request payload for a\n`documentAdditionOrUpdate` task. This count is determined before any\nprocessing occurs.", + "minimum": 0 + }, + "indexedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "The number of documents that were successfully indexed after\nprocessing a `documentAdditionOrUpdate` task. This may differ from\n`receivedDocuments` if some documents were invalid or duplicates.\nThe inner `null` indicates the task is still processing.", + "minimum": 0 + }, + "editedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "The number of documents that were modified by an `documentEdition`\ntask using a RHAI function. The inner `null` indicates the task is\nstill processing.", + "minimum": 0 + }, + "primaryKey": { + "type": [ + "string", + "null" + ], + "description": "The primary key attribute set for the index. For `indexCreation`\ntasks, this is the primary key that was specified. For `indexUpdate`\ntasks, this shows the new primary key if it was changed. The inner\n`null` means no primary key was specified and Meilisearch will infer\nit from documents." + }, + "providedIds": { + "type": [ + "integer", + "null" + ], + "description": "The number of document IDs that were provided in a `documentDeletion`\nrequest. This is the count before processing - the actual number\ndeleted may be lower if some IDs didn't exist.", + "minimum": 0 + }, + "deletedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "The number of documents that were actually removed from the index for\n`documentDeletion`, `documentDeletionByFilter`, or `indexDeletion`\ntasks. The inner `null` indicates the task is still processing.", + "minimum": 0 + }, + "matchedTasks": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "The number of tasks that matched the filter criteria for a\n`taskCancelation` or `taskDeletion` request. This is determined when\nthe request is received, before any cancellation or deletion occurs.", + "minimum": 0 + }, + "canceledTasks": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "The number of tasks that were successfully canceled by a\n`taskCancelation` task. This may be less than `matchedTasks` if some\ntasks completed before they could be canceled. The inner `null`\nindicates the task is still processing.", + "minimum": 0 + }, + "deletedTasks": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "The number of tasks that were successfully deleted by a `taskDeletion`\ntask. The inner `null` indicates the task is still processing.", + "minimum": 0 + }, + "originalFilter": { + "type": [ + "string", + "null" + ], + "description": "The original filter query string that was used to select tasks for a\n`taskCancelation` or `taskDeletion` operation. Useful for\nunderstanding which tasks were targeted." + }, + "dumpUid": { + "type": [ + "string", + "null" + ], + "description": "The unique identifier assigned to the dump file created by a\n`dumpCreation` task. Use this UID to locate the dump file in the\ndumps directory. The inner `null` indicates the task is still\nprocessing or failed before generating a UID." + }, + "context": { + "type": [ + "object", + "null" + ], + "description": "The context object that was provided to the RHAI function for a\n`documentEdition` task. This object contains data that the function\ncan access during document processing." + }, + "function": { + "type": [ + "string", + "null" + ], + "description": "The RHAI function code that was executed for a `documentEdition`\ntask. This function is applied to each document matching the filter." + }, + "swaps": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/IndexSwap" + }, + "description": "The list of index swap operations that were performed by an\n`indexSwap` task. Each swap specifies two indexes that exchanged\ntheir contents." + }, + "upgradeFrom": { + "type": [ + "string", + "null" + ], + "description": "The Meilisearch version before a database upgrade was performed.\nFormatted as `vX.Y.Z`." + }, + "upgradeTo": { + "type": [ + "string", + "null" + ], + "description": "The Meilisearch version after a database upgrade was completed.\nFormatted as `vX.Y.Z`." + }, + "url": { + "type": [ + "string", + "null" + ], + "description": "The destination URL where data is being exported for an `export`\ntask. This is the endpoint that receives the exported index data." + }, + "apiKey": { + "type": [ + "string", + "null" + ], + "description": "The API key used for authentication when exporting data to a remote\nMeilisearch instance. This value is partially masked for security." + }, + "payloadSize": { + "type": [ + "string", + "null" + ], + "description": "The maximum payload size configured for an `export` task, formatted\nas a human-readable string (e.g., `100 MB`). This limits the size of\neach batch of documents sent during export." + }, + "indexes": { + "type": [ + "object", + "null" + ], + "description": "A map of index patterns to their export settings for an `export`\ntask. The keys are index patterns (which may include wildcards) and\nthe values contain the specific export configuration for matching\nindexes.", + "additionalProperties": { + "$ref": "#/components/schemas/DetailsExportIndexSettings" + }, + "propertyNames": { + "type": "string" + } + }, + "oldIndexUid": { + "type": [ + "string", + "null" + ], + "description": "The original unique identifier of the index before an `indexRename`\noperation. This is the name the index had before it was renamed." + }, + "newIndexUid": { + "type": [ + "string", + "null" + ], + "description": "The new unique identifier assigned to the index after an `indexRename`\noperation. This is the name the index has after being renamed." + }, + "preCompactionSize": { + "type": [ + "string", + "null" + ], + "description": "The size of the index before an `indexCompaction` task was performed,\nformatted as a human-readable string (e.g., `1.5 GB`). Compare with\n`postCompactionSize` to see how much space was reclaimed." + }, + "postCompactionSize": { + "type": [ + "string", + "null" + ], + "description": "The size of the index after an `indexCompaction` task completed,\nformatted as a human-readable string (e.g., `1.2 GB`). This should\nbe smaller than or equal to `preCompactionSize`." + }, + "movedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "The number of documents that were redistributed during a\n`networkTopologyChange` task in a distributed deployment. This\noccurs when the cluster configuration changes.", + "minimum": 0 + }, + "message": { + "type": [ + "string", + "null" + ], + "description": "A human-readable message providing additional information about the\ntask, such as status updates or explanatory text about what occurred\nduring processing." + } + } + } + ], + "description": "Contains type-specific details about a task's execution.\n\nThe fields present depend on the task type. For example, document addition\ntasks will have `receivedDocuments` and `indexedDocuments`, while settings\nupdate tasks will have the applied settings." + }, + "DistributionShift": { + "type": "object", + "description": "Describes the mean and sigma of distribution of embedding similarity in the embedding space.\n\nThe intended use is to make the similarity score more comparable to the regular ranking score.\nThis allows to correct effects where results are too \"packed\" around a certain value.", + "required": [ + "current_mean", + "current_sigma" + ], + "properties": { + "current_mean": { + "type": "number", + "format": "float", + "description": "Value where the results are \"packed\".\n\nSimilarity scores are translated so that they are packed around 0.5 instead" + }, + "current_sigma": { + "type": "number", + "format": "float", + "description": "standard deviation of a similarity score.\n\nSet below 0.4 to make the results less packed around the mean, and above 0.4 to make them more packed." + } + } + }, + "DocumentDeletionByFilter": { + "type": "object", + "description": "Request body for deleting documents by filter", + "required": [ + "filter" + ], + "properties": { + "filter": { + "description": "Filter expression to match documents for deletion" + } + } + }, + "DocumentEditionByFunction": { + "type": "object", + "description": "Request body for editing documents using a JavaScript function", + "required": [ + "function" + ], + "properties": { + "filter": { + "description": "Filter expression to select which documents to edit" + }, + "context": { + "description": "Data to make available for the editing function" + }, + "function": { + "type": "string", + "description": "RHAI function to apply to each document" + } + } + }, + "EmbedderSource": { + "type": "string", + "enum": [ + "openAi", + "huggingFace", + "ollama", + "userProvided", + "rest", + "composite" + ] + }, + "EmbedderStatsView": { + "type": "object", + "description": "Statistics for embedder requests", + "required": [ + "total", + "failed" + ], + "properties": { + "total": { + "type": "integer", + "description": "Total number of embedder requests", + "minimum": 0 + }, + "failed": { + "type": "integer", + "description": "Number of failed embedder requests", + "minimum": 0 + }, + "lastError": { + "type": [ + "string", + "null" + ], + "description": "Last error message from the embedder" + } + } + }, + "ErrorType": { + "type": "string", + "enum": [ + "internal", + "invalid_request", + "auth", + "system" + ] + }, + "Export": { + "type": "object", + "description": "Request body for exporting data to a remote Meilisearch instance", + "properties": { + "url": { + "type": [ + "string", + "null" + ], + "description": "URL of the destination Meilisearch instance", + "example": "https://ms-1234.heaven.meilisearch.com" + }, + "apiKey": { + "type": [ + "string", + "null" + ], + "description": "API key for authenticating with the destination instance", + "example": "1234abcd" + }, + "payloadSize": { + "type": [ + "string", + "null" + ], + "description": "Maximum payload size per request", + "example": "24MiB" + }, + "indexes": { + "type": [ + "object", + "null" + ], + "description": "Index patterns to export with their settings", + "additionalProperties": { + "$ref": "#/components/schemas/ExportIndexSettings" + }, + "propertyNames": { + "type": "string" + }, + "example": { + "*": { + "filter": null + } + } + } + } + }, + "ExportIndexSettings": { + "type": "object", + "description": "Export settings for a specific index", + "properties": { + "filter": { + "type": [ + "string", + "null" + ], + "description": "Filter expression to select which documents to export", + "example": "genres = action" + }, + "overrideSettings": { + "type": [ + "boolean", + "null" + ], + "description": "Whether to override settings on the destination index", + "example": true + } + } + }, + "FacetSearchQuery": { + "type": "object", + "description": "Request body for searching facet values", + "required": [ + "facet_name", + "matching_strategy" + ], + "properties": { + "facet_query": { + "type": [ + "string", + "null" + ], + "description": "Query string to search for facet values" + }, + "facet_name": { + "type": "string", + "description": "Name of the facet to search" + }, + "q": { + "type": [ + "string", + "null" + ], + "description": "Query string to filter documents before facet search" + }, + "vector": { + "type": [ + "array", + "null" + ], + "items": { + "type": "number", + "format": "float" + }, + "description": "Custom query vector for semantic search" + }, + "media": { + "description": "Multimodal content for AI-powered search" + }, + "hybrid": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/HybridQuery", + "description": "Hybrid search configuration that combines keyword search with semantic\n(vector) search. Set `semanticRatio` to balance between keyword\nmatching (0.0) and semantic similarity (1.0). Requires an embedder to\nbe configured in the index settings." + } + ] + }, + "filter": { + "description": "Filter expression to apply before facet search" + }, + "matching_strategy": { + "$ref": "#/components/schemas/MatchingStrategy", + "description": "Strategy used to match query terms" + }, + "attributes_to_search_on": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Restrict search to specified attributes" + }, + "ranking_score_threshold": { + "type": [ + "number", + "null" + ], + "format": "double", + "description": "Minimum ranking score threshold (0.0 to 1.0) that documents must\nachieve to be considered when computing facet counts. Documents with\nscores below this threshold are excluded from facet value counts." + }, + "locales": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/Locale" + }, + "description": "Languages to use for query processing" + }, + "exhaustive_facet_count": { + "type": [ + "boolean", + "null" + ], + "description": "Return exhaustive facet count instead of an estimate" + } + } + }, + "FacetStats": { + "type": "object", + "description": "The numeric min and max values for a facet", + "required": [ + "min", + "max" + ], + "properties": { + "min": { + "type": "number", + "format": "double", + "description": "Minimum value of the numeric facet" + }, + "max": { + "type": "number", + "format": "double", + "description": "Maximum value of the numeric facet" + } + } + }, + "FacetValuesSort": { + "type": "string", + "enum": [ + "alpha", + "count" + ] + }, + "FacetingSettings": { + "type": "object", + "description": "Faceting configuration settings", + "properties": { + "maxValuesPerFacet": { + "type": [ + "integer", + "null" + ], + "description": "Maximum number of facet values returned for each facet", + "example": 10, + "minimum": 0 + }, + "sortFacetValuesBy": { + "type": [ + "object", + "null" + ], + "description": "How facet values should be sorted (by count or alphabetically)", + "additionalProperties": { + "$ref": "#/components/schemas/FacetValuesSort" + }, + "propertyNames": { + "type": "string" + }, + "example": { + "genre": "count" + } + } + }, + "additionalProperties": false + }, + "FederatedFacets": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ComputedFacets" + }, + "propertyNames": { + "type": "string" + } + }, + "FederatedSearch": { + "type": "object", + "description": "Request body for federated multi-search across multiple indexes. This\nallows you to execute multiple search queries in a single request and\noptionally combine their results into a unified response. Use this for\ncross-index search scenarios or to reduce network round-trips.", + "required": [ + "queries" + ], + "properties": { + "queries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchQueryWithIndex" + }, + "description": "An array of search queries to execute. Each query can target a\ndifferent index and have its own parameters. When `federation` is\n`null`, results are returned separately for each query. When\n`federation` is set, results are merged." + }, + "federation": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/Federation", + "description": "Configuration for combining results from multiple queries into a\nsingle response. When set, results are merged and ranked together.\nWhen `null`, each query's results are returned separately in an\narray." + } + ] + } + } + }, + "FederatedSearchResult": { + "allOf": [ + { + "$ref": "#/components/schemas/HitsInfo", + "description": "Pagination information" + }, + { + "type": "object", + "required": [ + "hits", + "processingTimeMs" + ], + "properties": { + "hits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchHit" + }, + "description": "Combined search results from all queries" + }, + "queryVectors": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/Vec" + }, + "propertyNames": { + "type": "integer", + "minimum": 0 + } + }, + "processingTimeMs": { + "type": "integer", + "description": "Total processing time in milliseconds", + "minimum": 0 + }, + "facetDistribution": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + }, + "propertyNames": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + } + }, + "facetStats": { + "type": [ + "object", + "null" + ], + "description": "Merged facet statistics across all indexes", + "additionalProperties": { + "$ref": "#/components/schemas/FacetStats" + }, + "propertyNames": { + "type": "string" + } + }, + "facetsByIndex": { + "$ref": "#/components/schemas/FederatedFacets", + "description": "Facets grouped by index" + }, + "requestUid": { + "type": [ + "string", + "null" + ], + "format": "uuid", + "description": "Unique identifier for the request" + }, + "metadata": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/SearchMetadata" + }, + "description": "Metadata for each query" + }, + "remoteErrors": { + "type": [ + "object", + "null" + ], + "description": "Errors from remote servers", + "additionalProperties": { + "$ref": "#/components/schemas/ResponseError" + }, + "propertyNames": { + "type": "string" + } + }, + "semanticHitCount": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "minimum": 0 + }, + "performanceDetails": {} + } + } + ], + "description": "Response from a federated multi-search query" + }, + "Federation": { + "type": "object", + "description": "Configuration for federated multi-search", + "required": [ + "limit", + "offset", + "facetsByIndex", + "showPerformanceDetails" + ], + "properties": { + "limit": { + "type": "integer", + "description": "Maximum number of results to return across all queries", + "minimum": 0 + }, + "offset": { + "type": "integer", + "description": "Number of results to skip", + "minimum": 0 + }, + "page": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "hitsPerPage": { + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "facetsByIndex": { + "type": "object", + "description": "Facets to retrieve per index", + "additionalProperties": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string", + "description": "An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long", + "example": "movies" + } + }, + "mergeFacets": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/MergeFacets", + "description": "Options for merging facets from multiple indexes" + } + ] + }, + "showPerformanceDetails": { + "type": "boolean", + "description": "Whether to include performance details in the response" + } + } + }, + "FederationOptions": { + "type": "object", + "description": "Options for federated multi-search queries", + "required": [ + "weight" + ], + "properties": { + "weight": { + "type": "number", + "format": "double", + "description": "Weight to apply to results from this query (default: 1.0)" + }, + "remote": { + "type": [ + "string", + "null" + ], + "description": "Remote server to send this query to" + }, + "queryPosition": { + "type": [ + "integer", + "null" + ], + "description": "Position of this query in the list of queries", + "minimum": 0 + } + } + }, + "FilterFeatures": { + "type": "object", + "description": "Controls which filter operators are allowed for an attribute. This\nprovides fine-grained control over filtering capabilities.", + "properties": { + "equality": { + "type": "boolean", + "description": "When `true`, enables equality operators: `=`, `!=`, and `IN`. These\nallow filtering for exact matches or membership in a set of values.\nAlso enables `IS EMPTY`, `IS NULL`, and `EXISTS` operators. Defaults\nto `true`." + }, + "comparison": { + "type": "boolean", + "description": "When `true`, enables comparison operators: `<`, `>`, `<=`, `>=`, and\n`TO` (range). These allow filtering based on numeric or string\ncomparisons. Defaults to `false`." + } + }, + "additionalProperties": false + }, + "FilterableAttributesFeatures": { + "type": "object", + "description": "Controls which filtering and faceting operations are enabled for matching\nattributes. This allows restricting certain operations on specific fields\nfor security or performance reasons.", + "properties": { + "facetSearch": { + "type": "boolean", + "description": "When `true`, allows searching within facet values for matching\nattributes. This enables the facet search feature which lets users\nsearch for specific facet values. Defaults to `false`." + }, + "filter": { + "$ref": "#/components/schemas/FilterFeatures", + "description": "Controls which filter operators are allowed for matching attributes.\nSee `FilterFeatures` for available options." + } + }, + "additionalProperties": false + }, + "FilterableAttributesPatterns": { + "type": "object", + "description": "Defines a set of attribute patterns with specific filtering and faceting\nfeatures. This allows fine-grained control over which operations are\nallowed on matched attributes.", + "required": [ + "attributePatterns" + ], + "properties": { + "attributePatterns": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Patterns to match attribute names. Use `*` as a wildcard to match any\ncharacters. For example, `[\"price_*\", \"stock\"]` matches `price_usd`,\n`price_eur`, and `stock`." + }, + "features": { + "$ref": "#/components/schemas/FilterableAttributesFeatures", + "description": "The filtering and faceting features enabled for attributes matching\nthese patterns. If not specified, defaults to equality filtering\nenabled." + } + }, + "additionalProperties": false + }, + "FilterableAttributesRule": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/FilterableAttributesPatterns" + } + ] + }, + "GetLogs": { + "type": "object", + "description": "Request body for streaming logs", + "required": [ + "target", + "mode", + "profileMemory" + ], + "properties": { + "target": { + "type": "string", + "description": "Log targets to filter. Format: code_part=log_level (e.g.,\nmilli=trace,actix_web=off)", + "default": "info", + "example": "milli=trace,index_scheduler,actix_web=off" + }, + "mode": { + "oneOf": [ + { + "$ref": "#/components/schemas/LogMode", + "description": "Output format for log entries. `human` provides readable text output,\n`json` provides structured JSON for parsing, and `profile` outputs\nFirefox profiler format for performance visualization." + } + ], + "default": "Human" + }, + "profileMemory": { + "type": "boolean", + "description": "Enable memory profiling (only useful with profile mode, significantly\nslows down the engine)", + "default": false + } + } + }, + "HealthResponse": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/HealthStatus", + "description": "The status of the instance." + } + } + }, + "HealthStatus": { + "type": "string", + "enum": [ + "available" + ] + }, + "HitsInfo": { + "oneOf": [ + { + "type": "object", + "description": "Finite pagination with exact counts", + "required": [ + "hitsPerPage", + "page", + "totalPages", + "totalHits" + ], + "properties": { + "hitsPerPage": { + "type": "integer", + "description": "Number of results on each page", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Current search results page", + "minimum": 0 + }, + "totalPages": { + "type": "integer", + "description": "Exhaustive total number of search result pages", + "minimum": 0 + }, + "totalHits": { + "type": "integer", + "description": "Exhaustive total number of matches", + "minimum": 0 + } + } + }, + { + "type": "object", + "description": "Offset-based pagination with estimated counts", + "required": [ + "limit", + "offset", + "estimatedTotalHits" + ], + "properties": { + "limit": { + "type": "integer", + "description": "Number of documents to take", + "minimum": 0 + }, + "offset": { + "type": "integer", + "description": "Number of documents skipped", + "minimum": 0 + }, + "estimatedTotalHits": { + "type": "integer", + "description": "Estimated total number of matches", + "minimum": 0 + } + } + } + ], + "description": "Pagination information for search results" + }, + "HybridQuery": { + "type": "object", + "description": "Configuration for hybrid search combining keyword and semantic search.\n\nThis allows searches that understand both exact words and conceptual\nmeaning.", + "required": [ + "embedder" + ], + "properties": { + "semanticRatio": { + "type": "number", + "format": "float", + "description": "Controls the balance between keyword search and semantic search.\nA value of `0.0` uses only keyword search, `1.0` uses only semantic\nsearch, and `0.5` (the default) gives equal weight to both.\nUse lower values for exact term matching and higher values for\nconceptual similarity." + }, + "embedder": { + "type": "string", + "description": "The name of the embedder configuration to use for generating query\nvectors. This must match one of the embedders defined in the index's\n`embedders` settings." + } + } + }, + "ImportData": { + "type": "object", + "description": "Import data stored in a task", + "required": [ + "remoteName", + "documentCount" + ], + "properties": { + "remoteName": { + "type": "string", + "description": "Remote that this task is imported from" + }, + "indexName": { + "type": [ + "string", + "null" + ], + "description": "Index relevant to this task" + }, + "documentCount": { + "type": "integer", + "format": "u-int64", + "description": "Number of documents in this task", + "minimum": 0 + } + } + }, + "IndexCreateRequest": { + "type": "object", + "description": "Request body for creating a new index", + "required": [ + "uid" + ], + "properties": { + "uid": { + "$ref": "#/components/schemas/IndexUid", + "description": "Unique identifier for the index" + }, + "primaryKey": { + "type": [ + "string", + "null" + ], + "description": "Primary key of the index", + "example": "id" + } + } + }, + "IndexStats": { + "type": "object", + "description": "Stats of an `Index`, as known to the `stats` route.", + "required": [ + "numberOfDocuments", + "rawDocumentDbSize", + "avgDocumentSize", + "isIndexing", + "fieldDistribution" + ], + "properties": { + "numberOfDocuments": { + "type": "integer", + "format": "u-int64", + "description": "Number of documents in the index", + "minimum": 0 + }, + "rawDocumentDbSize": { + "type": "integer", + "format": "u-int64", + "description": "Size of the documents database, in bytes.", + "minimum": 0 + }, + "avgDocumentSize": { + "type": "integer", + "format": "u-int64", + "description": "Average size of a document in the documents database.", + "minimum": 0 + }, + "isIndexing": { + "type": "boolean", + "description": "Whether or not the index is currently ingesting document" + }, + "numberOfEmbeddings": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of embeddings in the index", + "minimum": 0 + }, + "numberOfEmbeddedDocuments": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Number of embedded documents in the index", + "minimum": 0 + }, + "fieldDistribution": { + "type": "object", + "description": "Association of every field name with the number of times it occurs in\nthe documents.", + "additionalProperties": { + "type": "integer", + "format": "u-int64", + "minimum": 0 + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "IndexSwap": { + "type": "object", + "description": "Index swap operation", + "required": [ + "indexes" + ], + "properties": { + "indexes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Pair of index UIDs to swap", + "example": [ + "indexA", + "indexB" + ] + }, + "rename": { + "type": "boolean", + "description": "Whether this is a rename operation" + } + } + }, + "IndexUid": { + "type": "string", + "description": "An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long", + "example": "movies" + }, + "IndexView": { + "type": "object", + "description": "An index containing searchable documents", + "required": [ + "uid", + "createdAt", + "updatedAt" + ], + "properties": { + "uid": { + "type": "string", + "description": "Unique identifier for the index. Once created, it cannot be changed" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Creation date of the index, represented in RFC 3339 format" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "Latest date of index update, represented in RFC 3339 format" + }, + "primaryKey": { + "type": [ + "string", + "null" + ], + "description": "Primary key of the index" + } + } + }, + "KeyView": { + "type": "object", + "description": "Represents an API key used for authenticating requests to Meilisearch.\nEach key has specific permissions defined by its actions and can be scoped\nto particular indexes. Keys provide fine-grained access control for your\nMeilisearch instance.", + "required": [ + "key", + "uid", + "actions", + "indexes", + "createdAt", + "updatedAt" + ], + "properties": { + "name": { + "type": [ + "string", + "null" + ], + "description": "A human-readable name for the API key. Use this to identify the purpose\nof each key, such as \"Frontend Search Key\" or \"Admin Key for CI/CD\".\nThis is optional and can be `null`." + }, + "description": { + "type": [ + "string", + "null" + ], + "description": "A longer description explaining the purpose or usage of this API key.\nUseful for documenting why the key was created and how it should be\nused. This is optional and can be `null`." + }, + "key": { + "type": "string", + "description": "The actual API key string to use in the `Authorization: Bearer `\nheader when making requests to Meilisearch. Keep this value secret and\nnever expose it in client-side code." + }, + "uid": { + "type": "string", + "format": "uuid", + "description": "The unique identifier (UUID) for this API key. Use this to update or\ndelete the key. The UID remains constant even if the key's name or\ndescription changes." + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Action" + }, + "description": "The list of actions (permissions) this key is allowed to perform.\nExamples include `documents.add`, `search`, `indexes.create`,\n`settings.update`, etc. Use `*` to grant all permissions." + }, + "indexes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The list of index UIDs this key can access. Use `*` to grant access to\nall indexes, including future ones. Patterns are also supported, e.g.,\n`movies_*` matches any index starting with \"movies_\"." + }, + "expiresAt": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "The expiration date and time of the key in RFC 3339 format. After this\ntime, the key will no longer be valid for authentication. Set to `null`\nfor keys that never expire." + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The date and time when this API key was created, formatted as an\nRFC 3339 date-time string. This is automatically set by Meilisearch\nand cannot be modified.", + "readOnly": true + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "The date and time when this API key was last modified, formatted as an\nRFC 3339 date-time string. This is automatically updated by Meilisearch\nwhen the key's name or description changes.", + "readOnly": true + } + } + }, + "Kind": { + "type": "string", + "description": "The type of the task.", + "enum": [ + "documentAdditionOrUpdate", + "documentEdition", + "documentDeletion", + "settingsUpdate", + "indexCreation", + "indexDeletion", + "indexUpdate", + "indexSwap", + "taskCancelation", + "taskDeletion", + "dumpCreation", + "snapshotCreation", + "export", + "upgradeDatabase", + "indexCompaction", + "networkTopologyChange" + ], + "example": "documentAdditionOrUpdate" + }, + "Locale": { + "type": "string", + "enum": [ + "af", + "ak", + "am", + "ar", + "az", + "be", + "bn", + "bg", + "ca", + "cs", + "da", + "de", + "el", + "en", + "eo", + "et", + "fi", + "fr", + "gu", + "he", + "hi", + "hr", + "hu", + "hy", + "id", + "it", + "jv", + "ja", + "kn", + "ka", + "km", + "ko", + "la", + "lv", + "lt", + "ml", + "mr", + "mk", + "my", + "ne", + "nl", + "nb", + "or", + "pa", + "fa", + "pl", + "pt", + "ro", + "ru", + "si", + "sk", + "sl", + "sn", + "es", + "sr", + "sv", + "ta", + "te", + "tl", + "th", + "tk", + "tr", + "uk", + "ur", + "uz", + "vi", + "yi", + "zh", + "zu", + "afr", + "aka", + "amh", + "ara", + "aze", + "bel", + "ben", + "bul", + "cat", + "ces", + "dan", + "deu", + "ell", + "eng", + "epo", + "est", + "fin", + "fra", + "guj", + "heb", + "hin", + "hrv", + "hun", + "hye", + "ind", + "ita", + "jav", + "jpn", + "kan", + "kat", + "khm", + "kor", + "lat", + "lav", + "lit", + "mal", + "mar", + "mkd", + "mya", + "nep", + "nld", + "nob", + "ori", + "pan", + "pes", + "pol", + "por", + "ron", + "rus", + "sin", + "slk", + "slv", + "sna", + "spa", + "srp", + "swe", + "tam", + "tel", + "tgl", + "tha", + "tuk", + "tur", + "ukr", + "urd", + "uzb", + "vie", + "yid", + "zho", + "zul", + "cmn" + ] + }, + "LocalizedAttributesRuleView": { + "type": "object", + "description": "Defines a rule for associating specific locales (languages) with\nattributes. This allows Meilisearch to use language-specific tokenization\nand processing for matched attributes, improving search quality for\nmultilingual content.", + "required": [ + "attributePatterns", + "locales" + ], + "properties": { + "attributePatterns": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Patterns to match attribute names. Use `*` as a wildcard to match any\ncharacters. For example, `[\"title_*\", \"description\"]` matches\n`title_en`, `title_fr`, and `description`.", + "example": [ + "*_ja" + ] + }, + "locales": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Locale" + }, + "description": "The list of locales (languages) to apply to matching attributes. When\nthese attributes are indexed, Meilisearch will use language-specific\ntokenization rules. Examples: `[\"en\", \"fr\"]` or `[\"jpn\", \"zho\"]`." + } + } + }, + "LogMode": { + "type": "string", + "description": "Format for log output", + "enum": [ + "human", + "json", + "profile" + ] + }, + "MatchBounds": { + "type": "object", + "description": "Represents the position of a matching term in a document field. Used to\nindicate where query terms were found within attribute values, enabling\nfeatures like highlighting and match position display.", + "required": [ + "start", + "length" + ], + "properties": { + "start": { + "type": "integer", + "description": "The byte offset where the match begins within the attribute value.\nThis is a zero-indexed position from the start of the string.", + "minimum": 0 + }, + "length": { + "type": "integer", + "description": "The length in bytes of the matched text. Combined with `start`, this\ndefines the exact substring that matched the query term.", + "minimum": 0 + }, + "indices": { + "type": [ + "array", + "null" + ], + "items": { + "type": "integer", + "minimum": 0 + }, + "description": "Byte indices of individual matched characters when the match spans\nmultiple positions (e.g., for prefix matches). This is `null` for\nsimple contiguous matches." + } + } + }, + "MatchingStrategy": { + "type": "string", + "description": "This is unfortunately a duplication of the struct in .\nThe reason why it is duplicated is because milli cannot depend on meilisearch. It would be cyclic imports.", + "enum": [ + "last", + "all", + "frequency" + ] + }, + "MergeFacets": { + "type": "object", + "description": "Options for merging facets from multiple indexes in federated search.\nWhen multiple indexes are queried, this controls how their facet values\nare combined into a single facet distribution.", + "properties": { + "maxValuesPerFacet": { + "type": [ + "integer", + "null" + ], + "description": "The maximum number of facet values to return for each facet after\nmerging. Values from all indexes are combined and sorted before\ntruncation. If not specified, uses the default limit from the index\nsettings.", + "minimum": 0 + } + } + }, + "MinWordSizeTyposSetting": { + "type": "object", + "description": "Configures the minimum word length required before typos are allowed.\n\nThis helps prevent matching very short words with typos, which can lead\nto irrelevant results.", + "properties": { + "oneTypo": { + "type": [ + "integer", + "null" + ], + "format": "u-int8", + "description": "The minimum word length required to accept one typo. Words shorter\nthan this value must match exactly. For example, if set to `5`, the\nword \"apple\" (5 letters) can have one typo, but \"app\" (3 letters)\ncannot. Defaults to `5`.", + "example": 5, + "minimum": 0 + }, + "twoTypos": { + "type": [ + "integer", + "null" + ], + "format": "u-int8", + "description": "The minimum word length required to accept two typos. Words shorter\nthan this value can have at most one typo. For example, if set to `9`,\nthe word \"computing\" (9 letters) can have two typos. Must be greater\nthan or equal to `oneTypo`. Defaults to `9`.", + "example": 9, + "minimum": 0 + } + }, + "additionalProperties": false + }, + "Network": { + "type": "object", + "description": "Network topology configuration for distributed Meilisearch", + "properties": { + "remotes": { + "type": [ + "object", + "null" + ], + "description": "Map of remote instance names to their configurations", + "additionalProperties": { + "$ref": "#/components/schemas/Remote" + }, + "propertyNames": { + "type": "string" + }, + "example": { + "ms-00": { + "url": "http://localhost:7700" + }, + "ms-01": { + "url": "http://localhost:7701" + } + } + }, + "self": { + "type": [ + "string", + "null" + ], + "description": "Name of this instance in the network", + "example": "ms-00" + }, + "leader": { + "type": [ + "string", + "null" + ], + "description": "Name of the leader instance in the network", + "example": "ms-00" + }, + "previousRemotes": { + "type": [ + "object", + "null" + ], + "description": "Previous remote configurations (for rollback)", + "additionalProperties": { + "$ref": "#/components/schemas/Remote" + }, + "propertyNames": { + "type": "string" + }, + "example": { + "ms-00": { + "url": "http://localhost:7700" + }, + "ms-01": { + "url": "http://localhost:7701" + } + } + } + } + }, + "Origin": { + "type": "object", + "description": "Information about the origin of a task in a distributed Meilisearch\ndeployment. This tracks where a task was originally created before being\nreplicated to other nodes.", + "required": [ + "remoteName", + "taskUid" + ], + "properties": { + "remoteName": { + "type": "string", + "description": "The name of the remote Meilisearch instance where this task originated.\nThis corresponds to a remote defined in the network configuration." + }, + "taskUid": { + "type": "integer", + "format": "u-int32", + "description": "The unique task identifier on the originating remote. This allows\ntracking the same task across different nodes in the network.", + "minimum": 0 + }, + "networkVersion": { + "type": "string", + "format": "uuid", + "description": "The version of the network topology when this task was created. Used to\nensure consistent task routing during network topology changes." + } + } + }, + "OverridePooling": { + "type": "string", + "enum": [ + "useModel", + "forceCls", + "forceMean" + ] + }, + "PaginationSettings": { + "type": "object", + "description": "Pagination configuration settings", + "properties": { + "maxTotalHits": { + "type": [ + "integer", + "null" + ], + "description": "Maximum number of hits that can be returned", + "example": 250, + "minimum": 0 + } + }, + "additionalProperties": false + }, + "PaginationView_IndexView": { + "type": "object", + "description": "Paginated response wrapper", + "required": [ + "results", + "offset", + "limit", + "total" + ], + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "description": "An index containing searchable documents", + "required": [ + "uid", + "createdAt", + "updatedAt" + ], + "properties": { + "uid": { + "type": "string", + "description": "Unique identifier for the index. Once created, it cannot be changed" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Creation date of the index, represented in RFC 3339 format" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "Latest date of index update, represented in RFC 3339 format" + }, + "primaryKey": { + "type": [ + "string", + "null" + ], + "description": "Primary key of the index" + } + } + }, + "description": "Array of items for the current page" + }, + "offset": { + "type": "integer", + "description": "Number of items skipped", + "minimum": 0 + }, + "limit": { + "type": "integer", + "description": "Maximum number of items returned", + "minimum": 0 + }, + "total": { + "type": "integer", + "description": "Total number of items matching the query", + "minimum": 0 + } + } + }, + "PaginationView_KeyView": { + "type": "object", + "description": "Paginated response wrapper", + "required": [ + "results", + "offset", + "limit", + "total" + ], + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "description": "Represents an API key used for authenticating requests to Meilisearch.\nEach key has specific permissions defined by its actions and can be scoped\nto particular indexes. Keys provide fine-grained access control for your\nMeilisearch instance.", + "required": [ + "key", + "uid", + "actions", + "indexes", + "createdAt", + "updatedAt" + ], + "properties": { + "name": { + "type": [ + "string", + "null" + ], + "description": "A human-readable name for the API key. Use this to identify the purpose\nof each key, such as \"Frontend Search Key\" or \"Admin Key for CI/CD\".\nThis is optional and can be `null`." + }, + "description": { + "type": [ + "string", + "null" + ], + "description": "A longer description explaining the purpose or usage of this API key.\nUseful for documenting why the key was created and how it should be\nused. This is optional and can be `null`." + }, + "key": { + "type": "string", + "description": "The actual API key string to use in the `Authorization: Bearer `\nheader when making requests to Meilisearch. Keep this value secret and\nnever expose it in client-side code." + }, + "uid": { + "type": "string", + "format": "uuid", + "description": "The unique identifier (UUID) for this API key. Use this to update or\ndelete the key. The UID remains constant even if the key's name or\ndescription changes." + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Action" + }, + "description": "The list of actions (permissions) this key is allowed to perform.\nExamples include `documents.add`, `search`, `indexes.create`,\n`settings.update`, etc. Use `*` to grant all permissions." + }, + "indexes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The list of index UIDs this key can access. Use `*` to grant access to\nall indexes, including future ones. Patterns are also supported, e.g.,\n`movies_*` matches any index starting with \"movies_\"." + }, + "expiresAt": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "The expiration date and time of the key in RFC 3339 format. After this\ntime, the key will no longer be valid for authentication. Set to `null`\nfor keys that never expire." + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The date and time when this API key was created, formatted as an\nRFC 3339 date-time string. This is automatically set by Meilisearch\nand cannot be modified.", + "readOnly": true + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "The date and time when this API key was last modified, formatted as an\nRFC 3339 date-time string. This is automatically updated by Meilisearch\nwhen the key's name or description changes.", + "readOnly": true + } + } + }, + "description": "Array of items for the current page" + }, + "offset": { + "type": "integer", + "description": "Number of items skipped", + "minimum": 0 + }, + "limit": { + "type": "integer", + "description": "Maximum number of items returned", + "minimum": 0 + }, + "total": { + "type": "integer", + "description": "Total number of items matching the query", + "minimum": 0 + } + } + }, + "PaginationView_Value": { + "type": "object", + "description": "Paginated response wrapper", + "required": [ + "results", + "offset", + "limit", + "total" + ], + "properties": { + "results": { + "type": "array", + "items": {}, + "description": "Array of items for the current page" + }, + "offset": { + "type": "integer", + "description": "Number of items skipped", + "minimum": 0 + }, + "limit": { + "type": "integer", + "description": "Maximum number of items returned", + "minimum": 0 + }, + "total": { + "type": "integer", + "description": "Total number of items matching the query", + "minimum": 0 + } + } + }, + "PatchApiKey": { + "type": "object", + "description": "Request body for updating an existing API key. Only the name and\ndescription can be modified - other properties like actions, indexes,\nand expiration are immutable after creation.", + "properties": { + "description": { + "type": [ + "string", + "null" + ], + "description": "A new description for the API key. Pass `null` to remove the existing\ndescription. Useful for documenting the purpose or usage of the key.", + "example": "This key is used to update documents in the products index" + }, + "name": { + "type": [ + "string", + "null" + ], + "description": "A new human-readable name for the API key. Pass `null` to remove the\nexisting name. Use this to identify keys by purpose, such as\n\"Production Search Key\" or \"CI/CD Indexing Key\".", + "example": "Indexing Products API key" + } + } + }, + "Personalize": { + "type": "object", + "description": "Configuration for personalized search results.\n\nWhen enabled, search results are tailored based on user context,\nproviding different rankings and results for different user profiles.", + "required": [ + "user_context" + ], + "properties": { + "user_context": { + "type": "string", + "description": "A string describing the user context for personalization. This is\npassed to the embedder to generate user-specific vectors that\ninfluence search ranking. Example: user preferences, browsing\nhistory, or demographic information." + } + } + }, + "PrefixSearchSettings": { + "type": "string", + "enum": [ + "indexingTime", + "disabled" + ] + }, + "ProgressStepView": { + "type": "object", + "description": "Information about a single processing step within a batch or task. Each\nstep has a name, current progress, and total items to process.", + "required": [ + "currentStep", + "finished", + "total" + ], + "properties": { + "currentStep": { + "type": "string", + "description": "A human-readable name describing what this processing step is doing.\nExamples include \"indexing documents\", \"computing embeddings\",\n\"building word cache\", etc." + }, + "finished": { + "type": "integer", + "format": "u-int32", + "description": "The number of items that have been processed so far in this step.\nCompare with `total` to calculate the percentage complete for this\nspecific step.", + "minimum": 0 + }, + "total": { + "type": "integer", + "format": "u-int32", + "description": "The total number of items to process in this step. When `finished`\nequals `total`, this step is complete and processing moves to the\nnext step.", + "minimum": 0 + } + } + }, + "ProgressView": { + "type": "object", + "description": "Real-time progress information for a batch or task that is currently\nbeing processed. Use this to display progress bars or status updates to\nusers.", + "required": [ + "steps", + "percentage" + ], + "properties": { + "steps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProgressStepView" + }, + "description": "A hierarchical list of processing steps currently being executed.\nSteps are listed from outermost to innermost, with each step\nrepresenting a more granular operation within its parent step." + }, + "percentage": { + "type": "number", + "format": "float", + "description": "The overall completion percentage of the operation (0.0 to 100.0).\nThis is calculated by combining the progress of all nested steps,\nweighted by their relative importance." + } + } + }, + "ProximityPrecisionView": { + "type": "string", + "enum": [ + "byWord", + "byAttribute" + ] + }, + "RankingRuleView": { + "oneOf": [ + { + "type": "string", + "description": "Sorted by decreasing number of matched query terms.\nQuery words at the front of an attribute is considered better than if\nit was at the back.", + "enum": [ + "Words" + ] + }, + { + "type": "string", + "description": "Sorted by increasing number of typos.", + "enum": [ + "Typo" + ] + }, + { + "type": "string", + "description": "Sorted by increasing distance between matched query terms.", + "enum": [ + "Proximity" + ] + }, + { + "type": "string", + "description": "Documents with quey words contained in more important\nattributes are considered better.", + "enum": [ + "Attribute" + ] + }, + { + "type": "string", + "description": "Dynamically sort at query time the documents. None, one or multiple\nAsc/Desc sortable attributes can be used in place of this criterion at\nquery time.", + "enum": [ + "Sort" + ] + }, + { + "type": "string", + "description": "Sorted by the similarity of the matched words with the query words.", + "enum": [ + "Exactness" + ] + }, + { + "type": "object", + "description": "Sorted by the increasing value of the field specified.", + "required": [ + "Asc" + ], + "properties": { + "Asc": { + "type": "string", + "description": "Sorted by the increasing value of the field specified." + } + } + }, + { + "type": "object", + "description": "Sorted by the decreasing value of the field specified.", + "required": [ + "Desc" + ], + "properties": { + "Desc": { + "type": "string", + "description": "Sorted by the decreasing value of the field specified." + } + } + } + ] + }, + "RankingScoreThreshold": { + "type": "number", + "format": "double" + }, + "Remote": { + "type": "object", + "description": "Configuration for a remote Meilisearch instance", + "properties": { + "url": { + "type": [ + "string", + "null" + ], + "description": "URL of the remote instance", + "example": "http://localhost:7700" + }, + "searchApiKey": { + "type": [ + "string", + "null" + ], + "description": "API key for search operations on this remote", + "example": "XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU" + }, + "writeApiKey": { + "type": [ + "string", + "null" + ], + "description": "API key for write operations on this remote", + "example": "XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU" + } + } + }, + "RemoteTask": { + "type": "object", + "description": "Represents a task that was replicated to a remote Meilisearch instance.\nContains either the remote task UID on success, or an error if\nreplication failed.", + "properties": { + "taskUid": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "description": "The unique task identifier assigned by the remote Meilisearch instance.\nPresent when the task was successfully replicated to the remote.", + "minimum": 0 + }, + "error": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ResponseError", + "description": "Error details if the task failed to replicate to this remote. Contains\nthe error message, code, and type from the remote instance." + } + ] + } + } + }, + "ResponseError": { + "type": "object", + "required": [ + "message", + "code", + "type", + "link" + ], + "properties": { + "message": { + "type": "string", + "description": "The error message." + }, + "code": { + "$ref": "#/components/schemas/Code", + "description": "The error code." + }, + "type": { + "$ref": "#/components/schemas/ErrorType", + "description": "The error type." + }, + "link": { + "type": "string", + "description": "A link to the documentation about this specific error." + } + } + }, + "RuntimeTogglableFeatures": { + "type": "object", + "description": "Experimental features that can be toggled at runtime", + "properties": { + "metrics": { + "type": [ + "boolean", + "null" + ], + "description": "Enable the /metrics endpoint for Prometheus metrics" + }, + "logsRoute": { + "type": [ + "boolean", + "null" + ], + "description": "Enable the /logs route for log configuration" + }, + "editDocumentsByFunction": { + "type": [ + "boolean", + "null" + ], + "description": "Enable document editing via JavaScript functions" + }, + "containsFilter": { + "type": [ + "boolean", + "null" + ], + "description": "Enable the CONTAINS filter operator" + }, + "network": { + "type": [ + "boolean", + "null" + ], + "description": "Enable network features for distributed search" + }, + "getTaskDocumentsRoute": { + "type": [ + "boolean", + "null" + ], + "description": "Enable the route to get documents from tasks" + }, + "compositeEmbedders": { + "type": [ + "boolean", + "null" + ], + "description": "Enable composite embedders for multi-source embeddings" + }, + "chatCompletions": { + "type": [ + "boolean", + "null" + ], + "description": "Enable chat completion capabilities" + }, + "multimodal": { + "type": [ + "boolean", + "null" + ], + "description": "Enable multimodal search with images and other media" + }, + "vectorStoreSetting": { + "type": [ + "boolean", + "null" + ], + "description": "Enable vector store settings configuration" + } + } + }, + "SearchHit": { + "type": "object", + "description": "A single search result hit", + "properties": { + "_formatted": { + "type": "object", + "description": "The formatted document with highlighted and cropped attributes", + "additionalProperties": true + }, + "_matchesPosition": { + "type": [ + "object", + "null" + ], + "description": "Location of matching terms in the document", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MatchBounds" + } + }, + "propertyNames": { + "type": "string" + } + }, + "_rankingScore": { + "type": [ + "number", + "null" + ], + "format": "double", + "description": "Global ranking score of the document" + }, + "_rankingScoreDetails": { + "type": [ + "object", + "null" + ], + "description": "Detailed breakdown of the ranking score", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + } + }, + "additionalProperties": { + "description": "The document data" + } + }, + "SearchMetadata": { + "type": "object", + "description": "Metadata about a search query", + "required": [ + "queryUid", + "indexUid" + ], + "properties": { + "queryUid": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the query" + }, + "indexUid": { + "type": "string", + "description": "Identifier of the queried index" + }, + "primaryKey": { + "type": [ + "string", + "null" + ], + "description": "Primary key of the queried index" + }, + "remote": { + "type": [ + "string", + "null" + ], + "description": "Remote server that processed the query" + } + } + }, + "SearchQuery": { + "type": "object", + "required": [ + "offset", + "limit", + "retrieve_vectors", + "crop_length", + "show_matches_position", + "show_ranking_score", + "show_ranking_score_details", + "show_performance_details", + "highlight_pre_tag", + "highlight_post_tag", + "crop_marker", + "matching_strategy" + ], + "properties": { + "q": { + "type": [ + "string", + "null" + ], + "description": "Query string" + }, + "vector": { + "type": [ + "array", + "null" + ], + "items": { + "type": "number", + "format": "float" + }, + "description": "Search using a custom query vector" + }, + "media": { + "description": "Perform AI-powered search queries with multimodal content" + }, + "hybrid": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/HybridQuery", + "description": "Hybrid search configuration combining keyword and semantic search.\nSet `semanticRatio` to balance between keyword matching (0.0) and\nsemantic similarity (1.0). Requires an embedder to be configured." + } + ] + }, + "offset": { + "type": "integer", + "description": "Number of documents to skip", + "default": 0, + "minimum": 0 + }, + "limit": { + "type": "integer", + "description": "Maximum number of documents returned", + "default": 20, + "minimum": 0 + }, + "page": { + "type": [ + "integer", + "null" + ], + "description": "Request a specific page of results", + "minimum": 0 + }, + "hits_per_page": { + "type": [ + "integer", + "null" + ], + "description": "Maximum number of documents returned for a page", + "minimum": 0 + }, + "attributes_to_retrieve": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Attributes to display in the returned documents", + "uniqueItems": true + }, + "retrieve_vectors": { + "type": "boolean", + "description": "Return document and query vector data" + }, + "attributes_to_crop": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Attributes whose values have to be cropped" + }, + "crop_length": { + "type": "integer", + "description": "Maximum length of cropped value in words", + "default": 10, + "minimum": 0 + }, + "attributes_to_highlight": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Highlight matching terms contained in an attribute", + "uniqueItems": true + }, + "show_matches_position": { + "type": "boolean", + "description": "Return matching terms location" + }, + "show_ranking_score": { + "type": "boolean", + "description": "Display the global ranking score of a document" + }, + "show_ranking_score_details": { + "type": "boolean", + "description": "Adds a detailed global ranking score field" + }, + "show_performance_details": { + "type": "boolean", + "description": "Adds a detailed performance details field" + }, + "use_network": { + "type": [ + "boolean", + "null" + ], + "description": "Experimental: Whether this query should be performed on the whole network or locally.\n\nWhen performing the query on the whole network, this is \"as-if\" a remote federated search were performed,\nsuch that all shards are covered, and such that documents are deduplicated across the remotes.\n\n# Response\n\nThe response will have the same shape as a federated search response.\n\n# Edition\n\nThis feature is available in the Enterprise Edition.\n\n# Experimental\n\n- Setting this parameter to a value different from the default requires the `network` experimental feature.\n\n# Values\n\n- `Some(true)`: Use the whole network for this query.\n- `Some(false)`: Make this query local.\n- `None` (default): Same as `Some(false)`.\n\n# Assumptions when using the network\n\nNetwork queries assume that the following is true:\n\n- the target index exists with compatible settings on all remotes of the network.\n- any document with the same document id between two remotes have the same content and can be deduplicated." + }, + "filter": { + "description": "Filter queries by an attribute's value" + }, + "sort": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Sort search results by an attribute's value" + }, + "distinct": { + "type": [ + "string", + "null" + ], + "description": "Restrict search to documents with unique values of specified\nattribute" + }, + "facets": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Display the count of matches per facet" + }, + "highlight_pre_tag": { + "type": "string", + "description": "String inserted at the start of a highlighted term", + "default": "" + }, + "highlight_post_tag": { + "type": "string", + "description": "String inserted at the end of a highlighted term", + "default": "" + }, + "crop_marker": { + "type": "string", + "description": "String marking crop boundaries", + "default": "…" + }, + "matching_strategy": { + "$ref": "#/components/schemas/MatchingStrategy", + "description": "Strategy used to match query terms within documents" + }, + "attributes_to_search_on": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Restrict search to the specified attributes" + }, + "ranking_score_threshold": { + "type": [ + "number", + "null" + ], + "format": "double", + "description": "Minimum ranking score threshold (0.0 to 1.0) that documents must\nachieve to be included in results. Documents with scores below this\nthreshold are excluded. Useful for filtering out low-relevance\nresults." + }, + "locales": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/Locale" + }, + "description": "Explicitly specify languages used in a query" + }, + "personalize": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/Personalize", + "description": "Enables personalized search results based on user context. When\nprovided, the search uses AI to tailor results to the user's\nprofile, preferences, or behavior described in `userContext`." + } + ] + } + } + }, + "SearchQueryWithIndex": { + "type": "object", + "description": "A `SearchQuery` + an index UID and optional FederationOptions.", + "required": [ + "indexUid", + "retrieveVectors", + "cropLength", + "showRankingScore", + "showRankingScoreDetails", + "showMatchesPosition", + "highlightPreTag", + "highlightPostTag", + "cropMarker", + "matchingStrategy" + ], + "properties": { + "indexUid": { + "$ref": "#/components/schemas/IndexUid", + "description": "Index unique identifier" + }, + "q": { + "type": [ + "string", + "null" + ], + "description": "Query string" + }, + "vector": { + "type": [ + "array", + "null" + ], + "items": { + "type": "number", + "format": "float" + }, + "description": "Search using a custom query vector" + }, + "media": { + "description": "Perform AI-powered search queries with multimodal content" + }, + "hybrid": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/HybridQuery", + "description": "Hybrid search configuration combining keyword and semantic search.\nSet `semanticRatio` to balance between keyword matching (0.0) and\nsemantic similarity (1.0). Requires an embedder to be configured." + } + ] + }, + "offset": { + "type": [ + "integer", + "null" + ], + "description": "Number of documents to skip", + "minimum": 0 + }, + "limit": { + "type": [ + "integer", + "null" + ], + "description": "Maximum number of documents returned", + "minimum": 0 + }, + "page": { + "type": [ + "integer", + "null" + ], + "description": "Request a specific page of results", + "minimum": 0 + }, + "hitsPerPage": { + "type": [ + "integer", + "null" + ], + "description": "Maximum number of documents returned for a page", + "minimum": 0 + }, + "attributesToRetrieve": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Attributes to display in the returned documents", + "uniqueItems": true + }, + "retrieveVectors": { + "type": "boolean", + "description": "Return document and query vector data" + }, + "attributesToCrop": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Attributes whose values have to be cropped" + }, + "cropLength": { + "type": "integer", + "description": "Maximum length of cropped value in words", + "minimum": 0 + }, + "attributesToHighlight": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Highlight matching terms contained in an attribute", + "uniqueItems": true + }, + "showRankingScore": { + "type": "boolean", + "description": "Display the global ranking score of a document" + }, + "showRankingScoreDetails": { + "type": "boolean", + "description": "Adds a detailed global ranking score field" + }, + "showPerformanceDetails": { + "type": [ + "boolean", + "null" + ], + "description": "Adds a detailed performance details field" + }, + "useNetwork": { + "type": [ + "boolean", + "null" + ] + }, + "showMatchesPosition": { + "type": "boolean", + "description": "Return matching terms location" + }, + "filter": { + "description": "Filter queries by an attribute's value" + }, + "sort": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Sort search results by an attribute's value" + }, + "distinct": { + "type": [ + "string", + "null" + ], + "description": "Restrict search to documents with unique values of specified\nattribute" + }, + "facets": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Display the count of matches per facet" + }, + "highlightPreTag": { + "type": "string", + "description": "String inserted at the start of a highlighted term" + }, + "highlightPostTag": { + "type": "string", + "description": "String inserted at the end of a highlighted term" + }, + "cropMarker": { + "type": "string", + "description": "String marking crop boundaries" + }, + "matchingStrategy": { + "$ref": "#/components/schemas/MatchingStrategy", + "description": "Strategy used to match query terms within documents" + }, + "attributesToSearchOn": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Restrict search to the specified attributes" + }, + "rankingScoreThreshold": { + "type": [ + "number", + "null" + ], + "format": "double", + "description": "Exclude results below the specified ranking score" + }, + "locales": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/Locale" + }, + "description": "Languages to use for query tokenization" + }, + "federationOptions": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/FederationOptions", + "description": "Federation options for multi-index search" + } + ] + } + } + }, + "SearchResult": { + "allOf": [ + { + "$ref": "#/components/schemas/HitsInfo", + "description": "Pagination information for the search results" + }, + { + "type": "object", + "required": [ + "hits", + "query", + "processingTimeMs" + ], + "properties": { + "hits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchHit" + }, + "description": "Results of the query" + }, + "query": { + "type": "string", + "description": "Query originating the response" + }, + "queryVector": { + "type": [ + "array", + "null" + ], + "items": { + "type": "number", + "format": "float" + }, + "description": "Vector representation of the query" + }, + "processingTimeMs": { + "type": "integer", + "description": "Processing time of the query in milliseconds", + "minimum": 0 + }, + "facetDistribution": { + "type": [ + "object", + "null" + ], + "description": "Distribution of the given facets", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "facetStats": { + "type": [ + "object", + "null" + ], + "description": "The numeric min and max values per facet", + "additionalProperties": { + "$ref": "#/components/schemas/FacetStats" + }, + "propertyNames": { + "type": "string" + } + }, + "requestUid": { + "type": [ + "string", + "null" + ], + "format": "uuid", + "description": "A UUID v7 identifying the search request" + }, + "metadata": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SearchMetadata", + "description": "Metadata about the search query" + } + ] + }, + "performanceDetails": { + "description": "Performance details of the search query" + }, + "remoteErrors": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/components/schemas/ResponseError" + }, + "propertyNames": { + "type": "string" + } + }, + "semanticHitCount": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "description": "Exhaustive number of semantic search matches (only present in\nAI-powered searches)", + "minimum": 0 + } + } + } + ], + "description": "Search response containing matching documents and metadata" + }, + "SearchResultWithIndex": { + "allOf": [ + { + "$ref": "#/components/schemas/SearchResult", + "description": "Search results for this index" + }, + { + "type": "object", + "required": [ + "indexUid" + ], + "properties": { + "indexUid": { + "type": "string", + "description": "Identifier of the queried index" + } + } + } + ], + "description": "Search result with index identifier for multi-search responses" + }, + "SearchResults": { + "type": "object", + "description": "Response containing results from multiple search queries", + "required": [ + "results" + ], + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchResultWithIndex" + }, + "description": "Array of search results for each query" + } + } + }, + "SettingEmbeddingSettings": { + "type": "object", + "description": "\"Technical\" type that is required due to utoipa.\n\nWe did not find a way to implement [`utoipa::ToSchema`] for the\n[`Setting`] enum, but most types can use the `value_type` macro parameter\nto workaround that issue.\n\nHowever that type is used in the settings route, including through the\nmacro that auto-generate all the settings route, so we can't remap the\n`value_type`.", + "properties": { + "inner": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "source": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/EmbedderSource", + "description": "The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`" + } + ] + }, + "model": { + "type": [ + "string", + "null" + ], + "description": "The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`" + }, + "revision": { + "type": [ + "string", + "null" + ], + "description": "The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`" + }, + "pooling": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/OverridePooling", + "description": "The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior." + } + ] + }, + "apiKey": { + "type": [ + "string", + "null" + ], + "description": "The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings" + }, + "dimensions": { + "type": [ + "string", + "null" + ], + "description": "The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text." + }, + "binaryQuantized": { + "type": [ + "boolean", + "null" + ], + "description": "Whether to binary quantize the embeddings of this embedder.\n\nBinary quantized embeddings are smaller than regular embeddings, which improves\ndisk usage and retrieval speed, at the cost of relevancy.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🏗️ When set to `true`, embeddings are not regenerated, but they are binary quantized, which takes time.\n\n# Defaults\n\n- Defaults to `false`\n\n# Note\n\nAs binary quantization is a destructive operation, it is not possible to disable again this setting after\nfirst enabling it. If you are unsure of whether the performance-relevancy tradeoff is right for you,\nwe recommend to use this parameter on a test index first." + }, + "documentTemplate": { + "type": [ + "boolean", + "null" + ], + "description": "A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text." + }, + "documentTemplateMaxBytes": { + "type": [ + "integer", + "null" + ], + "description": "Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400", + "minimum": 0 + }, + "url": { + "type": [ + "string", + "null" + ], + "description": "URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated" + }, + "indexingFragments": { + "type": [ + "object", + "null" + ], + "description": "Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "searchFragments": { + "type": [ + "object", + "null" + ], + "description": "Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "request": { + "description": "Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" + }, + "response": { + "description": "Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" + }, + "headers": { + "type": [ + "object", + "null" + ], + "description": "Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "additionalProperties": { + "type": "string" + }, + "propertyNames": { + "type": "string" + } + }, + "searchEmbedder": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SubEmbeddingSettings" + } + ] + }, + "indexingEmbedder": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SubEmbeddingSettings" + } + ] + }, + "distribution": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/DistributionShift", + "description": "Affine transformation applied to the semantic score to make it more comparable to the ranking score.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings" + } + ] + } + }, + "additionalProperties": false + } + ], + "description": "Configuration for this embedder. Includes the source (openAi,\nhuggingFace, ollama, rest, userProvided), model settings, API\ncredentials, and document template for generating embeddings." + } + } + }, + "Settings_Checked": { + "type": "object", + "description": "Holds all the settings for an index. `T` can either be `Checked` if\nthey represents settings whose validity is guaranteed, or `Unchecked` if\nthey need to be validated. In the later case, a call to `check` will\nreturn a `Settings` from a `Settings`.", + "properties": { + "displayedAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Fields displayed in the returned documents.", + "example": [ + "id", + "title", + "description", + "url" + ] + }, + "searchableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Fields in which to search for matching query words sorted by order of\nimportance.", + "example": [ + "title", + "description" + ] + }, + "filterableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/FilterableAttributesRule" + }, + "description": "Attributes to use for faceting and filtering.\nSee [Filtering and Faceted\nSearch](https://meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).", + "example": [ + "release_date", + "genre" + ] + }, + "sortableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Attributes to use when sorting search results.", + "example": [ + "release_date" + ] + }, + "rankingRules": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of ranking rules sorted by order of importance. The order is\ncustomizable. [A list of ordered built-in ranking\nrules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).", + "example": [ + "words", + "typo", + "proximity", + "attribute", + "exactness" + ] + }, + "stopWords": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of words ignored when present in search queries.", + "example": [ + "the", + "a", + "them", + "their" + ] + }, + "nonSeparatorTokens": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of characters not delimiting where one term begins and ends.", + "example": [ + " ", + "\n" + ] + }, + "separatorTokens": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of characters delimiting where one term begins and ends.", + "example": [ + "S" + ] + }, + "dictionary": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of strings Meilisearch should parse as a single term.", + "example": [ + "iPhone pro" + ] + }, + "synonyms": { + "type": [ + "object", + "null" + ], + "description": "List of associated words treated similarly. A word associated to an\narray of word as synonyms.", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + }, + "example": { + "he": [ + "she", + "they", + "them" + ], + "phone": [ + "iPhone", + "android" + ] + } + }, + "distinctAttribute": { + "type": [ + "string", + "null" + ], + "description": "Search returns documents with distinct (different) values of the given\nfield.", + "example": "sku" + }, + "proximityPrecision": { + "type": [ + "string", + "null" + ], + "description": "Precision level when calculating the proximity ranking rule.", + "example": "byAttribute" + }, + "typoTolerance": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/TypoSettings", + "description": "Typo tolerance settings for controlling how Meilisearch handles\nspelling mistakes in search queries. Configure minimum word lengths,\ndisable on specific words or attributes." + } + ] + }, + "faceting": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/FacetingSettings", + "description": "Faceting settings for controlling facet behavior. Configure maximum\nfacet values returned and sorting order for facet values." + } + ] + }, + "pagination": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/PaginationSettings", + "description": "Pagination settings for controlling the maximum number of results\nthat can be returned. Set `maxTotalHits` to limit how far users can\npaginate into results." + } + ] + }, + "embedders": { + "type": [ + "object", + "null" + ], + "description": "Embedder required for performing semantic search queries.", + "additionalProperties": { + "$ref": "#/components/schemas/SettingEmbeddingSettings" + }, + "propertyNames": { + "type": "string" + } + }, + "searchCutoffMs": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Maximum duration of a search query.", + "example": 50, + "minimum": 0 + }, + "localizedAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/LocalizedAttributesRuleView" + }, + "description": "Rules for associating locales (languages) with specific attributes.\nThis enables language-specific tokenization for multilingual content,\nimproving search quality for non-English text.", + "example": [ + { + "locales": [ + "jpn" + ], + "attributePatterns": [ + "*_ja" + ] + } + ] + }, + "facetSearch": { + "type": [ + "boolean", + "null" + ], + "description": "When `true`, enables facet search which allows users to search within\nfacet values. When `false`, only the first `maxValuesPerFacet` values\nare returned. Defaults to `true`.", + "example": true + }, + "prefixSearch": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/PrefixSearchSettings", + "description": "Controls prefix search behavior. `indexingTime` enables prefix search\nby building a prefix database at indexing time. `disabled` turns off\nprefix search for faster indexing. Defaults to `indexingTime`." + } + ] + }, + "chat": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ChatSettings", + "description": "Chat settings for AI-powered search. Configure the index description,\ndocument template for rendering, and search parameters used when the\nLLM queries this index." + } + ] + }, + "vectorStore": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/VectorStoreBackend", + "description": "Backend storage for vector embeddings. `memory` stores vectors in\nmemory for fastest performance. `database` stores vectors on disk to\nreduce memory usage at the cost of speed." + } + ] + } + }, + "additionalProperties": false + }, + "Settings_Unchecked": { + "type": "object", + "description": "Holds all the settings for an index. `T` can either be `Checked` if\nthey represents settings whose validity is guaranteed, or `Unchecked` if\nthey need to be validated. In the later case, a call to `check` will\nreturn a `Settings` from a `Settings`.", + "properties": { + "displayedAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Fields displayed in the returned documents.", + "example": [ + "id", + "title", + "description", + "url" + ] + }, + "searchableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Fields in which to search for matching query words sorted by order of\nimportance.", + "example": [ + "title", + "description" + ] + }, + "filterableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/FilterableAttributesRule" + }, + "description": "Attributes to use for faceting and filtering.\nSee [Filtering and Faceted\nSearch](https://meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).", + "example": [ + "release_date", + "genre" + ] + }, + "sortableAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Attributes to use when sorting search results.", + "example": [ + "release_date" + ] + }, + "rankingRules": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of ranking rules sorted by order of importance. The order is\ncustomizable. [A list of ordered built-in ranking\nrules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).", + "example": [ + "words", + "typo", + "proximity", + "attribute", + "exactness" + ] + }, + "stopWords": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of words ignored when present in search queries.", + "example": [ + "the", + "a", + "them", + "their" + ] + }, + "nonSeparatorTokens": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of characters not delimiting where one term begins and ends.", + "example": [ + " ", + "\n" + ] + }, + "separatorTokens": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of characters delimiting where one term begins and ends.", + "example": [ + "S" + ] + }, + "dictionary": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "List of strings Meilisearch should parse as a single term.", + "example": [ + "iPhone pro" + ] + }, + "synonyms": { + "type": [ + "object", + "null" + ], + "description": "List of associated words treated similarly. A word associated to an\narray of word as synonyms.", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "propertyNames": { + "type": "string" + }, + "example": { + "he": [ + "she", + "they", + "them" + ], + "phone": [ + "iPhone", + "android" + ] + } + }, + "distinctAttribute": { + "type": [ + "string", + "null" + ], + "description": "Search returns documents with distinct (different) values of the given\nfield.", + "example": "sku" + }, + "proximityPrecision": { + "type": [ + "string", + "null" + ], + "description": "Precision level when calculating the proximity ranking rule.", + "example": "byAttribute" + }, + "typoTolerance": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/TypoSettings", + "description": "Typo tolerance settings for controlling how Meilisearch handles\nspelling mistakes in search queries. Configure minimum word lengths,\ndisable on specific words or attributes." + } + ] + }, + "faceting": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/FacetingSettings", + "description": "Faceting settings for controlling facet behavior. Configure maximum\nfacet values returned and sorting order for facet values." + } + ] + }, + "pagination": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/PaginationSettings", + "description": "Pagination settings for controlling the maximum number of results\nthat can be returned. Set `maxTotalHits` to limit how far users can\npaginate into results." + } + ] + }, + "embedders": { + "type": [ + "object", + "null" + ], + "description": "Embedder required for performing semantic search queries.", + "additionalProperties": { + "$ref": "#/components/schemas/SettingEmbeddingSettings" + }, + "propertyNames": { + "type": "string" + } + }, + "searchCutoffMs": { + "type": [ + "integer", + "null" + ], + "format": "u-int64", + "description": "Maximum duration of a search query.", + "example": 50, + "minimum": 0 + }, + "localizedAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/LocalizedAttributesRuleView" + }, + "description": "Rules for associating locales (languages) with specific attributes.\nThis enables language-specific tokenization for multilingual content,\nimproving search quality for non-English text.", + "example": [ + { + "locales": [ + "jpn" + ], + "attributePatterns": [ + "*_ja" + ] + } + ] + }, + "facetSearch": { + "type": [ + "boolean", + "null" + ], + "description": "When `true`, enables facet search which allows users to search within\nfacet values. When `false`, only the first `maxValuesPerFacet` values\nare returned. Defaults to `true`.", + "example": true + }, + "prefixSearch": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/PrefixSearchSettings", + "description": "Controls prefix search behavior. `indexingTime` enables prefix search\nby building a prefix database at indexing time. `disabled` turns off\nprefix search for faster indexing. Defaults to `indexingTime`." + } + ] + }, + "chat": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ChatSettings", + "description": "Chat settings for AI-powered search. Configure the index description,\ndocument template for rendering, and search parameters used when the\nLLM queries this index." + } + ] + }, + "vectorStore": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/VectorStoreBackend", + "description": "Backend storage for vector embeddings. `memory` stores vectors in\nmemory for fastest performance. `database` stores vectors on disk to\nreduce memory usage at the cost of speed." + } + ] + } + }, + "additionalProperties": false + }, + "SimilarQuery": { + "type": "object", + "description": "Request body for similar document search", + "required": [ + "id", + "offset", + "limit", + "embedder", + "retrieve_vectors", + "show_ranking_score", + "show_ranking_score_details", + "show_performance_details", + "ranking_score_threshold" + ], + "properties": { + "id": { + "type": "string", + "description": "Document ID to find similar documents for" + }, + "offset": { + "type": "integer", + "description": "Number of documents to skip", + "minimum": 0 + }, + "limit": { + "type": "integer", + "description": "Maximum number of documents returned", + "minimum": 0 + }, + "filter": { + "description": "Filter queries by an attribute's value" + }, + "embedder": { + "type": "string", + "description": "Name of the embedder to use for semantic similarity" + }, + "attributes_to_retrieve": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "Attributes to display in the returned documents", + "uniqueItems": true + }, + "retrieve_vectors": { + "type": "boolean", + "description": "Return document vector data" + }, + "show_ranking_score": { + "type": "boolean", + "description": "Display the global ranking score of a document" + }, + "show_ranking_score_details": { + "type": "boolean", + "description": "Adds a detailed global ranking score field" + }, + "show_performance_details": { + "type": "boolean", + "description": "Adds a detailed performance details field" + }, + "ranking_score_threshold": { + "type": "number", + "format": "double", + "description": "Excludes results with low ranking scores" + } + } + }, + "SimilarResult": { + "allOf": [ + { + "$ref": "#/components/schemas/HitsInfo", + "description": "Pagination information" + }, + { + "type": "object", + "required": [ + "hits", + "id", + "processingTimeMs" + ], + "properties": { + "hits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchHit" + }, + "description": "Results of the query" + }, + "id": { + "type": "string", + "description": "Document ID that was used as reference" + }, + "processingTimeMs": { + "type": "integer", + "description": "Processing time of the query in milliseconds", + "minimum": 0 + }, + "performanceDetails": { + "description": "Performance details of the query" + } + } + } + ], + "description": "Response containing similar documents" + }, + "Stats": { + "type": "object", + "description": "Global statistics for the Meilisearch instance", + "required": [ + "databaseSize", + "usedDatabaseSize", + "indexes" + ], + "properties": { + "databaseSize": { + "type": "integer", + "format": "u-int64", + "description": "Total disk space used by the database in bytes", + "minimum": 0 + }, + "usedDatabaseSize": { + "type": "integer", + "format": "u-int64", + "description": "Actual size of the data in the database in bytes", + "minimum": 0 + }, + "lastUpdate": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "Date of the last update in RFC 3339 format. Null if no update has been\nprocessed" + }, + "indexes": { + "type": "object", + "description": "Statistics for each index", + "additionalProperties": { + "$ref": "#/components/schemas/IndexStats" + }, + "propertyNames": { + "type": "string" + } + } + } + }, + "Status": { + "type": "string", + "description": "The status of a task.", + "enum": [ + "enqueued", + "processing", + "succeeded", + "failed", + "canceled" + ], + "example": "processing" + }, + "SubEmbeddingSettings": { + "type": "object", + "properties": { + "source": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/EmbedderSource", + "description": "The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`" + } + ] + }, + "model": { + "type": [ + "string", + "null" + ], + "description": "The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`" + }, + "revision": { + "type": [ + "string", + "null" + ], + "description": "The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`" + }, + "pooling": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/OverridePooling", + "description": "The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior." + } + ] + }, + "apiKey": { + "type": [ + "string", + "null" + ], + "description": "The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings" + }, + "dimensions": { + "type": [ + "string", + "null" + ], + "description": "The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text." + }, + "documentTemplate": { + "type": [ + "boolean", + "null" + ], + "description": "A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text." + }, + "documentTemplateMaxBytes": { + "type": [ + "integer", + "null" + ], + "description": "Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400", + "minimum": 0 + }, + "url": { + "type": [ + "string", + "null" + ], + "description": "URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated" + }, + "indexingFragments": { + "type": [ + "object", + "null" + ], + "description": "Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "searchFragments": { + "type": [ + "object", + "null" + ], + "description": "Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } + }, + "request": { + "description": "Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" + }, + "response": { + "description": "Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" + }, + "headers": { + "type": [ + "object", + "null" + ], + "description": "Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "additionalProperties": { + "type": "string" + }, + "propertyNames": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "SummarizedTaskView": { + "type": "object", + "description": "A summarized view of a task, returned when a task is enqueued", + "required": [ + "taskUid", + "status", + "type", + "enqueuedAt" + ], + "properties": { + "taskUid": { + "type": "integer", + "format": "u-int32", + "description": "Unique sequential identifier of the task", + "minimum": 0 + }, + "indexUid": { + "type": [ + "string", + "null" + ], + "description": "Unique identifier of the targeted index. Null for global tasks" + }, + "status": { + "$ref": "#/components/schemas/Status", + "description": "Status of the task. Possible values are enqueued, processing,\nsucceeded, failed, and canceled" + }, + "type": { + "$ref": "#/components/schemas/Kind", + "description": "Type of operation performed by the task" + }, + "enqueuedAt": { + "type": "string", + "format": "date-time", + "description": "Date and time when the task was enqueued" + }, + "customMetadata": { + "type": [ + "string", + "null" + ], + "description": "Custom metadata string that was attached to this task when it was\ncreated. This can be used to associate tasks with external systems or\nadd application-specific information." + } + } + }, + "SwapIndexesPayload": { + "type": "object", + "description": "Request body for swapping two indexes", + "required": [ + "indexes", + "rename" + ], + "properties": { + "indexes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IndexUid" + }, + "description": "Array of the two index UIDs to be swapped" + }, + "rename": { + "type": "boolean", + "description": "If true, rename the first index to the second instead of swapping" + } + } + }, + "TaskView": { + "type": "object", + "description": "Represents the current state and details of an asynchronous task.\n\nTasks are created when you perform operations like adding documents,\nupdating settings, or creating indexes. Use this view to monitor task\nprogress and check for errors.", + "required": [ + "uid", + "status", + "type", + "enqueuedAt" + ], + "properties": { + "uid": { + "type": "integer", + "format": "u-int32", + "description": "The unique sequential identifier assigned to this task. Task UIDs are\nassigned in order of creation and can be used to retrieve specific\ntask information or track task dependencies.", + "example": 4312, + "minimum": 0 + }, + "batchUid": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "description": "The unique identifier of the batch that processed this task. Multiple\ntasks may share the same batch UID if they were processed together\nfor efficiency. This is `null` for tasks that haven't been processed.", + "example": 12, + "minimum": 0 + }, + "indexUid": { + "type": [ + "string", + "null" + ], + "description": "The unique identifier of the index this task operates on. This is\n`null` for global tasks like `dumpCreation` or `taskDeletion` that\ndon't target a specific index." + }, + "status": { + "$ref": "#/components/schemas/Status", + "description": "The current processing status of the task. Possible values are:\n`enqueued` (waiting), `processing` (executing), `succeeded`,\n`failed`, or `canceled`." + }, + "type": { + "$ref": "#/components/schemas/Kind", + "description": "The type of operation this task performs. Examples include\n`documentAdditionOrUpdate`, `documentDeletion`, `settingsUpdate`,\n`indexCreation`, `indexDeletion`, `dumpCreation`, etc." + }, + "canceledBy": { + "type": [ + "integer", + "null" + ], + "format": "u-int32", + "description": "If this task was canceled, this field contains the UID of the\n`taskCancelation` task that canceled it. This is `null` for tasks\nthat were not canceled.", + "example": 4326, + "minimum": 0 + }, + "details": { + "type": [ + "object", + "null" + ], + "description": "Contains type-specific information about the task, such as the number\nof documents processed, settings that were applied, or filters that\nwere used. The structure varies depending on the task type." + }, + "error": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ResponseError", + "description": "If the task failed, this field contains detailed error information\nincluding an error message, error code, error type, and a link to\ndocumentation. This is `null` for tasks that succeeded or are still\nprocessing." + } + ] + }, + "duration": { + "type": [ + "string", + "null" + ], + "description": "The total time spent processing this task, formatted as an ISO-8601\nduration (e.g., `PT0.5S` for 0.5 seconds). This is `null` for tasks\nthat haven't finished processing yet.", + "example": null + }, + "enqueuedAt": { + "type": "string", + "description": "The timestamp when this task was added to the queue, formatted as an\nRFC 3339 date-time string. All tasks have an enqueued timestamp as\nit's set when the task is created.", + "example": "2024-08-08_14:12:09.393Z" + }, + "startedAt": { + "type": "string", + "description": "The timestamp when Meilisearch began processing this task, formatted\nas an RFC 3339 date-time string. This is `null` for tasks that are\nstill in the queue waiting to be processed.", + "example": "2024-08-08_14:12:09.393Z" + }, + "finishedAt": { + "type": "string", + "description": "The timestamp when this task finished processing (whether successfully\nor with an error), formatted as an RFC 3339 date-time string. This is\n`null` for tasks that haven't finished yet.", + "example": "2024-08-08_14:12:09.393Z" + }, + "network": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/DbTaskNetwork", + "description": "Network topology information for distributed deployments. Contains\ndetails about which nodes are involved in processing this task. This\nis only present when running Meilisearch in a distributed config." + } + ] + }, + "customMetadata": { + "type": [ + "string", + "null" + ], + "description": "Custom metadata string that was attached to this task when it was\ncreated. This can be used to associate tasks with external systems,\ntrack task origins, or add any application-specific information." + } + } + }, + "TypoSettings": { + "type": "object", + "description": "Configuration for typo tolerance in search queries.\n\nTypo tolerance allows Meilisearch to match documents even when search\nterms contain spelling mistakes.", + "properties": { + "enabled": { + "type": [ + "boolean", + "null" + ], + "description": "When `true`, enables typo tolerance for search queries. When `false`,\nonly exact matches are returned. Defaults to `true`.", + "example": true + }, + "minWordSizeForTypos": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/MinWordSizeTyposSetting", + "description": "Configures the minimum word length before typos are allowed. Contains\n`oneTypo` (min length for 1 typo) and `twoTypos` (min length for 2\ntypos) settings." + } + ] + }, + "disableOnWords": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "A list of words for which typo tolerance should be disabled. Use this\nfor brand names, technical terms, or other words that must be matched\nexactly. Example: `[\"iPhone\", \"macOS\"]`.", + "example": [ + "iPhone", + "phone" + ], + "uniqueItems": true + }, + "disableOnAttributes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "A list of attributes for which typo tolerance should be disabled.\nSearches in these attributes will only return exact matches. Useful\nfor fields like product codes or IDs.", + "example": [ + "uuid", + "url" + ], + "uniqueItems": true + }, + "disableOnNumbers": { + "type": [ + "boolean", + "null" + ], + "description": "When `true`, disables typo tolerance on numeric tokens. This prevents\nnumbers like `123` from matching `132`. Defaults to `false`.", + "example": true + } + }, + "additionalProperties": false + }, + "Unchecked": { + "default": null + }, + "UpdateIndexRequest": { + "type": "object", + "description": "Request body for updating an existing index", + "properties": { + "primaryKey": { + "type": [ + "string", + "null" + ], + "description": "New primary key of the index" + }, + "uid": { + "type": [ + "string", + "null" + ], + "description": "New uid for the index (for renaming)" + } + } + }, + "UpdateStderrLogs": { + "type": "object", + "description": "Request body for updating stderr log configuration", + "required": [ + "target" + ], + "properties": { + "target": { + "type": "string", + "description": "Log targets to filter. Format: code_part=log_level (e.g.,\nmilli=trace,actix_web=off)", + "default": "info", + "example": "milli=trace,index_scheduler,actix_web=off" + } + } + }, + "Vec": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "VectorStoreBackend": { + "type": "string", + "enum": [ + "stable", + "experimental" + ] + }, + "VersionResponse": { + "type": "object", + "required": [ + "commitSha", + "commitDate", + "pkgVersion" + ], + "properties": { + "commitSha": { + "type": "string", + "description": "The commit used to compile this build of Meilisearch." + }, + "commitDate": { + "type": "string", + "description": "The date of this build." + }, + "pkgVersion": { + "type": "string", + "description": "The version of Meilisearch." + } + } + }, + "WebhookResults": { + "type": "object", + "description": "Response containing a list of all registered webhooks", + "required": [ + "results" + ], + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" + }, + "description": "Array of all webhooks configured in this Meilisearch instance. Each\nwebhook includes its UUID, URL, headers (with authorization values\nredacted), and editability status." + } + } + }, + "WebhookSettings": { + "type": "object", + "description": "Configuration for a webhook endpoint", + "properties": { + "url": { + "type": [ + "string", + "null" + ], + "description": "URL endpoint to call when tasks complete", + "example": "https://your.site/on-tasks-completed" + }, + "headers": { + "type": [ + "object", + "null" + ], + "description": "HTTP headers to include in webhook requests", + "additionalProperties": { + "type": "string" + }, + "propertyNames": { + "type": "string" + }, + "example": { + "Authorization": "Bearer a-secret-token" + } + } + } + }, + "WebhookWithMetadataRedactedAuthorization": { + "allOf": [ + { + "$ref": "#/components/schemas/WebhookSettings", + "description": "Webhook settings" + }, + { + "type": "object", + "required": [ + "uuid", + "isEditable" + ], + "properties": { + "uuid": { + "type": "string", + "format": "uuid", + "description": "Unique identifier of the webhook" + }, + "isEditable": { + "type": "boolean", + "description": "Whether the webhook can be edited" + } + } + } + ], + "description": "A webhook with metadata and redacted authorization headers" + }, + "u32": { + "type": "integer", + "format": "u-int32", + "minimum": 0 + } + }, + "securitySchemes": { + "Bearer": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "Uuidv4, string or JWT", + "description": "An API key is a token that you provide when making API calls. Include the token in a header parameter called `Authorization`.\nExample: `Authorization: Bearer 8fece4405662dd830e4cb265e7e047aab2e79672a760a12712d2a263c9003509`" + } + } + }, + "tags": [ + { + "name": "Stats", + "description": "Stats gives extended information and metrics about indexes and the Meilisearch database." + }, + { + "name": "Health", + "description": "The health check endpoint enables you to periodically test the health of your Meilisearch instance." + }, + { + "name": "Version", + "description": "Returns the version of the running Meilisearch instance." + }, + { + "name": "Tasks", + "description": "The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html).", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/tasks" + } + }, + { + "name": "Batches", + "description": "The /batches route gives information about the progress of batches of asynchronous operations.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/batches" + } + }, + { + "name": "Indexes", + "description": "An index is an entity that gathers a set of [documents](https://www.meilisearch.com/docs/learn/getting_started/documents) with its own [settings](https://www.meilisearch.com/docs/reference/api/settings). Learn more about indexes.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/indexes" + } + }, + { + "name": "Documents", + "description": "Documents are objects composed of fields that can store any type of data. Each field contains an attribute and its associated value. Documents are stored inside [indexes](https://www.meilisearch.com/docs/learn/getting_started/indexes).", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/learn/getting_started/documents" + } + }, + { + "name": "Facet Search", + "description": "The `/facet-search` route allows you to search for facet values. Facet search supports prefix search and typo tolerance. The returned hits are sorted lexicographically in ascending order. You can configure how facets are sorted using the sortFacetValuesBy property of the faceting index settings.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/facet_search" + } + }, + { + "name": "Similar documents", + "description": "The /similar route uses AI-powered search to return a number of documents similar to a target document.\n\nMeilisearch exposes two routes for retrieving similar documents: POST and GET. In the majority of cases, POST will offer better performance and ease of use.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/similar" + } + }, + { + "name": "Settings", + "description": "Use the /settings route to customize search settings for a given index. You can either modify all index settings at once using the update settings endpoint, or use a child route to configure a single setting.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/settings" + } + }, + { + "name": "Compact an index", + "description": "The /compact route uses compacts the database to reorganize and make it smaller and more efficient.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/compact" + } + }, + { + "name": "Search", + "description": "Meilisearch exposes two routes to perform searches:\n\n- A POST route: this is the preferred route when using API authentication, as it allows [preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) caching and better performance.\n- A GET route: the usage of this route is discouraged, unless you have good reason to do otherwise (specific caching abilities for example)", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/search" + } + }, + { + "name": "Snapshots", + "description": "The snapshots route allows the creation of database snapshots. Snapshots are .snapshot files that can be used to launch Meilisearch.\nCreating a snapshot is also referred to as exporting it, whereas launching Meilisearch with a snapshot is referred to as importing it.\nDuring a snapshot export, all indexes of the current instance are exported—together with their documents and settings—and saved as a single .snapshot file.\nDuring a snapshot import, all indexes contained in the indicated .snapshot file are imported along with their associated documents and settings.\nSnapshot imports are performed at launch using an option.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/snapshots" + } + }, + { + "name": "Dumps", + "description": "The `dumps` route allows the creation of database dumps.\nDumps are `.dump` files that can be used to launch Meilisearch. Dumps are compatible between Meilisearch versions.\nCreating a dump is also referred to as exporting it, whereas launching Meilisearch with a dump is referred to as importing it.\nDuring a [dump export](https://www.meilisearch.com/docs/reference/api/dump#create-a-dump), all indexes of the current instance are\nexported—together with their documents and settings—and saved as a single `.dump` file. During a dump import,\nall indexes contained in the indicated `.dump` file are imported along with their associated documents and settings.\nAny existing index with the same uid as an index in the dump file will be overwritten.\nDump imports are [performed at launch](https://www.meilisearch.com/docs/learn/advanced/dumps#importing-a-dump) using an option.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/dump" + } + }, + { + "name": "Keys", + "description": "Manage API `keys` for a Meilisearch instance. Each key has a given set of permissions.\nYou must have the master key or the default admin key to access the keys route. More information about the keys and their rights.\nAccessing any route under `/keys` without having set a master key will result in an error.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/keys" + } + }, + { + "name": "Logs", + "description": "Everything about retrieving or customizing logs.\nCurrently [experimental](https://www.meilisearch.com/docs/learn/experimental/overview).", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/learn/experimental/log_customization" + } + }, + { + "name": "Multi-search", + "description": "The `/multi-search` route allows you to perform multiple search queries on one or more indexes by bundling them into a single HTTP request. Multi-search is also known as federated search.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/multi_search" + } + }, + { + "name": "Experimental features", + "description": "The `/experimental-features` route allows you to activate or deactivate some of Meilisearch's experimental features.\n\nThis route is **synchronous**. This means that no task object will be returned, and any activated or deactivated features will be made available or unavailable immediately.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/experimental_features" + } + }, + { + "name": "Export", + "description": "The `/export` route allows you to trigger an export process to a remote Meilisearch instance.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/export" + } + }, + { + "name": "Network", + "description": "The `/network` route allows you to describe the topology of a network of Meilisearch instances.\n\nThis route is **synchronous**. This means that no task object will be returned, and any change to the network will be made available immediately.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/network" + } + }, + { + "name": "Webhooks", + "description": "The `/webhooks` route allows you to register endpoints to be called once tasks are processed.", + "externalDocs": { + "url": "https://www.meilisearch.com/docs/reference/api/webhooks" + } + } + ] +} \ No newline at end of file From dd0552226022c522c3e2f0db096c0f655f7fc32e Mon Sep 17 00:00:00 2001 From: curquiza Date: Tue, 10 Feb 2026 22:55:00 +0100 Subject: [PATCH 28/45] Remove useless CI --- .github/workflows/pull-code-samples.yml | 31 ------------------------- 1 file changed, 31 deletions(-) delete mode 100644 .github/workflows/pull-code-samples.yml diff --git a/.github/workflows/pull-code-samples.yml b/.github/workflows/pull-code-samples.yml deleted file mode 100644 index 8d1500904..000000000 --- a/.github/workflows/pull-code-samples.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Pull Code Samples - -on: - push: - branches: - - '**' # Runs on all branches - -jobs: - update-samples: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v6 - - - name: Setup Node.js - uses: actions/setup-node@v6 - - - name: Install dependencies - run: npm install - - - name: Generate code sample snippets - run: node scripts/generate-code-sample-snippets.mjs - - - name: Commit changes - run: | - git config --local user.email "github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" - git add snippets/ - git diff --quiet && git diff --staged --quiet || git commit -m "Update code samples [skip ci]" - git push From df254bdc5016f7caa79b83bc048a08e7cab16f3a Mon Sep 17 00:00:00 2001 From: curquiza Date: Tue, 10 Feb 2026 23:00:34 +0100 Subject: [PATCH 29/45] Remove useless files --- openapi-curqui.json | 19972 ------------------------------------------ openapi.json | 14908 ------------------------------- 2 files changed, 34880 deletions(-) delete mode 100644 openapi-curqui.json delete mode 100644 openapi.json diff --git a/openapi-curqui.json b/openapi-curqui.json deleted file mode 100644 index 89051f2c4..000000000 --- a/openapi-curqui.json +++ /dev/null @@ -1,19972 +0,0 @@ -{ - "openapi": "3.1.0", - "info": { - "title": "meilisearch", - "description": "Meilisearch HTTP server", - "contact": { - "name": "Quentin de Quelen", - "email": "quentin@dequelen.me" - }, - "license": { - "name": "MIT", - "identifier": "MIT" - }, - "version": "1.35.0" - }, - "servers": [ - { - "url": "http://localhost:7700", - "description": "Local server" - } - ], - "paths": { - "/batches": { - "get": { - "tags": [ - "Async task management" - ], - "summary": "List batches", - "description": "The `/batches` route gives information about the progress of batches of [asynchronous operations](/learn/async/asynchronous_operations).\n\nBatches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first. Batch results are paginated and can be filtered with query parameters.", - "operationId": "get_batches", - "parameters": [ - { - "name": "limit", - "in": "query", - "description": "Maximum number of batches to return", - "required": false, - "schema": { - "type": "integer", - "format": "u-int32", - "default": 20, - "minimum": 0 - }, - "example": 12 - }, - { - "name": "from", - "in": "query", - "description": "`uid` of the first batch returned", - "required": false, - "schema": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "example": 12421 - }, - { - "name": "reverse", - "in": "query", - "description": "If `true`, returns results in the reverse order, from oldest to most recent", - "required": false, - "schema": { - "type": "boolean" - }, - "example": true - }, - { - "name": "batchUids", - "in": "query", - "description": "Permits to filter tasks by their batch uid. By default, when the\n`batchUids` query parameter is not set, all task uids are returned.\nIt's possible to specify several batch uids by separating them with\nthe `,` character.", - "required": false, - "schema": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "example": 12421 - }, - { - "name": "uids", - "in": "query", - "description": "Permits to filter tasks by their uid. By default, when the uids query\nparameter is not set, all task uids are returned. It's possible to\nspecify several uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 231, - 423, - 598 - ] - }, - { - "name": "canceledBy", - "in": "query", - "description": "Permits to filter tasks using the uid of the task that canceled them.\nIt's possible to specify several task uids by separating them with\nthe `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 374 - ] - }, - { - "name": "types", - "in": "query", - "description": "Permits to filter tasks by their related type. By default, when `types`\nquery parameter is not set, all task types are returned. It's possible\nto specify several types by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [ - "documentAdditionOrUpdate" - ] - }, - { - "name": "statuses", - "in": "query", - "description": "Permits to filter tasks by their status. By default, when `statuses`\nquery parameter is not set, all task statuses are returned. It's\npossible to specify several statuses by separating them with the `,`\ncharacter.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Status" - } - }, - "example": [ - "succeeded", - "failed", - "canceled", - "enqueued", - "processing" - ] - }, - { - "name": "indexUids", - "in": "query", - "description": "Permits to filter tasks by their related index. By default, when\n`indexUids` query parameter is not set, the tasks of all the indexes\nare returned. It is possible to specify several indexes by separating\nthem with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [ - "movies", - "theater" - ] - }, - { - "name": "afterEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - }, - { - "name": "beforeEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - }, - { - "name": "afterStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - }, - { - "name": "beforeStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - }, - { - "name": "afterFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - }, - { - "name": "beforeFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - } - ], - "responses": { - "200": { - "description": "Return the batches", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AllBatches" - }, - "example": { - "results": [ - { - "uid": 2, - "details": { - "stopWords": [ - "of", - "the" - ] - }, - "progress": null, - "stats": { - "totalNbTasks": 1, - "status": { - "succeeded": 1 - }, - "types": { - "settingsUpdate": 1 - }, - "indexUids": { - "INDEX_NAME": 1 - } - }, - "duration": "PT0.110083S", - "startedAt": "2024-12-10T15:49:04.995321Z", - "finishedAt": "2024-12-10T15:49:05.105404Z" - } - ], - "total": 1, - "limit": 20, - "from": 1, - "next": null - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "tasks.get", - "tasks.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches'" - }, - { - "lang": "JS", - "source": "client.batches.getBatches();" - }, - { - "lang": "PHP", - "source": "$client->getBatches();" - }, - { - "lang": "Python", - "source": "client.get_batches()" - }, - { - "lang": "Ruby", - "source": "client.batches" - }, - { - "lang": "Go", - "source": "client.GetBatches();" - }, - { - "lang": "Rust", - "source": "let mut query = meilisearch_sdk::batches::BatchesQuery::new(&client);\nquery.with_limit(20);\nlet batches: meilisearch_sdk::batches::BatchesResults =\n client.get_batches_with(&query).await.unwrap();" - } - ] - } - }, - "/batches/{batchUid}": { - "get": { - "tags": [ - "Async task management" - ], - "summary": "Get batch", - "description": "Get a single batch by its unique identifier.\n\nThe `/batches` route gives information about the progress of batches of [asynchronous operations](/learn/async/asynchronous_operations).", - "operationId": "get_batch", - "parameters": [ - { - "name": "batchUid", - "in": "path", - "description": "The unique batch id", - "required": true, - "schema": { - "type": "string" - }, - "example": "8685" - } - ], - "responses": { - "200": { - "description": "Return the batch", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BatchView" - }, - "example": { - "uid": 0, - "details": { - "receivedDocuments": 1, - "indexedDocuments": 1 - }, - "progress": null, - "stats": { - "totalNbTasks": 1, - "status": { - "succeeded": 1 - }, - "types": { - "documentAdditionOrUpdate": 1 - }, - "indexUids": { - "INDEX_NAME": 1 - } - }, - "duration": "PT0.364788S", - "startedAt": "2024-12-10T15:48:49.672141Z", - "finishedAt": "2024-12-10T15:48:50.036929Z", - "batchStrategy": "batched all enqueued tasks" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "tasks.get", - "tasks.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches/BATCH_UID'" - }, - { - "lang": "JS", - "source": "client.batches.getBatch(BATCH_UID);" - }, - { - "lang": "PHP", - "source": "$client->getBatch(BATCH_UID);" - }, - { - "lang": "Python", - "source": "client.get_batch(BATCH_UID)" - }, - { - "lang": "Ruby", - "source": "client.batch(BATCH_UID)" - }, - { - "lang": "Go", - "source": "client.GetBatch(BATCH_UID);" - }, - { - "lang": "Rust", - "source": "let uid: u32 = 42;\nlet batch: meilisearch_sdk::batches::Batch = client\n .get_batch(uid)\n .await\n .unwrap();" - } - ] - } - }, - "/dumps": { - "post": { - "tags": [ - "Backups" - ], - "summary": "Create dump", - "description": "Triggers a dump creation process. Once the process is complete, a dump is created in the\n[dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory).\nIf the dump directory does not exist yet, it will be created.", - "operationId": "create_dump", - "responses": { - "202": { - "description": "Dump is being created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 0, - "indexUid": null, - "status": "enqueued", - "type": "dumpCreation", - "enqueuedAt": "2021-01-01T09:39:00.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "dumps.create", - "dumps.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/dumps'" - }, - { - "lang": "JS", - "source": "client.createDump()" - }, - { - "lang": "PHP", - "source": "$client->createDump();" - }, - { - "lang": "Python", - "source": "client.create_dump()" - }, - { - "lang": "Java", - "source": "client.createDump();" - }, - { - "lang": "Ruby", - "source": "client.create_dump" - }, - { - "lang": "Go", - "source": "resp, err := client.CreateDump()" - }, - { - "lang": "C#", - "source": "await client.CreateDumpAsync();" - }, - { - "lang": "Rust", - "source": "client\n .create_dump()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.createDump();" - }, - { - "lang": "Swift", - "source": "client.createDump { result in\n switch result {\n case .success(let dumpStatus):\n print(dumpStatus)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/experimental-features": { - "get": { - "tags": [ - "Experimental features" - ], - "summary": "List experimental features", - "description": "Get a list of all experimental features that can be activated via the\n/experimental-features route and whether or not they are currently\nactivated.", - "operationId": "get_features", - "responses": { - "200": { - "description": "Experimental features are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuntimeTogglableFeatures" - }, - "example": { - "metrics": true, - "logsRoute": false, - "editDocumentsByFunction": false, - "containsFilter": false, - "network": false, - "getTaskDocumentsRoute": false, - "compositeEmbedders": false, - "chatCompletions": false, - "multimodal": false, - "vectorStoreSetting": false - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "experimental_features.get", - "experimental_features.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/experimental-features/'" - }, - { - "lang": "Ruby", - "source": "client.experimental_features" - }, - { - "lang": "Go", - "source": "client.ExperimentalFeatures().Get()" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nlet res = features\n .get()\n .await\n .unwrap();" - } - ] - }, - "patch": { - "tags": [ - "Experimental features" - ], - "summary": "Configure experimental features", - "description": "Activate or deactivate experimental features.", - "operationId": "patch_features", - "responses": { - "200": { - "description": "Experimental features are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuntimeTogglableFeatures" - }, - "example": { - "metrics": true, - "logsRoute": false, - "editDocumentsByFunction": false, - "containsFilter": false, - "network": false, - "getTaskDocumentsRoute": false, - "compositeEmbedders": false, - "chatCompletions": false, - "multimodal": false, - "vectorStoreSetting": false - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "experimental_features.update", - "experimental_features.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/experimental-features/' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"metrics\": true\n }'" - }, - { - "lang": "Ruby", - "source": "client.update_experimental_features(metrics: true)" - }, - { - "lang": "Go", - "source": "client.ExperimentalFeatures().SetMetrics(true).Update()" - }, - { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nfeatures.set_metrics(true)\nlet res = features\n .update()\n .await\n .unwrap();" - } - ] - } - }, - "/export": { - "post": { - "tags": [ - "Documents" - ], - "summary": "Export to a remote Meilisearch", - "description": "Triggers an export process to a remote Meilisearch instance. This allows you to send\ndocuments and settings from the current instance to another Meilisearch server.", - "operationId": "export", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Export" - } - } - }, - "required": true - }, - "responses": { - "202": { - "description": "Export successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 1, - "status": "enqueued", - "type": "export", - "enqueuedAt": "2021-08-11T09:25:53.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "export", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/export' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"TARGET_INSTANCE_URL\",\n \"indexes\": {\n \"*\": {\n \"overrideSettings\": true\n }\n }\n }'" - }, - { - "lang": "Java", - "source": "Map indexes = new HashMap<>();\nindexes.put(\"*\", ExportIndexFilter.builder().overrideSettings(true).build());\nExportRequest request = ExportRequest.builder().url(\"TARGET_INSTANCE_URL\").indexes(indexes).build();\nclient.export(request);" - } - ] - } - }, - "/health": { - "get": { - "tags": [ - "Health" - ], - "summary": "Get health", - "description": "The health check endpoint enables you to periodically test the health of\nyour Meilisearch instance.", - "operationId": "get_health", - "responses": { - "200": { - "description": "Instance is healthy", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HealthResponse" - }, - "example": { - "status": "available" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/health'" - }, - { - "lang": "JS", - "source": "client.health()" - }, - { - "lang": "PHP", - "source": "$client->health();" - }, - { - "lang": "Python", - "source": "client.health()" - }, - { - "lang": "Java", - "source": "client.health();" - }, - { - "lang": "Ruby", - "source": "client.health" - }, - { - "lang": "Go", - "source": "client.Health()" - }, - { - "lang": "C#", - "source": "await client.HealthAsync();" - }, - { - "lang": "Rust", - "source": "// health() return an Err() if the server is not healthy, so this example would panic due to the unwrap\nclient\n .health()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.health();" - }, - { - "lang": "Swift", - "source": "client.health { (result) in\n switch result {\n case .success:\n print(\"Healthy!\")\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/indexes": { - "get": { - "tags": [ - "Indexes" - ], - "summary": "List indexes", - "description": "List all indexes.", - "operationId": "list_indexes", - "parameters": [ - { - "name": "offset", - "in": "query", - "description": "The number of indexes to skip before starting to retrieve anything", - "required": false, - "schema": { - "type": "integer", - "minimum": 0 - }, - "example": 100 - }, - { - "name": "limit", - "in": "query", - "description": "The number of indexes to retrieve", - "required": false, - "schema": { - "type": "integer", - "default": 20, - "minimum": 0 - }, - "example": 1 - } - ], - "responses": { - "200": { - "description": "Indexes are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationView_IndexView" - }, - "example": { - "results": [ - { - "uid": "movies", - "primaryKey": "movie_id", - "createdAt": "2019-11-20T09:40:33.711324Z", - "updatedAt": "2019-11-20T09:40:33.711324Z" - } - ], - "limit": 1, - "offset": 0, - "total": 1 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "indexes.get", - "indexes.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes?limit=3'" - }, - { - "lang": "JS", - "source": "client.getIndexes({ limit: 3 })" - }, - { - "lang": "PHP", - "source": "$client->getIndexes((new IndexesQuery())->setLimit(3));" - }, - { - "lang": "Python", - "source": "client.get_indexes({'limit': 3})" - }, - { - "lang": "Java", - "source": "IndexesQuery query = new IndexesQuery().setLimit(3);\nclient.getIndexes(query);" - }, - { - "lang": "Ruby", - "source": "client.indexes(limit: 3)" - }, - { - "lang": "Go", - "source": "client.GetIndexes(&meilisearch.IndexesQuery{\n Limit: 3,\n})" - }, - { - "lang": "C#", - "source": "await client.GetAllIndexesAsync(new IndexesQuery { Limit = 3 });" - }, - { - "lang": "Rust", - "source": "let mut indexes = IndexesQuery::new(&client)\n .with_limit(3)\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.getIndexes(params: IndexesQuery(limit: 3));" - }, - { - "lang": "Swift", - "source": "client.getIndexes { (result) in\n switch result {\n case .success(let indexes):\n print(indexes)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "post": { - "tags": [ - "Indexes" - ], - "summary": "Create index", - "description": "Create an index.", - "operationId": "create_index", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IndexCreateRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "indexCreation", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "indexes.create", - "indexes.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"uid\": \"movies\",\n \"primaryKey\": \"id\"\n }'" - }, - { - "lang": "JS", - "source": "client.createIndex('movies', { primaryKey: 'id' })" - }, - { - "lang": "PHP", - "source": "$client->createIndex('movies', ['primaryKey' => 'id']);" - }, - { - "lang": "Python", - "source": "client.create_index('movies', {'primaryKey': 'id'})" - }, - { - "lang": "Java", - "source": "client.createIndex(\"movies\", \"id\");" - }, - { - "lang": "Ruby", - "source": "client.create_index('movies', primary_key: 'id')" - }, - { - "lang": "Go", - "source": "client.CreateIndex(&meilisearch.IndexConfig{\n Uid: \"movies\",\n PrimaryKey: \"id\",\n})" - }, - { - "lang": "C#", - "source": "TaskInfo task = await client.CreateIndexAsync(\"movies\", \"id\");" - }, - { - "lang": "Rust", - "source": "client.create_index(\"movies\", Some(\"id\"))\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.createIndex('movies', primaryKey: 'id');" - }, - { - "lang": "Swift", - "source": "client.createIndex(uid: \"movies\", primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/indexes/{indexUid}": { - "get": { - "tags": [ - "Indexes" - ], - "summary": "Get index", - "description": "Get information about an index.", - "operationId": "get_index", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "The index is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IndexView" - }, - "example": { - "uid": "movies", - "primaryKey": "movie_id", - "createdAt": "2019-11-20T09:40:33.711324Z", - "updatedAt": "2019-11-20T09:40:33.711324Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "indexes.get", - "indexes.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies'" - }, - { - "lang": "JS", - "source": "client.index('movies').getRawInfo()" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->fetchRawInfo();" - }, - { - "lang": "Python", - "source": "client.get_index('movies')" - }, - { - "lang": "Java", - "source": "client.getIndex(\"movies\");" - }, - { - "lang": "Ruby", - "source": "client.fetch_index('movies')" - }, - { - "lang": "Go", - "source": "client.GetIndex(\"movies\")" - }, - { - "lang": "C#", - "source": "await client.GetIndexAsync(\"movies\");" - }, - { - "lang": "Rust", - "source": "let movies: Index = client\n .get_index(\"movies\")\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.getIndex('movies');" - }, - { - "lang": "Swift", - "source": "client.getIndex(\"movies\") { (result) in\n switch result {\n case .success(let index):\n print(index)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "delete": { - "tags": [ - "Indexes" - ], - "summary": "Delete index", - "description": "Delete an index.", - "operationId": "delete_index", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "202": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 0, - "indexUid": "movies", - "status": "enqueued", - "type": "indexDeletion", - "enqueuedAt": "2021-01-01T09:39:00.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "indexes.delete", - "indexes.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies'" - }, - { - "lang": "JS", - "source": "client.deleteIndex('movies')" - }, - { - "lang": "PHP", - "source": "$client->deleteIndex('movies');" - }, - { - "lang": "Python", - "source": "client.delete_index('movies')\n// OR\nclient.index('movies').delete()" - }, - { - "lang": "Java", - "source": "client.deleteIndex(\"movies\");" - }, - { - "lang": "Ruby", - "source": "client.delete_index('movies')" - }, - { - "lang": "Go", - "source": "client.DeleteIndex(\"movies\")\n// OR\nclient.Index(\"movies\").Delete()" - }, - { - "lang": "C#", - "source": "await client.DeleteIndexAsync(\"movies\");" - }, - { - "lang": "Rust", - "source": "client.index(\"movies\")\n .delete()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').delete();\nt_one_document_1: \"await client.index('movies').getDocument(25684,\\n fields: ['id', 'title', 'poster', 'release_date']);\"" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").delete { (result) in\n switch result {\n case .success:\n print(\"Index deleted\")\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "patch": { - "tags": [ - "Indexes" - ], - "summary": "Update index", - "description": "Update the `primaryKey` of an index.\nReturn an error if the index doesn't exists yet or if it contains\ndocuments.", - "operationId": "update_index", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateIndexRequest" - } - } - }, - "required": true - }, - "responses": { - "202": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 0, - "indexUid": "movies", - "status": "enqueued", - "type": "indexUpdate", - "enqueuedAt": "2021-01-01T09:39:00.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "indexes.update", - "indexes.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"primaryKey\": \"id\" }'" - }, - { - "lang": "JS", - "source": "client.updateIndex('movies', { primaryKey: 'id' })" - }, - { - "lang": "PHP", - "source": "$client->updateIndex('movies', ['primaryKey' => 'id']);" - }, - { - "lang": "Python", - "source": "client.index('movies').update(primary_key='id')" - }, - { - "lang": "Java", - "source": "client.updateIndex(\"movies\", \"id\");" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update(primary_key: 'movie_id')" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateIndex(&meilisearch.UpdateIndexRequestParams{\n PrimaryKey: \"id\",\n})" - }, - { - "lang": "C#", - "source": "TaskInfo task = await client.UpdateIndexAsync(\"movies\", \"id\");" - }, - { - "lang": "Rust", - "source": "let task = IndexUpdater::new(\"movies\", &client)\n .with_primary_key(\"movie_review_id\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').update(primaryKey: 'id');" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").update(primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/indexes/{indexUid}/compact": { - "post": { - "tags": [ - "Indexes" - ], - "summary": "Compact index", - "description": "Triggers a compaction process on the specified index. Compaction reorganizes the index database to make it smaller and more efficient.", - "operationId": "compact", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "202": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentDeletion", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_UID/compact'" - }, - { - "lang": "Python", - "source": "client.index('movies').compact()" - }, - { - "lang": "Java", - "source": "client.index(\"INDEX_NAME\").compact();" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_UID').compact" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"INDEX_UID\")\n .compact()\n .await\n .unwrap();" - } - ] - } - }, - "/indexes/{indexUid}/documents": { - "get": { - "tags": [ - "Documents" - ], - "summary": "List documents with GET", - "description": "Get documents by batches.", - "operationId": "get_documents", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - }, - { - "name": "offset", - "in": "query", - "description": "Number of documents to skip in the response. Use this parameter\ntogether with `limit` to paginate through large document sets. For\nexample, to get documents 21-40, set `offset=20` and `limit=20`.\nDefaults to `0`.", - "required": false, - "schema": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "limit", - "in": "query", - "description": "Maximum number of documents to return in a single response. Use\ntogether with `offset` for pagination. Defaults to `20`.", - "required": false, - "schema": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "fields", - "in": "query", - "description": "Comma-separated list of document attributes to include in the\nresponse. Use `*` to retrieve all attributes. By default, all\nattributes are returned. Example: `title,description,price`.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "retrieveVectors", - "in": "query", - "description": "When `true`, includes vector embeddings in the response for documents\nthat have them. This is useful when you need to inspect or export\nvector data. Defaults to `false`.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "ids", - "in": "query", - "description": "Comma-separated list of document IDs to retrieve. Only documents with\nmatching IDs will be returned. If not specified, all documents\nmatching other criteria are returned.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "filter", - "in": "query", - "description": "Filter expression to select which documents to return. Uses the same\nsyntax as search filters. Only documents matching the filter will be\nincluded in the response. Example: `genres = action AND rating > 4`.", - "required": false, - "schema": { - "type": "string" - }, - "example": "popularity > 1000" - }, - { - "name": "sort", - "in": "query", - "description": "Attribute(s) to sort the documents by. Format: `attribute:asc` or\n`attribute:desc`. Multiple sort criteria can be comma-separated.\nExample: `price:asc,rating:desc`.", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The documents are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationView_Value" - }, - "example": { - "results": [ - { - "id": 25684, - "title": "American Ninja 5", - "poster": "https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg", - "overview": "When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.", - "release_date": 725846400 - }, - { - "id": 45881, - "title": "The Bridge of San Luis Rey", - "poster": "https://image.tmdb.org/t/p/w500/4X7quIcdkc24Cveg5XdpfRqxtYA.jpg", - "overview": "The Bridge of San Luis Rey is American author Thornton Wilder's second novel, first published in 1927 to worldwide acclaim. It tells the story of several interrelated people who die in the collapse of an Inca rope-fiber suspension bridge in Peru, and the events that lead up to their being on the bridge.[ A friar who has witnessed the tragic accident then goes about inquiring into the lives of the victims, seeking some sort of cosmic answer to the question of why each had to die. The novel won the Pulitzer Prize in 1928.", - "release_date": 1072915200 - } - ], - "limit": 20, - "offset": 0, - "total": 2 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.get", - "documents.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents?limit=2&filter=genres=action'" - }, - { - "lang": "JS", - "source": "client.index('movies').getDocuments({\n limit: 2,\n filter: 'genres = action',\n sort: ['release_date:desc']\n})" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getDocuments((new DocumentsQuery())->setFilter('genres = action')->setLimit(2));" - }, - { - "lang": "Python", - "source": "client.index('movies').get_documents({\n 'limit':2, 'filter': 'genres=action',\n 'sort': ['rating:desc', 'release_date:asc'] # list format\n})" - }, - { - "lang": "Java", - "source": "DocumentsQuery query = new DocumentsQuery().setLimit(2).setFilter(new String[] {\"genres = action\"});\nclient.index(\"movies\").getDocuments(query, TargetClassName.class);" - }, - { - "lang": "Ruby", - "source": "client.index('movies').get_documents(limit: 2, filter: 'genres = action')" - }, - { - "lang": "Go", - "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"movies\").GetDocuments(&meilisearch.DocumentsQuery{\n Limit: 2,\n Filter: \"genres = action\",\n}, &result)" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() { Limit = 2, Filter = \"genres = action\" });" - }, - { - "lang": "Rust", - "source": "let index = client.index(\"movies\");\nlet documents: DocumentsResults = DocumentsQuery::new(&index)\n .with_filter(\"genres = action\")\n .with_limit(2)\n .execute::()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getDocuments(params: DocumentsQuery(limit: 2)) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let movies):\n print(movies)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "put": { - "tags": [ - "Documents" - ], - "summary": "Add or update documents", - "description": "Add a list of documents or update them if they already exist.\nIf you send an already existing document (same id) the old document will\nbe only partially updated according to the fields of the new document.\nThus, any fields not present in the new document are kept and remained\nunchanged.\nTo completely overwrite a document, see Add or replace documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document.\n> `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved\n> `_vectors` field in your documents. It can accept an array of floats,\n> multiple arrays of floats in an outer array or an object. This object\n> accepts keys corresponding to the different embedders defined your index\n> settings.", - "operationId": "update_documents", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - }, - { - "name": "primaryKey", - "in": "query", - "description": "The primary key of the documents. primaryKey is optional. If you want\nto set the primary key of your index through this route, it only has\nto be done the first time you add documents to the index. After which\nit will be ignored if given.", - "required": false, - "schema": { - "type": "string" - }, - "example": "id" - }, - { - "name": "csvDelimiter", - "in": "query", - "description": "Customize the csv delimiter when importing CSV documents.", - "required": true, - "schema": { - "type": "string", - "default": "," - }, - "example": ";" - }, - { - "name": "customMetadata", - "in": "query", - "description": "A string that can be used to identify and filter tasks. This metadata\nis stored with the task and returned in task responses. Useful for\ntracking tasks from external systems or associating tasks with\nspecific operations in your application.", - "required": false, - "schema": { - "type": "string" - }, - "example": "custom" - }, - { - "name": "skipCreation", - "in": "query", - "description": "When set to `true`, only updates existing documents and skips creating\nnew ones. Documents that don't already exist in the index will be\nignored. This is useful for partial updates where you only want to\nmodify existing records without adding new ones.", - "required": false, - "schema": { - "type": "boolean" - }, - "example": true - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentAdditionOrUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.add", - "documents.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\"\n }\n ]'" - }, - { - "lang": "JS", - "source": "client.index('movies').updateDocuments([{\n id: 287947,\n title: 'Shazam ⚡️',\n genres: 'comedy'\n}])" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateDocuments([\n [\n 'id' => 287947,\n 'title' => 'Shazam ⚡️',\n 'genres' => 'comedy'\n ]\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_documents([{\n 'id': 287947,\n 'title': 'Shazam ⚡️',\n 'genres': 'comedy'\n}], skip_creation=True)" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateDocuments(\"[{\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam ⚡️\\\",\"\n + \"\\\"genres\\\": \\\"comedy\\\"\"\n + \"}]\"\n);" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_documents([\n {\n id: 287947,\n title: 'Shazam ⚡️',\n genres: 'comedy'\n }\n])" - }, - { - "lang": "Go", - "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\",\n },\n}\noptions := &meilisearch.DocumentOptions{SkipCreation: true}\nclient.Index(\"movies\").UpdateDocuments(documents, options)" - }, - { - "lang": "C#", - "source": "var movie = new[]\n{\n new Movie { Id = \"287947\", Title = \"Shazam ⚡️\", Genres = \"comedy\" }\n};\nawait index.UpdateDocumentsAsync(movie);" - }, - { - "lang": "Rust", - "source": "// Define the type of our documents\n#[derive(Serialize, Deserialize)]\nstruct IncompleteMovie {\n id: usize,\n title: String,\n genres: String\n}\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .add_or_update(&[\n IncompleteMovie {\n id: 287947,\n title: \"Shazam ⚡️\".to_string(),\n genres: \"comedy\".to_string()\n }\n ], None)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let documentJsonString = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\"\n }\n]\n\"\"\"\nlet documents: Data = documentJsonString.data(using: .utf8)!\n\nclient.index(\"movies\").updateDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "post": { - "tags": [ - "Documents" - ], - "summary": "Add or replace documents", - "description": "Add a list of documents or replace them if they already exist.\n\nIf you send an already existing document (same id) the whole existing\ndocument will be overwritten by the new document. Fields previously in the\ndocument not present in the new document are removed.\n\nFor a partial update of the document see Add or update documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document.\n> `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved\n> `_vectors` field in your documents. It can accept an array of floats,\n> multiple arrays of floats in an outer array or an object. This object\n> accepts keys corresponding to the different embedders defined your index\n> settings.", - "operationId": "replace_documents", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - }, - { - "name": "primaryKey", - "in": "query", - "description": "The primary key of the documents. primaryKey is optional. If you want\nto set the primary key of your index through this route, it only has\nto be done the first time you add documents to the index. After which\nit will be ignored if given.", - "required": false, - "schema": { - "type": "string" - }, - "example": "id" - }, - { - "name": "csvDelimiter", - "in": "query", - "description": "Customize the csv delimiter when importing CSV documents.", - "required": true, - "schema": { - "type": "string", - "default": "," - }, - "example": ";" - }, - { - "name": "customMetadata", - "in": "query", - "description": "A string that can be used to identify and filter tasks. This metadata\nis stored with the task and returned in task responses. Useful for\ntracking tasks from external systems or associating tasks with\nspecific operations in your application.", - "required": false, - "schema": { - "type": "string" - }, - "example": "custom" - }, - { - "name": "skipCreation", - "in": "query", - "description": "When set to `true`, only updates existing documents and skips creating\nnew ones. Documents that don't already exist in the index will be\nignored. This is useful for partial updates where you only want to\nmodify existing records without adding new ones.", - "required": false, - "schema": { - "type": "boolean" - }, - "example": true - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentAdditionOrUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.add", - "documents.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n ]'" - }, - { - "lang": "JS", - "source": "client.index('movies').addDocuments([{\n id: 287947,\n title: 'Shazam',\n poster: 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n overview: 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n release_date: '2019-03-23'\n}])" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->addDocuments([\n [\n 'id' => 287947,\n 'title' => 'Shazam',\n 'poster' => 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview' => 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date' => '2019-03-23'\n ]\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').add_documents([{\n 'id': 287947,\n 'title': 'Shazam',\n 'poster': 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview': 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n}], skip_creation=True)" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").addDocuments(\"[{\"\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam\\\",\"\n + \"\\\"poster\\\": \\\"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\\\",\"\n + \"\\\"overview\\\": \\\"A boy is given the ability to become an adult superhero in times of need with a single magic word.\\\",\"\n + \"\\\"release_date\\\": \\\"2019-03-23\\\"\"\n + \"}]\"\n);" - }, - { - "lang": "Ruby", - "source": "client.index('movies').add_documents([\n {\n id: 287947,\n title: 'Shazam',\n poster: 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n overview: 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n release_date: '2019-03-23'\n }\n])" - }, - { - "lang": "Go", - "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\",\n },\n}\noptions := &meilisearch.DocumentOptions{SkipCreation: false}\nclient.Index(\"movies\").AddDocuments(documents, options)" - }, - { - "lang": "C#", - "source": "var movie = new[]\n{\n new Movie\n {\n Id = \"287947\",\n Title = \"Shazam\",\n Poster = \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n Overview = \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n ReleaseDate = \"2019-03-23\"\n }\n};\nawait index.AddDocumentsAsync(movie);" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .add_or_replace(&[\n Movie {\n id: 287947,\n title: \"Shazam\".to_string(),\n poster: \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\".to_string(),\n overview: \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\".to_string(),\n release_date: \"2019-03-23\".to_string(),\n }\n ], None)\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').addDocuments([\n {\n 'id': 287947,\n 'title': 'Shazam',\n 'poster':\n 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview':\n 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n }\n]);\nd_or_update_documents_1: \"await client.index('movies').updateDocuments([\\n {\\n 'id': 287947,\\n 'title': 'Shazam ⚡️',\\n 'genres': 'comedy',\\n }\\n]);\"" - }, - { - "lang": "Swift", - "source": "let documentJsonString = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n]\n\"\"\"\nlet documents: Data = documentJsonString.data(using: .utf8)!\n\nclient.index(\"movies\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "delete": { - "tags": [ - "Documents" - ], - "summary": "Delete all documents", - "description": "Delete all documents in the specified index.", - "operationId": "clear_all_documents", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentDeletion", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.delete", - "documents.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/documents'" - }, - { - "lang": "JS", - "source": "client.index('movies').deleteAllDocuments()" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->deleteAllDocuments();" - }, - { - "lang": "Python", - "source": "client.index('movies').delete_all_documents()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").deleteAllDocuments();" - }, - { - "lang": "Ruby", - "source": "client.index('movies').delete_all_documents" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteAllDocuments()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteAllDocumentsAsync();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_all_documents()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').deleteAllDocuments();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").deleteAllDocuments() { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/indexes/{indexUid}/documents/delete": { - "post": { - "tags": [ - "Documents" - ], - "summary": "Delete documents by filter", - "description": "Delete a set of documents based on a filter.", - "operationId": "delete_documents_by_filter", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DocumentDeletionByFilter" - } - } - }, - "required": true - }, - "responses": { - "202": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentDeletion", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.delete", - "documents.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/movies/documents/delete \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"genres = action OR genres = adventure\"\n }'" - }, - { - "lang": "JS", - "source": "client.index('movies').deleteDocuments({\n filter: 'genres = action OR genres = adventure'\n})" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->deleteDocuments(['filter' => 'genres = action OR genres = adventure']);" - }, - { - "lang": "Python", - "source": "client.index('movies').delete_documents(filter='genres=action OR genres=adventure')" - }, - { - "lang": "Java", - "source": "String filter = \"genres = action OR genres = adventure\";\nclient.index(\"movies\").deleteDocumentsByFilter(filter);" - }, - { - "lang": "Ruby", - "source": "client.index('movies').delete_documents(filter: 'genres = action OR genres = adventure')" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteDocumentsByFilter(\"genres=action OR genres=adventure\")" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new DeleteDocumentsQuery() { Filter = \"genres = action OR genres = adventure\" });" - }, - { - "lang": "Rust", - "source": "let index = client.index(\"movies\");\nlet task = DocumentDeletionQuery::new(&index)\n .with_filter(\"genres = action OR genres = adventure\")\n .execute()\n .await\n .unwrap();" - } - ] - } - }, - "/indexes/{indexUid}/documents/delete-batch": { - "post": { - "tags": [ - "Documents" - ], - "summary": "Delete documents by batch", - "description": "Delete a set of documents based on an array of document ids.", - "operationId": "delete_documents_batch", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": {} - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentAdditionOrUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.delete", - "documents.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents/delete-batch' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n 23488,\n 153738,\n 437035,\n 363869\n ]'" - }, - { - "lang": "JS", - "source": "client.index('movies').deleteDocuments([23488, 153738, 437035, 363869])" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->deleteDocuments([23488, 153738, 437035, 363869]);" - }, - { - "lang": "Python", - "source": "client.index('movies').delete_documents([23488, 153738, 437035, 363869])" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").deleteDocuments(Arrays.asList(new String[]\n{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\"\n}));" - }, - { - "lang": "Ruby", - "source": "client.index('movies').delete_documents([23488, 153738, 437035, 363869])" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteDocuments([]string{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\",\n})" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new[] { \"23488\", \"153738\", \"437035\", \"363869\" });" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_documents(&[23488, 153738, 437035, 363869])\n .await\n .unwrap();" - } - ] - } - }, - "/indexes/{indexUid}/documents/edit": { - "post": { - "tags": [ - "Documents" - ], - "summary": "Edit documents by function", - "description": "Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to\nedit one or more documents directly in Meilisearch.", - "operationId": "edit_documents_by_function", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DocumentEditionByFunction" - } - } - }, - "required": true - }, - "responses": { - "202": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentDeletion", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents/edit' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"function\": \"doc.new_field = `a]new[value`\",\n \"filter\": \"id > 3000\",\n \"context\": {\n \"max_title_length\": 10\n }\n }'" - } - ] - } - }, - "/indexes/{indexUid}/documents/fetch": { - "post": { - "tags": [ - "Documents" - ], - "summary": "List documents with POST", - "description": "Get a set of documents.", - "operationId": "documents_by_query_post", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BrowseQuery" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationView_Value" - }, - "example": { - "results": [ - { - "title": "The Travels of Ibn Battuta", - "genres": [ - "Travel", - "Adventure" - ], - "language": "English", - "rating": 4.5 - }, - { - "title": "Pride and Prejudice", - "genres": [ - "Classics", - "Fiction", - "Romance", - "Literature" - ], - "language": "English", - "rating": 4 - } - ], - "offset": 0, - "limit": 2, - "total": 5 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.delete", - "documents.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/books/documents/fetch \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n \"fields\": [\"title\", \"genres\", \"rating\", \"language\"],\n \"limit\": 3\n }'" - }, - { - "lang": "JS", - "source": "client.index('books').getDocuments({\n filter: '(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English',\n fields: ['title', 'genres', 'rating', 'language'],\n limit: 3,\n sort: ['release_date:desc']\n})" - }, - { - "lang": "PHP", - "source": "$client->index('books')->getDocuments(\n (new DocumentsQuery())\n ->setFilter('(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English')\n ->setLimit(3)\n ->setFields(['title', 'genres', 'rating', 'language'])\n);" - }, - { - "lang": "Python", - "source": "client.index('books').get_documents({\n 'limit':3,\n 'fields': ['title', 'genres', 'rating', 'language'],\n 'filter': '(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English',\n 'sort': 'rating:desc, title:asc' # comma-separated string format\n})" - }, - { - "lang": "Java", - "source": "DocumentsQuery query = new DocumentsQuery()\n .setFilter(new String[] {\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\"})\n .setFields(new String[] {\"title\", \"genres\", \"rating\", \"language\"})\n .setLimit(3);\nclient.index(\"books\").getDocuments(query, TargetClassName.class);" - }, - { - "lang": "Ruby", - "source": "client.index('books').get_documents(\n filter: '(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English',\n limit: 3,\n fields: ['title', 'genres', 'rating', 'language']\n)" - }, - { - "lang": "Go", - "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"books\").GetDocuments(&meilisearch.DocumentsQuery{\n Fields: []string{\"title\", \"genres\", \"rating\", \"language\"},\n Filter: \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n}, &result)" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() {\n Limit = 3,\n Fields = new List { \"title\", \"genres\", \"rating\", \"language\"},\n Filter = \"(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English\"\n});" - }, - { - "lang": "Rust", - "source": "let index = client.index(\"books\");\nlet documents: DocumentsResults = DocumentsQuery::new(&index)\n .with_filter(\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\")\n .with_fields([\"title\", \"genres\", \"rating\", \"language\"])\n .with_limit(2)\n .execute::()\n .await\n .unwrap();" - } - ] - } - }, - "/indexes/{indexUid}/documents/{documentId}": { - "get": { - "tags": [ - "Documents" - ], - "summary": "Get document", - "description": "Get one document from its primary key.", - "operationId": "get_document", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - }, - { - "name": "documentId", - "in": "path", - "description": "The document identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "85087" - }, - { - "name": "fields", - "in": "query", - "description": "Comma-separated list of document attributes to include in the\nresponse. Use `*` to retrieve all attributes. By default, all\nattributes listed in the `displayedAttributes` setting are returned.\nExample: `title,description,price`.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "retrieveVectors", - "in": "query", - "description": "When `true`, includes the vector embeddings in the response for this\ndocument. This is useful when you need to inspect or export vector\ndata. Note that this can significantly increase response size if the\ndocument has multiple embedders configured. Defaults to `false`.", - "required": false, - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { - "description": "The document is returned", - "content": { - "application/json": { - "schema": {}, - "example": { - "id": 25684, - "title": "American Ninja 5", - "poster": "https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg", - "overview": "When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.", - "release_date": 725846400 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Document not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Document `a` not found.", - "code": "document_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#document_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.get", - "documents.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents/25684?fields=id,title,poster,release_date'" - }, - { - "lang": "JS", - "source": "client\n .index('movies')\n .getDocument(25684, { fields: ['id', 'title', 'poster', 'release_date'] })" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getDocument(25684, ['id', 'title', 'poster', 'release_date']);" - }, - { - "lang": "Python", - "source": "client.index('movies').get_document(25684, {\n 'fields': ['id', 'title', 'poster', 'release_date']\n})" - }, - { - "lang": "Java", - "source": "DocumentQuery query = new DocumentQuery().setFields(new String[] {\"id\", \"title\", \"poster\", \"release_date\"});\nclient.index(\"movies\").getDocument(\"25684\", query);" - }, - { - "lang": "Ruby", - "source": "client.index('movies').document(25684, fields: ['id', 'title', 'poster', 'release_date'])" - }, - { - "lang": "Go", - "source": "var a interface{}\nclient.Index(\"movies\").GetDocument(\"25684\",&meilisearch.DocumentQuery{\n Fields: []string{\"id\", \"title\", \"poster\", \"release_date\"},\n}, &a)" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDocumentAsync(25684, new List { \"id\", \"title\", \"poster\", \"release_date\" });" - }, - { - "lang": "Rust", - "source": "let index = client\n .index(\"movies\");\nlet document = DocumentQuery::new(&index)\n .with_fields([\"id\", \"title\", \"poster\", \"release_date\"])\n .execute::(\"25684\")\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getDocument(25684) { (result: Result) in\n switch result {\n case .success(let movie):\n print(movie)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "delete": { - "tags": [ - "Documents" - ], - "summary": "Delete document", - "description": "Delete a single document by id.", - "operationId": "delete_document", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - }, - { - "name": "documentId", - "in": "path", - "description": "Document Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "853" - } - ], - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentAdditionOrUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.delete", - "documents.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/documents/25684'" - }, - { - "lang": "JS", - "source": "client.index('movies').deleteDocument(25684)" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->deleteDocument(25684);" - }, - { - "lang": "Python", - "source": "client.index('movies').delete_document(25684)" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").deleteDocument(\"25684\");" - }, - { - "lang": "Ruby", - "source": "client.index('movies').delete_document(25684)" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteDocument(\"25684\")" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteOneDocumentAsync(\"25684\");" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_document(25684)\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').deleteDocument(25684);\nlete_documents_by_batch_1: \"await client.index('movies').deleteDocuments(\\n DeleteDocumentsQuery(\\n ids: [23488, 153738, 437035, 363869],\\n ),\\n );\"" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").deleteDocument(\"25684\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/indexes/{indexUid}/facet-search": { - "post": { - "tags": [ - "Facet Search" - ], - "summary": "Search in facets", - "description": "Search for a facet value within a given facet.", - "operationId": "search", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FacetSearchQuery" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "The documents are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchResult" - }, - "example": { - "hits": [ - { - "id": 2770, - "title": "American Pie 2", - "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", - "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", - "release_date": 997405200 - }, - { - "id": 190859, - "title": "American Sniper", - "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", - "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", - "release_date": 1418256000 - } - ], - "offset": 0, - "limit": 2, - "estimatedTotalHits": 976, - "processingTimeMs": 35, - "query": "american " - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"facetQuery\": \"fiction\",\n \"facetName\": \"genres\",\n \"filter\": \"rating > 3\"\n }'" - }, - { - "lang": "JS", - "source": "client.index('books').searchForFacetValues({\n facetQuery: 'fiction',\n facetName: 'genres'\n filter: 'rating > 3'\n})" - }, - { - "lang": "PHP", - "source": "$client->index('books')->facetSearch(\n (new FacetSearchQuery())\n ->setFacetQuery('fiction')\n ->setFacetName('genres')\n ->setFilter(['rating > 3'])\n);" - }, - { - "lang": "Python", - "source": "client.index('books').facet_search('genres', 'fiction', {\n 'filter': 'rating > 3'\n})" - }, - { - "lang": "Java", - "source": "FacetSearchRequest fsr = FacetSearchRequest.builder().facetName(\"genres\").facetQuery(\"fiction\").filter(new String[]{\"rating > 3\"}).build();\nclient.index(\"books\").facetSearch(fsr);" - }, - { - "lang": "Ruby", - "source": "client.index('books').facet_search('genres', 'fiction', filter: 'rating > 3')" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").FacetSearch(&meilisearch.FacetSearchRequest{\n FacetQuery: \"fiction\",\n FacetName: \"genres\",\n Filter: \"rating > 3\",\n})" - }, - { - "lang": "C#", - "source": "var query = new SearchFacetsQuery()\n{\n FacetQuery = \"fiction\",\n Filter = \"rating > 3\"\n};\nawait client.Index(\"books\").FacetSearchAsync(\"genres\", query);" - }, - { - "lang": "Rust", - "source": "let res = client.index(\"books\")\n .facet_search(\"genres\")\n .with_facet_query(\"fiction\")\n .with_filter(\"rating > 3\")\n .execute()\n .await\n .unwrap();" - } - ] - } - }, - "/indexes/{indexUid}/search": { - "get": { - "tags": [ - "Search" - ], - "summary": "Search with GET", - "description": "Search for documents matching a specific query in the given index.", - "operationId": "search_with_url_query", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - }, - { - "name": "q", - "in": "query", - "description": "The search query string. Meilisearch will return documents that match\nthis query. Supports prefix search (words matching the beginning of\nthe query) and typo tolerance. Leave empty to match all documents.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "vector", - "in": "query", - "description": "A vector of floating-point numbers for semantic/vector search. The\ndimensions must match the embedder configuration. When provided,\ndocuments are ranked by vector similarity. Can be combined with `q`\nfor hybrid search.", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "number", - "format": "float" - } - }, - "explode": false - }, - { - "name": "offset", - "in": "query", - "description": "Number of search results to skip. Use together with `limit` for\npagination. For example, to get results 21-40, set `offset=20` and\n`limit=20`. Defaults to `0`. Cannot be used with `page`/`hitsPerPage`.", - "required": true, - "schema": { - "type": "integer", - "default": 0, - "minimum": 0 - } - }, - { - "name": "limit", - "in": "query", - "description": "Maximum number of search results to return. Use together with `offset`\nfor pagination. Defaults to `20`. Cannot be used with\n`page`/`hitsPerPage`.", - "required": true, - "schema": { - "type": "integer", - "default": 20, - "minimum": 0 - } - }, - { - "name": "page", - "in": "query", - "description": "Request a specific page of results (1-indexed). Use together with\n`hitsPerPage` for page-based pagination. Cannot be used with\n`offset`/`limit`.", - "required": false, - "schema": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "hitsPerPage", - "in": "query", - "description": "Number of results per page when using page-based pagination. Use\ntogether with `page`. Cannot be used with `offset`/`limit`.", - "required": false, - "schema": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "attributesToRetrieve", - "in": "query", - "description": "Comma-separated list of attributes to include in the returned\ndocuments. Use `*` to return all attributes. By default, returns\nattributes from the `displayedAttributes` setting.", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "explode": false - }, - { - "name": "retrieveVectors", - "in": "query", - "description": "When `true`, includes vector embeddings in the response for documents\nthat have them. Defaults to `false`.", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "attributesToCrop", - "in": "query", - "description": "Comma-separated list of attributes whose values should be cropped to\nfit within `cropLength`. Useful for displaying long text attributes\nin search results. Format: `attribute` or `attribute:length`.", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "explode": false - }, - { - "name": "cropLength", - "in": "query", - "description": "Maximum number of words to keep when cropping attribute values. The\ncropped text will be centered around the matching terms. Defaults to\n`10`.", - "required": true, - "schema": { - "type": "integer", - "default": 10, - "minimum": 0 - } - }, - { - "name": "attributesToHighlight", - "in": "query", - "description": "Comma-separated list of attributes whose matching terms should be\nhighlighted with `highlightPreTag` and `highlightPostTag`. Use `*` to\nhighlight all searchable attributes.", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "explode": false - }, - { - "name": "filter", - "in": "query", - "description": "Filter expression to narrow down search results. Uses SQL-like syntax.\nExample: `genres = action AND rating > 4`. Only attributes in\n`filterableAttributes` can be used.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sort", - "in": "query", - "description": "Comma-separated list of attributes to sort by. Format: `attribute:asc`\nor `attribute:desc`. Only attributes in `sortableAttributes` can be\nused. Custom ranking rules can also affect sort order.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "distinct", - "in": "query", - "description": "Attribute used to ensure only one document with each unique value is\nreturned. Useful for deduplication. Only attributes in\n`filterableAttributes` can be used.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "showMatchesPosition", - "in": "query", - "description": "When `true`, returns the position (start and length) of each matched\nterm in the original document attributes. Useful for custom\nhighlighting implementations.", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "showRankingScore", - "in": "query", - "description": "When `true`, includes a `_rankingScore` field (0.0 to 1.0) in each\ndocument indicating how well it matches the query. Higher scores mean\nbetter matches.", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "showRankingScoreDetails", - "in": "query", - "description": "When `true`, includes a `_rankingScoreDetails` object showing the\ncontribution of each ranking rule to the final score. Useful for\ndebugging relevancy.", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "showPerformanceDetails", - "in": "query", - "description": "When `true`, includes a `_performanceDetails` object showing the\nperformance details of the search.", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "facets", - "in": "query", - "description": "Comma-separated list of attributes for which to return facet\ndistribution (value counts). Only attributes in `filterableAttributes`\ncan be used. Returns the count of documents matching each facet value.", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "explode": false - }, - { - "name": "highlightPreTag", - "in": "query", - "description": "HTML tag or string to insert before highlighted matching terms.\nDefaults to ``.", - "required": true, - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "highlightPostTag", - "in": "query", - "description": "HTML tag or string to insert after highlighted matching terms.\nDefaults to ``.", - "required": true, - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "cropMarker", - "in": "query", - "description": "String used to indicate truncated content when cropping. Defaults to\n`…` (ellipsis).", - "required": true, - "schema": { - "type": "string", - "default": "…" - } - }, - { - "name": "matchingStrategy", - "in": "query", - "description": "Strategy for matching query terms. `last` (default): all terms must\nmatch, removing terms from the end if needed. `all`: all terms must\nmatch exactly. `frequency`: prioritizes matching frequent terms.", - "required": true, - "schema": { - "$ref": "#/components/schemas/MatchingStrategy" - } - }, - { - "name": "attributesToSearchOn", - "in": "query", - "description": "Comma-separated list of attributes to search in. By default, searches\nall `searchableAttributes`. Use this to restrict search to specific\nfields for better performance or relevance.", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "explode": false - }, - { - "name": "hybridEmbedder", - "in": "query", - "description": "Name of the embedder to use for hybrid/semantic search. Must match an\nembedder configured in the index settings.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hybridSemanticRatio", - "in": "query", - "description": "Balance between keyword search (0.0) and semantic/vector search (1.0)\nin hybrid search. A value of 0.5 gives equal weight to both. Defaults\nto `0.5`.", - "required": true, - "schema": { - "type": "number", - "format": "float" - } - }, - { - "name": "rankingScoreThreshold", - "in": "query", - "description": "Minimum ranking score (0.0 to 1.0) a document must have to be\nincluded in results. Documents with lower scores are excluded. Useful\nfor filtering out poor matches.", - "required": true, - "schema": { - "type": "number", - "format": "float" - } - }, - { - "name": "locales", - "in": "query", - "description": "Comma-separated list of language locales to use for tokenization and\nprocessing. Useful for multilingual content. Example: `en,fr,de`.", - "required": true, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Locale" - } - }, - "explode": false - }, - { - "name": "personalizeUserContext", - "in": "query", - "description": "User-specific context for personalized search results. The format\ndepends on your personalization configuration.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "useNetwork", - "in": "query", - "required": false, - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { - "description": "The documents are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchResult" - }, - "example": { - "hits": [ - { - "id": 2770, - "title": "American Pie 2", - "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", - "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", - "release_date": 997405200 - }, - { - "id": 190859, - "title": "American Sniper", - "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", - "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", - "release_date": 1418256000 - } - ], - "offset": 0, - "limit": 2, - "estimatedTotalHits": 976, - "processingTimeMs": 35, - "query": "american " - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/search?q=american%20ninja'" - }, - { - "lang": "JS", - "source": "client.index('movies').searchGet('American ninja')" - } - ] - }, - "post": { - "tags": [ - "Search" - ], - "summary": "Search with POST", - "description": "Search for documents matching a specific query in the given index.", - "operationId": "search_with_post", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchQuery" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "The documents are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchResult" - }, - "example": { - "hits": [ - { - "id": 2770, - "title": "American Pie 2", - "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", - "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", - "release_date": 997405200 - }, - { - "id": 190859, - "title": "American Sniper", - "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", - "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", - "release_date": 1418256000 - } - ], - "offset": 0, - "limit": 2, - "estimatedTotalHits": 976, - "processingTimeMs": 35, - "query": "american " - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"american ninja\" }'" - }, - { - "lang": "JS", - "source": "client.index('movies').search('American ninja')" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->search('american ninja');" - }, - { - "lang": "Python", - "source": "client.index('movies').search('American ninja')" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").search(\"American ninja\");" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search('american ninja')" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").Search(\"american ninja\", &meilisearch.SearchRequest{})" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").SearchAsync(\"American ninja\");\nt_task_1: |\nTaskInfo task = await client.GetTaskAsync(1);\nt_all_tasks_1: |\nResourceResults taskResult = await client.GetTasksAsync();" - }, - { - "lang": "Rust", - "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"american ninja\")\n .execute()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').search('American ninja');" - }, - { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(query: \"American ninja\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/indexes/{indexUid}/settings": { - "get": { - "tags": [ - "Settings" - ], - "summary": "List settings", - "description": "This route allows you to retrieve, configure, or reset all of an index's settings at once.", - "operationId": "get_all", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "Settings are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Settings_Unchecked" - }, - "example": {} - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings'" - }, - { - "lang": "JS", - "source": "client.index('movies').getSettings()" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getSettings();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_settings()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('movies').settings" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSettings()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSettingsAsync();" - }, - { - "lang": "Rust", - "source": "let settings: Settings = client\n .index(\"movies\")\n .get_settings()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getSettings();\ndate_settings_1: \"await client.index('movies').updateSettings(\\n IndexSettings(\\n rankingRules: [\\n 'words',\\n 'typo',\\n 'proximity',\\n 'attribute',\\n 'sort',\\n 'exactness',\\n 'release_date:desc',\\n 'rank:desc'\\n ],\\n distinctAttribute: 'movie_id',\\n searchableAttributes: ['title', 'overview', 'genres'],\\n displayedAttributes: [\\n 'title',\\n 'overview',\\n 'genres',\\n 'release_date'\\n ],\\n stopWords: ['the', 'a', 'an'],\\n sortableAttributes: ['title', 'release_date'],\\n synonyms: {\\n 'wolverine': ['xmen', 'logan'],\\n 'logan': ['wolverine'],\\n },\\n ),\\n );\"" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getSettings { (result) in\n switch result {\n case .success(let setting):\n print(setting)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset settings", - "description": "Reset all the settings of an index to their default value.", - "operationId": "delete_all", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings'" - }, - { - "lang": "JS", - "source": "client.index('movies').resetSettings()" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetSettings();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_settings()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_settings" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetSettings()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSettingsAsync();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_settings()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetSettings();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").resetSettings { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "patch": { - "tags": [ - "Settings" - ], - "summary": "Update settings", - "description": "Update the settings of an index.\nPassing null to an index setting will reset it to its default value.\nUpdates in the settings route are partial. This means that any parameters not provided in the body will be left unchanged.\nIf the provided index does not exist, it will be created.", - "operationId": "update_all", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Settings_Unchecked" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"rankingRules\": [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ],\n \"distinctAttribute\": \"movie_id\",\n \"searchableAttributes\": [\n \"title\",\n \"overview\",\n \"genres\"\n ],\n \"displayedAttributes\": [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ],\n \"stopWords\": [\n \"the\",\n \"a\",\n \"an\"\n ],\n \"sortableAttributes\": [\n \"title\",\n \"release_date\"\n ],\n \"synonyms\": {\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\"wolverine\"]\n },\n \"typoTolerance\": {\n \"minWordSizeForTypos\": {\n \"oneTypo\": 8,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n },\n \"pagination\": {\n \"maxTotalHits\": 5000\n },\n \"faceting\": {\n \"maxValuesPerFacet\": 200\n },\n \"searchCutoffMs\": 150\n }'" - }, - { - "lang": "JS", - "source": "client.index('movies').updateSettings({\n rankingRules: [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n distinctAttribute: 'movie_id',\n searchableAttributes: [\n 'title',\n 'overview',\n 'genres'\n ],\n displayedAttributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n stopWords: [\n 'the',\n 'a',\n 'an'\n ],\n sortableAttributes: [\n 'title',\n 'release_date'\n ],\n synonyms: {\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine']\n },\n typoTolerance: {\n 'minWordSizeForTypos': {\n 'oneTypo': 8,\n 'twoTypos': 10\n },\n 'disableOnAttributes': [\n 'title'\n ]\n },\n pagination: {\n maxTotalHits: 5000\n },\n faceting: {\n maxValuesPerFacet: 200\n },\n searchCutoffMs: 150\n})" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateSettings([\n 'rankingRules' => [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n 'distinctAttribute' => 'movie_id',\n 'searchableAttributes' => [\n 'title',\n 'overview',\n 'genres'\n ],\n 'displayedAttributes' => [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n 'stopWords' => [\n 'the',\n 'a',\n 'an'\n ],\n 'sortableAttributes' => [\n 'title',\n 'release_date'\n ],\n 'synonyms' => [\n 'wolverine' => ['xmen', 'logan'],\n 'logan' => ['wolverine']\n ],\n 'typoTolerance' => [\n 'minWordSizeForTypos' => [\n 'oneTypo' => 8,\n 'twoTypos' => 10\n ],\n 'disableOnAttributes' => ['title']\n ],\n 'pagination' => [\n 'maxTotalHits' => 5000\n ],\n 'faceting' => [\n 'maxValuesPerFacet' => 200\n ],\n 'searchCutoffMs' => 150\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_settings({\n 'rankingRules': [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n 'distinctAttribute': 'movie_id',\n 'searchableAttributes': [\n 'title',\n 'overview',\n 'genres'\n ],\n 'displayedAttributes': [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n 'sortableAttributes': [\n 'title',\n 'release_date'\n ],\n 'stopWords': [\n 'the',\n 'a',\n 'an'\n ],\n 'synonyms': {\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine']\n },\n 'typoTolerance': {\n 'minWordSizeForTypos': {\n 'oneTypo': 8,\n 'twoTypos': 10\n },\n 'disableOnAttributes': ['title']\n },\n 'pagination': {\n 'maxTotalHits': 5000\n },\n 'faceting': {\n 'maxValuesPerFacet': 200\n },\n 'searchCutoffMs': 150\n})" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setRankingRules(\n new String[] {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n });\nsettings.setDistinctAttribute(\"movie_id\");\nsettings.setSearchableAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\"\n });\nsettings.setDisplayedAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n });\nsettings.setStopWords(\n new String[] {\n \"the\",\n \"a\",\n \"an\"\n });\nsettings.setSortableAttributes(\n new String[] {\n \"title\",\n \"release_date\"\n });\n\nHashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nsettings.setSynonyms(synonyms);\n\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 8);\n put(\"twoTypos\", 10);\n }\n };\nTypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\nsettings.setTypoTolerance(typoTolerance);\nsettings.setSearchCutoffMs(150);\nclient.index(\"movies\").updateSettings(settings);" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_settings({\n ranking_rules: [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n distinct_attribute: 'movie_id',\n searchable_attributes: [\n 'title',\n 'overview',\n 'genres'\n ],\n displayed_attributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n stop_words: [\n 'the',\n 'a',\n 'an'\n ],\n sortable_attributes: [\n 'title',\n 'release_date'\n ],\n synonyms: {\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine']\n },\n pagination: {\n max_total_hits: 5000\n },\n faceting: {\n max_values_per_facet: 200\n },\n search_cutoff_ms: 150\n})" - }, - { - "lang": "Go", - "source": "distinctAttribute := \"movie_id\"\nsettings := meilisearch.Settings{\n RankingRules: []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\",\n },\n DistinctAttribute: &distinctAttribute,\n SearchableAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n },\n DisplayedAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n },\n StopWords: []string{\n \"the\",\n \"a\",\n \"an\",\n },\n SortableAttributes: []string{\n \"title\",\n \"release_date\",\n },\n Synonyms: map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\"},\n },\n TypoTolerance: &meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 8,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n },\n Pagination: &meilisearch.Pagination{\n MaxTotalHits: 5000,\n },\n Faceting: &meilisearch.Faceting{\n MaxValuesPerFacet: 200,\n },\n SearchCutoffMs: 150,\n}\nclient.Index(\"movies\").UpdateSettings(&settings)" - }, - { - "lang": "C#", - "source": "Settings newSettings = new Settings\n{\n RankingRules = new string[]\n {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n },\n DistinctAttribute = \"movie_id\",\n SearchableAttributes = new string[] { \"title\", \"overview\", \"genres\" },\n DisplayedAttributes = new string[] { \"title\", \"overview\", \"genres\", \"release_date\" },\n SortableAttributes = new string[] { \"title\", \"release_date\" },\n StopWords = new string[] { \"the\", \"a\", \"an\" },\n Synonyms = new Dictionary>\n {\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\" } },\n },\n FilterableAttributes = new string[] { },\n TypoTolerance = new TypoTolerance\n {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeForTypos = new TypoTolerance.TypoSize\n {\n OneTypo = 8,\n TwoTypos = 10\n }\n },\n SearchCutoffMs = 150\n};\nTaskInfo task = await client.Index(\"movies\").UpdateSettingsAsync(newFilters);" - }, - { - "lang": "Rust", - "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"wolverine\"), vec![\"xmen\", \"logan\"]);\nsynonyms.insert(String::from(\"logan\"), vec![\"wolverine\"]);\n\nlet min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(4),\n two_typos; Some(12)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![\"title\".to_string()]),\n disable_on_words: Some(vec![])\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet settings = Settings::new()\n .with_ranking_rules([\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ])\n .with_distinct_attribute(Some(\"movie_id\"))\n .with_searchable_attributes([\n \"title\",\n \"overview\",\n \"genres\"\n ])\n .with_displayed_attributes([\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ])\n .with_stop_words([\n \"the\",\n \"a\",\n \"an\"\n ])\n .with_sortable_attributes([\n \"title\",\n \"release_date\"\n ])\n .with_synonyms(synonyms)\n .with_typo_tolerance(typo_tolerance)\n .with_search_cutoff(150);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_settings(&settings)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let settings = Setting(rankingRules: [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n], searchableAttributes: [\n \"title\",\n \"overview\",\n \"genres\"\n], displayedAttributes: [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n], stopWords: [\n \"the\",\n \"a\",\n \"an\"\n], synonyms: [\n \"wolverine\": [\"xmen\", \"logan\"],\n \"logan\": [\"wolverine\"]\n], distinctAttribute: \"movie_id\",\nsortableAttributes: [\n \"title\",\n \"release_date\"\n])\nclient.index(\"movies\").updateSettings(settings) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/indexes/{indexUid}/settings/chat": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get chat", - "description": "Get an user defined chat", - "operationId": "getchat", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "chat is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChatSettings" - }, - "example": {} - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/chat'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset chat", - "description": "Reset an index's chat to its default value", - "operationId": "deletechat", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChatSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/chat'" - } - ] - }, - "patch": { - "tags": [ - "Settings" - ], - "summary": "Update chat", - "description": "Update an index's user defined chat", - "operationId": "patchchat", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChatSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/chat' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"description\": \"An index of movies.\",\n \"documentTemplate\": \"A movie titled '{{doc.title}}' released in {{ doc.release_date }}\",\n \"documentTemplateMaxBytes\": 400\n }'" - } - ] - } - }, - "/indexes/{indexUid}/settings/dictionary": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get dictionary", - "description": "Get an user defined dictionary", - "operationId": "getdictionary", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "dictionary is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/dictionary'" - }, - { - "lang": "JS", - "source": "client.index('books').getDictionary()" - }, - { - "lang": "PHP", - "source": "$client->index('books')->getDictionary();" - }, - { - "lang": "Python", - "source": "client.index('books').get_dictionary()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").getDictionarySettings();" - }, - { - "lang": "Ruby", - "source": "client.index('books').dictionary" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetDictionary()" - }, - { - "lang": "C#", - "source": "var indexDictionary = await client.Index(\"books\").GetDictionaryAsync();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('books')\n .get_dictionary()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").getDictionary { result in\n // handle result\n}" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update dictionary", - "description": "Update an index's user defined dictionary", - "operationId": "putdictionary", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/dictionary' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"J. R. R.\",\n \"W. E. B.\"\n ]'" - }, - { - "lang": "JS", - "source": "client.index('books').updateDictionary(['J. R. R.', 'W. E. B.'])" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateDictionary(['J. R. R.', 'W. E. B.']);" - }, - { - "lang": "Python", - "source": "client.index('books').update_dictionary([\"J. R. R.\", \"W. E. B.\"])" - }, - { - "lang": "Java", - "source": "client.index(\"books\").updateDictionarySettings(new String[] {\"J. R. R.\", \"W. E. B.\"});" - }, - { - "lang": "Ruby", - "source": "client.index('books').update_dictionary(['J. R. R.', 'W. E. B.'])" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateDictionary([]string{\n \"J. R. R.\",\n \"W. E. B.\",\n})" - }, - { - "lang": "C#", - "source": "var newDictionary = new string[] { \"J. R. R.\", \"W. E. B.\" };\nawait client.Index(\"books\").UpdateDictionaryAsync(newDictionary);" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('books')\n .set_dictionary(['J. R. R.', 'W. E. B.'])\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").updateDictionary([\"J. R. R.\", \"W. E. B.\"]) { result in\n // handle result\n}" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset dictionary", - "description": "Reset an index's dictionary to its default value", - "operationId": "deletedictionary", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/dictionary'" - }, - { - "lang": "JS", - "source": "client.index('books').resetDictionary()" - }, - { - "lang": "PHP", - "source": "$client->index('books')->resetDictionary();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_dictionary()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").resetDictionarySettings();" - }, - { - "lang": "Ruby", - "source": "client.index('books').reset_dictionary" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetDictionary()" - }, - { - "lang": "C#", - "source": "await client.Index(\"books\").ResetDictionaryAsync();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('books')\n .reset_dictionary()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").resetDictionary { result in\n // handle result\n}" - } - ] - } - }, - "/indexes/{indexUid}/settings/displayed-attributes": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get displayedAttributes", - "description": "Get an user defined displayedAttributes", - "operationId": "getdisplayedAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "displayedAttributes is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" - }, - { - "lang": "JS", - "source": "client.index('movies').getDisplayedAttributes()" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getDisplayedAttributes();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_displayed_attributes()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getDisplayedAttributesSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('movies').get_displayed_attributes" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetDisplayedAttributes()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDisplayedAttributesAsync();" - }, - { - "lang": "Rust", - "source": "let displayed_attributes: Vec = client\n .index(\"movies\")\n .get_displayed_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getDisplayedAttributes();\ndate_displayed_attributes_1: \"await client.index('movies').updateDisplayedAttributes([\\n 'title',\\n 'overview',\\n 'genres',\\n 'release_date',\\n]);\"" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getDisplayedAttributes { (result) in\n switch result {\n case .success(let displayedAttributes):\n print(displayedAttributes)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update displayedAttributes", - "description": "Update an index's user defined displayedAttributes", - "operationId": "putdisplayedAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ]'" - }, - { - "lang": "JS", - "source": "client.index('movies').updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateDisplayedAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" - }, - { - "lang": "Go", - "source": "displayedAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n}\nclient.Index(\"movies\").UpdateDisplayedAttributes(&displayedAttributes)" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateDisplayedAttributesAsync(new[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" - }, - { - "lang": "Rust", - "source": "let displayed_attributes = [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_displayed_attributes(&displayed_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let displayedAttributes: [String] = [\"title\", \"overview\", \"genres\", \"release_date\"]\nclient.index(\"movies\").updateDisplayedAttributes(displayedAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset displayedAttributes", - "description": "Reset an index's displayedAttributes to its default value", - "operationId": "deletedisplayedAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" - }, - { - "lang": "JS", - "source": "client.index('movies').resetDisplayedAttributes()" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetDisplayedAttributes();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_displayed_attributes()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetDisplayedAttributesSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_displayed_attributes" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetDisplayedAttributes()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetDisplayedAttributesAsync();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_displayed_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetDisplayedAttributes();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").resetDisplayedAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/indexes/{indexUid}/settings/distinct-attribute": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get distinctAttribute", - "description": "Get an user defined distinctAttribute", - "operationId": "getdistinctAttribute", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "distinctAttribute is returned", - "content": { - "application/json": { - "schema": { - "type": "string" - }, - "example": "" - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" - }, - { - "lang": "JS", - "source": "client.index('shoes').getDistinctAttribute()" - }, - { - "lang": "PHP", - "source": "$client->index('shoes')->getDistinctAttribute();" - }, - { - "lang": "Python", - "source": "client.index('shoes').get_distinct_attribute()" - }, - { - "lang": "Java", - "source": "client.index(\"shoes\").getDistinctAttributeSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('shoes').distinct_attribute" - }, - { - "lang": "Go", - "source": "client.Index(\"shoes\").GetDistinctAttribute()" - }, - { - "lang": "C#", - "source": "string result = await client.Index(\"shoes\").GetDistinctAttributeAsync();" - }, - { - "lang": "Rust", - "source": "let distinct_attribute: Option = client\n .index(\"shoes\")\n .get_distinct_attribute()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('shoes').getDistinctAttribute();" - }, - { - "lang": "Swift", - "source": "client.index(\"shoes\").getDistinctAttribute { (result) in\n switch result {\n case .success(let distinctAttribute):\n print(distinctAttribute)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update distinctAttribute", - "description": "Update an index's user defined distinctAttribute", - "operationId": "putdistinctAttribute", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"skuid\"'" - }, - { - "lang": "JS", - "source": "client.index('shoes').updateDistinctAttribute('skuid')" - }, - { - "lang": "PHP", - "source": "$client->index('shoes')->updateDistinctAttribute('skuid');" - }, - { - "lang": "Python", - "source": "client.index('shoes').update_distinct_attribute('skuid')" - }, - { - "lang": "Java", - "source": "client.index(\"shoes\").updateDistinctAttributeSettings(\"skuid\");" - }, - { - "lang": "Ruby", - "source": "client.index('shoes').update_distinct_attribute('skuid')" - }, - { - "lang": "Go", - "source": "client.Index(\"shoes\").UpdateDistinctAttribute(\"skuid\")" - }, - { - "lang": "C#", - "source": "TaskInfo result = await client.Index(\"shoes\").UpdateDistinctAttributeAsync(\"skuid\");" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"shoes\")\n .set_distinct_attribute(\"skuid\")\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('shoes').updateDistinctAttribute('skuid');" - }, - { - "lang": "Swift", - "source": "client.index(\"shoes\").updateDistinctAttribute(\"skuid\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset distinctAttribute", - "description": "Reset an index's distinctAttribute to its default value", - "operationId": "deletedistinctAttribute", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" - }, - { - "lang": "JS", - "source": "client.index('shoes').resetDistinctAttribute()" - }, - { - "lang": "PHP", - "source": "$client->index('shoes')->resetDistinctAttribute();" - }, - { - "lang": "Python", - "source": "client.index('shoes').reset_distinct_attribute()" - }, - { - "lang": "Java", - "source": "client.index(\"shoes\").resetDistinctAttributeSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('shoes').reset_distinct_attribute" - }, - { - "lang": "Go", - "source": "client.Index(\"shoes\").ResetDistinctAttribute()" - }, - { - "lang": "C#", - "source": "TaskInfo result = await client.Index(\"shoes\").ResetDistinctAttributeAsync();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"shoes\")\n .reset_distinct_attribute()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('shoes').resetDistinctAttribute();" - }, - { - "lang": "Swift", - "source": "client.index(\"shoes\").resetDistinctAttribute { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/indexes/{indexUid}/settings/embedders": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get embedders", - "description": "Get an user defined embedders", - "operationId": "getembedders", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "embedders is returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/SettingEmbeddingSettings" - }, - "propertyNames": { - "type": "string" - } - }, - "example": {} - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').embedders" - }, - { - "lang": "Rust", - "source": "let embedders = index.get_embedders().await.unwrap();" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset embedders", - "description": "Reset an index's embedders to its default value", - "operationId": "deleteembedders", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/SettingEmbeddingSettings" - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').reset_embedders" - }, - { - "lang": "Rust", - "source": "index.reset_embedders().await.unwrap();" - } - ] - }, - "patch": { - "tags": [ - "Settings" - ], - "summary": "Update embedders", - "description": "Update an index's user defined embedders", - "operationId": "patchembedders", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/SettingEmbeddingSettings" - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"default\": {\n \"source\": \"openAi\",\n \"apiKey\": \"OPEN_AI_API_KEY\",\n \"model\": \"text-embedding-3-small\",\n \"documentTemplate\": \"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\"\n }\n }'" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').updateEmbedders({\n default: {\n source: 'openAi',\n apiKey: 'OPEN_AI_API_KEY',\n model: 'text-embedding-3-small',\n documentTemplate: 'A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}'\n }\n});" - }, - { - "lang": "PHP", - "source": "$client->updateEmbedders([\n 'default' => [\n 'source' => 'openAi',\n 'apiKey' => 'OPEN_AI_API_KEY',\n 'model' => 'text-embedding-3-small',\n 'documentTemplate' => 'A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}'\n ]\n]);" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').update_embedders(\n default: {\n source: 'openAi',\n api_key: 'OPEN_AI_API_KEY',\n model: 'text-embedding-3-small',\n document_template: \"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\"\n }\n)" - }, - { - "lang": "Rust", - "source": "let embedders = HashMap::from([(\n String::from(\"default\"),\n Embedder {\n source: EmbedderSource::OpenAi,\n api_key: Some(String::from(\"OPEN_AI_API_KEY\")),\n model: Some(String::from(\"text-embedding-3-small\")),\n document_template: Some(String::from(\"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\")),\n ..Embedder::default()\n }\n)]);\nlet task = index\n .set_embedders(&embedders)\n .await\n .unwrap();" - } - ] - } - }, - "/indexes/{indexUid}/settings/facet-search": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get facetSearch", - "description": "Get an user defined facetSearch", - "operationId": "getfacetSearch", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "facetSearch is returned", - "content": { - "application/json": { - "schema": { - "type": "boolean" - }, - "example": false - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').getFacetSearch();" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->getFacetSearch();" - }, - { - "lang": "Python", - "source": "client.index('books').get_facet_search_settings()" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_UID').facet_search_setting" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetFacetSearch()" - }, - { - "lang": "Rust", - "source": "let facet_search: bool = client\n .index(INDEX_UID)\n .get_facet_search()\n .await\n .unwrap();" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update facetSearch", - "description": "Update an index's user defined facetSearch", - "operationId": "putfacetSearch", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "boolean" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary 'false'" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').updateFacetSearch(false);" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->updateFacetSearch(false);" - }, - { - "lang": "Python", - "source": "client.index('books').update_facet_search_settings(False)" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_UID').update_facet_search_setting(false)" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateFacetSearch(false)" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_facet_search(false)\n .await\n .unwrap();" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset facetSearch", - "description": "Reset an index's facetSearch to its default value", - "operationId": "deletefacetSearch", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "boolean" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').resetFacetSearch();" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->resetFacetSearch();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_facet_search_settings()" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_UID').reset_facet_search_setting" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetFacetSearch()" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_facet_search()\n .await\n .unwrap();" - } - ] - } - }, - "/indexes/{indexUid}/settings/faceting": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get faceting", - "description": "Get an user defined faceting", - "operationId": "getfaceting", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "faceting is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FacetingSettings" - }, - "example": {} - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/faceting'" - }, - { - "lang": "JS", - "source": "client.index('books').getFaceting()" - }, - { - "lang": "PHP", - "source": "$client->index('books')->getFaceting();" - }, - { - "lang": "Python", - "source": "client.index('books').get_faceting_settings()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").getFacetingSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('books').faceting" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetFaceting()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetFacetingAsync();" - }, - { - "lang": "Rust", - "source": "let faceting: FacetingSettings = client\n .index(\"books\")\n .get_faceting()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getFaceting();\ndate_faceting_settings_1: \"await client.index('books').updateFaceting(Faceting(\\n maxValuesPerFacet: 2,\\n sortFacetValuesBy: {\\n '*': FacetingSortTypes.alpha,\\n 'genres': FacetingSortTypes.count\\n }));\"" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset faceting", - "description": "Reset an index's faceting to its default value", - "operationId": "deletefaceting", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FacetingSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/faceting'" - }, - { - "lang": "JS", - "source": "client.index('books').resetFaceting()" - }, - { - "lang": "PHP", - "source": "$client->index('books')->resetFaceting();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_faceting_settings()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").resetFacetingSettings();" - }, - { - "lang": "Ruby", - "source": "index('books').reset_faceting" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetFaceting()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetFacetingAsync();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_faceting()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetFaceting();" - } - ] - }, - "patch": { - "tags": [ - "Settings" - ], - "summary": "Update faceting", - "description": "Update an index's user defined faceting", - "operationId": "patchfaceting", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FacetingSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/faceting' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxValuesPerFacet\": 2,\n \"sortFacetValuesBy\": {\n \"*\": \"alpha\",\n \"genres\": \"count\"\n }\n }'" - }, - { - "lang": "JS", - "source": "client.index('books').updateFaceting({\n maxValuesPerFacet: 2\n sortFacetValuesBy: {\n '*': 'alpha',\n genres: 'count'\n }\n})" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateFaceting([\n 'maxValuesPerFacet' => 2,\n 'sortFacetValuesBy' => ['*' => 'alpha', 'genres' => 'count']\n]);" - }, - { - "lang": "Python", - "source": "params = {\n 'maxValuesPerFacet': 2,\n 'sortFacetValuesBy': {\n '*': 'count',\n 'genres': 'count'\n }\n}\nclient.index('books').update_faceting_settings(params)" - }, - { - "lang": "Java", - "source": "Faceting newFaceting = new Faceting();\nnewFaceting.setMaxValuesPerFacet(2);\nHashMap facetSortValues = new HashMap<>();\nfacetSortValues.put(\"*\", FacetSortValue.ALPHA);\nfacetSortValues.put(\"genres\", FacetSortValue.COUNT);\nnewFaceting.setSortFacetValuesBy(facetSortValues);\nclient.index(\"books\").updateFacetingSettings(newFaceting);" - }, - { - "lang": "Ruby", - "source": "client.index('books').update_faceting({\n max_values_per_facet: 2,\n sort_facet_values_by: {\n '*': 'alpha',\n genres: 'count'\n }\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateFaceting(&meilisearch.Faceting{\n MaxValuesPerFacet: 2,\n SortFacetValuesBy: {\n \"*\": SortFacetTypeAlpha,\n \"genres\": SortFacetTypeCount,\n }\n})" - }, - { - "lang": "C#", - "source": "var faceting = new Faceting\n{\n MaxValuesPerFacet = 2,\n SortFacetValuesBy = new Dictionary\n {\n [\"*\"] = SortFacetValuesByType.Alpha,\n [\"genres\"] = SortFacetValuesByType.Count\n }\n};\nawait client.Index(\"books\").UpdateFacetingAsync(faceting);" - }, - { - "lang": "Rust", - "source": "let mut facet_sort_setting = BTreeMap::new();\nfacet_sort_setting.insert(String::from(\"*\"), FacetSortValue::Alpha);\nfacet_sort_setting.insert(String::from(\"genres\"), FacetSortValue::Count);\nlet mut faceting = FacetingSettings {\n max_values_per_facet: 2,\n sort_facet_values_by: Some(facet_sort_setting),\n};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_faceting(&faceting)\n .await\n .unwrap();" - } - ] - } - }, - "/indexes/{indexUid}/settings/filterable-attributes": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get filterableAttributes", - "description": "Get an user defined filterableAttributes", - "operationId": "getfilterableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "filterableAttributes is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FilterableAttributesRule" - } - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" - }, - { - "lang": "JS", - "source": "client.index('movies').getFilterableAttributes()" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getFilterableAttributes();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_filterable_attributes()" - }, - { - "lang": "Java", - "source": "// Granular filterable attributes API (v1.14+)\nclient.index(\"movies\").getGranularFilterableAttributesSettings();\n// Legacy String[] API\nclient.index(\"movies\").getFilterableAttributesSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('movies').filterable_attributes" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetFilterableAttributes()" - }, - { - "lang": "C#", - "source": "IEnumerable attributes = await client.Index(\"movies\").GetFilterableAttributesAsync();" - }, - { - "lang": "Rust", - "source": "let filterable_attributes: Vec = client\n .index(\"movies\")\n .get_filterable_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getFilterableAttributes();\ndate_filterable_attributes_1: \"await client\\n .index('movies')\\n .updateFilterableAttributes(['genres', 'director']);\"" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update filterableAttributes", - "description": "Update an index's user defined filterableAttributes", - "operationId": "putfilterableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FilterableAttributesRule" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"genres\",\n \"director\",\n {\n \"attributePatterns\": [\"*_ratings\"],\n \"features\": {\n \"facetSearch\": false,\n \"filter\": {\n \"equality\": true,\n \"comparison\": false\n }\n }\n }\n ]'" - }, - { - "lang": "JS", - "source": "client.index('movies')\n .updateFilterableAttributes([\n \"genres\",\n {\n attributePatterns: [\"genre\"],\n features: {\n facetSearch: true,\n filter: { equality: true, comparison: false },\n },\n }\n ])" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateFilterableAttributes([\n 'author',\n [\n 'attributePatterns' => ['genres'],\n 'features' => [\n 'facetSearch' => true,\n 'filter' => [\n 'equality' => true,\n 'comparison' => false,\n ],\n ],\n ],\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_filterable_attributes([\n 'genres',\n 'director'\n])" - }, - { - "lang": "Java", - "source": "FilterableAttributesConfig genres = FilterableAttributesConfig.simple(\"genres\");\n\nFilterableAttributesFilter directorFilter = new FilterableAttributesFilter();\ndirectorFilter.setEquality(true);\ndirectorFilter.setComparison(false);\n\nFilterableAttributesFeatures directorFeatures = new FilterableAttributesFeatures();\ndirectorFeatures.setFacetSearch(true);\ndirectorFeatures.setFilter(directorFilter);\n\nFilterableAttributesConfig director = new FilterableAttributesConfig();\ndirector.setAttributePatterns(new String[] {\"director\"});\ndirector.setFeatures(directorFeatures);\n\n// Update settings\nclient.index(\"movies\").updateGranularFilterableAttributesSettings(\n new FilterableAttributesConfig[] {genres, director});" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_filterable_attributes([\n 'genres',\n 'director'\n])" - }, - { - "lang": "Go", - "source": "filterableAttributes := []interface{}{\n \"genres\",\n \"director\",\n AttributeRule{\n AttributePatterns: []string{\"tag\"}\n Features: AttributeFeatures{\n FacetSearch: false,\n Filter: FilterFeatures{\n Equality: true,\n Comparison: false,\n }\n }\n },\n map[string]interface{}{\n \"attributePatterns\": []interface{}{\"year\"}\n \"features\": map[string]interface{}{\n \"facetSearch\": false,\n \"filter\": map[string]interface{}{\n \"equality\": true,\n \"comparison\": true,\n }\n }\n }\n}\nclient.Index(\"movies\").UpdateFilterableAttributes(&filterableAttributes)" - }, - { - "lang": "C#", - "source": "List attributes = new() { \"genres\", \"director\" };\nTaskInfo result = await client.Index(\"movies\").UpdateFilterableAttributesAsync(attributes);" - }, - { - "lang": "Rust", - "source": "use meilisearch_sdk::settings::{\n FilterableAttribute,\n FilterableAttributesSettings,\n FilterFeatures,\n FilterFeatureModes,\n};\n\n// Mixed legacy + new syntax\nlet filterable_attributes: Vec = vec![\n // legacy: plain attribute name\n \"author\".into(),\n // new syntax: settings object\n FilterableAttribute::Settings(FilterableAttributesSettings {\n attribute_patterns: vec![\"genre\".to_string()],\n features: FilterFeatures {\n facet_search: true,\n filter: FilterFeatureModes { equality: true, comparison: false },\n },\n }),\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_filterable_attributes_advanced(filterable_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").updateFilterableAttributes([\"genre\", \"director\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset filterableAttributes", - "description": "Reset an index's filterableAttributes to its default value", - "operationId": "deletefilterableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FilterableAttributesRule" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" - }, - { - "lang": "JS", - "source": "client.index('movies').resetFilterableAttributes()" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetFilterableAttributes();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_filterable_attributes()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetFilterableAttributesSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_filterable_attributes" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetFilterableAttributes()" - }, - { - "lang": "C#", - "source": "TaskInfo result = await client.Index(\"movies\").ResetFilterableAttributesAsync();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_filterable_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetFilterableAttributes();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").resetFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/indexes/{indexUid}/settings/localized-attributes": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get localizedAttributes", - "description": "Get an user defined localizedAttributes", - "operationId": "getlocalizedAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "localizedAttributes is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LocalizedAttributesRuleView" - } - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').getLocalizedAttributes()" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->getLocalizedAttributes();" - }, - { - "lang": "Python", - "source": "client.index('INDEX_NAME').get_localized_attributes()" - }, - { - "lang": "Java", - "source": "client.index(\"INDEX_NAME\").getLocalizedAttributesSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').localized_attributes" - }, - { - "lang": "Go", - "source": "client.index(\"INDEX_NAME\").GetLocalizedAttributes()" - }, - { - "lang": "Rust", - "source": "let localized_attributes: Option> = client\n .index(\"books\")\n .get_localized_attributes()\n .await\n .unwrap();" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update localizedAttributes", - "description": "Update an index's user defined localizedAttributes", - "operationId": "putlocalizedAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LocalizedAttributesRuleView" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\"locales\": [\"jpn\"], \"attributePatterns\": [\"*_ja\"]}\n ]'" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').updateLocalizedAttributes([\n { attributePatterns: ['*_ja'], locales: ['jpn'] },\n])" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->updateLocalizedAttributes([\n 'locales' => ['jpn'],\n 'attributePatterns' => ['*_ja']\n]);" - }, - { - "lang": "Python", - "source": "client.index('INDEX_NAME').update_localized_attributes([\n {'attribute_patterns': ['*_ja'], 'locales': ['jpn']}\n])" - }, - { - "lang": "Java", - "source": "LocalizedAttribute attribute = new LocalizedAttribute();\nattribute.setAttributePatterns(new String[] {\"jpn\"});\nattribute.setLocales(new String[] {\"*_ja\"});\n\nclient.index(\"INDEX_NAME\").updateLocalizedAttributesSettings(\n new LocalizedAttributes[] {attribute}\n);" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').update_localized_attributes([\n { attribute_patterns: ['*_ja'], locales: ['jpn'] },\n])" - }, - { - "lang": "Go", - "source": "client.index(\"INDEX_NAME\").UpdateLocalizedAttributes([]*LocalizedAttributes{\n { AttributePatterns: [\"*_ja\"], Locales: [\"jpn\"] },\n})" - }, - { - "lang": "Rust", - "source": "let localized_attributes = vec![LocalizedAttributes {\n locales: vec![\"jpn\".to_string()],\n attribute_patterns: vec![\"*_ja\".to_string()],\n}];\nlet task: TaskInfo = client\n .index(\"books\")\n .set_localized_attributes(&localizced_attributes)\n .await\n .unwrap();" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset localizedAttributes", - "description": "Reset an index's localizedAttributes to its default value", - "operationId": "deletelocalizedAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LocalizedAttributesRuleView" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').resetLocalizedAttributes()" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->resetLocalizedAttributes();" - }, - { - "lang": "Python", - "source": "client.index('INDEX_NAME').reset_localized_attributes()" - }, - { - "lang": "Java", - "source": "client.index(\"INDEX_NAME\").resetLocalizedAttributesSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').reset_localized_attributes" - }, - { - "lang": "Go", - "source": "client.index(\"INDEX_NAME\").ResetLocalizedAttributes()" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_localized_attributes()\n .await\n .unwrap();" - } - ] - } - }, - "/indexes/{indexUid}/settings/non-separator-tokens": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get nonSeparatorTokens", - "description": "Get an user defined nonSeparatorTokens", - "operationId": "getnonSeparatorTokens", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "nonSeparatorTokens is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" - }, - { - "lang": "JS", - "source": "client.index('books').getNonSeparatorTokens()" - }, - { - "lang": "PHP", - "source": "$client->index('articles')->getNonSeparatorTokens();" - }, - { - "lang": "Python", - "source": "client.index('articles').get_non_separator_tokens()" - }, - { - "lang": "Java", - "source": "client.index(\"articles\").getNonSeparatorTokensSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('articles').non_separator_tokens" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").GetNonSeparatorTokens()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetNonSeparatorTokensAsync();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('articles')\n .get_non_separator_tokens()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").getNonSeparatorTokens { result in\n // handle result\n}" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update nonSeparatorTokens", - "description": "Update an index's user defined nonSeparatorTokens", - "operationId": "putnonSeparatorTokens", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"@\", \"#\"]'" - }, - { - "lang": "JS", - "source": "client.index('books').updateNonSeparatorTokens(['@', '#'])" - }, - { - "lang": "PHP", - "source": "$client->index('articles')->updateNonSeparatorTokens(['@', '#']);" - }, - { - "lang": "Python", - "source": "client.index('articles').update_non_separator_tokens([\"@\", \"#\"])" - }, - { - "lang": "Java", - "source": "String[] newSeparatorTokens = { \"@\", \"#\" };\nclient.index(\"articles\").updateNonSeparatorTokensSettings(newSeparatorTokens);" - }, - { - "lang": "Ruby", - "source": "client.index('articles').update_non_separator_tokens(['@', '#'])" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").UpdateNonSeparatorTokens([]string{\n \"@\",\n \"#\",\n})" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateNonSeparatorTokensAsync(new[] { \"@\", \"#\" });" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('articles')\n .set_non_separator_tokens(&vec!['@'.to_string(), '#'.to_string()])\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").updateNonSeparatorTokens([\"@\", \"#\"]) { result in\n // handle result\n}" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset nonSeparatorTokens", - "description": "Reset an index's nonSeparatorTokens to its default value", - "operationId": "deletenonSeparatorTokens", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" - }, - { - "lang": "JS", - "source": "client.index('books').resetNonSeparatorTokens()" - }, - { - "lang": "PHP", - "source": "$client->index('articles')->resetNonSeparatorTokens();" - }, - { - "lang": "Python", - "source": "client.index('articles').reset_non_separator_tokens()" - }, - { - "lang": "Java", - "source": "client.index(\"articles\").resetNonSeparatorTokensSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('articles').reset_non_separator_tokens" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").ResetNonSeparatorTokens()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetNonSeparatorTokensAsync();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('articles')\n .reset_non_separator_tokens()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").resetNonSeparatorTokens { result in\n // handle result\n}" - } - ] - } - }, - "/indexes/{indexUid}/settings/pagination": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get pagination", - "description": "Get an user defined pagination", - "operationId": "getpagination", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "pagination is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationSettings" - }, - "example": {} - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/pagination'" - }, - { - "lang": "JS", - "source": "client.index('books').getPagination()" - }, - { - "lang": "PHP", - "source": "$client->index('books')->getPagination();" - }, - { - "lang": "Python", - "source": "client.index('books').get_pagination_settings()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").getPaginationSettings();" - }, - { - "lang": "Ruby", - "source": "index('books').pagination" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetPagination()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetPaginationAsync();" - }, - { - "lang": "Rust", - "source": "let pagination: PaginationSetting = client\n .index(\"books\")\n .get_pagination()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getPagination();\ndate_pagination_settings_1: \"await client\\n .index('books')\\n .updatePagination(Pagination(maxTotalHits: 100));\"" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset pagination", - "description": "Reset an index's pagination to its default value", - "operationId": "deletepagination", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/pagination'" - }, - { - "lang": "JS", - "source": "client.index('books').resetPagination()" - }, - { - "lang": "PHP", - "source": "$client->index('books')->resetPagination();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_pagination_settings()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").resetPaginationSettings();" - }, - { - "lang": "Ruby", - "source": "index('books').reset_pagination" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetPagination()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetPaginationAsync();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_pagination()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetPagination();" - } - ] - }, - "patch": { - "tags": [ - "Settings" - ], - "summary": "Update pagination", - "description": "Update an index's user defined pagination", - "operationId": "patchpagination", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/pagination' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxTotalHits\": 100\n }'" - }, - { - "lang": "JS", - "source": "client.index('books').updateSettings({ pagination: { maxTotalHits: 100 }})" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateSettings([\n 'pagination' => [\n 'maxTotalHits' => 100\n ]\n]);" - }, - { - "lang": "Python", - "source": "client.index('books').update_pagination_settings({'maxTotalHits': 100})" - }, - { - "lang": "Java", - "source": "Pagination newPagination = new Pagination();\nnewPagination.setMaxTotalHits(100);\nclient.index(\"books\").updatePaginationSettings(newPagination);" - }, - { - "lang": "Ruby", - "source": "index('books').update_pagination({ max_total_hits: 100 })" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdatePagination(&meilisearch.Pagination{\n MaxTotalHits: 100,\n})" - }, - { - "lang": "C#", - "source": "var pagination = new Pagination {\n MaxTotalHits = 20\n};\nawait client.Index(\"movies\").UpdatePaginationAsync(pagination);" - }, - { - "lang": "Rust", - "source": "let pagination = PaginationSetting {max_total_hits:100};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_pagination(pagination)\n .await\n .unwrap();" - } - ] - } - }, - "/indexes/{indexUid}/settings/prefix-search": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get prefixSearch", - "description": "Get an user defined prefixSearch", - "operationId": "getprefixSearch", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "prefixSearch is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PrefixSearchSettings" - }, - "example": "indexingTime" - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').getPrefixSearch();" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->getPrefixSearch();" - }, - { - "lang": "Python", - "source": "client.index('books').get_prefix_search()" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_UID').prefix_search" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetPrefixSearch()" - }, - { - "lang": "Rust", - "source": "let prefix_search: PrefixSearchSettings = client\n .index(INDEX_UID)\n .get_prefix_search()\n .await\n .unwrap();" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update prefixSearch", - "description": "Update an index's user defined prefixSearch", - "operationId": "putprefixSearch", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PrefixSearchSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"disabled\"'" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').updatePrefixSearch('disabled');" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->updatePrefixSearch('disabled');" - }, - { - "lang": "Python", - "source": "client.index('books').update_prefix_search(PrefixSearch.DISABLED)" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_UID').update_prefix_search('disabled')" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdatePrefixSearch(\"disabled\")" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_prefix_search(PrefixSearchSettings::Disabled)\n .await\n .unwrap();" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset prefixSearch", - "description": "Reset an index's prefixSearch to its default value", - "operationId": "deleteprefixSearch", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PrefixSearchSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').resetPrefixSearch();" - }, - { - "lang": "PHP", - "source": "$client->index('INDEX_NAME')->resetPrefixSearch();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_prefix_search()" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_UID').reset_prefix_search" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetPrefixSearch()" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_prefix_search()\n .await\n .unwrap();" - } - ] - } - }, - "/indexes/{indexUid}/settings/proximity-precision": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get proximityPrecision", - "description": "Get an user defined proximityPrecision", - "operationId": "getproximityPrecision", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "proximityPrecision is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProximityPrecisionView" - }, - "example": "byWord" - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" - }, - { - "lang": "JS", - "source": "client.index('books').getProximityPrecision()" - }, - { - "lang": "PHP", - "source": "$client->index('books')->getProximityPrecision();" - }, - { - "lang": "Python", - "source": "client.index('books').get_proximity_precision()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").getProximityPrecisionSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('books').proximity_precision" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetProximityPrecision()" - }, - { - "lang": "C#", - "source": "await client.Index(\"books\").GetProximityPrecisionAsync();" - }, - { - "lang": "Rust", - "source": "let proximity_precision: String = client\n .index(\"books\")\n .get_proximity_precision()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let precisionValue = try await self.client.index(\"books\").getProximityPrecision()" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update proximityPrecision", - "description": "Update an index's user defined proximityPrecision", - "operationId": "putproximityPrecision", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProximityPrecisionView" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/proximity-precision' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"byAttribute\"'" - }, - { - "lang": "JS", - "source": "client.index('books').updateProximityPrecision('byAttribute')" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateProximityPrecision('byAttribute');" - }, - { - "lang": "Python", - "source": "client.index('books').update_proximity_precision(ProximityPrecision.BY_ATTRIBUTE)" - }, - { - "lang": "Java", - "source": "client.index(\"books\").updateProximityPrecisionSettings(\"byAttribute\");" - }, - { - "lang": "Ruby", - "source": "client.index('books').update_proximity_precision('byAttribute')" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateProximityPrecision(ByAttribute)" - }, - { - "lang": "C#", - "source": "await client.Index(\"books\").UpdateProximityPrecisionAsync(\"byAttribute\");" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .set_proximity_precision(\"byAttribute\".to_string())\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let task = try await self.client.index(\"books\").updateProximityPrecision(.byWord)" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset proximityPrecision", - "description": "Reset an index's proximityPrecision to its default value", - "operationId": "deleteproximityPrecision", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProximityPrecisionView" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" - }, - { - "lang": "JS", - "source": "client.index('books').resetProximityPrecision()" - }, - { - "lang": "PHP", - "source": "$client->index('books')->resetProximityPrecision();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_proximity_precision()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").resetProximityPrecisionSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('books').reset_proximity_precision" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetProximityPrecision()" - }, - { - "lang": "C#", - "source": "await client.Index(\"books\").ResetProximityPrecisionAsync();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_proximity_precision()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let task = try await self.client.index(\"books\").resetProximityPrecision()" - } - ] - } - }, - "/indexes/{indexUid}/settings/ranking-rules": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get rankingRules", - "description": "Get an user defined rankingRules", - "operationId": "getrankingRules", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "rankingRules is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RankingRuleView" - } - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" - }, - { - "lang": "JS", - "source": "client.index('movies').getRankingRules()" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getRankingRules();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_ranking_rules()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getRankingRulesSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('movies').ranking_rules" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetRankingRules()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetRankingRulesAsync();" - }, - { - "lang": "Rust", - "source": "let ranking_rules: Vec = client\n .index(\"movies\")\n .get_ranking_rules()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getRankingRules();\ndate_ranking_rules_1: \"await client.index('movies').updateRankingRules([\\n 'words',\\n 'typo',\\n 'proximity',\\n 'attribute',\\n 'sort',\\n 'exactness',\\n 'release_date:asc',\\n 'rank:desc',\\n]);\"" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getRankingRules { (result) in\n switch result {\n case .success(let rankingRules):\n print(rankingRules)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update rankingRules", - "description": "Update an index's user defined rankingRules", - "operationId": "putrankingRules", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RankingRuleView" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n ]'" - }, - { - "lang": "JS", - "source": "client.index('movies').updateRankingRules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateRankingRules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_ranking_rules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" - }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setRankingRules(new String[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});\nclient.index(\"movies\").updateSettings(settings);" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_ranking_rules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" - }, - { - "lang": "Go", - "source": "rankingRules := []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\",\n}\nclient.Index(\"movies\").UpdateRankingRules(&rankingRules)" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateRankingRulesAsync(new[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});" - }, - { - "lang": "Rust", - "source": "let ranking_rules = [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\",\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_ranking_rules(&ranking_rules)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let rankingRules: [String] = [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n]\nclient.index(\"movies\").updateRankingRules(rankingRules) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset rankingRules", - "description": "Reset an index's rankingRules to its default value", - "operationId": "deleterankingRules", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RankingRuleView" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" - }, - { - "lang": "JS", - "source": "client.index('movies').resetRankingRules()" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetRankingRules();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_ranking_rules()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetRankingRulesSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_ranking_rules" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetRankingRules()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetRankingRulesAsync();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_ranking_rules()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetRankingRules();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").resetRankingRules { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/indexes/{indexUid}/settings/search-cutoff-ms": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get searchCutoffMs", - "description": "Get an user defined searchCutoffMs", - "operationId": "getsearchCutoffMs", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "searchCutoffMs is returned", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - }, - "example": 0 - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" - }, - { - "lang": "JS", - "source": "client.index('movies').getSearchCutoffMs()" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getSearchCutoffMs();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_search_cutoff_ms()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getSearchCutoffMsSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('movies').search_cutoff_ms" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSearchCutoffMs()" - }, - { - "lang": "C#", - "source": "var searchCutoff = await client.Index(\"movies\").GetSearchCutoffMsAsync();" - }, - { - "lang": "Rust", - "source": "let search_cutoff_ms: String = client\n .index(\"movies\")\n .get_search_cutoff_ms()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let precisionValue = try await self.client.index(\"books\").getSearchCutoffMs()" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update searchCutoffMs", - "description": "Update an index's user defined searchCutoffMs", - "operationId": "putsearchCutoffMs", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '150'" - }, - { - "lang": "JS", - "source": "client.index('movies').updateSearchCutoffMs(150)" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateSearchCutoffMs(150);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_search_cutoff_ms(150)" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateSearchCutoffMsSettings(150);" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_search_cutoff_ms(150)" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateSearchCutoffMs(150)" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSearchCutoffMsAsync(150);" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .set_search_cutoff_ms(Some(150))\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let task = try await self.client.index(\"books\").updateSearchCutoffMs(150)" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset searchCutoffMs", - "description": "Reset an index's searchCutoffMs to its default value", - "operationId": "deletesearchCutoffMs", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" - }, - { - "lang": "JS", - "source": "client.index('movies').resetSearchCutoffMs()" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetSearchCutoffMs();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_search_cutoff_ms()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetSearchCutoffMsSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_search_cutoff_ms" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetSearchCutoffMs()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSearchCutoffMsAsync();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_search_cutoff_ms()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let task = try await self.client.index(\"books\").resetSearchCutoffMs()" - } - ] - } - }, - "/indexes/{indexUid}/settings/searchable-attributes": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get searchableAttributes", - "description": "Get an user defined searchableAttributes", - "operationId": "getsearchableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "searchableAttributes is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" - }, - { - "lang": "JS", - "source": "client.index('movies').getSearchableAttributes()" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getSearchableAttributes();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_searchable_attributes()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getSearchableAttributesSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('movies').searchable_attributes" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSearchableAttributes()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSearchableAttributesAsync();" - }, - { - "lang": "Rust", - "source": "let searchable_attributes: Vec = client\n .index(\"movies\")\n .get_searchable_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getSearchableAttributes();\ndate_searchable_attributes_1: \"await client\\n .index('movies')\\n .updateSearchableAttributes(['title', 'overview', 'genres']);\"" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getSearchableAttributes { (result) in\n switch result {\n case .success(let searchableAttributes):\n print(searchableAttributes)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update searchableAttributes", - "description": "Update an index's user defined searchableAttributes", - "operationId": "putsearchableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\"\n ]'" - }, - { - "lang": "JS", - "source": "client.index('movies').updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n])" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateSearchableAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\"\n});" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" - }, - { - "lang": "Go", - "source": "searchableAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n}\nclient.Index(\"movies\").UpdateSearchableAttributes(&searchableAttributes)" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSearchableAttributesAsync(new[] {\"title\", \"overview\", \"genres\"});" - }, - { - "lang": "Rust", - "source": "let searchable_attributes = [\n \"title\",\n \"overview\",\n \"genres\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_searchable_attributes(&searchable_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let searchableAttributes: [String] = [\"title\", \"overview\", \"genres\"]\nclient.index(\"movies\").updateSearchableAttributes(searchableAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset searchableAttributes", - "description": "Reset an index's searchableAttributes to its default value", - "operationId": "deletesearchableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" - }, - { - "lang": "JS", - "source": "client.index('movies').resetSearchableAttributes()" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetSearchableAttributes();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_searchable_attributes()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetSearchableAttributesSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_searchable_attributes" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetSearchableAttributes()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSearchableAttributesAsync();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_searchable_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetSearchableAttributes();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").resetSearchableAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/indexes/{indexUid}/settings/separator-tokens": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get separatorTokens", - "description": "Get an user defined separatorTokens", - "operationId": "getseparatorTokens", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "separatorTokens is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" - }, - { - "lang": "JS", - "source": "client.index('books').getSeparatorTokens()" - }, - { - "lang": "PHP", - "source": "$client->index('articles')->getSeparatorTokens();" - }, - { - "lang": "Python", - "source": "client.index('articles').get_separator_tokens()" - }, - { - "lang": "Java", - "source": "client.index(\"articles\").getSeparatorTokensSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('articles').separator_tokens" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").GetSeparatorTokens()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSeparatorTokensAsync();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('articles')\n .get_separator_tokens()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").getSeparatorTokens { result in\n // handle result\n}" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update separatorTokens", - "description": "Update an index's user defined separatorTokens", - "operationId": "putseparatorTokens", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"|\", \"…\"]'" - }, - { - "lang": "JS", - "source": "client.index('books').updateSeparatorTokens(['|', '…'])" - }, - { - "lang": "PHP", - "source": "$client->index('articles')->updateSeparatorTokens(['|', '…']);" - }, - { - "lang": "Python", - "source": "client.index('articles').update_separator_tokens([\"|\", \"…\"])" - }, - { - "lang": "Java", - "source": "String[] newSeparatorTokens = { \"|\", \"…\" };\nclient.index(\"articles\").updateSeparatorTokensSettings(newSeparatorTokens);" - }, - { - "lang": "Ruby", - "source": "client.index('articles').update_separator_tokens(['|', '…'])" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").UpdateSeparatorTokens([]string{\n \"|\",\n \"…\",\n})" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSeparatorTokensAsync(new[] { \"|\", \"…\" });" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('articles')\n .set_separator_tokens(&vec!['|'.to_string(), '…'.to_string()])\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").updateSeparatorTokens([\"|\", \"…\"]) { result in\n // handle result\n}" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset separatorTokens", - "description": "Reset an index's separatorTokens to its default value", - "operationId": "deleteseparatorTokens", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" - }, - { - "lang": "JS", - "source": "client.index('books').resetSeparatorTokens()" - }, - { - "lang": "PHP", - "source": "$client->index('articles')->resetSeparatorTokens();" - }, - { - "lang": "Python", - "source": "client.index('articles').reset_separator_tokens()" - }, - { - "lang": "Java", - "source": "client.index(\"articles\").resetSeparatorTokensSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('articles').reset_separator_tokens" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").ResetSeparatorTokens()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSeparatorTokensAsync();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index('articles')\n .reset_separator_tokens()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").resetSeparatorTokens { result in\n // handle result\n}" - } - ] - } - }, - "/indexes/{indexUid}/settings/sortable-attributes": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get sortableAttributes", - "description": "Get an user defined sortableAttributes", - "operationId": "getsortableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "sortableAttributes is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" - }, - { - "lang": "JS", - "source": "client.index('books').getSortableAttributes()" - }, - { - "lang": "PHP", - "source": "$client->index('books')->getSortableAttributes();" - }, - { - "lang": "Python", - "source": "client.index('books').get_sortable_attributes()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").getSortableAttributesSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('books').sortable_attributes" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetSortableAttributes()" - }, - { - "lang": "C#", - "source": "await client.Index(\"books\").GetSortableAttributesAsync();" - }, - { - "lang": "Rust", - "source": "let sortable_attributes: Vec = client\n .index(\"books\")\n .get_sortable_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('books').getSortableAttributes();\ndate_sortable_attributes_1: \"await client.index('books').updateSortableAttributes(['price', 'author']);\"" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").getSortableAttributes { (result: Result, Swift.Error>) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update sortableAttributes", - "description": "Update an index's user defined sortableAttributes", - "operationId": "putsortableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"price\",\n \"author\"\n ]'" - }, - { - "lang": "JS", - "source": "client.index('books')\n .updateSortableAttributes([\n 'price',\n 'author'\n ])" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateSortableAttributes([\n 'price',\n 'author'\n]);" - }, - { - "lang": "Python", - "source": "client.index('books').update_sortable_attributes([\n 'price',\n 'author'\n])" - }, - { - "lang": "Java", - "source": "client.index(\"books\").updateSortableAttributesSettings(new String[] {\"price\", \"author\"});" - }, - { - "lang": "Ruby", - "source": "client.index('books').update_sortable_attributes([\n 'price',\n 'author'\n])" - }, - { - "lang": "Go", - "source": "sortableAttributes := []string{\n \"price\",\n \"author\",\n}\nclient.Index(\"books\").UpdateSortableAttributes(&sortableAttributes)" - }, - { - "lang": "C#", - "source": "await client.Index(\"books\").UpdateSortableAttributesAsync(new [] { \"price\", \"author\" });" - }, - { - "lang": "Rust", - "source": "let sortable_attributes = [\n \"price\",\n \"author\"\n];\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_sortable_attributes(&sortable_attributes)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").updateSortableAttributes([\"price\", \"author\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset sortableAttributes", - "description": "Reset an index's sortableAttributes to its default value", - "operationId": "deletesortableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" - }, - { - "lang": "JS", - "source": "client.index('books').resetSortableAttributes()" - }, - { - "lang": "PHP", - "source": "$client->index('books')->resetSortableAttributes();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_sortable_attributes()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").resetSortableAttributesSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('books').reset_sortable_attributes" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetSortableAttributes()" - }, - { - "lang": "C#", - "source": "await client.Index(\"books\").ResetSortableAttributesAsync();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_sortable_attributes()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('books').resetSortableAttributes();\narch_parameter_guide_sort_1: \"await client\\n .index('books')\\n .search('science fiction', SearchQuery(sort: ['price:asc']));\"" - }, - { - "lang": "Swift", - "source": "client.index(\"books\").resetSortableAttributes() { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/indexes/{indexUid}/settings/stop-words": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get stopWords", - "description": "Get an user defined stopWords", - "operationId": "getstopWords", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "stopWords is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" - }, - { - "lang": "JS", - "source": "client.index('movies').getStopWords()" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getStopWords();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_stop_words()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getStopWordsSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('movies').stop_words" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetStopWords()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetStopWordsAsync();" - }, - { - "lang": "Rust", - "source": "let stop_words: Vec = client\n .index(\"movies\")\n .get_stop_words()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getStopWords();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getStopWords { (result) in\n switch result {\n case .success(let stopWords):\n print(stopWords)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update stopWords", - "description": "Update an index's user defined stopWords", - "operationId": "putstopWords", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/stop-words' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"the\",\n \"of\",\n \"to\"\n ]'" - }, - { - "lang": "JS", - "source": "client.index('movies').updateStopWords(['of', 'the', 'to'])" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateStopWords(['the', 'of', 'to']);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_stop_words(['of', 'the', 'to'])" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateStopWordsSettings(new String[] {\"of\", \"the\", \"to\"});" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_stop_words(['of', 'the', 'to'])" - }, - { - "lang": "Go", - "source": "stopWords := []string{\"of\", \"the\", \"to\"}\nclient.Index(\"movies\").UpdateStopWords(&stopWords)" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateStopWordsAsync(new[] {\"of\", \"the\", \"to\"});" - }, - { - "lang": "Rust", - "source": "let stop_words = [\"of\", \"the\", \"to\"];\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_stop_words(&stop_words)\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').updateStopWords(['of', 'the', 'to']);" - }, - { - "lang": "Swift", - "source": "let stopWords: [String] = [\"of\", \"the\", \"to\"]\nclient.index(\"movies\").updateStopWords(stopWords) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset stopWords", - "description": "Reset an index's stopWords to its default value", - "operationId": "deletestopWords", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" - }, - { - "lang": "JS", - "source": "client.index('movies').resetStopWords()" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetStopWords();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_stop_words()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetStopWordsSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_stop_words" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetStopWords()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetStopWordsAsync();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_stop_words()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetStopWords();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").resetStopWords { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/indexes/{indexUid}/settings/synonyms": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get synonyms", - "description": "Get an user defined synonyms", - "operationId": "getsynonyms", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "synonyms is returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - } - }, - "example": {} - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" - }, - { - "lang": "JS", - "source": "client.index('movies').getSynonyms()" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->getSynonyms();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_synonyms()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getSynonymsSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('movies').synonyms" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSynonyms()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSynonymsAsync();" - }, - { - "lang": "Rust", - "source": "let synonyms: HashMap> = client\n .index(\"movies\")\n .get_synonyms()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getSynonyms();\ndate_synonyms_1: \"await client.index('movies').updateSynonyms({\\n 'wolverine': ['xmen', 'logan'],\\n 'logan': ['wolverine', 'xmen'],\\n 'wow': ['world of warcraft'],\\n});\"" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").getSynonyms { (result) in\n switch result {\n case .success(let synonyms):\n print(synonyms)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update synonyms", - "description": "Update an index's user defined synonyms", - "operationId": "putsynonyms", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/synonyms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\n \"wolverine\",\n \"xmen\"\n ],\n \"wow\": [\"world of warcraft\"]\n }'" - }, - { - "lang": "JS", - "source": "client.index('movies').updateSynonyms({\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine', 'xmen'],\n wow: ['world of warcraft']\n})" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->updateSynonyms([\n 'wolverine' => ['xmen', 'logan'],\n 'logan' => ['wolverine', 'xmen'],\n 'wow' => ['world of warcraft']\n]);" - }, - { - "lang": "Python", - "source": "client.index('movies').update_synonyms({\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine', 'xmen'],\n 'wow': ['world of warcraft']\n})" - }, - { - "lang": "Java", - "source": "HashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nclient.index(\"movies\").updateSynonymsSettings(synonyms);" - }, - { - "lang": "Ruby", - "source": "client.index('movies').update_synonyms({\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine', 'xmen'],\n wow: ['world of warcraft']\n})" - }, - { - "lang": "Go", - "source": "synonyms := map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\", \"xmen\"},\n \"wow\": []string{\"world of warcraft\"},\n}\nclient.Index(\"movies\").UpdateSynonyms(&synonyms)" - }, - { - "lang": "C#", - "source": "var synonyms = new Dictionary>\n{\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\", \"xmen\" } },\n { \"wow\", new string[] { \"world of warcraft\" } }\n};\nawait client.Index(\"movies\").UpdateSynonymsAsync(synonyms);" - }, - { - "lang": "Rust", - "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"wolverine\"), vec![String::from(\"xmen\"), String::from(\"logan\")]);\nsynonyms.insert(String::from(\"logan\"), vec![String::from(\"xmen\"), String::from(\"wolverine\")]);\nsynonyms.insert(String::from(\"wow\"), vec![String::from(\"world of warcraft\")]);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_synonyms(&synonyms)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let synonyms: [String: [String]] = [\n \"wolverine\": [\"xmen\", \"logan\"],\n \"logan\": [\"wolverine\", \"xmen\"],\n \"wow\": [\"world of warcraft\"]\n]\nclient.index(\"movies\").updateSynonyms(synonyms) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset synonyms", - "description": "Reset an index's synonyms to its default value", - "operationId": "deletesynonyms", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" - }, - { - "lang": "JS", - "source": "client.index('movies').resetSynonyms()" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->resetSynonyms();" - }, - { - "lang": "Python", - "source": "client.index('movies').reset_synonyms()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetSynonymsSettings();" - }, - { - "lang": "Ruby", - "source": "client.index('movies').reset_synonyms" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetSynonyms()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSynonymsAsync();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_synonyms()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetSynonyms();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").resetSynonyms { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/indexes/{indexUid}/settings/typo-tolerance": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get typoTolerance", - "description": "Get an user defined typoTolerance", - "operationId": "gettypoTolerance", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "typoTolerance is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TypoSettings" - }, - "example": {} - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" - }, - { - "lang": "JS", - "source": "client.index('books').getTypoTolerance()" - }, - { - "lang": "PHP", - "source": "$client->index('books')->getTypoTolerance();" - }, - { - "lang": "Python", - "source": "client.index('books').get_typo_tolerance()" - }, - { - "lang": "Ruby", - "source": "index('books').typo_tolerance" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetTypoTolerance()" - }, - { - "lang": "Rust", - "source": "let typo_tolerance: TypoToleranceSettings = client\n .index(\"books\")\n .get_typo_tolerance()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('books').getTypoTolerance();" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset typoTolerance", - "description": "Reset an index's typoTolerance to its default value", - "operationId": "deletetypoTolerance", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TypoSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" - }, - { - "lang": "JS", - "source": "client.index('books').resetTypoTolerance()" - }, - { - "lang": "PHP", - "source": "$client->index('books')->resetTypoTolerance();" - }, - { - "lang": "Python", - "source": "client.index('books').reset_typo_tolerance()" - }, - { - "lang": "Java", - "source": "client.index(\"books\").resetTypoToleranceSettings();" - }, - { - "lang": "Ruby", - "source": "index('books').reset_typo_tolerance" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetTypoTolerance()" - }, - { - "lang": "C#", - "source": "await client.Index(\"books\").ResetTypoToleranceAsync();" - }, - { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_typo_tolerance()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('books').resetTypoTolerance();" - } - ] - }, - "patch": { - "tags": [ - "Settings" - ], - "summary": "Update typoTolerance", - "description": "Update an index's user defined typoTolerance", - "operationId": "patchtypoTolerance", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TypoSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"minWordSizeForTypos\": {\n \"oneTypo\": 4,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n }'" - }, - { - "lang": "JS", - "source": "client.index('books').updateTypoTolerance({\n minWordSizeForTypos: {\n oneTypo: 4,\n twoTypos: 10\n },\n disableOnAttributes: [\n 'title'\n ]\n})" - }, - { - "lang": "PHP", - "source": "$client->index('books')->updateTypoTolerance([\n 'minWordSizeForTypos' => [\n 'oneTypo' => 4,\n 'twoTypos' => 10\n ],\n 'disableOnAttributes' => [\n 'title'\n ]\n]);" - }, - { - "lang": "Python", - "source": "client.index('books').update_typo_tolerance({\n 'minWordSizeForTypos': {\n 'oneTypo': 4,\n 'twoTypos': 10\n },\n 'disableOnAttributes': [\n 'title'\n ]\n})" - }, - { - "lang": "Java", - "source": "TypoTolerance typoTolerance = new TypoTolerance();\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 4);\n put(\"twoTypos\", 10);\n }\n };\n\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\ntypoTolerance.setDisableOnAttributes(new String[] {\"title\"});\n\nclient.index(\"books\").updateTypoToleranceSettings(typoTolerance);" - }, - { - "lang": "Ruby", - "source": "index('books').update_typo_tolerance({\n min_word_size_for_typos: {\n one_typo: 4,\n two_typos: 10\n },\n disable_on_attributes: ['title']\n})" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 4,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n})" - }, - { - "lang": "C#", - "source": "var typoTolerance = new TypoTolerance {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeTypos = new TypoTolerance.TypoSize {\n OneTypo = 4,\n TwoTypos = 10\n }\n};\n\nawait client.Index(\"books\").UpdateTypoToleranceAsync(typoTolerance);" - }, - { - "lang": "Rust", - "source": "let typo_tolerance = TypoToleranceSettings {\n enabled: Some(false),\n disable_on_attributes: None,\n disable_on_words: None,\n min_word_size_for_typos: None,\n};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "final toUpdate = TypoTolerance(\n minWordSizeForTypos: MinWordSizeForTypos(\n oneTypo: 4,\n twoTypos: 10,\n ),\n disableOnAttributes: ['title'],\n);\nawait client.index('books').updateTypoTolerance(toUpdate);" - } - ] - } - }, - "/indexes/{indexUid}/settings/vector-store": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get vectorStore", - "description": "Get an user defined vectorStore", - "operationId": "getvectorStore", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "vectorStore is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VectorStoreBackend" - }, - "example": "stable" - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store'" - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset vectorStore", - "description": "Reset an index's vectorStore to its default value", - "operationId": "deletevectorStore", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VectorStoreBackend" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store'" - } - ] - }, - "patch": { - "tags": [ - "Settings" - ], - "summary": "Update vectorStore", - "description": "Update an index's user defined vectorStore", - "operationId": "patchvectorStore", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VectorStoreBackend" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"experimental\"'" - } - ] - } - }, - "/indexes/{indexUid}/similar": { - "get": { - "tags": [ - "Similar documents" - ], - "summary": "Get similar documents with GET", - "description": "Retrieve documents similar to a specific search result.", - "operationId": "similar_get", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - }, - { - "name": "id", - "in": "query", - "description": "The unique identifier (primary key value) of the target document.\nMeilisearch will find and return documents that are semantically\nsimilar to this document based on their vector embeddings. This is a\nrequired parameter.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "offset", - "in": "query", - "description": "Number of similar documents to skip in the response. Use together with\n`limit` for pagination through large result sets. For example, to get\nsimilar documents 21-40, set `offset=20` and `limit=20`. Defaults to\n`0`.", - "required": true, - "schema": { - "type": "integer", - "default": 0, - "minimum": 0 - } - }, - { - "name": "limit", - "in": "query", - "description": "Maximum number of similar documents to return in a single response. Use\ntogether with `offset` for pagination. Higher values return more\nresults but may increase response time. Defaults to `20`.", - "required": true, - "schema": { - "type": "integer", - "default": 20, - "minimum": 0 - } - }, - { - "name": "attributes_to_retrieve", - "in": "query", - "description": "Comma-separated list of document attributes to include in the response.\nUse `*` to retrieve all attributes. By default, all attributes listed\nin the `displayedAttributes` setting are returned. Example:\n`title,description,price`.", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "retrieve_vectors", - "in": "query", - "description": "When `true`, includes the vector embeddings for each returned document.\nUseful for debugging or when you need to inspect the vector data. Note\nthat this can significantly increase response size. Defaults to\n`false`.", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "filter", - "in": "query", - "description": "Filter expression to narrow down which documents can be returned as\nsimilar. Uses the same syntax as search filters. Only documents\nmatching this filter will be considered when finding similar documents.\nExample: `genres = action AND year > 2000`.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "show_ranking_score", - "in": "query", - "description": "When `true`, includes a global `_rankingScore` field in each document\nshowing how similar it is to the target document. The score is a value\nbetween 0 and 1, where higher values indicate greater similarity.\nDefaults to `false`.", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "show_ranking_score_details", - "in": "query", - "description": "When `true`, includes a detailed `_rankingScoreDetails` object in each\ndocument breaking down how the similarity score was calculated. Useful\nfor debugging and understanding why certain documents are considered\nmore similar. Defaults to `false`.", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "show_performance_details", - "in": "query", - "description": "When `true`, includes a `_performanceDetails` object showing the\nperformance details of the search.", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "ranking_score_threshold", - "in": "query", - "description": "Minimum ranking score threshold (between 0.0 and 1.0) that documents\nmust meet to be included in results. Documents with a similarity score\nbelow this threshold will be excluded. Useful for ensuring only highly\nsimilar documents are returned.", - "required": false, - "schema": { - "type": "number", - "format": "float" - } - }, - { - "name": "embedder", - "in": "query", - "description": "The name of the embedder to use for finding similar documents. This\nmust match one of the embedders configured in your index settings. The\nembedder determines how document similarity is calculated based on\nvector embeddings.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The documents are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SimilarResult" - }, - "example": { - "hits": [ - { - "id": 2770, - "title": "American Pie 2", - "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", - "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", - "release_date": 997405200 - }, - { - "id": 190859, - "title": "American Sniper", - "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", - "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", - "release_date": 1418256000 - } - ], - "id": "143", - "offset": 0, - "limit": 2, - "estimatedTotalHits": 976, - "processingTimeMs": 35 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/similar?id=TARGET_DOCUMENT_ID&embedder=EMBEDDER_NAME'" - } - ] - }, - "post": { - "tags": [ - "Similar documents" - ], - "summary": "Get similar documents with POST", - "description": "Retrieve documents similar to a specific search result.", - "operationId": "similar_post", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SimilarQuery" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "The documents are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SimilarResult" - }, - "example": { - "hits": [ - { - "id": 2770, - "title": "American Pie 2", - "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", - "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", - "release_date": 997405200 - }, - { - "id": 190859, - "title": "American Sniper", - "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", - "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", - "release_date": 1418256000 - } - ], - "id": "143", - "offset": 0, - "limit": 2, - "estimatedTotalHits": 976, - "processingTimeMs": 35 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/similar' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"id\": TARGET_DOCUMENT_ID,\n \"embedder\": \"EMBEDDER_NAME\"\n }'" - }, - { - "lang": "JS", - "source": "client.index('INDEX_NAME').searchSimilarDocuments({ id: 'TARGET_DOCUMENT_ID', embedder: 'default' })" - }, - { - "lang": "PHP", - "source": "$similarQuery = new SimilarDocumentsQuery('TARGET_DOCUMENT_ID', 'default');\n$client->index('INDEX_NAME')->searchSimilarDocuments($similarQuery);" - }, - { - "lang": "Python", - "source": "client.index(\"INDEX_NAME\").get_similar_documents({\"id\": \"TARGET_DOCUMENT_ID\", \"embedder\": \"default\"})" - }, - { - "lang": "Ruby", - "source": "client.index('INDEX_NAME').search_similar_documents('TARGET_DOCUMENT_ID', embedder: 'default')" - }, - { - "lang": "Go", - "source": "resp := new(meilisearch.SimilarDocumentResult)\nclient.Index(\"INDEX_NAME\").SearchSimilarDocuments(&meilisearch.SimilarDocumentQuery{\n Id: \"TARGET_DOCUMENT_ID\",\n Embedder: \"default\",\n}, resp)" - }, - { - "lang": "Rust", - "source": "let results = index\n .similar_search(\"TARGET_DOCUMENT_ID\", \"EMBEDDER_NAME\")\n .execute()\n .await\n .unwrap();" - } - ] - } - }, - "/indexes/{indexUid}/stats": { - "get": { - "tags": [ - "Stats" - ], - "summary": "Get stats of index", - "description": "Get the stats of an index.", - "operationId": "get_index_stats", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "The stats of the index", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IndexStats" - }, - "example": { - "numberOfDocuments": 10, - "rawDocumentDbSize": 10, - "avgDocumentSize": 10, - "numberOfEmbeddings": 10, - "numberOfEmbeddedDocuments": 10, - "isIndexing": true, - "fieldDistribution": { - "genre": 10, - "author": 9 - } - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "stats.get", - "stats.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/stats'" - }, - { - "lang": "JS", - "source": "client.index('movies').getStats()" - }, - { - "lang": "PHP", - "source": "$client->index('movies')->stats();" - }, - { - "lang": "Python", - "source": "client.index('movies').get_stats()" - }, - { - "lang": "Java", - "source": "client.index(\"movies\").getStats();" - }, - { - "lang": "Ruby", - "source": "client.index('movies').stats" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetStats()" - }, - { - "lang": "C#", - "source": "await client.Index(\"movies\").GetStatsAsync();" - }, - { - "lang": "Rust", - "source": "let stats: IndexStats = client\n .index(\"movies\")\n .get_stats()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getStats();" - }, - { - "lang": "Swift", - "source": "client.index(\"movies\").stats { (result) in\n switch result {\n case .success(let stats):\n print(stats)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/keys": { - "get": { - "tags": [ - "Keys" - ], - "summary": "List API keys", - "description": "List all API keys", - "operationId": "list_api_keys", - "parameters": [ - { - "name": "offset", - "in": "query", - "description": "Number of API keys to skip in the response. Use together with `limit`\nfor pagination through large sets of keys. For example, to get keys\n21-40, set `offset=20` and `limit=20`. Defaults to `0`.", - "required": true, - "schema": { - "type": "integer", - "default": 0, - "minimum": 0 - } - }, - { - "name": "limit", - "in": "query", - "description": "Maximum number of API keys to return in a single response. Use together\nwith `offset` for pagination. Defaults to `20`.", - "required": true, - "schema": { - "type": "integer", - "default": 20, - "minimum": 0 - } - } - ], - "responses": { - "202": { - "description": "List of keys", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationView_KeyView" - }, - "example": { - "results": [ - { - "uid": "01b4bc42-eb33-4041-b481-254d00cce834", - "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", - "name": "An API Key", - "description": null, - "actions": [ - "documents.add" - ], - "indexes": [ - "movies" - ], - "expiresAt": "2022-11-12T10:00:00Z", - "createdAt": "2021-11-12T10:00:00Z", - "updatedAt": "2021-11-12T10:00:00Z" - } - ], - "limit": 20, - "offset": 0, - "total": 1 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "keys.get", - "keys.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys?limit=3' \\\n -H 'Authorization: Bearer MASTER_KEY'" - }, - { - "lang": "JS", - "source": "client.getKeys({ limit: 3 })" - }, - { - "lang": "PHP", - "source": "$client->getKeys((new KeysQuery())->setLimit(3));" - }, - { - "lang": "Python", - "source": "client.get_keys({'limit': 3})" - }, - { - "lang": "Java", - "source": "KeysQuery query = new KeysQuery().setLimit(3);\nclient.getKeys(query);" - }, - { - "lang": "Ruby", - "source": "client.keys(limit: 3)" - }, - { - "lang": "Go", - "source": "client.GetKeys(&meilisearch.KeysQuery{\n Limit: 3\n});" - }, - { - "lang": "C#", - "source": "ResourceResults keyResult = await client.GetKeysAsync(new KeysQuery { Limit = 3 });" - }, - { - "lang": "Rust", - "source": "let mut query = KeysQuery::new()\n .with_limit(3)\n .execute(&client)\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.getKeys(params: KeysQuery(limit: 3));\neate_a_key_1: \"await client.createKey(\\n description: 'Add documents: Products API key',\\n actions: ['documents.add'],\\n indexes: ['products'],\\n expiresAt: DateTime(2042, 04, 02));\"\ndate_a_key_1: \"await client.updateKey(\\n '6062abda-a5aa-4414-ac91-ecd7944c0f8d',\\n description: 'Manage documents: Products\\/Reviews API key',\\n name: 'Products\\/Reviews API key',\\n);\"" - }, - { - "lang": "Swift", - "source": "client.getKeys(params: KeysQuery(limit: 3)) { result in\n switch result {\n case .success(let keys):\n print(keys)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "post": { - "tags": [ - "Keys" - ], - "summary": "Create API key", - "description": "Create an API Key.", - "operationId": "create_api_key", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateApiKey" - } - } - }, - "required": true - }, - "responses": { - "202": { - "description": "Key has been created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/KeyView" - }, - "example": { - "uid": "01b4bc42-eb33-4041-b481-254d00cce834", - "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", - "name": "Indexing Products API key", - "description": null, - "actions": [ - "documents.add" - ], - "indexes": [ - "products" - ], - "expiresAt": "2021-11-13T00:00:00Z", - "createdAt": "2021-11-12T10:00:00Z", - "updatedAt": "2021-11-12T10:00:00Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "keys.create", - "keys.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/keys' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"description\": \"Add documents: Products API key\",\n \"actions\": [\"documents.add\"],\n \"indexes\": [\"products\"],\n \"expiresAt\": \"2042-04-02T00:42:42Z\"\n }'" - }, - { - "lang": "JS", - "source": "client.createKey({\n description: 'Add documents: Products API key',\n actions: ['documents.add'],\n indexes: ['products'],\n expiresAt: '2021-11-13T00:00:00Z'\n})" - }, - { - "lang": "PHP", - "source": "$client->createKey([\n 'description' => 'Add documents: Products API key',\n 'actions' => ['documents.add'],\n 'indexes' => ['products'],\n 'expiresAt' => '2042-04-02T00:42:42Z',\n]);" - }, - { - "lang": "Python", - "source": "client.create_key(options={\n 'description': 'Add documents: Products API key',\n 'actions': ['documents.add'],\n 'indexes': ['products'],\n 'expiresAt': '2042-04-02T00:42:42Z'\n})" - }, - { - "lang": "Java", - "source": "SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\nDate dateParsed = format.parse(\"2042-04-02T00:42:42Z\");\n\nKey keyInfo = new Key();\n\nkeyInfo.setDescription(\"Add documents: Products API key\");\nkeyInfo.setActions(new String[] {\"documents.add\"});\nkeyInfo.setIndexes(new String[] {\"products\"});\nkeyInfo.setExpiresAt(dateParsed);\n\nclient.createKey(keyInfo);" - }, - { - "lang": "Ruby", - "source": "client.create_key(\n description: 'Add documents: Products API key',\n actions: ['documents.add'],\n indexes: ['products'],\n expires_at: '2042-04-02T00:42:42Z'\n)" - }, - { - "lang": "Go", - "source": "client.CreateKey(&meilisearch.Key{\n Description: \"Add documents: Products API key\",\n Actions: []string{\"documents.add\"},\n Indexes: []string{\"products\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" - }, - { - "lang": "C#", - "source": "Key keyOptions = new Key\n{\n Description = \"Add documents: Products API key\",\n Actions = new KeyAction[] { KeyAction.DocumentsAdd },\n Indexes = new string[] { \"products\" },\n ExpiresAt = DateTime.Parse(\"2042-04-02T00:42:42Z\")\n};\nKey createdKey = await this.client.CreateKeyAsync(keyOptions);" - }, - { - "lang": "Rust", - "source": "let mut key_options = KeyBuilder::new();\nkey_options\n .with_name(\"Add documents: Products API key\")\n .with_action(Action::DocumentsAdd)\n .with_expires_at(time::macros::datetime!(2042 - 04 - 02 00:42:42 UTC))\n .with_index(\"products\");\nlet new_key = client\n .create_key(key_options)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let keyParams = KeyParams(\n description: \"Add documents: Products API key\",\n actions: [\"documents.add\"],\n indexes: [\"products\"],\n expiresAt: \"2042-04-02T00:42:42Z\"\n)\nclient.createKey(keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/keys/{uidOrKey}": { - "get": { - "tags": [ - "Keys" - ], - "summary": "Get API key", - "description": "Get an API key from its `uid` or its `key` field.", - "operationId": "get_api_key", - "parameters": [ - { - "name": "uidOrKey", - "in": "path", - "description": "The `uid` or `key` field of an existing API key", - "required": true, - "schema": { - "type": "string", - "format": "password" - }, - "example": "7b198a7f-52a0-4188-8762-9ad93cd608b2" - } - ], - "responses": { - "200": { - "description": "The key is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/KeyView" - }, - "example": { - "uid": "01b4bc42-eb33-4041-b481-254d00cce834", - "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", - "name": "An API Key", - "description": null, - "actions": [ - "documents.add" - ], - "indexes": [ - "movies" - ], - "expiresAt": "2022-11-12T10:00:00Z", - "createdAt": "2021-11-12T10:00:00Z", - "updatedAt": "2021-11-12T10:00:00Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "keys.get", - "keys.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" - }, - { - "lang": "JS", - "source": "client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" - }, - { - "lang": "PHP", - "source": "$client->getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" - }, - { - "lang": "Python", - "source": "client.get_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" - }, - { - "lang": "Java", - "source": "client.getKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\");" - }, - { - "lang": "Ruby", - "source": "client.key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" - }, - { - "lang": "Go", - "source": "client.GetKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" - }, - { - "lang": "C#", - "source": "Key key = await client.GetKeyAsync(\"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4\");" - }, - { - "lang": "Rust", - "source": "let key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" - }, - { - "lang": "Swift", - "source": "client.getKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "delete": { - "tags": [ - "Keys" - ], - "summary": "Delete API key", - "description": "Delete the specified API key.", - "operationId": "delete_api_key", - "parameters": [ - { - "name": "uidOrKey", - "in": "path", - "description": "The `uid` or `key` field of an existing API key", - "required": true, - "schema": { - "type": "string", - "format": "password" - }, - "example": "7b198a7f-52a0-4188-8762-9ad93cd608b2" - } - ], - "responses": { - "204": { - "description": "The key have been removed" - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "keys.delete", - "keys.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" - }, - { - "lang": "JS", - "source": "client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" - }, - { - "lang": "PHP", - "source": "$client->deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" - }, - { - "lang": "Python", - "source": "client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" - }, - { - "lang": "Java", - "source": "client.deleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" - }, - { - "lang": "Ruby", - "source": "client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" - }, - { - "lang": "Go", - "source": "client.DeleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" - }, - { - "lang": "C#", - "source": "client.DeleteKeyAsync(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" - }, - { - "lang": "Rust", - "source": "let key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();\nclient\n .delete_key(&key)\n .await?;\nthorization_header_1:\nlet client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet keys = client\n.get_keys()\n.await\n.unwrap();" - }, - { - "lang": "Dart", - "source": "await client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" - }, - { - "lang": "Swift", - "source": "client.deleteKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success:\n print(\"success\")\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "patch": { - "tags": [ - "Keys" - ], - "summary": "Update API key", - "description": "Update the name and description of an API key. Updates to keys are partial.\nThis means you should provide only the fields you intend to update, as any\nfields not present in the payload will remain unchanged.", - "operationId": "patch_api_key", - "parameters": [ - { - "name": "uidOrKey", - "in": "path", - "description": "The `uid` or `key` field of an existing API key", - "required": true, - "schema": { - "type": "string", - "format": "password" - }, - "example": "7b198a7f-52a0-4188-8762-9ad93cd608b2" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchApiKey" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "The key have been updated", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/KeyView" - }, - "example": { - "uid": "01b4bc42-eb33-4041-b481-254d00cce834", - "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", - "name": "An API Key", - "description": null, - "actions": [ - "documents.add" - ], - "indexes": [ - "movies" - ], - "expiresAt": "2022-11-12T10:00:00Z", - "createdAt": "2021-11-12T10:00:00Z", - "updatedAt": "2021-11-12T10:00:00Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "keys.update", - "keys.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"name\": \"Products/Reviews API key\",\n \"description\": \"Manage documents: Products/Reviews API key\"\n }'" - }, - { - "lang": "JS", - "source": "client.updateKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d', {\n name: 'Products/Reviews API key',\n description: 'Manage documents: Products/Reviews API key',\n})" - }, - { - "lang": "PHP", - "source": "$client->updateKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n [\n 'name' => 'Products/Reviews API key',\n 'description' => 'Manage documents: Products/Reviews API key'\n ]);" - }, - { - "lang": "Python", - "source": "client.update_key(key_or_uid='6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n options={\n 'name': 'Products/Reviews API key',\n 'description': 'Manage documents: Products/Reviews API key'\n})" - }, - { - "lang": "Java", - "source": "KeyUpdate keyChanges = new KeyUpdate();\nkeyChanges.setName(\"Products/Reviews API key\");\nkeyChanges.setDescription(\"Manage documents: Products/Reviews API key\");\n\nclient.updateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", keyChanges);" - }, - { - "lang": "Ruby", - "source": "client.update_key(\n '6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n {\n description: 'Manage documents: Products/Reviews API key',\n name: 'Products/Reviews API key'\n }\n)" - }, - { - "lang": "Go", - "source": "client.UpdateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", &meilisearch.Key{\n Description: \"Manage documents: Products/Reviews API key\",\n Actions: []string{\"documents.add\", \"document.delete\"},\n Indexes: []string{\"products\", \"reviews\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" - }, - { - "lang": "C#", - "source": "await client.UpdateKeyAsync(\n \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\",\n description: \"Manage documents: Products/Reviews API key\",\n name: \"Products/Reviews API key\"\n)" - }, - { - "lang": "Rust", - "source": "let mut key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();\nkey\n .with_description(\"Manage documents: Products/Reviews API key\".to_string())\n .with_name(\"Products/Reviews API key\".to_string())\n .update(&client)\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let keyParams = KeyUpdateParams(\n description: \"Manage documents: Products/Reviews API key\",\n name: \"Products/Reviews API key\"\n)\n\nclient.updateKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", keyParams: keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/logs/stderr": { - "post": { - "tags": [ - "Experimental features" - ], - "summary": "Update target of the console logs", - "description": "This route lets you specify at runtime the level of the console logs\noutputted on stderr.", - "operationId": "update_stderr_target", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateStderrLogs" - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "The console logs have been updated" - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "metrics.get", - "metrics.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST MEILISEARCH_URL/logs/stderr \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"target\": \"milli=trace,index_scheduler=info,actix_web=off\"\n }'" - } - ] - } - }, - "/logs/stream": { - "post": { - "tags": [ - "Experimental features" - ], - "summary": "Retrieve logs", - "description": "Stream logs over HTTP. The format of the logs depends on the\nconfiguration specified in the payload. The logs are sent as multi-part,\nand the stream never stops, so make sure your clients correctly handle\nthat. To make the server stop sending you logs, you can call the `DELETE\n/logs/stream` route.\n\nThere can only be one listener at a timeand an error will be returned if\nyou call this route while it's being used by another client.", - "operationId": "get_logs", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetLogs" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Logs are being returned", - "content": { - "application/json": { - "schema": { - "type": "string" - }, - "example": "\n2024-10-08T13:35:02.643750Z WARN HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: tracing_actix_web::middleware: Error encountered while processing the incoming HTTP request: ResponseError { code: 400, message: \"Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625\", error_code: \"feature_not_enabled\", error_type: \"invalid_request\", error_link: \"https://docs.meilisearch.com/errors#feature_not_enabled\" }\n2024-10-08T13:35:02.644191Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: meilisearch: close time.busy=1.66ms time.idle=658µs\n2024-10-08T13:35:18.564152Z INFO HTTP request{method=PATCH host=\"localhost:7700\" route=/experimental-features query_parameters= user_agent=curl/8.6.0 status_code=200}: meilisearch: close time.busy=1.17ms time.idle=127µs\n2024-10-08T13:35:23.094987Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=200}: meilisearch: close time.busy=2.12ms time.idle=595µs\n" - } - } - }, - "400": { - "description": "The route is already being used", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The `/logs/stream` route is currently in use by someone else.", - "code": "bad_request", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#bad_request" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "metrics.get", - "metrics.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST MEILISEARCH_URL/logs/stream \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"mode\": \"human\",\n \"target\": \"index_scheduler=trace\"\n }'" - } - ] - }, - "delete": { - "tags": [ - "Experimental features" - ], - "summary": "Stop retrieving logs", - "description": "Call this route to make the engine stops sending logs through the `POST\n/logs/stream` route.", - "operationId": "cancel_logs", - "responses": { - "204": { - "description": "Logs are being returned" - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "metrics.get", - "metrics.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE MEILISEARCH_URL/logs/stream\n}'" - } - ] - } - }, - "/metrics": { - "get": { - "tags": [ - "Stats" - ], - "summary": "Get prometheus metrics", - "description": "Retrieve metrics on the engine. See https://www.meilisearch.com/docs/learn/experimental/metrics\nCurrently, [the feature is experimental](https://www.meilisearch.com/docs/learn/experimental/overview)\nwhich means it must be enabled.", - "operationId": "get_metrics", - "responses": { - "200": { - "description": "The metrics of the instance", - "content": { - "text/plain": { - "schema": { - "type": "string" - }, - "example": "\n# HELP meilisearch_db_size_bytes Meilisearch DB Size In Bytes\n# TYPE meilisearch_db_size_bytes gauge\nmeilisearch_db_size_bytes 1130496\n# HELP meilisearch_batch_running_progress_trace The currently running progress trace\n# TYPE meilisearch_batch_running_progress_trace gauge\nmeilisearch_batch_running_progress_trace{batch_uid=\"0\",step_name=\"document\"} 0.710618582519409\nmeilisearch_batch_running_progress_trace{batch_uid=\"0\",step_name=\"extracting word proximity\"} 0.2222222222222222\nmeilisearch_batch_running_progress_trace{batch_uid=\"0\",step_name=\"indexing\"} 0.6666666666666666\nmeilisearch_batch_running_progress_trace{batch_uid=\"0\",step_name=\"processing tasks\"} 0\n# HELP meilisearch_http_requests_total Meilisearch HTTP requests total\n# TYPE meilisearch_http_requests_total counter\nmeilisearch_http_requests_total{method=\"GET\",path=\"/metrics\",status=\"400\"} 1\nmeilisearch_http_requests_total{method=\"PATCH\",path=\"/experimental-features\",status=\"200\"} 1\n# HELP meilisearch_http_response_time_seconds Meilisearch HTTP response times\n# TYPE meilisearch_http_response_time_seconds histogram\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.005\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.01\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.025\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.05\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.075\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.25\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.75\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"2.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"7.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"10\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"+Inf\"} 0\nmeilisearch_http_response_time_seconds_sum{method=\"GET\",path=\"/metrics\"} 0\nmeilisearch_http_response_time_seconds_count{method=\"GET\",path=\"/metrics\"} 0\n# HELP meilisearch_last_finished_batches_progress_trace_ms The last few batches progress trace in milliseconds\n# TYPE meilisearch_last_finished_batches_progress_trace_ms gauge\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks\"} 19360\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks > computing document changes\"} 368\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks > computing document changes > preparing payloads\"} 367\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks > computing document changes > preparing payloads > payload\"} 367\nmeilisearch_last_finished_batches_progress_trace_ms{batch_uid=\"0\",step_name=\"processing tasks > indexing\"} 18970\n# HELP meilisearch_index_count Meilisearch Index Count\n# TYPE meilisearch_index_count gauge\nmeilisearch_index_count 1\n# HELP meilisearch_index_docs_count Meilisearch Index Docs Count\n# TYPE meilisearch_index_docs_count gauge\nmeilisearch_index_docs_count{index=\"mieli\"} 2\n# HELP meilisearch_is_indexing Meilisearch Is Indexing\n# TYPE meilisearch_is_indexing gauge\nmeilisearch_is_indexing 0\n# HELP meilisearch_last_update Meilisearch Last Update\n# TYPE meilisearch_last_update gauge\nmeilisearch_last_update 1726675964\n# HELP meilisearch_nb_tasks Meilisearch Number of tasks\n# TYPE meilisearch_nb_tasks gauge\nmeilisearch_nb_tasks{kind=\"indexes\",value=\"mieli\"} 39\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"canceled\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"enqueued\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"failed\"} 4\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"processing\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"succeeded\"} 35\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentAdditionOrUpdate\"} 9\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentDeletion\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentEdition\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"dumpCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexDeletion\"} 8\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexSwap\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexUpdate\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"settingsUpdate\"} 22\nmeilisearch_nb_tasks{kind=\"types\",value=\"snapshotCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskCancelation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskDeletion\"} 0\n# HELP meilisearch_used_db_size_bytes Meilisearch Used DB Size In Bytes\n# TYPE meilisearch_used_db_size_bytes gauge\nmeilisearch_used_db_size_bytes 409600\n" - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "metrics.get", - "metrics.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/metrics'" - } - ] - } - }, - "/multi-search": { - "post": { - "tags": [ - "Search" - ], - "summary": "Perform a multi-search", - "description": "Bundle multiple search queries in a single API request. Use this endpoint\nto search through multiple indexes at once.", - "operationId": "multi_search_with_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FederatedSearch" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Federated multi-search", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FederatedSearchResult" - }, - "example": { - "hits": [ - { - "id": 42, - "title": "Batman returns", - "overview": "The overview of batman returns", - "_federation": { - "indexUid": "movies", - "queriesPosition": 0 - } - }, - { - "comicsId": "batman-killing-joke", - "description": "This comic is really awesome", - "title": "Batman: the killing joke", - "_federation": { - "indexUid": "comics", - "queriesPosition": 1 - } - } - ], - "processingTimeMs": 0, - "limit": 20, - "offset": 0, - "estimatedTotalHits": 2, - "semanticHitCount": 0 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/multi-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"queries\": [\n {\n \"indexUid\": \"movies\",\n \"q\": \"pooh\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movies\",\n \"q\": \"nemo\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movie_ratings\",\n \"q\": \"us\"\n }\n ]\n }'" - }, - { - "lang": "JS", - "source": "client.multiSearch({ queries: [\n {\n indexUid: 'movies',\n q: 'pooh',\n limit: 5,\n },\n {\n indexUid: 'movies',\n q: 'nemo',\n limit: 5,\n },\n {\n indexUid: 'movie_ratings',\n q: 'us',\n },\n]})" - }, - { - "lang": "PHP", - "source": "$client->multiSearch([\n (new SearchQuery())\n ->setIndexUid('movies')\n ->setQuery('pooh')\n ->setLimit(5),\n (new SearchQuery())\n ->setIndexUid('movies')\n ->setQuery('nemo')\n ->setLimit(5),\n (new SearchQuery())\n ->setIndexUid('movie_ratings')\n ->setQuery('us')\n ]);" - }, - { - "lang": "Python", - "source": "client.multi_search(\n [\n {'indexUid': 'movies', 'q': 'pooh', 'limit': 5},\n {'indexUid': 'movies', 'q': 'nemo', 'limit': 5},\n {'indexUid': 'movie_ratings', 'q': 'us'}\n ]\n)" - }, - { - "lang": "Java", - "source": "MultiSearchRequest multiSearchRequest = new MultiSearchRequest();\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"pooh\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"nemo\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movie_ratings\").setQuery(\"us\"));\n\nclient.multiSearch(multiSearchRequest);\nt_similar_post_1:\nSimilarDocumentRequest query = new SimilarDocumentRequest()\n .setId(\"143\")\n .setEmbedder(\"manual\");\nclient.index(\"movies\").searchSimilarDocuments(query)" - }, - { - "lang": "Ruby", - "source": "client.multi_search([\n { index_uid: 'books', q: 'prince' },\n { index_uid: 'movies', q: 'pooh', limit: 5 }\n { index_uid: 'movies', q: 'nemo', limit: 5 }\n { index_uid: 'movie_ratings', q: 'us' }\n])" - }, - { - "lang": "Go", - "source": "client.MultiSearch(&MultiSearchRequest{\n Queries: []SearchRequest{\n {\n IndexUID: \"movies\",\n Query: \"pooh\",\n Limit: 5,\n },\n {\n IndexUID: \"movies\",\n Query: \"nemo\",\n Limit: 5,\n },\n {\n IndexUID: \"movie_ratings\",\n Query: \"us\",\n },\n },\n})" - }, - { - "lang": "C#", - "source": "await client.MultiSearchAsync(new MultiSearchQuery()\n{\n Queries = new System.Collections.Generic.List()\n {\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"booh\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"nemo\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movie_ratings\",\n Q = \"us\",\n },\n }\n});" - }, - { - "lang": "Rust", - "source": "let movie = client.index(\"movie\");\nlet movie_ratings = client.index(\"movie_ratings\");\n\nlet search_query_1 = SearchQuery::new(&movie)\n .with_query(\"pooh\")\n .with_limit(5)\n .build();\nlet search_query_2 = SearchQuery::new(&movie)\n .with_query(\"nemo\")\n .with_limit(5)\n .build();\nlet search_query_3 = SearchQuery::new(&movie_ratings)\n .with_query(\"us\")\n .build();\n\nlet response = client\n .multi_search()\n .with_search_query(search_query_1)\n .with_search_query(search_query_2)\n .with_search_query(search_query_3)\n .execute::()\n .await\n .unwrap();" - } - ] - } - }, - "/network": { - "get": { - "tags": [ - "Experimental features" - ], - "summary": "Get network topology", - "description": "Get a list of all Meilisearch instances currently known to this instance.", - "operationId": "get_network", - "responses": { - "200": { - "description": "Known nodes are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Network" - }, - "example": { - "self": "ms-0", - "remotes": { - "ms-0": { - "url": "http://localhost:7700", - "searchApiKey": null, - "writeApiKey": null - }, - "ms-1": { - "url": "http://localhost:7701", - "searchApiKey": "foo", - "writeApiKey": "bar" - }, - "ms-2": { - "url": "http://localhost:7702", - "searchApiKey": "bar", - "writeApiKey": "foo" - } - } - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "network.get", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/network'" - }, - { - "lang": "PHP", - "source": "$client->getNetwork();" - }, - { - "lang": "Python", - "source": "client.get_all_networks()" - }, - { - "lang": "Go", - "source": "client.GetNetwork();" - }, - { - "lang": "Rust", - "source": "let network = client\n .get_network_state()\n .await\n .unwrap();" - } - ] - }, - "patch": { - "tags": [ - "Experimental features" - ], - "summary": "Configure network topology", - "description": "Add or remove nodes from network.", - "operationId": "patch_network", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Network" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "New network state is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Network" - }, - "example": { - "self": "ms-0", - "remotes": { - "ms-0": { - "url": "http://localhost:7700", - "searchApiKey": null, - "writeApiKey": null - }, - "ms-1": { - "url": "http://localhost:7701", - "searchApiKey": "foo", - "writeApiKey": "bar" - }, - "ms-2": { - "url": "http://localhost:7702", - "searchApiKey": "bar", - "writeApiKey": "foo" - } - } - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "network.update", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/network' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"self\": \"ms-00\",\n \"remotes\": {\n \"ms-00\": {\n \"url\": \"http://INSTANCE_URL\",\n \"searchApiKey\": \"INSTANCE_API_KEY\"\n },\n \"ms-01\": {\n \"url\": \"http://ANOTHER_INSTANCE_URL\",\n \"searchApiKey\": \"ANOTHER_INSTANCE_API_KEY\"\n }\n }\n }'" - }, - { - "lang": "PHP", - "source": "$client->updateNetwork([\n 'self' => 'ms-00',\n 'leader' => 'ms-00',\n 'remotes' => [\n 'ms-00' => [\n 'url' => 'http://INSTANCE_URL',\n 'searchApiKey' => 'INSTANCE_API_KEY',\n 'writeApiKey' => 'INSTANCE_WRITE_API_KEY'\n ],\n 'ms-01' => [\n 'url' => 'http://ANOTHER_INSTANCE_URL',\n 'searchApiKey' => 'ANOTHER_INSTANCE_API_KEY',\n 'writeApiKey' => 'ANOTHER_INSTANCE_WRITE_API_KEY'\n ]\n ]\n]);" - }, - { - "lang": "Python", - "source": "client.add_or_update_networks({\n \"remotes\": {\n \"http://localhost:7700\": {\n \"searchApiKey\": \"masterKey\"\n }\n },\n \"leader\": None\n})" - }, - { - "lang": "Go", - "source": "client.UpdateNetwork(&meilisearch.UpdateNetworkRequest{\n Self: meilisearch.String(\"ms-00\"),\n Leader: meilisearch.String(\"ms-00\"),\n Remotes: meilisearch.NewOpt(map[string]meilisearch.Opt[meilisearch.Remote]{\n \"ms-00\": meilisearch.NewOpt(meilisearch.Remote{\n URL: meilisearch.String(\"https://meilisearch.com\"),\n SearchAPIKey: meilisearch.String(\"ReadKey\"),\n WriteAPIKey: meilisearch.String(\"WriteKey\"),\n },\n },\n});" - }, - { - "lang": "Rust", - "source": "let mut remotes = std::collections::HashMap::new();\nremotes.insert(String::from(\"ms-01\"), Some(meilisearch_sdk::network::RemoteConfig {\n url: \"https://ms-01.enterprise.meilisearch.com\".to_string(),\n search_api_key: \"SEARCH_API_KEY\".to_string(),\n write_api_key: Some(\"WRITE_API_KEY\".to_string()),\n}));\n// Remove ms-00 from the topology\nremotes.insert(String::from(\"ms-00\"), None);\n\nlet update = meilisearch_sdk::network::NetworkUpdate {\n leader: Some(\"ms-01\".to_string()),\n remotes: Some(remotes),\n ..meilisearch_sdk::network::NetworkUpdate::default()\n};\n\nlet task: TaskInfo = client\n .update_network_state(&update)\n .await\n .unwrap();" - } - ] - } - }, - "/snapshots": { - "post": { - "tags": [ - "Backups" - ], - "summary": "Create snapshot", - "description": "Triggers a snapshot creation process. Once the process is complete, a snapshot is created in the snapshot directory. If the snapshot directory does not exist yet, it will be created.", - "operationId": "create_snapshot", - "responses": { - "202": { - "description": "Snapshot is being created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 0, - "indexUid": null, - "status": "enqueued", - "type": "snapshotCreation", - "enqueuedAt": "2021-01-01T09:39:00.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "snapshots.create", - "snapshots.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/snapshots'" - }, - { - "lang": "JS", - "source": "client.createSnapshot()" - }, - { - "lang": "PHP", - "source": "$client->createSnapshot();" - }, - { - "lang": "Python", - "source": "client.create_snapshot()" - }, - { - "lang": "Java", - "source": "client.createSnapshot();" - }, - { - "lang": "Ruby", - "source": "client.create_snapshot" - }, - { - "lang": "Go", - "source": "client.CreateSnapshot()" - }, - { - "lang": "C#", - "source": "await client.CreateSnapshotAsync();" - }, - { - "lang": "Rust", - "source": "client\n .create_snapshot()\n .await\n .unwrap();" - }, - { - "lang": "Swift", - "source": "let task = try await self.client.createSnapshot()" - } - ] - } - }, - "/stats": { - "get": { - "tags": [ - "Stats" - ], - "summary": "Get stats of all indexes", - "description": "Get stats of all indexes.", - "operationId": "get_stats", - "responses": { - "200": { - "description": "The stats of the instance", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Stats" - }, - "example": { - "databaseSize": 567, - "usedDatabaseSize": 456, - "lastUpdate": "2019-11-20T09:40:33.711324Z", - "indexes": { - "movies": { - "numberOfDocuments": 10, - "rawDocumentDbSize": 100, - "maxDocumentSize": 16, - "avgDocumentSize": 10, - "isIndexing": true, - "fieldDistribution": { - "genre": 10, - "author": 9 - } - } - } - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "stats.get", - "stats.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/stats'" - }, - { - "lang": "JS", - "source": "client.getStats()" - }, - { - "lang": "PHP", - "source": "$client->stats();" - }, - { - "lang": "Python", - "source": "client.get_all_stats()" - }, - { - "lang": "Java", - "source": "client.getStats();" - }, - { - "lang": "Ruby", - "source": "client.stats" - }, - { - "lang": "Go", - "source": "client.GetStats()" - }, - { - "lang": "C#", - "source": "await client.GetStatsAsync();" - }, - { - "lang": "Rust", - "source": "let stats: ClientStats = client\n .get_stats()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.getStats();" - }, - { - "lang": "Swift", - "source": "client.allStats { (result) in\n switch result {\n case .success(let stats):\n print(stats)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/swap-indexes": { - "post": { - "tags": [ - "Indexes" - ], - "summary": "Swap indexes", - "description": "Swap the documents, settings, and task history of two or more indexes.\nYou can only swap indexes in pairs. However, a single request can swap as\nmany index pairs as you wish. Swapping indexes is an atomic transaction:\neither all indexes are successfully swapped, or none are. Swapping indexA\nand indexB will also replace every mention of indexA by indexB and\nvice-versa in the task history. enqueued tasks are left unmodified.", - "operationId": "swap_indexes", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SwapIndexesPayload" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 3, - "indexUid": null, - "status": "enqueued", - "type": "indexSwap", - "enqueuedAt": "2021-08-12T10:00:00.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/swap-indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"indexes\": [\n \"indexA\",\n \"indexB\"\n ]\n },\n {\n \"indexes\": [\n \"indexX\",\n \"indexY\"\n ]\n }\n ]'" - }, - { - "lang": "JS", - "source": "client.swapIndexes([\n { 'indexes': ['indexA', 'indexB'] },\n { 'indexes': ['indexX', 'indexY'] }\n])" - }, - { - "lang": "PHP", - "source": "$client->swapIndexes([['indexA', 'indexB'], ['indexX', 'indexY']]);" - }, - { - "lang": "Python", - "source": "client.swap_indexes([{'indexes': ['indexA', 'indexB']}, {'indexes': ['indexX', 'indexY']}])" - }, - { - "lang": "Java", - "source": "SwapIndexesParams[] params =\n new SwapIndexesParams[] {\n new SwapIndexesParams().setIndexes(new String[] {\"indexA\", \"indexB\"}),\n new SwapIndexesParams().setIndexes(new String[] {\"indexX\", \"indexY\"})\n };\nTaskInfo task = client.swapIndexes(params);" - }, - { - "lang": "Ruby", - "source": "client.swap_indexes(['indexA', 'indexB'], ['indexX', 'indexY'])" - }, - { - "lang": "Go", - "source": "client.SwapIndexes([]SwapIndexesParams{\n {Indexes: []string{\"indexA\", \"indexB\"}},\n {Indexes: []string{\"indexX\", \"indexY\"}},\n})" - }, - { - "lang": "C#", - "source": "await client.SwapIndexesAsync(new List { new IndexSwap(\"indexA\", \"indexB\"), new IndexSwap(\"indexX\", \"indexY\") } });" - }, - { - "lang": "Rust", - "source": "client.swap_indexes([\n &SwapIndexes {\n indexes: (\n \"indexA\".to_string(),\n \"indexB\".to_string(),\n ),\n }, &SwapIndexes {\n indexes: (\n \"indexX\".to_string(),\n \"indexY\".to_string(),\n ),\n}])" - }, - { - "lang": "Swift", - "source": "let task = try await self.client.swapIndexes([\n (\"indexA\", \"indexB\"),\n (\"indexX\", \"indexY\")\n])" - } - ] - } - }, - "/tasks": { - "get": { - "tags": [ - "Async task management" - ], - "summary": "List tasks", - "description": "Get all [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)", - "operationId": "get_tasks", - "parameters": [ - { - "name": "limit", - "in": "query", - "description": "Maximum number of batches to return", - "required": false, - "schema": { - "type": "integer", - "format": "u-int32", - "default": 20, - "minimum": 0 - }, - "example": 12 - }, - { - "name": "from", - "in": "query", - "description": "`uid` of the first batch returned", - "required": false, - "schema": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "example": 12421 - }, - { - "name": "reverse", - "in": "query", - "description": "If `true`, returns results in the reverse order, from oldest to most recent", - "required": false, - "schema": { - "type": "boolean" - }, - "example": true - }, - { - "name": "batchUids", - "in": "query", - "description": "Permits to filter tasks by their batch uid. By default, when the\n`batchUids` query parameter is not set, all task uids are returned.\nIt's possible to specify several batch uids by separating them with\nthe `,` character.", - "required": false, - "schema": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "example": 12421 - }, - { - "name": "uids", - "in": "query", - "description": "Permits to filter tasks by their uid. By default, when the uids query\nparameter is not set, all task uids are returned. It's possible to\nspecify several uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 231, - 423, - 598 - ] - }, - { - "name": "canceledBy", - "in": "query", - "description": "Permits to filter tasks using the uid of the task that canceled them.\nIt's possible to specify several task uids by separating them with\nthe `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 374 - ] - }, - { - "name": "types", - "in": "query", - "description": "Permits to filter tasks by their related type. By default, when `types`\nquery parameter is not set, all task types are returned. It's possible\nto specify several types by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [ - "documentAdditionOrUpdate" - ] - }, - { - "name": "statuses", - "in": "query", - "description": "Permits to filter tasks by their status. By default, when `statuses`\nquery parameter is not set, all task statuses are returned. It's\npossible to specify several statuses by separating them with the `,`\ncharacter.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Status" - } - }, - "example": [ - "succeeded", - "failed", - "canceled", - "enqueued", - "processing" - ] - }, - { - "name": "indexUids", - "in": "query", - "description": "Permits to filter tasks by their related index. By default, when\n`indexUids` query parameter is not set, the tasks of all the indexes\nare returned. It is possible to specify several indexes by separating\nthem with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [ - "movies", - "theater" - ] - }, - { - "name": "afterEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - }, - { - "name": "beforeEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - }, - { - "name": "afterStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - }, - { - "name": "beforeStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - }, - { - "name": "afterFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - }, - { - "name": "beforeFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - } - ], - "responses": { - "200": { - "description": "Get all tasks", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AllTasks" - }, - "example": { - "results": [ - { - "uid": 144, - "indexUid": "mieli", - "status": "succeeded", - "type": "indexCreation", - "canceledBy": null, - "details": null, - "error": null, - "duration": "PT0.009330S", - "enqueuedAt": "2024-08-08T09:01:13.348471Z", - "startedAt": "2024-08-08T09:01:13.349442Z", - "finishedAt": "2024-08-08T09:01:13.358772Z" - } - ], - "total": 1, - "limit": 1, - "from": 144, - "next": null - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "tasks.get", - "tasks.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks'" - }, - { - "lang": "JS", - "source": "client.tasks.getTasks()" - }, - { - "lang": "PHP", - "source": "$client->getTasks();" - }, - { - "lang": "Python", - "source": "client.get_tasks()" - }, - { - "lang": "Java", - "source": "client.getTasks();" - }, - { - "lang": "Ruby", - "source": "client.tasks" - }, - { - "lang": "Go", - "source": "client.GetTasks(nil);" - }, - { - "lang": "Rust", - "source": "let tasks: TasksResults = client\n .get_tasks()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.getTasks();" - }, - { - "lang": "Swift", - "source": "client.getTasks { (result) in\n switch result {\n case .success(let tasks):\n print(tasks)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - }, - "delete": { - "tags": [ - "Async task management" - ], - "summary": "Delete tasks", - "description": "Delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) on filter", - "operationId": "delete_tasks", - "parameters": [ - { - "name": "uids", - "in": "query", - "description": "Permits to filter tasks by their uid. By default, when the `uids` query\nparameter is not set, all task uids are returned. It's possible to\nspecify several uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 231, - 423, - 598 - ] - }, - { - "name": "batchUids", - "in": "query", - "description": "Lets you filter tasks by their `batchUid`.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 231, - 423, - 598 - ] - }, - { - "name": "canceledBy", - "in": "query", - "description": "Permits to filter tasks using the uid of the task that canceled them.\nIt's possible to specify several task uids by separating them with\nthe `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 374 - ] - }, - { - "name": "types", - "in": "query", - "description": "Permits to filter tasks by their related type. By default, when `types`\nquery parameter is not set, all task types are returned. It's possible\nto specify several types by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Kind" - } - }, - "example": [ - "documentDeletion" - ] - }, - { - "name": "statuses", - "in": "query", - "description": "Permits to filter tasks by their status. By default, when `statuses`\nquery parameter is not set, all task statuses are returned. It's\npossible to specify several statuses by separating them with the `,`\ncharacter.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Status" - } - }, - "example": [ - "succeeded", - "failed", - "canceled" - ] - }, - { - "name": "indexUids", - "in": "query", - "description": "Permits to filter tasks by their related index. By default, when\n`indexUids` query parameter is not set, the tasks of all the indexes\nare returned. It is possible to specify several indexes by separating\nthem with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [ - "movies", - "theater" - ] - }, - { - "name": "afterEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - }, - { - "name": "beforeEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - }, - { - "name": "afterStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - }, - { - "name": "beforeStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - }, - { - "name": "afterFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - }, - { - "name": "beforeFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - } - ], - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "taskDeletion", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "400": { - "description": "A filter is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Query parameters to filter the tasks to delete are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.", - "code": "missing_task_filters", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#missing_task_filters" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "The task uid does not exist", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Task :taskUid not found.", - "code": "task_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors/#task_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "tasks.delete", - "tasks.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/tasks?uids=1,2'" - }, - { - "lang": "JS", - "source": "client.tasks.deleteTasks({ uids: [1, 2] })" - }, - { - "lang": "PHP", - "source": "$client->deleteTasks((new DeleteTasksQuery())->setUids([1, 2]));" - }, - { - "lang": "Python", - "source": "client.delete_tasks({'uids': ['1', '2']})" - }, - { - "lang": "Java", - "source": "DeleteTasksQuery query = new DeleteTasksQuery().setUids(new int[] {1, 2})\nclient.deleteTasks(query);" - }, - { - "lang": "Ruby", - "source": "client.delete_tasks(uids: [1, 2])" - }, - { - "lang": "Go", - "source": "client.DeleteTaks(&meilisearch.DeleteTasksQuery{\n UIDS: []int64{1, 2},\n});" - }, - { - "lang": "C#", - "source": "await client.DeleteTasksAsync(new DeleteTasksQuery { Uids = new List { 1, 2 } });" - }, - { - "lang": "Rust", - "source": "let mut query = tasks::TasksDeleteQuery::new(&client);\nquery.with_uids([1, 2]);\n\nlet res = client.delete_tasks_with(&query).await.unwrap();" - }, - { - "lang": "Dart", - "source": "await client.deleteTasks(params: DeleteTasksQuery(uids: [1, 2]));" - }, - { - "lang": "Swift", - "source": "client.deleteTasks(filter: DeleteTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/tasks/cancel": { - "post": { - "tags": [ - "Async task management" - ], - "summary": "Cancel tasks", - "description": "Cancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", - "operationId": "cancel_tasks", - "parameters": [ - { - "name": "uids", - "in": "query", - "description": "Permits to filter tasks by their uid. By default, when the `uids` query\nparameter is not set, all task uids are returned. It's possible to\nspecify several uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 231, - 423, - 598 - ] - }, - { - "name": "batchUids", - "in": "query", - "description": "Lets you filter tasks by their `batchUid`.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 231, - 423, - 598 - ] - }, - { - "name": "canceledBy", - "in": "query", - "description": "Permits to filter tasks using the uid of the task that canceled them.\nIt's possible to specify several task uids by separating them with\nthe `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 374 - ] - }, - { - "name": "types", - "in": "query", - "description": "Permits to filter tasks by their related type. By default, when `types`\nquery parameter is not set, all task types are returned. It's possible\nto specify several types by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Kind" - } - }, - "example": [ - "documentDeletion" - ] - }, - { - "name": "statuses", - "in": "query", - "description": "Permits to filter tasks by their status. By default, when `statuses`\nquery parameter is not set, all task statuses are returned. It's\npossible to specify several statuses by separating them with the `,`\ncharacter.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Status" - } - }, - "example": [ - "succeeded", - "failed", - "canceled" - ] - }, - { - "name": "indexUids", - "in": "query", - "description": "Permits to filter tasks by their related index. By default, when\n`indexUids` query parameter is not set, the tasks of all the indexes\nare returned. It is possible to specify several indexes by separating\nthem with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [ - "movies", - "theater" - ] - }, - { - "name": "afterEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - }, - { - "name": "beforeEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - }, - { - "name": "afterStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - }, - { - "name": "beforeStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - }, - { - "name": "afterFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - }, - { - "name": "beforeFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": "2024-08-08T16:37:09.971Z" - } - ], - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "taskCancelation", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "400": { - "description": "A filter is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Query parameters to filter the tasks to cancel are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.", - "code": "missing_task_filters", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#missing_task_filters" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "The task uid does not exist", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Task :taskUid not found.", - "code": "task_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors/#task_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "tasks.cancel", - "tasks.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/tasks/cancel?uids=1,2'" - }, - { - "lang": "JS", - "source": "client.tasks.cancelTasks({ uids: [1, 2] })" - }, - { - "lang": "PHP", - "source": "$client->cancelTasks((new CancelTasksQuery())->setUids([1, 2]));" - }, - { - "lang": "Python", - "source": "client.cancel_tasks({'uids': ['1', '2']})" - }, - { - "lang": "Java", - "source": "CancelTasksQuery query = new CancelTasksQuery().setUids(new int[] {1, 2})\nclient.cancelTasks(query);" - }, - { - "lang": "Ruby", - "source": "client.cancel_tasks(uids: [1, 2])" - }, - { - "lang": "Go", - "source": "client.CancelTasks(&meilisearch.CancelTasksQuery{\n UIDS: []int64{1, 2},\n});" - }, - { - "lang": "C#", - "source": "await client.CancelTasksAsync(new CancelTasksQuery { Uids = new List { 1, 2 } });" - }, - { - "lang": "Rust", - "source": "let mut query = tasks::TasksCancelQuery::new(&client);\nquery.with_uids([1, 2]);\n\nlet res = client.cancel_task_with(&query).await.unwrap();" - }, - { - "lang": "Dart", - "source": "await client.cancelTasks(params: CancelTasksQuery(uids: [1, 2]));" - }, - { - "lang": "Swift", - "source": "client.cancelTasks(filter: CancelTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/tasks/{taskUid}": { - "get": { - "tags": [ - "Async task management" - ], - "summary": "Get task", - "description": "Get a [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", - "operationId": "get_task", - "parameters": [ - { - "name": "taskUid", - "in": "path", - "description": "The task identifier", - "required": true, - "schema": { - "type": "string", - "format": "u-int32" - }, - "example": "0" - } - ], - "responses": { - "200": { - "description": "Task successfully retrieved", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TaskView" - }, - "example": { - "uid": 1, - "indexUid": "movies", - "status": "succeeded", - "type": "indexCreation", - "canceledBy": null, - "details": null, - "error": null, - "duration": "PT1S", - "enqueuedAt": "2021-01-01T09:39:00.000000Z", - "startedAt": "2021-01-01T09:39:01.000000Z", - "finishedAt": "2021-01-01T09:39:02.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "The task uid does not exist", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Task :taskUid not found.", - "code": "task_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors/#task_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "tasks.get", - "tasks.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks/1'" - }, - { - "lang": "JS", - "source": "client.tasks.getTask(1)" - }, - { - "lang": "PHP", - "source": "$client->getTask(1);" - }, - { - "lang": "Python", - "source": "client.get_task(1)" - }, - { - "lang": "Java", - "source": "client.getTask(1);" - }, - { - "lang": "Ruby", - "source": "client.task(1)" - }, - { - "lang": "Go", - "source": "client.GetTask(1);" - }, - { - "lang": "Rust", - "source": "let task: Task = client\n .get_task(1)\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.getTask(1);" - }, - { - "lang": "Swift", - "source": "client.getTask(taskUid: 1) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" - } - ] - } - }, - "/version": { - "get": { - "tags": [ - "Version" - ], - "summary": "Get version", - "description": "Current version of Meilisearch.", - "operationId": "get_version", - "responses": { - "200": { - "description": "Instance is healthy", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VersionResponse" - }, - "example": { - "commitSha": "b46889b5f0f2f8b91438a08a358ba8f05fc09fc1", - "commitDate": "2021-07-08", - "pkgVersion": "0.23.0" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "version", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/version'" - }, - { - "lang": "JS", - "source": "client.getVersion()" - }, - { - "lang": "PHP", - "source": "$client->version();" - }, - { - "lang": "Python", - "source": "client.get_version()" - }, - { - "lang": "Java", - "source": "client.getVersion();" - }, - { - "lang": "Ruby", - "source": "client.version" - }, - { - "lang": "Go", - "source": "client.GetVersion()" - }, - { - "lang": "C#", - "source": "await client.GetVersionAsync();" - }, - { - "lang": "Rust", - "source": "let version: Version = client\n .get_version()\n .await\n .unwrap();" - }, - { - "lang": "Dart", - "source": "await client.getVersion();" - }, - { - "lang": "Swift", - "source": "client.version { (result) in\n switch result {\n case .success(let version):\n print(version)\n case .failure(let error):\n print(error)\n }\n}" - } - ] - } - }, - "/webhooks": { - "get": { - "tags": [ - "Webhooks" - ], - "summary": "List webhooks", - "description": "Get the list of all registered webhooks.", - "operationId": "get_webhooks", - "responses": { - "200": { - "description": "Webhooks are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookResults" - }, - "example": { - "results": [ - { - "uuid": "550e8400-e29b-41d4-a716-446655440000", - "url": "https://your.site/on-tasks-completed", - "headers": { - "Authorization": "Bearer a-secret-token" - }, - "isEditable": true - }, - { - "uuid": "550e8400-e29b-41d4-a716-446655440001", - "url": "https://another.site/on-tasks-completed", - "isEditable": true - } - ] - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "webhooks.get", - "webhooks.*", - "*.get", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks'" - }, - { - "lang": "JS", - "source": "client.getWebhooks()" - }, - { - "lang": "Python", - "source": "client.get_webhooks()" - }, - { - "lang": "Go", - "source": "client.ListWebhooks();" - }, - { - "lang": "Rust", - "source": "let webhooks = client.get_webhooks().await.unwrap();" - } - ] - }, - "post": { - "tags": [ - "Webhooks" - ], - "summary": "Create webhook", - "description": "Create a new webhook to receive task notifications.", - "operationId": "post_webhook", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookSettings" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Webhook created successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" - }, - "example": { - "uuid": "550e8400-e29b-41d4-a716-446655440000", - "url": "https://your.site/on-tasks-completed", - "headers": { - "Authorization": "Bearer a-secret-token" - }, - "isEditable": true - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "webhooks.create", - "webhooks.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/webhooks' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"WEBHOOK_TARGET_URL\",\n \"headers\": {\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n }\n }'" - }, - { - "lang": "JS", - "source": "client.createWebhook({\n url: 'WEBHOOK_TARGET_URL',\n headers: {\n authorization: 'SECURITY_KEY',\n referer: 'https://example.com'\n }\n})" - }, - { - "lang": "Python", - "source": "client.create_webhook({\n 'url': 'https://example.com/webhook',\n 'headers': {\"Authorization\":\"\", \"X-Custom-Header\":\"test\"},\n})" - }, - { - "lang": "Go", - "source": "client.AddWebhook(&meilisearch.AddWebhookRequest{\n URL: \"WEBHOOK_TARGET_URL\",\n Headers: map[string]string{\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n },\n});" - }, - { - "lang": "Rust", - "source": "let mut payload = meilisearch_sdk::webhooks::WebhookCreate::new(\"WEBHOOK_TARGET_URL\");\npayload\n .insert_header(\"authorization\", \"SECURITY_KEY\")\n .insert_header(\"referer\", \"https://example.com\");\nlet webhook = client.create_webhook(&payload).await.unwrap();" - } - ] - } - }, - "/webhooks/{uuid}": { - "get": { - "tags": [ - "Webhooks" - ], - "summary": "Get webhook", - "description": "Get a single webhook by its UUID.", - "operationId": "get_webhook", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "The universally unique identifier of the webhook", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Webhook found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" - }, - "example": { - "uuid": "550e8400-e29b-41d4-a716-446655440000", - "url": "https://your.site/on-tasks-completed", - "headers": { - "Authorization": "Bearer a-secret" - }, - "isEditable": true - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - }, - "404": { - "description": "Webhook not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "webhooks.get", - "webhooks.*", - "*.get", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID'" - }, - { - "lang": "JS", - "source": "client.getWebhook(WEBHOOK_UUID)" - }, - { - "lang": "Python", - "source": "client.get_webhook('WEBHOOK_UID')" - }, - { - "lang": "Go", - "source": "client.GetWebhook(\"WEBHOOK_UUID\");" - }, - { - "lang": "Rust", - "source": "let webhook = client.get_webhook(\"WEBHOOK_UUID\").await.unwrap();" - } - ] - }, - "delete": { - "tags": [ - "Webhooks" - ], - "summary": "Delete webhook", - "description": "Delete an existing webhook by its UUID.", - "operationId": "delete_webhook", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "The universally unique identifier of the webhook", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "Webhook deleted successfully" - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - }, - "404": { - "description": "Webhook not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "webhooks.delete", - "webhooks.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID'" - }, - { - "lang": "JS", - "source": "client.deleteWebhook(WEBHOOK_UUID)" - }, - { - "lang": "Python", - "source": "client.delete_webhook('WEBHOOK_UID')" - }, - { - "lang": "Go", - "source": "client.DeleteWebhook(\"WEBHOOK_UUID\");" - }, - { - "lang": "Rust", - "source": "client.delete_webhook(\"WEBHOOK_UUID\").await.unwrap();" - } - ] - }, - "patch": { - "tags": [ - "Webhooks" - ], - "summary": "Update webhook", - "description": "Update an existing webhook's URL or headers.", - "operationId": "patch_webhook", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "The universally unique identifier of the webhook", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Webhook updated successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" - }, - "example": { - "uuid": "550e8400-e29b-41d4-a716-446655440000", - "url": "https://your.site/on-tasks-completed", - "headers": { - "Authorization": "Bearer a-secret-token" - }, - "isEditable": true - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "webhooks.update", - "webhooks.*", - "*" - ] - } - ], - "x-codeSamples": [ - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"header\": {\n \"referer\": null\n }\n }'" - }, - { - "lang": "JS", - "source": "client.updateWebhook(WEBHOOK_UUID, {\n headers: {\n referer: null\n }\n})" - }, - { - "lang": "Python", - "source": "client.update_webhook('WEBHOOK_UID', {\n 'url': 'https://example.com/new-webhook',\n 'headers': {\"Authorization\":\"\", \"X-Custom-Header\":\"test\"},\n})" - }, - { - "lang": "Go", - "source": "client.UpdateWebhook(\"WEBHOOK_UUID\", &meilisearch.UpdateWebhookRequest{\n Header: map[string]string{\n \"referer\": \"\"\n },\n});" - }, - { - "lang": "Rust", - "source": "let mut update = meilisearch_sdk::webhooks::WebhookUpdate::new();\nupdate.remove_header(\"referer\");\nlet webhook = client\n .update_webhook(\"WEBHOOK_UUID\", &update)\n .await\n .unwrap();" - } - ] - } - } - }, - "components": { - "schemas": { - "Action": { - "type": "string", - "enum": [ - "*", - "search", - "documents.*", - "documents.add", - "documents.get", - "documents.delete", - "indexes.*", - "indexes.create", - "indexes.get", - "indexes.update", - "indexes.delete", - "indexes.swap", - "tasks.*", - "tasks.cancel", - "tasks.delete", - "tasks.get", - "settings.*", - "settings.get", - "settings.update", - "stats.*", - "stats.get", - "metrics.*", - "metrics.get", - "dumps.*", - "dumps.create", - "snapshots.*", - "snapshots.create", - "version", - "keys.create", - "keys.get", - "keys.update", - "keys.delete", - "experimental.get", - "experimental.update", - "export", - "network.get", - "network.update", - "chatCompletions", - "chats.*", - "chats.get", - "chats.delete", - "chatsSettings.*", - "chatsSettings.get", - "chatsSettings.update", - "*.get", - "webhooks.get", - "webhooks.update", - "webhooks.delete", - "webhooks.create", - "webhooks.*", - "indexes.compact", - "fields.post" - ] - }, - "AllBatches": { - "type": "object", - "description": "Response containing a paginated list of batches", - "required": [ - "results", - "total", - "limit" - ], - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BatchView" - }, - "description": "Array of batch objects" - }, - "total": { - "type": "integer", - "format": "u-int64", - "description": "Total number of batches", - "minimum": 0 - }, - "limit": { - "type": "integer", - "format": "u-int32", - "description": "Maximum number of batches returned", - "minimum": 0 - }, - "from": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "description": "The first batch uid returned", - "minimum": 0 - }, - "next": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "description": "Value to send in from to fetch the next slice of results", - "minimum": 0 - } - } - }, - "AllTasks": { - "type": "object", - "description": "Response containing a paginated list of tasks", - "required": [ - "results", - "total", - "limit" - ], - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TaskView" - }, - "description": "Array of task objects matching the query" - }, - "total": { - "type": "integer", - "format": "u-int64", - "description": "Total number of tasks matching the query", - "minimum": 0 - }, - "limit": { - "type": "integer", - "format": "u-int32", - "description": "Maximum number of tasks returned", - "minimum": 0 - }, - "from": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "description": "The first task uid returned", - "minimum": 0 - }, - "next": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "description": "Value to send in from to fetch the next slice of results. Null when all data has been browsed", - "minimum": 0 - } - } - }, - "AttributePatterns": { - "type": "object", - "description": "A collection of patterns used to match attribute names. Patterns can\ninclude wildcards (`*`) for flexible matching. For example, `title`\nmatches exactly, `overview_*` matches any attribute starting with\n`overview_`, and `*_date` matches any attribute ending with `_date`.", - "required": [ - "patterns" - ], - "properties": { - "patterns": { - "type": "array", - "items": { - "type": "string" - }, - "description": "An array of attribute name patterns. Each pattern can be an exact\nattribute name, or include wildcards (`*`) at the start, end, or\nboth. Examples: `[\"title\", \"description_*\", \"*_date\", \"*content*\"]`.", - "example": [ - "title", - "overview_*", - "release_date" - ] - } - } - }, - "BatchStats": { - "type": "object", - "description": "Statistics for a batch of tasks", - "required": [ - "totalNbTasks", - "status", - "types", - "indexUids" - ], - "properties": { - "totalNbTasks": { - "$ref": "#/components/schemas/u32", - "description": "Total number of tasks in the batch" - }, - "status": { - "type": "object", - "description": "Count of tasks by status", - "additionalProperties": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "propertyNames": { - "type": "string", - "description": "The status of a task.", - "enum": [ - "enqueued", - "processing", - "succeeded", - "failed", - "canceled" - ], - "example": "processing" - } - }, - "types": { - "type": "object", - "description": "Count of tasks by type", - "additionalProperties": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "propertyNames": { - "type": "string", - "description": "The type of the task.", - "enum": [ - "documentAdditionOrUpdate", - "documentEdition", - "documentDeletion", - "settingsUpdate", - "indexCreation", - "indexDeletion", - "indexUpdate", - "indexSwap", - "taskCancelation", - "taskDeletion", - "dumpCreation", - "snapshotCreation", - "export", - "upgradeDatabase", - "indexCompaction", - "networkTopologyChange" - ], - "example": "documentAdditionOrUpdate" - } - }, - "indexUids": { - "type": "object", - "description": "Count of tasks by index UID", - "additionalProperties": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "propertyNames": { - "type": "string" - } - }, - "progressTrace": { - "type": "object", - "description": "Detailed progress trace information", - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - }, - "writeChannelCongestion": { - "type": [ - "object", - "null" - ], - "description": "Write channel congestion metrics", - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - }, - "internalDatabaseSizes": { - "type": "object", - "description": "Internal database size information", - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - } - } - }, - "BatchStatsView": { - "allOf": [ - { - "$ref": "#/components/schemas/BatchStats", - "description": "Core batch statistics including the total number of tasks, counts by\nstatus (succeeded, failed, canceled), task types included, and which\nindexes were affected by this batch." - }, - { - "type": "object", - "properties": { - "embedderRequests": { - "$ref": "#/components/schemas/EmbedderStatsView", - "description": "Statistics about AI embedder API requests made during batch processing.\nIncludes total requests, successful/failed counts, and response times.\nOnly present when the batch involved vector embedding operations." - } - } - } - ], - "description": "Provides comprehensive statistics about a batch's execution.\n\nIncludes task counts, status breakdowns, and AI embedder usage. This\ninformation is useful for monitoring system performance and understanding\nbatch composition." - }, - "BatchView": { - "type": "object", - "description": "Represents a batch of tasks that were processed together.\n\nMeilisearch groups compatible tasks into batches for efficient processing.\nFor example, multiple document additions to the same index may be batched\ntogether. Use this view to monitor batch progress and performance.", - "required": [ - "uid", - "details", - "stats" - ], - "properties": { - "uid": { - "$ref": "#/components/schemas/u32", - "description": "The unique sequential identifier assigned to this batch. Batch UIDs\nare assigned in order of creation and can be used to retrieve specific\nbatch information or correlate tasks that were processed together." - }, - "progress": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ProgressView", - "description": "Real-time progress information for the batch if it's currently being\nprocessed. Contains details about which step is executing and the\npercentage of completion. This is `null` for completed batches." - } - ] - }, - "details": { - "type": "object", - "description": "Aggregated details from all tasks in this batch. For example, if the\nbatch contains multiple document addition tasks, this will show the\ntotal number of documents received and indexed across all tasks." - }, - "stats": { - "$ref": "#/components/schemas/BatchStatsView", - "description": "Statistical information about the batch, including the number of tasks\nby status, the types of tasks included, and the indexes affected.\nUseful for understanding the composition and outcome of the batch." - }, - "duration": { - "type": [ - "string", - "null" - ], - "description": "The total time spent processing this batch, formatted as an ISO-8601\nduration (e.g., `PT2.5S` for 2.5 seconds). This is `null` for batches\nthat haven't finished processing yet." - }, - "startedAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp when Meilisearch began processing this batch, formatted\nas an RFC 3339 date-time string. All batches have a start time as it's\nset when processing begins." - }, - "finishedAt": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "The timestamp when this batch finished processing, formatted as an\nRFC 3339 date-time string. This is `null` for batches that are still\nbeing processed." - }, - "batchStrategy": { - "type": "string", - "description": "Explains why the batch was finalized and stopped accepting more tasks.\nCommon reasons include reaching the maximum batch size, encountering\nincompatible tasks, or processing being explicitly triggered." - } - } - }, - "BrowseQuery": { - "type": "object", - "description": "Request body for browsing and retrieving documents from an index. Use\nthis to fetch documents with optional filtering, sorting, and pagination.\nThis is useful for displaying document lists, exporting data, or\ninspecting index contents.", - "required": [ - "offset", - "limit", - "retrieveVectors" - ], - "properties": { - "offset": { - "type": "integer", - "description": "Number of documents to skip in the response. Use together with `limit`\nfor pagination through large document sets. For example, to get\ndocuments 151-170, set `offset=150` and `limit=20`. Defaults to `0`.", - "example": 150, - "minimum": 0 - }, - "limit": { - "type": "integer", - "description": "Maximum number of documents to return in a single response. Use\ntogether with `offset` for pagination. Higher values return more\nresults but may increase response time and memory usage. Defaults to\n`20`.", - "default": 20, - "example": 1, - "minimum": 0 - }, - "fields": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Array of document attributes to include in the response. If not\nspecified, all attributes listed in the `displayedAttributes` setting\nare returned. Use this to reduce response size by only requesting the\nfields you need. Example: `[\"title\", \"description\", \"price\"]`.", - "example": [ - "title, description" - ] - }, - "retrieveVectors": { - "type": "boolean", - "description": "When `true`, includes the vector embeddings in the response for\ndocuments that have them. This is useful when you need to inspect or\nexport vector data. Note that this can significantly increase response\nsize. Defaults to `false`.", - "example": true - }, - "ids": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Array of specific document IDs to retrieve. Only documents with\nmatching primary key values will be returned. If not specified, all\ndocuments matching other criteria are returned. This is useful for\nfetching specific known documents.", - "example": [ - "cody", - "finn", - "brandy", - "gambit" - ] - }, - "filter": { - "description": "Filter expression to select which documents to return. Uses the same\nsyntax as search filters. Only documents matching the filter will be\nincluded in the response. Example: `\"genres = action AND rating > 4\"`\nor as an array `[[\"genres = action\"], \"rating > 4\"]`." - }, - "sort": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Array of attributes to sort the documents by. Each entry should be in\nthe format `attribute:direction` where direction is either `asc`\n(ascending) or `desc` (descending). Example: `[\"price:asc\",\n\"rating:desc\"]` sorts by price ascending, then by rating descending.", - "example": [ - "title:asc", - "rating:desc" - ] - } - } - }, - "ChatSearchParams": { - "type": "object", - "description": "Search parameters that control how the LLM queries this index.\n\nThese settings are applied automatically when the chat system\nperforms searches.", - "properties": { - "hybrid": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/HybridQuery", - "description": "Configuration for hybrid search combining keyword and semantic search.\nSet the `semanticRatio` to balance between keyword matching (0.0) and\nsemantic similarity (1.0). Requires an embedder to be configured." - } - ] - }, - "limit": { - "type": [ - "integer", - "null" - ], - "description": "Maximum number of documents to return when the LLM queries this index.\nHigher values provide more context to the LLM but may increase\nresponse time and token usage.", - "minimum": 0 - }, - "sort": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Sort criteria for ordering search results before presenting to the LLM.\nEach entry should be in the format `attribute:asc` or `attribute:desc`.\nExample: `[\"price:asc\", \"rating:desc\"]`." - }, - "distinct": { - "type": [ - "string", - "null" - ], - "description": "The attribute used for deduplicating results. When set, only one\ndocument per unique value of this attribute is returned. Useful for\navoiding duplicate content in LLM responses." - }, - "matchingStrategy": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/MatchingStrategy", - "description": "Strategy for matching query terms. `last` (default) matches all words\nand returns documents matching at least the last word. `all` requires\nall words to match. `frequency` prioritizes less frequent words." - } - ] - }, - "attributesToSearchOn": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Restricts the search to only the specified attributes. If not set, all\nsearchable attributes are searched.\nExample: `[\"title\", \"description\"]` searches only these two fields." - }, - "rankingScoreThreshold": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/RankingScoreThreshold", - "description": "Minimum ranking score (0.0 to 1.0) that documents must achieve to be\nincluded in results. Documents below this threshold are excluded.\nUseful for filtering out low-relevance results." - } - ] - } - }, - "additionalProperties": false - }, - "ChatSettings": { - "type": "object", - "description": "Configuration settings for AI-powered chat and search functionality.\n\nThese settings control how documents are presented to the LLM and what\nsearch parameters are used when the LLM queries the index.", - "properties": { - "description": { - "type": [ - "string", - "null" - ], - "description": "A description of this index that helps the LLM understand its contents\nand purpose. This description is provided to the LLM to help it decide\nwhen and how to query this index.\nExample: \"Contains product catalog with prices and descriptions\"." - }, - "documentTemplate": { - "type": [ - "string", - "null" - ], - "description": "A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text." - }, - "documentTemplateMaxBytes": { - "type": [ - "integer", - "null" - ], - "description": "Maximum size in bytes for the rendered document text. Texts longer than\nthis limit are truncated. This prevents very large documents from\nconsuming too much context in the LLM conversation.\nDefaults to `400` bytes.", - "minimum": 0 - }, - "searchParameters": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ChatSearchParams", - "description": "Default search parameters used when the LLM queries this index.\nThese settings control how search results are retrieved and ranked.\nIf not specified, standard search defaults are used." - } - ] - } - }, - "additionalProperties": false - }, - "Code": { - "type": "string", - "enum": [ - "api_key_already_exists", - "api_key_not_found", - "bad_parameter", - "bad_request", - "database_size_limit_reached", - "document_not_found", - "dump_already_processing", - "dump_not_found", - "dump_process_failed", - "duplicate_index_found", - "immutable_api_key_actions", - "immutable_api_key_created_at", - "immutable_api_key_expires_at", - "immutable_api_key_indexes", - "immutable_api_key_key", - "immutable_api_key_uid", - "immutable_api_key_updated_at", - "immutable_index_created_at", - "immutable_index_updated_at", - "import_task_already_received", - "import_task_unknown_remote", - "import_task_without_network_task", - "index_already_exists", - "index_creation_failed", - "index_not_found", - "index_primary_key_already_exists", - "index_primary_key_multiple_candidates_found", - "index_primary_key_no_candidate_found", - "internal", - "invalid_api_key", - "invalid_api_key_actions", - "invalid_api_key_description", - "invalid_api_key_expires_at", - "invalid_api_key_indexes", - "invalid_api_key_limit", - "invalid_api_key_name", - "invalid_api_key_offset", - "invalid_api_key_uid", - "invalid_content_type", - "invalid_document_csv_delimiter", - "invalid_document_fields", - "invalid_document_retrieve_vectors", - "missing_document_filter", - "missing_document_edition_function", - "inconsistent_document_change_headers", - "invalid_document_filter", - "invalid_document_sort", - "invalid_document_geo_field", - "invalid_document_geojson_field", - "invalid_header_value", - "invalid_vector_dimensions", - "invalid_vectors_type", - "invalid_document_id", - "invalid_document_ids", - "invalid_document_limit", - "invalid_document_offset", - "invalid_search_embedder", - "invalid_similar_embedder", - "invalid_search_hybrid_query", - "invalid_index_limit", - "invalid_index_offset", - "invalid_index_primary_key", - "invalid_index_custom_metadata", - "invalid_skip_creation", - "invalid_index_uid", - "invalid_multi_search_facets", - "invalid_multi_search_facets_by_index", - "invalid_multi_search_facet_order", - "invalid_multi_search_query_personalization", - "invalid_multi_search_query_show_performance_details", - "invalid_multi_search_federated", - "invalid_multi_search_federation_options", - "invalid_multi_search_max_values_per_facet", - "invalid_multi_search_merge_facets", - "invalid_multi_search_query_facets", - "invalid_multi_search_query_pagination", - "invalid_multi_search_query_ranking_rules", - "invalid_multi_search_query_position", - "invalid_multi_search_remote", - "invalid_multi_search_weight", - "invalid_network_leader", - "invalid_network_remotes", - "invalid_network_self", - "invalid_network_search_api_key", - "invalid_network_write_api_key", - "invalid_network_url", - "invalid_search_attributes_to_search_on", - "invalid_search_attributes_to_crop", - "invalid_search_attributes_to_highlight", - "invalid_similar_attributes_to_retrieve", - "invalid_similar_retrieve_vectors", - "invalid_search_attributes_to_retrieve", - "invalid_search_ranking_score_threshold", - "invalid_similar_ranking_score_threshold", - "invalid_search_retrieve_vectors", - "invalid_search_crop_length", - "invalid_search_crop_marker", - "invalid_search_facets", - "invalid_search_semantic_ratio", - "invalid_search_locales", - "invalid_facet_search_exhaustive_facet_count", - "invalid_facet_search_facet_name", - "invalid_similar_id", - "invalid_search_filter", - "invalid_similar_filter", - "invalid_search_highlight_post_tag", - "invalid_search_highlight_pre_tag", - "invalid_search_hits_per_page", - "invalid_similar_limit", - "invalid_search_limit", - "invalid_search_matching_strategy", - "invalid_similar_offset", - "invalid_search_offset", - "invalid_search_page", - "invalid_search_q", - "invalid_facet_search_query", - "invalid_facet_search_name", - "facet_search_disabled", - "invalid_search_vector", - "invalid_search_media", - "invalid_search_show_matches_position", - "invalid_search_show_ranking_score", - "invalid_similar_show_ranking_score", - "invalid_search_show_ranking_score_details", - "invalid_search_show_performance_details", - "invalid_search_use_network", - "invalid_similar_show_ranking_score_details", - "invalid_similar_show_performance_details", - "invalid_search_sort", - "invalid_search_distinct", - "invalid_search_personalize", - "invalid_search_personalize_user_context", - "invalid_search_media_and_vector", - "invalid_settings_displayed_attributes", - "invalid_settings_distinct_attribute", - "invalid_settings_proximity_precision", - "invalid_settings_facet_search", - "invalid_settings_prefix_search", - "invalid_settings_faceting", - "invalid_settings_filterable_attributes", - "invalid_settings_pagination", - "invalid_settings_search_cutoff_ms", - "invalid_settings_embedders", - "invalid_settings_ranking_rules", - "invalid_settings_searchable_attributes", - "invalid_settings_sortable_attributes", - "invalid_settings_stop_words", - "invalid_settings_non_separator_tokens", - "invalid_settings_separator_tokens", - "invalid_settings_dictionary", - "invalid_settings_synonyms", - "invalid_settings_typo_tolerance", - "invalid_settings_localized_attributes", - "invalid_state", - "invalid_store_file", - "invalid_swap_duplicate_index_found", - "invalid_swap_indexes", - "invalid_swap_rename", - "invalid_task_after_enqueued_at", - "invalid_task_after_finished_at", - "invalid_task_after_started_at", - "invalid_task_before_enqueued_at", - "invalid_task_before_finished_at", - "invalid_task_before_started_at", - "invalid_task_canceled_by", - "invalid_task_from", - "invalid_task_limit", - "invalid_task_reverse", - "invalid_task_statuses", - "invalid_task_types", - "invalid_task_uids", - "invalid_batch_uids", - "io_error", - "feature_not_enabled", - "malformed_payload", - "max_fields_limit_exceeded", - "missing_api_key_actions", - "missing_api_key_expires_at", - "missing_api_key_indexes", - "missing_authorization_header", - "missing_content_type", - "missing_document_id", - "missing_facet_search_facet_name", - "missing_index_uid", - "missing_master_key", - "missing_network_url", - "missing_payload", - "missing_search_hybrid", - "missing_swap_indexes", - "missing_task_filters", - "network_version_mismatch", - "no_space_left_on_device", - "not_leader", - "payload_too_large", - "remote_bad_response", - "remote_bad_request", - "remote_could_not_send_request", - "remote_invalid_api_key", - "remote_remote_error", - "remote_timeout", - "too_many_search_requests", - "task_not_found", - "task_file_not_found", - "batch_not_found", - "too_many_open_files", - "too_many_vectors", - "unexpected_network_previous_remotes", - "network_version_too_old", - "unprocessed_network_task", - "unretrievable_document", - "unretrievable_error_code", - "unsupported_media_type", - "invalid_s3_snapshot_request", - "invalid_s3_snapshot_parameters", - "s3_snapshot_server_error", - "vector_embedding_error", - "not_found_similar_id", - "invalid_document_edition_context", - "invalid_document_edition_function_filter", - "edit_documents_by_function_error", - "invalid_settings_index_chat", - "invalid_settings_vector_store", - "invalid_export_url", - "invalid_export_api_key", - "invalid_export_payload_size", - "invalid_export_indexes_patterns", - "invalid_export_index_filter", - "invalid_export_index_override_settings", - "unimplemented_external_function_calling", - "unimplemented_non_streaming_chat_completions", - "unimplemented_multi_choice_chat_completions", - "chat_not_found", - "invalid_chat_setting_document_template", - "invalid_chat_completion_org_id", - "invalid_chat_completion_project_id", - "invalid_chat_completion_api_version", - "invalid_chat_completion_deployment_id", - "invalid_chat_completion_source", - "invalid_chat_completion_base_api", - "invalid_chat_completion_api_key", - "invalid_chat_completion_prompts", - "invalid_chat_completion_system_prompt", - "invalid_chat_completion_search_description_prompt", - "invalid_chat_completion_search_query_param_prompt", - "invalid_chat_completion_search_filter_param_prompt", - "invalid_chat_completion_search_index_uid_param_prompt", - "invalid_chat_completion_pre_query_prompt", - "invalid_index_fields_filter", - "invalid_index_fields_filter_attribute_patterns", - "invalid_index_fields_filter_displayed", - "invalid_index_fields_filter_searchable", - "invalid_index_fields_filter_sortable", - "invalid_index_fields_filter_distinct", - "invalid_index_fields_filter_ranking_rule", - "invalid_index_fields_filter_filterable", - "requires_enterprise_edition", - "invalid_webhooks", - "invalid_webhook_url", - "invalid_webhook_headers", - "immutable_webhook", - "invalid_webhook_uuid", - "webhook_not_found", - "immutable_webhook_uuid", - "immutable_webhook_is_editable" - ] - }, - "ComputedFacets": { - "type": "object", - "description": "Computed facet data from a search", - "required": [ - "distribution", - "stats" - ], - "properties": { - "distribution": { - "type": "object", - "description": "Count of documents for each facet value", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - }, - "propertyNames": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - } - }, - "stats": { - "type": "object", - "description": "Numeric statistics for each facet", - "additionalProperties": { - "$ref": "#/components/schemas/FacetStats" - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "CreateApiKey": { - "type": "object", - "required": [ - "actions", - "indexes" - ], - "properties": { - "description": { - "type": [ - "string", - "null" - ], - "description": "A description for the key. `null` if empty.", - "example": null - }, - "name": { - "type": [ - "string", - "null" - ], - "description": "A human-readable name for the key. `null` if empty.", - "example": "Indexing Products API key" - }, - "uid": { - "type": [ - "string", - "null" - ], - "description": "A uuid v4 to identify the API Key. If not specified, it's generated by Meilisearch.", - "example": "01b4bc42-eb33-4041-b481-254d00cce834" - }, - "actions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Action" - }, - "description": "A list of actions permitted for the key. `[\"*\"]` for all actions. The\n`*` character can be used as a wildcard when located at the last\nposition. e.g. `documents.*` to authorize access on all documents\nendpoints.", - "example": [ - "documents.add" - ] - }, - "indexes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of accessible indexes permitted for the key. `[\"*\"]` for all\nindexes. The `*` character can be used as a wildcard when located at\nthe last position. e.g. `products_*` to allow access to all indexes\nwhose names start with `products_`.", - "example": [ - "products" - ] - }, - "expiresAt": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Represent the expiration date and time as RFC 3339 format. `null`\nequals to no expiration time." - } - } - }, - "DbTaskNetwork": { - "oneOf": [ - { - "type": "object", - "description": "Tasks that were duplicated from `origin`", - "required": [ - "origin" - ], - "properties": { - "origin": { - "$ref": "#/components/schemas/Origin" - } - } - }, - { - "type": "object", - "description": "Tasks that were duplicated as `remote_tasks`", - "required": [ - "remote_tasks" - ], - "properties": { - "remote_tasks": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/RemoteTask" - }, - "propertyNames": { - "type": "string" - } - }, - "network_version": { - "type": "string", - "format": "uuid" - } - } - }, - { - "type": "object", - "description": "Document import tasks sent in the context of `network_change`", - "required": [ - "import_from", - "network_change" - ], - "properties": { - "import_from": { - "$ref": "#/components/schemas/ImportData" - }, - "network_change": { - "$ref": "#/components/schemas/Origin" - } - } - } - ] - }, - "DetailsExportIndexSettings": { - "allOf": [ - { - "$ref": "#/components/schemas/ExportIndexSettings" - }, - { - "type": "object", - "properties": { - "matchedDocuments": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "minimum": 0 - } - } - } - ] - }, - "DetailsView": { - "allOf": [ - { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/Settings_Unchecked", - "description": "The complete settings object that was applied by a `settingsUpdate`\ntask. Only the settings that were modified are included in this\nobject." - } - ] - }, - { - "type": "object", - "properties": { - "receivedDocuments": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "The number of documents that were sent in the request payload for a\n`documentAdditionOrUpdate` task. This count is determined before any\nprocessing occurs.", - "minimum": 0 - }, - "indexedDocuments": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "The number of documents that were successfully indexed after\nprocessing a `documentAdditionOrUpdate` task. This may differ from\n`receivedDocuments` if some documents were invalid or duplicates.\nThe inner `null` indicates the task is still processing.", - "minimum": 0 - }, - "editedDocuments": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "The number of documents that were modified by an `documentEdition`\ntask using a RHAI function. The inner `null` indicates the task is\nstill processing.", - "minimum": 0 - }, - "primaryKey": { - "type": [ - "string", - "null" - ], - "description": "The primary key attribute set for the index. For `indexCreation`\ntasks, this is the primary key that was specified. For `indexUpdate`\ntasks, this shows the new primary key if it was changed. The inner\n`null` means no primary key was specified and Meilisearch will infer\nit from documents." - }, - "providedIds": { - "type": [ - "integer", - "null" - ], - "description": "The number of document IDs that were provided in a `documentDeletion`\nrequest. This is the count before processing - the actual number\ndeleted may be lower if some IDs didn't exist.", - "minimum": 0 - }, - "deletedDocuments": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "The number of documents that were actually removed from the index for\n`documentDeletion`, `documentDeletionByFilter`, or `indexDeletion`\ntasks. The inner `null` indicates the task is still processing.", - "minimum": 0 - }, - "matchedTasks": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "The number of tasks that matched the filter criteria for a\n`taskCancelation` or `taskDeletion` request. This is determined when\nthe request is received, before any cancellation or deletion occurs.", - "minimum": 0 - }, - "canceledTasks": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "The number of tasks that were successfully canceled by a\n`taskCancelation` task. This may be less than `matchedTasks` if some\ntasks completed before they could be canceled. The inner `null`\nindicates the task is still processing.", - "minimum": 0 - }, - "deletedTasks": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "The number of tasks that were successfully deleted by a `taskDeletion`\ntask. The inner `null` indicates the task is still processing.", - "minimum": 0 - }, - "originalFilter": { - "type": [ - "string", - "null" - ], - "description": "The original filter query string that was used to select tasks for a\n`taskCancelation` or `taskDeletion` operation. Useful for\nunderstanding which tasks were targeted." - }, - "dumpUid": { - "type": [ - "string", - "null" - ], - "description": "The unique identifier assigned to the dump file created by a\n`dumpCreation` task. Use this UID to locate the dump file in the\ndumps directory. The inner `null` indicates the task is still\nprocessing or failed before generating a UID." - }, - "context": { - "type": [ - "object", - "null" - ], - "description": "The context object that was provided to the RHAI function for a\n`documentEdition` task. This object contains data that the function\ncan access during document processing." - }, - "function": { - "type": [ - "string", - "null" - ], - "description": "The RHAI function code that was executed for a `documentEdition`\ntask. This function is applied to each document matching the filter." - }, - "swaps": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/IndexSwap" - }, - "description": "The list of index swap operations that were performed by an\n`indexSwap` task. Each swap specifies two indexes that exchanged\ntheir contents." - }, - "upgradeFrom": { - "type": [ - "string", - "null" - ], - "description": "The Meilisearch version before a database upgrade was performed.\nFormatted as `vX.Y.Z`." - }, - "upgradeTo": { - "type": [ - "string", - "null" - ], - "description": "The Meilisearch version after a database upgrade was completed.\nFormatted as `vX.Y.Z`." - }, - "url": { - "type": [ - "string", - "null" - ], - "description": "The destination URL where data is being exported for an `export`\ntask. This is the endpoint that receives the exported index data." - }, - "apiKey": { - "type": [ - "string", - "null" - ], - "description": "The API key used for authentication when exporting data to a remote\nMeilisearch instance. This value is partially masked for security." - }, - "payloadSize": { - "type": [ - "string", - "null" - ], - "description": "The maximum payload size configured for an `export` task, formatted\nas a human-readable string (e.g., `100 MB`). This limits the size of\neach batch of documents sent during export." - }, - "indexes": { - "type": [ - "object", - "null" - ], - "description": "A map of index patterns to their export settings for an `export`\ntask. The keys are index patterns (which may include wildcards) and\nthe values contain the specific export configuration for matching\nindexes.", - "additionalProperties": { - "$ref": "#/components/schemas/DetailsExportIndexSettings" - }, - "propertyNames": { - "type": "string" - } - }, - "oldIndexUid": { - "type": [ - "string", - "null" - ], - "description": "The original unique identifier of the index before an `indexRename`\noperation. This is the name the index had before it was renamed." - }, - "newIndexUid": { - "type": [ - "string", - "null" - ], - "description": "The new unique identifier assigned to the index after an `indexRename`\noperation. This is the name the index has after being renamed." - }, - "preCompactionSize": { - "type": [ - "string", - "null" - ], - "description": "The size of the index before an `indexCompaction` task was performed,\nformatted as a human-readable string (e.g., `1.5 GB`). Compare with\n`postCompactionSize` to see how much space was reclaimed." - }, - "postCompactionSize": { - "type": [ - "string", - "null" - ], - "description": "The size of the index after an `indexCompaction` task completed,\nformatted as a human-readable string (e.g., `1.2 GB`). This should\nbe smaller than or equal to `preCompactionSize`." - }, - "movedDocuments": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "The number of documents that were redistributed during a\n`networkTopologyChange` task in a distributed deployment. This\noccurs when the cluster configuration changes.", - "minimum": 0 - }, - "message": { - "type": [ - "string", - "null" - ], - "description": "A human-readable message providing additional information about the\ntask, such as status updates or explanatory text about what occurred\nduring processing." - } - } - } - ], - "description": "Contains type-specific details about a task's execution.\n\nThe fields present depend on the task type. For example, document addition\ntasks will have `receivedDocuments` and `indexedDocuments`, while settings\nupdate tasks will have the applied settings." - }, - "DistributionShift": { - "type": "object", - "description": "Describes the mean and sigma of distribution of embedding similarity in the embedding space.\n\nThe intended use is to make the similarity score more comparable to the regular ranking score.\nThis allows to correct effects where results are too \"packed\" around a certain value.", - "required": [ - "current_mean", - "current_sigma" - ], - "properties": { - "current_mean": { - "type": "number", - "format": "float", - "description": "Value where the results are \"packed\".\n\nSimilarity scores are translated so that they are packed around 0.5 instead" - }, - "current_sigma": { - "type": "number", - "format": "float", - "description": "standard deviation of a similarity score.\n\nSet below 0.4 to make the results less packed around the mean, and above 0.4 to make them more packed." - } - } - }, - "DocumentDeletionByFilter": { - "type": "object", - "description": "Request body for deleting documents by filter", - "required": [ - "filter" - ], - "properties": { - "filter": { - "description": "Filter expression to match documents for deletion" - } - } - }, - "DocumentEditionByFunction": { - "type": "object", - "description": "Request body for editing documents using a JavaScript function", - "required": [ - "function" - ], - "properties": { - "filter": { - "description": "Filter expression to select which documents to edit" - }, - "context": { - "description": "Data to make available for the editing function" - }, - "function": { - "type": "string", - "description": "RHAI function to apply to each document" - } - } - }, - "EmbedderSource": { - "type": "string", - "enum": [ - "openAi", - "huggingFace", - "ollama", - "userProvided", - "rest", - "composite" - ] - }, - "EmbedderStatsView": { - "type": "object", - "description": "Statistics for embedder requests", - "required": [ - "total", - "failed" - ], - "properties": { - "total": { - "type": "integer", - "description": "Total number of embedder requests", - "minimum": 0 - }, - "failed": { - "type": "integer", - "description": "Number of failed embedder requests", - "minimum": 0 - }, - "lastError": { - "type": [ - "string", - "null" - ], - "description": "Last error message from the embedder" - } - } - }, - "ErrorType": { - "type": "string", - "enum": [ - "internal", - "invalid_request", - "auth", - "system" - ] - }, - "Export": { - "type": "object", - "description": "Request body for exporting data to a remote Meilisearch instance", - "properties": { - "url": { - "type": [ - "string", - "null" - ], - "description": "URL of the destination Meilisearch instance", - "example": "https://ms-1234.heaven.meilisearch.com" - }, - "apiKey": { - "type": [ - "string", - "null" - ], - "description": "API key for authenticating with the destination instance", - "example": "1234abcd" - }, - "payloadSize": { - "type": [ - "string", - "null" - ], - "description": "Maximum payload size per request", - "example": "24MiB" - }, - "indexes": { - "type": [ - "object", - "null" - ], - "description": "Index patterns to export with their settings", - "additionalProperties": { - "$ref": "#/components/schemas/ExportIndexSettings" - }, - "propertyNames": { - "type": "string" - }, - "example": { - "*": { - "filter": null - } - } - } - } - }, - "ExportIndexSettings": { - "type": "object", - "description": "Export settings for a specific index", - "properties": { - "filter": { - "type": [ - "string", - "null" - ], - "description": "Filter expression to select which documents to export", - "example": "genres = action" - }, - "overrideSettings": { - "type": [ - "boolean", - "null" - ], - "description": "Whether to override settings on the destination index", - "example": true - } - } - }, - "FacetSearchQuery": { - "type": "object", - "description": "Request body for searching facet values", - "required": [ - "facet_name", - "matching_strategy" - ], - "properties": { - "facet_query": { - "type": [ - "string", - "null" - ], - "description": "Query string to search for facet values" - }, - "facet_name": { - "type": "string", - "description": "Name of the facet to search" - }, - "q": { - "type": [ - "string", - "null" - ], - "description": "Query string to filter documents before facet search" - }, - "vector": { - "type": [ - "array", - "null" - ], - "items": { - "type": "number", - "format": "float" - }, - "description": "Custom query vector for semantic search" - }, - "media": { - "description": "Multimodal content for AI-powered search" - }, - "hybrid": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/HybridQuery", - "description": "Hybrid search configuration that combines keyword search with semantic\n(vector) search. Set `semanticRatio` to balance between keyword\nmatching (0.0) and semantic similarity (1.0). Requires an embedder to\nbe configured in the index settings." - } - ] - }, - "filter": { - "description": "Filter expression to apply before facet search" - }, - "matching_strategy": { - "$ref": "#/components/schemas/MatchingStrategy", - "description": "Strategy used to match query terms" - }, - "attributes_to_search_on": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Restrict search to specified attributes" - }, - "ranking_score_threshold": { - "type": [ - "number", - "null" - ], - "format": "double", - "description": "Minimum ranking score threshold (0.0 to 1.0) that documents must\nachieve to be considered when computing facet counts. Documents with\nscores below this threshold are excluded from facet value counts." - }, - "locales": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/Locale" - }, - "description": "Languages to use for query processing" - }, - "exhaustive_facet_count": { - "type": [ - "boolean", - "null" - ], - "description": "Return exhaustive facet count instead of an estimate" - } - } - }, - "FacetStats": { - "type": "object", - "description": "The numeric min and max values for a facet", - "required": [ - "min", - "max" - ], - "properties": { - "min": { - "type": "number", - "format": "double", - "description": "Minimum value of the numeric facet" - }, - "max": { - "type": "number", - "format": "double", - "description": "Maximum value of the numeric facet" - } - } - }, - "FacetValuesSort": { - "type": "string", - "enum": [ - "alpha", - "count" - ] - }, - "FacetingSettings": { - "type": "object", - "description": "Faceting configuration settings", - "properties": { - "maxValuesPerFacet": { - "type": [ - "integer", - "null" - ], - "description": "Maximum number of facet values returned for each facet", - "example": 10, - "minimum": 0 - }, - "sortFacetValuesBy": { - "type": [ - "object", - "null" - ], - "description": "How facet values should be sorted (by count or alphabetically)", - "additionalProperties": { - "$ref": "#/components/schemas/FacetValuesSort" - }, - "propertyNames": { - "type": "string" - }, - "example": { - "genre": "count" - } - } - }, - "additionalProperties": false - }, - "FederatedFacets": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ComputedFacets" - }, - "propertyNames": { - "type": "string" - } - }, - "FederatedSearch": { - "type": "object", - "description": "Request body for federated multi-search across multiple indexes. This\nallows you to execute multiple search queries in a single request and\noptionally combine their results into a unified response. Use this for\ncross-index search scenarios or to reduce network round-trips.", - "required": [ - "queries" - ], - "properties": { - "queries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SearchQueryWithIndex" - }, - "description": "An array of search queries to execute. Each query can target a\ndifferent index and have its own parameters. When `federation` is\n`null`, results are returned separately for each query. When\n`federation` is set, results are merged." - }, - "federation": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/Federation", - "description": "Configuration for combining results from multiple queries into a\nsingle response. When set, results are merged and ranked together.\nWhen `null`, each query's results are returned separately in an\narray." - } - ] - } - } - }, - "FederatedSearchResult": { - "allOf": [ - { - "$ref": "#/components/schemas/HitsInfo", - "description": "Pagination information" - }, - { - "type": "object", - "required": [ - "hits", - "processingTimeMs" - ], - "properties": { - "hits": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SearchHit" - }, - "description": "Combined search results from all queries" - }, - "queryVectors": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "$ref": "#/components/schemas/Vec" - }, - "propertyNames": { - "type": "integer", - "minimum": 0 - } - }, - "processingTimeMs": { - "type": "integer", - "description": "Total processing time in milliseconds", - "minimum": 0 - }, - "facetDistribution": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - }, - "propertyNames": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - } - }, - "facetStats": { - "type": [ - "object", - "null" - ], - "description": "Merged facet statistics across all indexes", - "additionalProperties": { - "$ref": "#/components/schemas/FacetStats" - }, - "propertyNames": { - "type": "string" - } - }, - "facetsByIndex": { - "$ref": "#/components/schemas/FederatedFacets", - "description": "Facets grouped by index" - }, - "requestUid": { - "type": [ - "string", - "null" - ], - "format": "uuid", - "description": "Unique identifier for the request" - }, - "metadata": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/SearchMetadata" - }, - "description": "Metadata for each query" - }, - "remoteErrors": { - "type": [ - "object", - "null" - ], - "description": "Errors from remote servers", - "additionalProperties": { - "$ref": "#/components/schemas/ResponseError" - }, - "propertyNames": { - "type": "string" - } - }, - "semanticHitCount": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "minimum": 0 - }, - "performanceDetails": {} - } - } - ], - "description": "Response from a federated multi-search query" - }, - "Federation": { - "type": "object", - "description": "Configuration for federated multi-search", - "required": [ - "limit", - "offset", - "facetsByIndex", - "showPerformanceDetails" - ], - "properties": { - "limit": { - "type": "integer", - "description": "Maximum number of results to return across all queries", - "minimum": 0 - }, - "offset": { - "type": "integer", - "description": "Number of results to skip", - "minimum": 0 - }, - "page": { - "type": [ - "integer", - "null" - ], - "minimum": 0 - }, - "hitsPerPage": { - "type": [ - "integer", - "null" - ], - "minimum": 0 - }, - "facetsByIndex": { - "type": "object", - "description": "Facets to retrieve per index", - "additionalProperties": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "propertyNames": { - "type": "string", - "description": "An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long", - "example": "movies" - } - }, - "mergeFacets": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/MergeFacets", - "description": "Options for merging facets from multiple indexes" - } - ] - }, - "showPerformanceDetails": { - "type": "boolean", - "description": "Whether to include performance details in the response" - } - } - }, - "FederationOptions": { - "type": "object", - "description": "Options for federated multi-search queries", - "required": [ - "weight" - ], - "properties": { - "weight": { - "type": "number", - "format": "double", - "description": "Weight to apply to results from this query (default: 1.0)" - }, - "remote": { - "type": [ - "string", - "null" - ], - "description": "Remote server to send this query to" - }, - "queryPosition": { - "type": [ - "integer", - "null" - ], - "description": "Position of this query in the list of queries", - "minimum": 0 - } - } - }, - "FilterFeatures": { - "type": "object", - "description": "Controls which filter operators are allowed for an attribute. This\nprovides fine-grained control over filtering capabilities.", - "properties": { - "equality": { - "type": "boolean", - "description": "When `true`, enables equality operators: `=`, `!=`, and `IN`. These\nallow filtering for exact matches or membership in a set of values.\nAlso enables `IS EMPTY`, `IS NULL`, and `EXISTS` operators. Defaults\nto `true`." - }, - "comparison": { - "type": "boolean", - "description": "When `true`, enables comparison operators: `<`, `>`, `<=`, `>=`, and\n`TO` (range). These allow filtering based on numeric or string\ncomparisons. Defaults to `false`." - } - }, - "additionalProperties": false - }, - "FilterableAttributesFeatures": { - "type": "object", - "description": "Controls which filtering and faceting operations are enabled for matching\nattributes. This allows restricting certain operations on specific fields\nfor security or performance reasons.", - "properties": { - "facetSearch": { - "type": "boolean", - "description": "When `true`, allows searching within facet values for matching\nattributes. This enables the facet search feature which lets users\nsearch for specific facet values. Defaults to `false`." - }, - "filter": { - "$ref": "#/components/schemas/FilterFeatures", - "description": "Controls which filter operators are allowed for matching attributes.\nSee `FilterFeatures` for available options." - } - }, - "additionalProperties": false - }, - "FilterableAttributesPatterns": { - "type": "object", - "description": "Defines a set of attribute patterns with specific filtering and faceting\nfeatures. This allows fine-grained control over which operations are\nallowed on matched attributes.", - "required": [ - "attributePatterns" - ], - "properties": { - "attributePatterns": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Patterns to match attribute names. Use `*` as a wildcard to match any\ncharacters. For example, `[\"price_*\", \"stock\"]` matches `price_usd`,\n`price_eur`, and `stock`." - }, - "features": { - "$ref": "#/components/schemas/FilterableAttributesFeatures", - "description": "The filtering and faceting features enabled for attributes matching\nthese patterns. If not specified, defaults to equality filtering\nenabled." - } - }, - "additionalProperties": false - }, - "FilterableAttributesRule": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/FilterableAttributesPatterns" - } - ] - }, - "GetLogs": { - "type": "object", - "description": "Request body for streaming logs", - "required": [ - "target", - "mode", - "profileMemory" - ], - "properties": { - "target": { - "type": "string", - "description": "Log targets to filter. Format: code_part=log_level (e.g.,\nmilli=trace,actix_web=off)", - "default": "info", - "example": "milli=trace,index_scheduler,actix_web=off" - }, - "mode": { - "oneOf": [ - { - "$ref": "#/components/schemas/LogMode", - "description": "Output format for log entries. `human` provides readable text output,\n`json` provides structured JSON for parsing, and `profile` outputs\nFirefox profiler format for performance visualization." - } - ], - "default": "Human" - }, - "profileMemory": { - "type": "boolean", - "description": "Enable memory profiling (only useful with profile mode, significantly\nslows down the engine)", - "default": false - } - } - }, - "HealthResponse": { - "type": "object", - "required": [ - "status" - ], - "properties": { - "status": { - "$ref": "#/components/schemas/HealthStatus", - "description": "The status of the instance." - } - } - }, - "HealthStatus": { - "type": "string", - "enum": [ - "available" - ] - }, - "HitsInfo": { - "oneOf": [ - { - "type": "object", - "description": "Finite pagination with exact counts", - "required": [ - "hitsPerPage", - "page", - "totalPages", - "totalHits" - ], - "properties": { - "hitsPerPage": { - "type": "integer", - "description": "Number of results on each page", - "minimum": 0 - }, - "page": { - "type": "integer", - "description": "Current search results page", - "minimum": 0 - }, - "totalPages": { - "type": "integer", - "description": "Exhaustive total number of search result pages", - "minimum": 0 - }, - "totalHits": { - "type": "integer", - "description": "Exhaustive total number of matches", - "minimum": 0 - } - } - }, - { - "type": "object", - "description": "Offset-based pagination with estimated counts", - "required": [ - "limit", - "offset", - "estimatedTotalHits" - ], - "properties": { - "limit": { - "type": "integer", - "description": "Number of documents to take", - "minimum": 0 - }, - "offset": { - "type": "integer", - "description": "Number of documents skipped", - "minimum": 0 - }, - "estimatedTotalHits": { - "type": "integer", - "description": "Estimated total number of matches", - "minimum": 0 - } - } - } - ], - "description": "Pagination information for search results" - }, - "HybridQuery": { - "type": "object", - "description": "Configuration for hybrid search combining keyword and semantic search.\n\nThis allows searches that understand both exact words and conceptual\nmeaning.", - "required": [ - "embedder" - ], - "properties": { - "semanticRatio": { - "type": "number", - "format": "float", - "description": "Controls the balance between keyword search and semantic search.\nA value of `0.0` uses only keyword search, `1.0` uses only semantic\nsearch, and `0.5` (the default) gives equal weight to both.\nUse lower values for exact term matching and higher values for\nconceptual similarity." - }, - "embedder": { - "type": "string", - "description": "The name of the embedder configuration to use for generating query\nvectors. This must match one of the embedders defined in the index's\n`embedders` settings." - } - } - }, - "ImportData": { - "type": "object", - "description": "Import data stored in a task", - "required": [ - "remoteName", - "documentCount" - ], - "properties": { - "remoteName": { - "type": "string", - "description": "Remote that this task is imported from" - }, - "indexName": { - "type": [ - "string", - "null" - ], - "description": "Index relevant to this task" - }, - "documentCount": { - "type": "integer", - "format": "u-int64", - "description": "Number of documents in this task", - "minimum": 0 - } - } - }, - "IndexCreateRequest": { - "type": "object", - "description": "Request body for creating a new index", - "required": [ - "uid" - ], - "properties": { - "uid": { - "$ref": "#/components/schemas/IndexUid", - "description": "Unique identifier for the index" - }, - "primaryKey": { - "type": [ - "string", - "null" - ], - "description": "Primary key of the index", - "example": "id" - } - } - }, - "IndexStats": { - "type": "object", - "description": "Stats of an `Index`, as known to the `stats` route.", - "required": [ - "numberOfDocuments", - "rawDocumentDbSize", - "avgDocumentSize", - "isIndexing", - "fieldDistribution" - ], - "properties": { - "numberOfDocuments": { - "type": "integer", - "format": "u-int64", - "description": "Number of documents in the index", - "minimum": 0 - }, - "rawDocumentDbSize": { - "type": "integer", - "format": "u-int64", - "description": "Size of the documents database, in bytes.", - "minimum": 0 - }, - "avgDocumentSize": { - "type": "integer", - "format": "u-int64", - "description": "Average size of a document in the documents database.", - "minimum": 0 - }, - "isIndexing": { - "type": "boolean", - "description": "Whether or not the index is currently ingesting document" - }, - "numberOfEmbeddings": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Number of embeddings in the index", - "minimum": 0 - }, - "numberOfEmbeddedDocuments": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Number of embedded documents in the index", - "minimum": 0 - }, - "fieldDistribution": { - "type": "object", - "description": "Association of every field name with the number of times it occurs in\nthe documents.", - "additionalProperties": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "IndexSwap": { - "type": "object", - "description": "Index swap operation", - "required": [ - "indexes" - ], - "properties": { - "indexes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Pair of index UIDs to swap", - "example": [ - "indexA", - "indexB" - ] - }, - "rename": { - "type": "boolean", - "description": "Whether this is a rename operation" - } - } - }, - "IndexUid": { - "type": "string", - "description": "An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long", - "example": "movies" - }, - "IndexView": { - "type": "object", - "description": "An index containing searchable documents", - "required": [ - "uid", - "createdAt", - "updatedAt" - ], - "properties": { - "uid": { - "type": "string", - "description": "Unique identifier for the index. Once created, it cannot be changed" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "Creation date of the index, represented in RFC 3339 format" - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "description": "Latest date of index update, represented in RFC 3339 format" - }, - "primaryKey": { - "type": [ - "string", - "null" - ], - "description": "Primary key of the index" - } - } - }, - "KeyView": { - "type": "object", - "description": "Represents an API key used for authenticating requests to Meilisearch.\nEach key has specific permissions defined by its actions and can be scoped\nto particular indexes. Keys provide fine-grained access control for your\nMeilisearch instance.", - "required": [ - "key", - "uid", - "actions", - "indexes", - "createdAt", - "updatedAt" - ], - "properties": { - "name": { - "type": [ - "string", - "null" - ], - "description": "A human-readable name for the API key. Use this to identify the purpose\nof each key, such as \"Frontend Search Key\" or \"Admin Key for CI/CD\".\nThis is optional and can be `null`." - }, - "description": { - "type": [ - "string", - "null" - ], - "description": "A longer description explaining the purpose or usage of this API key.\nUseful for documenting why the key was created and how it should be\nused. This is optional and can be `null`." - }, - "key": { - "type": "string", - "description": "The actual API key string to use in the `Authorization: Bearer `\nheader when making requests to Meilisearch. Keep this value secret and\nnever expose it in client-side code." - }, - "uid": { - "type": "string", - "format": "uuid", - "description": "The unique identifier (UUID) for this API key. Use this to update or\ndelete the key. The UID remains constant even if the key's name or\ndescription changes." - }, - "actions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Action" - }, - "description": "The list of actions (permissions) this key is allowed to perform.\nExamples include `documents.add`, `search`, `indexes.create`,\n`settings.update`, etc. Use `*` to grant all permissions." - }, - "indexes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The list of index UIDs this key can access. Use `*` to grant access to\nall indexes, including future ones. Patterns are also supported, e.g.,\n`movies_*` matches any index starting with \"movies_\"." - }, - "expiresAt": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "The expiration date and time of the key in RFC 3339 format. After this\ntime, the key will no longer be valid for authentication. Set to `null`\nfor keys that never expire." - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The date and time when this API key was created, formatted as an\nRFC 3339 date-time string. This is automatically set by Meilisearch\nand cannot be modified.", - "readOnly": true - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "description": "The date and time when this API key was last modified, formatted as an\nRFC 3339 date-time string. This is automatically updated by Meilisearch\nwhen the key's name or description changes.", - "readOnly": true - } - } - }, - "Kind": { - "type": "string", - "description": "The type of the task.", - "enum": [ - "documentAdditionOrUpdate", - "documentEdition", - "documentDeletion", - "settingsUpdate", - "indexCreation", - "indexDeletion", - "indexUpdate", - "indexSwap", - "taskCancelation", - "taskDeletion", - "dumpCreation", - "snapshotCreation", - "export", - "upgradeDatabase", - "indexCompaction", - "networkTopologyChange" - ], - "example": "documentAdditionOrUpdate" - }, - "Locale": { - "type": "string", - "enum": [ - "af", - "ak", - "am", - "ar", - "az", - "be", - "bn", - "bg", - "ca", - "cs", - "da", - "de", - "el", - "en", - "eo", - "et", - "fi", - "fr", - "gu", - "he", - "hi", - "hr", - "hu", - "hy", - "id", - "it", - "jv", - "ja", - "kn", - "ka", - "km", - "ko", - "la", - "lv", - "lt", - "ml", - "mr", - "mk", - "my", - "ne", - "nl", - "nb", - "or", - "pa", - "fa", - "pl", - "pt", - "ro", - "ru", - "si", - "sk", - "sl", - "sn", - "es", - "sr", - "sv", - "ta", - "te", - "tl", - "th", - "tk", - "tr", - "uk", - "ur", - "uz", - "vi", - "yi", - "zh", - "zu", - "afr", - "aka", - "amh", - "ara", - "aze", - "bel", - "ben", - "bul", - "cat", - "ces", - "dan", - "deu", - "ell", - "eng", - "epo", - "est", - "fin", - "fra", - "guj", - "heb", - "hin", - "hrv", - "hun", - "hye", - "ind", - "ita", - "jav", - "jpn", - "kan", - "kat", - "khm", - "kor", - "lat", - "lav", - "lit", - "mal", - "mar", - "mkd", - "mya", - "nep", - "nld", - "nob", - "ori", - "pan", - "pes", - "pol", - "por", - "ron", - "rus", - "sin", - "slk", - "slv", - "sna", - "spa", - "srp", - "swe", - "tam", - "tel", - "tgl", - "tha", - "tuk", - "tur", - "ukr", - "urd", - "uzb", - "vie", - "yid", - "zho", - "zul", - "cmn" - ] - }, - "LocalizedAttributesRuleView": { - "type": "object", - "description": "Defines a rule for associating specific locales (languages) with\nattributes. This allows Meilisearch to use language-specific tokenization\nand processing for matched attributes, improving search quality for\nmultilingual content.", - "required": [ - "attributePatterns", - "locales" - ], - "properties": { - "attributePatterns": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Patterns to match attribute names. Use `*` as a wildcard to match any\ncharacters. For example, `[\"title_*\", \"description\"]` matches\n`title_en`, `title_fr`, and `description`.", - "example": [ - "*_ja" - ] - }, - "locales": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Locale" - }, - "description": "The list of locales (languages) to apply to matching attributes. When\nthese attributes are indexed, Meilisearch will use language-specific\ntokenization rules. Examples: `[\"en\", \"fr\"]` or `[\"jpn\", \"zho\"]`." - } - } - }, - "LogMode": { - "type": "string", - "description": "Format for log output", - "enum": [ - "human", - "json", - "profile" - ] - }, - "MatchBounds": { - "type": "object", - "description": "Represents the position of a matching term in a document field. Used to\nindicate where query terms were found within attribute values, enabling\nfeatures like highlighting and match position display.", - "required": [ - "start", - "length" - ], - "properties": { - "start": { - "type": "integer", - "description": "The byte offset where the match begins within the attribute value.\nThis is a zero-indexed position from the start of the string.", - "minimum": 0 - }, - "length": { - "type": "integer", - "description": "The length in bytes of the matched text. Combined with `start`, this\ndefines the exact substring that matched the query term.", - "minimum": 0 - }, - "indices": { - "type": [ - "array", - "null" - ], - "items": { - "type": "integer", - "minimum": 0 - }, - "description": "Byte indices of individual matched characters when the match spans\nmultiple positions (e.g., for prefix matches). This is `null` for\nsimple contiguous matches." - } - } - }, - "MatchingStrategy": { - "type": "string", - "description": "This is unfortunately a duplication of the struct in .\nThe reason why it is duplicated is because milli cannot depend on meilisearch. It would be cyclic imports.", - "enum": [ - "last", - "all", - "frequency" - ] - }, - "MergeFacets": { - "type": "object", - "description": "Options for merging facets from multiple indexes in federated search.\nWhen multiple indexes are queried, this controls how their facet values\nare combined into a single facet distribution.", - "properties": { - "maxValuesPerFacet": { - "type": [ - "integer", - "null" - ], - "description": "The maximum number of facet values to return for each facet after\nmerging. Values from all indexes are combined and sorted before\ntruncation. If not specified, uses the default limit from the index\nsettings.", - "minimum": 0 - } - } - }, - "MinWordSizeTyposSetting": { - "type": "object", - "description": "Configures the minimum word length required before typos are allowed.\n\nThis helps prevent matching very short words with typos, which can lead\nto irrelevant results.", - "properties": { - "oneTypo": { - "type": [ - "integer", - "null" - ], - "format": "u-int8", - "description": "The minimum word length required to accept one typo. Words shorter\nthan this value must match exactly. For example, if set to `5`, the\nword \"apple\" (5 letters) can have one typo, but \"app\" (3 letters)\ncannot. Defaults to `5`.", - "example": 5, - "minimum": 0 - }, - "twoTypos": { - "type": [ - "integer", - "null" - ], - "format": "u-int8", - "description": "The minimum word length required to accept two typos. Words shorter\nthan this value can have at most one typo. For example, if set to `9`,\nthe word \"computing\" (9 letters) can have two typos. Must be greater\nthan or equal to `oneTypo`. Defaults to `9`.", - "example": 9, - "minimum": 0 - } - }, - "additionalProperties": false - }, - "Network": { - "type": "object", - "description": "Network topology configuration for distributed Meilisearch", - "properties": { - "remotes": { - "type": [ - "object", - "null" - ], - "description": "Map of remote instance names to their configurations", - "additionalProperties": { - "$ref": "#/components/schemas/Remote" - }, - "propertyNames": { - "type": "string" - }, - "example": { - "ms-00": { - "url": "http://localhost:7700" - }, - "ms-01": { - "url": "http://localhost:7701" - } - } - }, - "self": { - "type": [ - "string", - "null" - ], - "description": "Name of this instance in the network", - "example": "ms-00" - }, - "leader": { - "type": [ - "string", - "null" - ], - "description": "Name of the leader instance in the network", - "example": "ms-00" - }, - "previousRemotes": { - "type": [ - "object", - "null" - ], - "description": "Previous remote configurations (for rollback)", - "additionalProperties": { - "$ref": "#/components/schemas/Remote" - }, - "propertyNames": { - "type": "string" - }, - "example": { - "ms-00": { - "url": "http://localhost:7700" - }, - "ms-01": { - "url": "http://localhost:7701" - } - } - } - } - }, - "Origin": { - "type": "object", - "description": "Information about the origin of a task in a distributed Meilisearch\ndeployment. This tracks where a task was originally created before being\nreplicated to other nodes.", - "required": [ - "remoteName", - "taskUid" - ], - "properties": { - "remoteName": { - "type": "string", - "description": "The name of the remote Meilisearch instance where this task originated.\nThis corresponds to a remote defined in the network configuration." - }, - "taskUid": { - "type": "integer", - "format": "u-int32", - "description": "The unique task identifier on the originating remote. This allows\ntracking the same task across different nodes in the network.", - "minimum": 0 - }, - "networkVersion": { - "type": "string", - "format": "uuid", - "description": "The version of the network topology when this task was created. Used to\nensure consistent task routing during network topology changes." - } - } - }, - "OverridePooling": { - "type": "string", - "enum": [ - "useModel", - "forceCls", - "forceMean" - ] - }, - "PaginationSettings": { - "type": "object", - "description": "Pagination configuration settings", - "properties": { - "maxTotalHits": { - "type": [ - "integer", - "null" - ], - "description": "Maximum number of hits that can be returned", - "example": 250, - "minimum": 0 - } - }, - "additionalProperties": false - }, - "PaginationView_IndexView": { - "type": "object", - "description": "Paginated response wrapper", - "required": [ - "results", - "offset", - "limit", - "total" - ], - "properties": { - "results": { - "type": "array", - "items": { - "type": "object", - "description": "An index containing searchable documents", - "required": [ - "uid", - "createdAt", - "updatedAt" - ], - "properties": { - "uid": { - "type": "string", - "description": "Unique identifier for the index. Once created, it cannot be changed" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "Creation date of the index, represented in RFC 3339 format" - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "description": "Latest date of index update, represented in RFC 3339 format" - }, - "primaryKey": { - "type": [ - "string", - "null" - ], - "description": "Primary key of the index" - } - } - }, - "description": "Array of items for the current page" - }, - "offset": { - "type": "integer", - "description": "Number of items skipped", - "minimum": 0 - }, - "limit": { - "type": "integer", - "description": "Maximum number of items returned", - "minimum": 0 - }, - "total": { - "type": "integer", - "description": "Total number of items matching the query", - "minimum": 0 - } - } - }, - "PaginationView_KeyView": { - "type": "object", - "description": "Paginated response wrapper", - "required": [ - "results", - "offset", - "limit", - "total" - ], - "properties": { - "results": { - "type": "array", - "items": { - "type": "object", - "description": "Represents an API key used for authenticating requests to Meilisearch.\nEach key has specific permissions defined by its actions and can be scoped\nto particular indexes. Keys provide fine-grained access control for your\nMeilisearch instance.", - "required": [ - "key", - "uid", - "actions", - "indexes", - "createdAt", - "updatedAt" - ], - "properties": { - "name": { - "type": [ - "string", - "null" - ], - "description": "A human-readable name for the API key. Use this to identify the purpose\nof each key, such as \"Frontend Search Key\" or \"Admin Key for CI/CD\".\nThis is optional and can be `null`." - }, - "description": { - "type": [ - "string", - "null" - ], - "description": "A longer description explaining the purpose or usage of this API key.\nUseful for documenting why the key was created and how it should be\nused. This is optional and can be `null`." - }, - "key": { - "type": "string", - "description": "The actual API key string to use in the `Authorization: Bearer `\nheader when making requests to Meilisearch. Keep this value secret and\nnever expose it in client-side code." - }, - "uid": { - "type": "string", - "format": "uuid", - "description": "The unique identifier (UUID) for this API key. Use this to update or\ndelete the key. The UID remains constant even if the key's name or\ndescription changes." - }, - "actions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Action" - }, - "description": "The list of actions (permissions) this key is allowed to perform.\nExamples include `documents.add`, `search`, `indexes.create`,\n`settings.update`, etc. Use `*` to grant all permissions." - }, - "indexes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The list of index UIDs this key can access. Use `*` to grant access to\nall indexes, including future ones. Patterns are also supported, e.g.,\n`movies_*` matches any index starting with \"movies_\"." - }, - "expiresAt": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "The expiration date and time of the key in RFC 3339 format. After this\ntime, the key will no longer be valid for authentication. Set to `null`\nfor keys that never expire." - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The date and time when this API key was created, formatted as an\nRFC 3339 date-time string. This is automatically set by Meilisearch\nand cannot be modified.", - "readOnly": true - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "description": "The date and time when this API key was last modified, formatted as an\nRFC 3339 date-time string. This is automatically updated by Meilisearch\nwhen the key's name or description changes.", - "readOnly": true - } - } - }, - "description": "Array of items for the current page" - }, - "offset": { - "type": "integer", - "description": "Number of items skipped", - "minimum": 0 - }, - "limit": { - "type": "integer", - "description": "Maximum number of items returned", - "minimum": 0 - }, - "total": { - "type": "integer", - "description": "Total number of items matching the query", - "minimum": 0 - } - } - }, - "PaginationView_Value": { - "type": "object", - "description": "Paginated response wrapper", - "required": [ - "results", - "offset", - "limit", - "total" - ], - "properties": { - "results": { - "type": "array", - "items": {}, - "description": "Array of items for the current page" - }, - "offset": { - "type": "integer", - "description": "Number of items skipped", - "minimum": 0 - }, - "limit": { - "type": "integer", - "description": "Maximum number of items returned", - "minimum": 0 - }, - "total": { - "type": "integer", - "description": "Total number of items matching the query", - "minimum": 0 - } - } - }, - "PatchApiKey": { - "type": "object", - "description": "Request body for updating an existing API key. Only the name and\ndescription can be modified - other properties like actions, indexes,\nand expiration are immutable after creation.", - "properties": { - "description": { - "type": [ - "string", - "null" - ], - "description": "A new description for the API key. Pass `null` to remove the existing\ndescription. Useful for documenting the purpose or usage of the key.", - "example": "This key is used to update documents in the products index" - }, - "name": { - "type": [ - "string", - "null" - ], - "description": "A new human-readable name for the API key. Pass `null` to remove the\nexisting name. Use this to identify keys by purpose, such as\n\"Production Search Key\" or \"CI/CD Indexing Key\".", - "example": "Indexing Products API key" - } - } - }, - "Personalize": { - "type": "object", - "description": "Configuration for personalized search results.\n\nWhen enabled, search results are tailored based on user context,\nproviding different rankings and results for different user profiles.", - "required": [ - "user_context" - ], - "properties": { - "user_context": { - "type": "string", - "description": "A string describing the user context for personalization. This is\npassed to the embedder to generate user-specific vectors that\ninfluence search ranking. Example: user preferences, browsing\nhistory, or demographic information." - } - } - }, - "PrefixSearchSettings": { - "type": "string", - "enum": [ - "indexingTime", - "disabled" - ] - }, - "ProgressStepView": { - "type": "object", - "description": "Information about a single processing step within a batch or task. Each\nstep has a name, current progress, and total items to process.", - "required": [ - "currentStep", - "finished", - "total" - ], - "properties": { - "currentStep": { - "type": "string", - "description": "A human-readable name describing what this processing step is doing.\nExamples include \"indexing documents\", \"computing embeddings\",\n\"building word cache\", etc." - }, - "finished": { - "type": "integer", - "format": "u-int32", - "description": "The number of items that have been processed so far in this step.\nCompare with `total` to calculate the percentage complete for this\nspecific step.", - "minimum": 0 - }, - "total": { - "type": "integer", - "format": "u-int32", - "description": "The total number of items to process in this step. When `finished`\nequals `total`, this step is complete and processing moves to the\nnext step.", - "minimum": 0 - } - } - }, - "ProgressView": { - "type": "object", - "description": "Real-time progress information for a batch or task that is currently\nbeing processed. Use this to display progress bars or status updates to\nusers.", - "required": [ - "steps", - "percentage" - ], - "properties": { - "steps": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProgressStepView" - }, - "description": "A hierarchical list of processing steps currently being executed.\nSteps are listed from outermost to innermost, with each step\nrepresenting a more granular operation within its parent step." - }, - "percentage": { - "type": "number", - "format": "float", - "description": "The overall completion percentage of the operation (0.0 to 100.0).\nThis is calculated by combining the progress of all nested steps,\nweighted by their relative importance." - } - } - }, - "ProximityPrecisionView": { - "type": "string", - "enum": [ - "byWord", - "byAttribute" - ] - }, - "RankingRuleView": { - "oneOf": [ - { - "type": "string", - "description": "Sorted by decreasing number of matched query terms.\nQuery words at the front of an attribute is considered better than if\nit was at the back.", - "enum": [ - "Words" - ] - }, - { - "type": "string", - "description": "Sorted by increasing number of typos.", - "enum": [ - "Typo" - ] - }, - { - "type": "string", - "description": "Sorted by increasing distance between matched query terms.", - "enum": [ - "Proximity" - ] - }, - { - "type": "string", - "description": "Documents with quey words contained in more important\nattributes are considered better.", - "enum": [ - "Attribute" - ] - }, - { - "type": "string", - "description": "Dynamically sort at query time the documents. None, one or multiple\nAsc/Desc sortable attributes can be used in place of this criterion at\nquery time.", - "enum": [ - "Sort" - ] - }, - { - "type": "string", - "description": "Sorted by the similarity of the matched words with the query words.", - "enum": [ - "Exactness" - ] - }, - { - "type": "object", - "description": "Sorted by the increasing value of the field specified.", - "required": [ - "Asc" - ], - "properties": { - "Asc": { - "type": "string", - "description": "Sorted by the increasing value of the field specified." - } - } - }, - { - "type": "object", - "description": "Sorted by the decreasing value of the field specified.", - "required": [ - "Desc" - ], - "properties": { - "Desc": { - "type": "string", - "description": "Sorted by the decreasing value of the field specified." - } - } - } - ] - }, - "RankingScoreThreshold": { - "type": "number", - "format": "double" - }, - "Remote": { - "type": "object", - "description": "Configuration for a remote Meilisearch instance", - "properties": { - "url": { - "type": [ - "string", - "null" - ], - "description": "URL of the remote instance", - "example": "http://localhost:7700" - }, - "searchApiKey": { - "type": [ - "string", - "null" - ], - "description": "API key for search operations on this remote", - "example": "XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU" - }, - "writeApiKey": { - "type": [ - "string", - "null" - ], - "description": "API key for write operations on this remote", - "example": "XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU" - } - } - }, - "RemoteTask": { - "type": "object", - "description": "Represents a task that was replicated to a remote Meilisearch instance.\nContains either the remote task UID on success, or an error if\nreplication failed.", - "properties": { - "taskUid": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "description": "The unique task identifier assigned by the remote Meilisearch instance.\nPresent when the task was successfully replicated to the remote.", - "minimum": 0 - }, - "error": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ResponseError", - "description": "Error details if the task failed to replicate to this remote. Contains\nthe error message, code, and type from the remote instance." - } - ] - } - } - }, - "ResponseError": { - "type": "object", - "required": [ - "message", - "code", - "type", - "link" - ], - "properties": { - "message": { - "type": "string", - "description": "The error message." - }, - "code": { - "$ref": "#/components/schemas/Code", - "description": "The error code." - }, - "type": { - "$ref": "#/components/schemas/ErrorType", - "description": "The error type." - }, - "link": { - "type": "string", - "description": "A link to the documentation about this specific error." - } - } - }, - "RuntimeTogglableFeatures": { - "type": "object", - "description": "Experimental features that can be toggled at runtime", - "properties": { - "metrics": { - "type": [ - "boolean", - "null" - ], - "description": "Enable the /metrics endpoint for Prometheus metrics" - }, - "logsRoute": { - "type": [ - "boolean", - "null" - ], - "description": "Enable the /logs route for log configuration" - }, - "editDocumentsByFunction": { - "type": [ - "boolean", - "null" - ], - "description": "Enable document editing via JavaScript functions" - }, - "containsFilter": { - "type": [ - "boolean", - "null" - ], - "description": "Enable the CONTAINS filter operator" - }, - "network": { - "type": [ - "boolean", - "null" - ], - "description": "Enable network features for distributed search" - }, - "getTaskDocumentsRoute": { - "type": [ - "boolean", - "null" - ], - "description": "Enable the route to get documents from tasks" - }, - "compositeEmbedders": { - "type": [ - "boolean", - "null" - ], - "description": "Enable composite embedders for multi-source embeddings" - }, - "chatCompletions": { - "type": [ - "boolean", - "null" - ], - "description": "Enable chat completion capabilities" - }, - "multimodal": { - "type": [ - "boolean", - "null" - ], - "description": "Enable multimodal search with images and other media" - }, - "vectorStoreSetting": { - "type": [ - "boolean", - "null" - ], - "description": "Enable vector store settings configuration" - } - } - }, - "SearchHit": { - "type": "object", - "description": "A single search result hit", - "properties": { - "_formatted": { - "type": "object", - "description": "The formatted document with highlighted and cropped attributes", - "additionalProperties": true - }, - "_matchesPosition": { - "type": [ - "object", - "null" - ], - "description": "Location of matching terms in the document", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MatchBounds" - } - }, - "propertyNames": { - "type": "string" - } - }, - "_rankingScore": { - "type": [ - "number", - "null" - ], - "format": "double", - "description": "Global ranking score of the document" - }, - "_rankingScoreDetails": { - "type": [ - "object", - "null" - ], - "description": "Detailed breakdown of the ranking score", - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - } - }, - "additionalProperties": { - "description": "The document data" - } - }, - "SearchMetadata": { - "type": "object", - "description": "Metadata about a search query", - "required": [ - "queryUid", - "indexUid" - ], - "properties": { - "queryUid": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the query" - }, - "indexUid": { - "type": "string", - "description": "Identifier of the queried index" - }, - "primaryKey": { - "type": [ - "string", - "null" - ], - "description": "Primary key of the queried index" - }, - "remote": { - "type": [ - "string", - "null" - ], - "description": "Remote server that processed the query" - } - } - }, - "SearchQuery": { - "type": "object", - "required": [ - "offset", - "limit", - "retrieve_vectors", - "crop_length", - "show_matches_position", - "show_ranking_score", - "show_ranking_score_details", - "show_performance_details", - "highlight_pre_tag", - "highlight_post_tag", - "crop_marker", - "matching_strategy" - ], - "properties": { - "q": { - "type": [ - "string", - "null" - ], - "description": "Query string" - }, - "vector": { - "type": [ - "array", - "null" - ], - "items": { - "type": "number", - "format": "float" - }, - "description": "Search using a custom query vector" - }, - "media": { - "description": "Perform AI-powered search queries with multimodal content" - }, - "hybrid": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/HybridQuery", - "description": "Hybrid search configuration combining keyword and semantic search.\nSet `semanticRatio` to balance between keyword matching (0.0) and\nsemantic similarity (1.0). Requires an embedder to be configured." - } - ] - }, - "offset": { - "type": "integer", - "description": "Number of documents to skip", - "default": 0, - "minimum": 0 - }, - "limit": { - "type": "integer", - "description": "Maximum number of documents returned", - "default": 20, - "minimum": 0 - }, - "page": { - "type": [ - "integer", - "null" - ], - "description": "Request a specific page of results", - "minimum": 0 - }, - "hits_per_page": { - "type": [ - "integer", - "null" - ], - "description": "Maximum number of documents returned for a page", - "minimum": 0 - }, - "attributes_to_retrieve": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Attributes to display in the returned documents", - "uniqueItems": true - }, - "retrieve_vectors": { - "type": "boolean", - "description": "Return document and query vector data" - }, - "attributes_to_crop": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Attributes whose values have to be cropped" - }, - "crop_length": { - "type": "integer", - "description": "Maximum length of cropped value in words", - "default": 10, - "minimum": 0 - }, - "attributes_to_highlight": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Highlight matching terms contained in an attribute", - "uniqueItems": true - }, - "show_matches_position": { - "type": "boolean", - "description": "Return matching terms location" - }, - "show_ranking_score": { - "type": "boolean", - "description": "Display the global ranking score of a document" - }, - "show_ranking_score_details": { - "type": "boolean", - "description": "Adds a detailed global ranking score field" - }, - "show_performance_details": { - "type": "boolean", - "description": "Adds a detailed performance details field" - }, - "use_network": { - "type": [ - "boolean", - "null" - ], - "description": "Experimental: Whether this query should be performed on the whole network or locally.\n\nWhen performing the query on the whole network, this is \"as-if\" a remote federated search were performed,\nsuch that all shards are covered, and such that documents are deduplicated across the remotes.\n\n# Response\n\nThe response will have the same shape as a federated search response.\n\n# Edition\n\nThis feature is available in the Enterprise Edition.\n\n# Experimental\n\n- Setting this parameter to a value different from the default requires the `network` experimental feature.\n\n# Values\n\n- `Some(true)`: Use the whole network for this query.\n- `Some(false)`: Make this query local.\n- `None` (default): Same as `Some(false)`.\n\n# Assumptions when using the network\n\nNetwork queries assume that the following is true:\n\n- the target index exists with compatible settings on all remotes of the network.\n- any document with the same document id between two remotes have the same content and can be deduplicated." - }, - "filter": { - "description": "Filter queries by an attribute's value" - }, - "sort": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Sort search results by an attribute's value" - }, - "distinct": { - "type": [ - "string", - "null" - ], - "description": "Restrict search to documents with unique values of specified\nattribute" - }, - "facets": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Display the count of matches per facet" - }, - "highlight_pre_tag": { - "type": "string", - "description": "String inserted at the start of a highlighted term", - "default": "" - }, - "highlight_post_tag": { - "type": "string", - "description": "String inserted at the end of a highlighted term", - "default": "" - }, - "crop_marker": { - "type": "string", - "description": "String marking crop boundaries", - "default": "…" - }, - "matching_strategy": { - "$ref": "#/components/schemas/MatchingStrategy", - "description": "Strategy used to match query terms within documents" - }, - "attributes_to_search_on": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Restrict search to the specified attributes" - }, - "ranking_score_threshold": { - "type": [ - "number", - "null" - ], - "format": "double", - "description": "Minimum ranking score threshold (0.0 to 1.0) that documents must\nachieve to be included in results. Documents with scores below this\nthreshold are excluded. Useful for filtering out low-relevance\nresults." - }, - "locales": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/Locale" - }, - "description": "Explicitly specify languages used in a query" - }, - "personalize": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/Personalize", - "description": "Enables personalized search results based on user context. When\nprovided, the search uses AI to tailor results to the user's\nprofile, preferences, or behavior described in `userContext`." - } - ] - } - } - }, - "SearchQueryWithIndex": { - "type": "object", - "description": "A `SearchQuery` + an index UID and optional FederationOptions.", - "required": [ - "indexUid", - "retrieveVectors", - "cropLength", - "showRankingScore", - "showRankingScoreDetails", - "showMatchesPosition", - "highlightPreTag", - "highlightPostTag", - "cropMarker", - "matchingStrategy" - ], - "properties": { - "indexUid": { - "$ref": "#/components/schemas/IndexUid", - "description": "Index unique identifier" - }, - "q": { - "type": [ - "string", - "null" - ], - "description": "Query string" - }, - "vector": { - "type": [ - "array", - "null" - ], - "items": { - "type": "number", - "format": "float" - }, - "description": "Search using a custom query vector" - }, - "media": { - "description": "Perform AI-powered search queries with multimodal content" - }, - "hybrid": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/HybridQuery", - "description": "Hybrid search configuration combining keyword and semantic search.\nSet `semanticRatio` to balance between keyword matching (0.0) and\nsemantic similarity (1.0). Requires an embedder to be configured." - } - ] - }, - "offset": { - "type": [ - "integer", - "null" - ], - "description": "Number of documents to skip", - "minimum": 0 - }, - "limit": { - "type": [ - "integer", - "null" - ], - "description": "Maximum number of documents returned", - "minimum": 0 - }, - "page": { - "type": [ - "integer", - "null" - ], - "description": "Request a specific page of results", - "minimum": 0 - }, - "hitsPerPage": { - "type": [ - "integer", - "null" - ], - "description": "Maximum number of documents returned for a page", - "minimum": 0 - }, - "attributesToRetrieve": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Attributes to display in the returned documents", - "uniqueItems": true - }, - "retrieveVectors": { - "type": "boolean", - "description": "Return document and query vector data" - }, - "attributesToCrop": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Attributes whose values have to be cropped" - }, - "cropLength": { - "type": "integer", - "description": "Maximum length of cropped value in words", - "minimum": 0 - }, - "attributesToHighlight": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Highlight matching terms contained in an attribute", - "uniqueItems": true - }, - "showRankingScore": { - "type": "boolean", - "description": "Display the global ranking score of a document" - }, - "showRankingScoreDetails": { - "type": "boolean", - "description": "Adds a detailed global ranking score field" - }, - "showPerformanceDetails": { - "type": [ - "boolean", - "null" - ], - "description": "Adds a detailed performance details field" - }, - "useNetwork": { - "type": [ - "boolean", - "null" - ] - }, - "showMatchesPosition": { - "type": "boolean", - "description": "Return matching terms location" - }, - "filter": { - "description": "Filter queries by an attribute's value" - }, - "sort": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Sort search results by an attribute's value" - }, - "distinct": { - "type": [ - "string", - "null" - ], - "description": "Restrict search to documents with unique values of specified\nattribute" - }, - "facets": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Display the count of matches per facet" - }, - "highlightPreTag": { - "type": "string", - "description": "String inserted at the start of a highlighted term" - }, - "highlightPostTag": { - "type": "string", - "description": "String inserted at the end of a highlighted term" - }, - "cropMarker": { - "type": "string", - "description": "String marking crop boundaries" - }, - "matchingStrategy": { - "$ref": "#/components/schemas/MatchingStrategy", - "description": "Strategy used to match query terms within documents" - }, - "attributesToSearchOn": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Restrict search to the specified attributes" - }, - "rankingScoreThreshold": { - "type": [ - "number", - "null" - ], - "format": "double", - "description": "Exclude results below the specified ranking score" - }, - "locales": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/Locale" - }, - "description": "Languages to use for query tokenization" - }, - "federationOptions": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/FederationOptions", - "description": "Federation options for multi-index search" - } - ] - } - } - }, - "SearchResult": { - "allOf": [ - { - "$ref": "#/components/schemas/HitsInfo", - "description": "Pagination information for the search results" - }, - { - "type": "object", - "required": [ - "hits", - "query", - "processingTimeMs" - ], - "properties": { - "hits": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SearchHit" - }, - "description": "Results of the query" - }, - "query": { - "type": "string", - "description": "Query originating the response" - }, - "queryVector": { - "type": [ - "array", - "null" - ], - "items": { - "type": "number", - "format": "float" - }, - "description": "Vector representation of the query" - }, - "processingTimeMs": { - "type": "integer", - "description": "Processing time of the query in milliseconds", - "minimum": 0 - }, - "facetDistribution": { - "type": [ - "object", - "null" - ], - "description": "Distribution of the given facets", - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - }, - "facetStats": { - "type": [ - "object", - "null" - ], - "description": "The numeric min and max values per facet", - "additionalProperties": { - "$ref": "#/components/schemas/FacetStats" - }, - "propertyNames": { - "type": "string" - } - }, - "requestUid": { - "type": [ - "string", - "null" - ], - "format": "uuid", - "description": "A UUID v7 identifying the search request" - }, - "metadata": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/SearchMetadata", - "description": "Metadata about the search query" - } - ] - }, - "performanceDetails": { - "description": "Performance details of the search query" - }, - "remoteErrors": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "$ref": "#/components/schemas/ResponseError" - }, - "propertyNames": { - "type": "string" - } - }, - "semanticHitCount": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "description": "Exhaustive number of semantic search matches (only present in\nAI-powered searches)", - "minimum": 0 - } - } - } - ], - "description": "Search response containing matching documents and metadata" - }, - "SearchResultWithIndex": { - "allOf": [ - { - "$ref": "#/components/schemas/SearchResult", - "description": "Search results for this index" - }, - { - "type": "object", - "required": [ - "indexUid" - ], - "properties": { - "indexUid": { - "type": "string", - "description": "Identifier of the queried index" - } - } - } - ], - "description": "Search result with index identifier for multi-search responses" - }, - "SearchResults": { - "type": "object", - "description": "Response containing results from multiple search queries", - "required": [ - "results" - ], - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SearchResultWithIndex" - }, - "description": "Array of search results for each query" - } - } - }, - "SettingEmbeddingSettings": { - "type": "object", - "description": "\"Technical\" type that is required due to utoipa.\n\nWe did not find a way to implement [`utoipa::ToSchema`] for the\n[`Setting`] enum, but most types can use the `value_type` macro parameter\nto workaround that issue.\n\nHowever that type is used in the settings route, including through the\nmacro that auto-generate all the settings route, so we can't remap the\n`value_type`.", - "properties": { - "inner": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "object", - "properties": { - "source": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/EmbedderSource", - "description": "The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`" - } - ] - }, - "model": { - "type": [ - "string", - "null" - ], - "description": "The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`" - }, - "revision": { - "type": [ - "string", - "null" - ], - "description": "The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`" - }, - "pooling": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/OverridePooling", - "description": "The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior." - } - ] - }, - "apiKey": { - "type": [ - "string", - "null" - ], - "description": "The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings" - }, - "dimensions": { - "type": [ - "string", - "null" - ], - "description": "The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text." - }, - "binaryQuantized": { - "type": [ - "boolean", - "null" - ], - "description": "Whether to binary quantize the embeddings of this embedder.\n\nBinary quantized embeddings are smaller than regular embeddings, which improves\ndisk usage and retrieval speed, at the cost of relevancy.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🏗️ When set to `true`, embeddings are not regenerated, but they are binary quantized, which takes time.\n\n# Defaults\n\n- Defaults to `false`\n\n# Note\n\nAs binary quantization is a destructive operation, it is not possible to disable again this setting after\nfirst enabling it. If you are unsure of whether the performance-relevancy tradeoff is right for you,\nwe recommend to use this parameter on a test index first." - }, - "documentTemplate": { - "type": [ - "boolean", - "null" - ], - "description": "A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text." - }, - "documentTemplateMaxBytes": { - "type": [ - "integer", - "null" - ], - "description": "Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400", - "minimum": 0 - }, - "url": { - "type": [ - "string", - "null" - ], - "description": "URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated" - }, - "indexingFragments": { - "type": [ - "object", - "null" - ], - "description": "Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.", - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - }, - "searchFragments": { - "type": [ - "object", - "null" - ], - "description": "Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - }, - "request": { - "description": "Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" - }, - "response": { - "description": "Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" - }, - "headers": { - "type": [ - "object", - "null" - ], - "description": "Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", - "additionalProperties": { - "type": "string" - }, - "propertyNames": { - "type": "string" - } - }, - "searchEmbedder": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/SubEmbeddingSettings" - } - ] - }, - "indexingEmbedder": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/SubEmbeddingSettings" - } - ] - }, - "distribution": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/DistributionShift", - "description": "Affine transformation applied to the semantic score to make it more comparable to the ranking score.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings" - } - ] - } - }, - "additionalProperties": false - } - ], - "description": "Configuration for this embedder. Includes the source (openAi,\nhuggingFace, ollama, rest, userProvided), model settings, API\ncredentials, and document template for generating embeddings." - } - } - }, - "Settings_Checked": { - "type": "object", - "description": "Holds all the settings for an index. `T` can either be `Checked` if\nthey represents settings whose validity is guaranteed, or `Unchecked` if\nthey need to be validated. In the later case, a call to `check` will\nreturn a `Settings` from a `Settings`.", - "properties": { - "displayedAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Fields displayed in the returned documents.", - "example": [ - "id", - "title", - "description", - "url" - ] - }, - "searchableAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Fields in which to search for matching query words sorted by order of\nimportance.", - "example": [ - "title", - "description" - ] - }, - "filterableAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/FilterableAttributesRule" - }, - "description": "Attributes to use for faceting and filtering.\nSee [Filtering and Faceted\nSearch](https://meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).", - "example": [ - "release_date", - "genre" - ] - }, - "sortableAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Attributes to use when sorting search results.", - "example": [ - "release_date" - ] - }, - "rankingRules": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of ranking rules sorted by order of importance. The order is\ncustomizable. [A list of ordered built-in ranking\nrules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).", - "example": [ - "words", - "typo", - "proximity", - "attribute", - "exactness" - ] - }, - "stopWords": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of words ignored when present in search queries.", - "example": [ - "the", - "a", - "them", - "their" - ] - }, - "nonSeparatorTokens": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of characters not delimiting where one term begins and ends.", - "example": [ - " ", - "\n" - ] - }, - "separatorTokens": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of characters delimiting where one term begins and ends.", - "example": [ - "S" - ] - }, - "dictionary": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of strings Meilisearch should parse as a single term.", - "example": [ - "iPhone pro" - ] - }, - "synonyms": { - "type": [ - "object", - "null" - ], - "description": "List of associated words treated similarly. A word associated to an\narray of word as synonyms.", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - }, - "example": { - "he": [ - "she", - "they", - "them" - ], - "phone": [ - "iPhone", - "android" - ] - } - }, - "distinctAttribute": { - "type": [ - "string", - "null" - ], - "description": "Search returns documents with distinct (different) values of the given\nfield.", - "example": "sku" - }, - "proximityPrecision": { - "type": [ - "string", - "null" - ], - "description": "Precision level when calculating the proximity ranking rule.", - "example": "byAttribute" - }, - "typoTolerance": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/TypoSettings", - "description": "Typo tolerance settings for controlling how Meilisearch handles\nspelling mistakes in search queries. Configure minimum word lengths,\ndisable on specific words or attributes." - } - ] - }, - "faceting": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/FacetingSettings", - "description": "Faceting settings for controlling facet behavior. Configure maximum\nfacet values returned and sorting order for facet values." - } - ] - }, - "pagination": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/PaginationSettings", - "description": "Pagination settings for controlling the maximum number of results\nthat can be returned. Set `maxTotalHits` to limit how far users can\npaginate into results." - } - ] - }, - "embedders": { - "type": [ - "object", - "null" - ], - "description": "Embedder required for performing semantic search queries.", - "additionalProperties": { - "$ref": "#/components/schemas/SettingEmbeddingSettings" - }, - "propertyNames": { - "type": "string" - } - }, - "searchCutoffMs": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Maximum duration of a search query.", - "example": 50, - "minimum": 0 - }, - "localizedAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/LocalizedAttributesRuleView" - }, - "description": "Rules for associating locales (languages) with specific attributes.\nThis enables language-specific tokenization for multilingual content,\nimproving search quality for non-English text.", - "example": [ - { - "locales": [ - "jpn" - ], - "attributePatterns": [ - "*_ja" - ] - } - ] - }, - "facetSearch": { - "type": [ - "boolean", - "null" - ], - "description": "When `true`, enables facet search which allows users to search within\nfacet values. When `false`, only the first `maxValuesPerFacet` values\nare returned. Defaults to `true`.", - "example": true - }, - "prefixSearch": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/PrefixSearchSettings", - "description": "Controls prefix search behavior. `indexingTime` enables prefix search\nby building a prefix database at indexing time. `disabled` turns off\nprefix search for faster indexing. Defaults to `indexingTime`." - } - ] - }, - "chat": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ChatSettings", - "description": "Chat settings for AI-powered search. Configure the index description,\ndocument template for rendering, and search parameters used when the\nLLM queries this index." - } - ] - }, - "vectorStore": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/VectorStoreBackend", - "description": "Backend storage for vector embeddings. `memory` stores vectors in\nmemory for fastest performance. `database` stores vectors on disk to\nreduce memory usage at the cost of speed." - } - ] - } - }, - "additionalProperties": false - }, - "Settings_Unchecked": { - "type": "object", - "description": "Holds all the settings for an index. `T` can either be `Checked` if\nthey represents settings whose validity is guaranteed, or `Unchecked` if\nthey need to be validated. In the later case, a call to `check` will\nreturn a `Settings` from a `Settings`.", - "properties": { - "displayedAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Fields displayed in the returned documents.", - "example": [ - "id", - "title", - "description", - "url" - ] - }, - "searchableAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Fields in which to search for matching query words sorted by order of\nimportance.", - "example": [ - "title", - "description" - ] - }, - "filterableAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/FilterableAttributesRule" - }, - "description": "Attributes to use for faceting and filtering.\nSee [Filtering and Faceted\nSearch](https://meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).", - "example": [ - "release_date", - "genre" - ] - }, - "sortableAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Attributes to use when sorting search results.", - "example": [ - "release_date" - ] - }, - "rankingRules": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of ranking rules sorted by order of importance. The order is\ncustomizable. [A list of ordered built-in ranking\nrules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).", - "example": [ - "words", - "typo", - "proximity", - "attribute", - "exactness" - ] - }, - "stopWords": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of words ignored when present in search queries.", - "example": [ - "the", - "a", - "them", - "their" - ] - }, - "nonSeparatorTokens": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of characters not delimiting where one term begins and ends.", - "example": [ - " ", - "\n" - ] - }, - "separatorTokens": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of characters delimiting where one term begins and ends.", - "example": [ - "S" - ] - }, - "dictionary": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of strings Meilisearch should parse as a single term.", - "example": [ - "iPhone pro" - ] - }, - "synonyms": { - "type": [ - "object", - "null" - ], - "description": "List of associated words treated similarly. A word associated to an\narray of word as synonyms.", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - }, - "example": { - "he": [ - "she", - "they", - "them" - ], - "phone": [ - "iPhone", - "android" - ] - } - }, - "distinctAttribute": { - "type": [ - "string", - "null" - ], - "description": "Search returns documents with distinct (different) values of the given\nfield.", - "example": "sku" - }, - "proximityPrecision": { - "type": [ - "string", - "null" - ], - "description": "Precision level when calculating the proximity ranking rule.", - "example": "byAttribute" - }, - "typoTolerance": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/TypoSettings", - "description": "Typo tolerance settings for controlling how Meilisearch handles\nspelling mistakes in search queries. Configure minimum word lengths,\ndisable on specific words or attributes." - } - ] - }, - "faceting": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/FacetingSettings", - "description": "Faceting settings for controlling facet behavior. Configure maximum\nfacet values returned and sorting order for facet values." - } - ] - }, - "pagination": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/PaginationSettings", - "description": "Pagination settings for controlling the maximum number of results\nthat can be returned. Set `maxTotalHits` to limit how far users can\npaginate into results." - } - ] - }, - "embedders": { - "type": [ - "object", - "null" - ], - "description": "Embedder required for performing semantic search queries.", - "additionalProperties": { - "$ref": "#/components/schemas/SettingEmbeddingSettings" - }, - "propertyNames": { - "type": "string" - } - }, - "searchCutoffMs": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Maximum duration of a search query.", - "example": 50, - "minimum": 0 - }, - "localizedAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/LocalizedAttributesRuleView" - }, - "description": "Rules for associating locales (languages) with specific attributes.\nThis enables language-specific tokenization for multilingual content,\nimproving search quality for non-English text.", - "example": [ - { - "locales": [ - "jpn" - ], - "attributePatterns": [ - "*_ja" - ] - } - ] - }, - "facetSearch": { - "type": [ - "boolean", - "null" - ], - "description": "When `true`, enables facet search which allows users to search within\nfacet values. When `false`, only the first `maxValuesPerFacet` values\nare returned. Defaults to `true`.", - "example": true - }, - "prefixSearch": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/PrefixSearchSettings", - "description": "Controls prefix search behavior. `indexingTime` enables prefix search\nby building a prefix database at indexing time. `disabled` turns off\nprefix search for faster indexing. Defaults to `indexingTime`." - } - ] - }, - "chat": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ChatSettings", - "description": "Chat settings for AI-powered search. Configure the index description,\ndocument template for rendering, and search parameters used when the\nLLM queries this index." - } - ] - }, - "vectorStore": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/VectorStoreBackend", - "description": "Backend storage for vector embeddings. `memory` stores vectors in\nmemory for fastest performance. `database` stores vectors on disk to\nreduce memory usage at the cost of speed." - } - ] - } - }, - "additionalProperties": false - }, - "SimilarQuery": { - "type": "object", - "description": "Request body for similar document search", - "required": [ - "id", - "offset", - "limit", - "embedder", - "retrieve_vectors", - "show_ranking_score", - "show_ranking_score_details", - "show_performance_details", - "ranking_score_threshold" - ], - "properties": { - "id": { - "type": "string", - "description": "Document ID to find similar documents for" - }, - "offset": { - "type": "integer", - "description": "Number of documents to skip", - "minimum": 0 - }, - "limit": { - "type": "integer", - "description": "Maximum number of documents returned", - "minimum": 0 - }, - "filter": { - "description": "Filter queries by an attribute's value" - }, - "embedder": { - "type": "string", - "description": "Name of the embedder to use for semantic similarity" - }, - "attributes_to_retrieve": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Attributes to display in the returned documents", - "uniqueItems": true - }, - "retrieve_vectors": { - "type": "boolean", - "description": "Return document vector data" - }, - "show_ranking_score": { - "type": "boolean", - "description": "Display the global ranking score of a document" - }, - "show_ranking_score_details": { - "type": "boolean", - "description": "Adds a detailed global ranking score field" - }, - "show_performance_details": { - "type": "boolean", - "description": "Adds a detailed performance details field" - }, - "ranking_score_threshold": { - "type": "number", - "format": "double", - "description": "Excludes results with low ranking scores" - } - } - }, - "SimilarResult": { - "allOf": [ - { - "$ref": "#/components/schemas/HitsInfo", - "description": "Pagination information" - }, - { - "type": "object", - "required": [ - "hits", - "id", - "processingTimeMs" - ], - "properties": { - "hits": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SearchHit" - }, - "description": "Results of the query" - }, - "id": { - "type": "string", - "description": "Document ID that was used as reference" - }, - "processingTimeMs": { - "type": "integer", - "description": "Processing time of the query in milliseconds", - "minimum": 0 - }, - "performanceDetails": { - "description": "Performance details of the query" - } - } - } - ], - "description": "Response containing similar documents" - }, - "Stats": { - "type": "object", - "description": "Global statistics for the Meilisearch instance", - "required": [ - "databaseSize", - "usedDatabaseSize", - "indexes" - ], - "properties": { - "databaseSize": { - "type": "integer", - "format": "u-int64", - "description": "Total disk space used by the database in bytes", - "minimum": 0 - }, - "usedDatabaseSize": { - "type": "integer", - "format": "u-int64", - "description": "Actual size of the data in the database in bytes", - "minimum": 0 - }, - "lastUpdate": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Date of the last update in RFC 3339 format. Null if no update has been\nprocessed" - }, - "indexes": { - "type": "object", - "description": "Statistics for each index", - "additionalProperties": { - "$ref": "#/components/schemas/IndexStats" - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "Status": { - "type": "string", - "description": "The status of a task.", - "enum": [ - "enqueued", - "processing", - "succeeded", - "failed", - "canceled" - ], - "example": "processing" - }, - "SubEmbeddingSettings": { - "type": "object", - "properties": { - "source": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/EmbedderSource", - "description": "The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`" - } - ] - }, - "model": { - "type": [ - "string", - "null" - ], - "description": "The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`" - }, - "revision": { - "type": [ - "string", - "null" - ], - "description": "The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`" - }, - "pooling": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/OverridePooling", - "description": "The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior." - } - ] - }, - "apiKey": { - "type": [ - "string", - "null" - ], - "description": "The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings" - }, - "dimensions": { - "type": [ - "string", - "null" - ], - "description": "The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text." - }, - "documentTemplate": { - "type": [ - "boolean", - "null" - ], - "description": "A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text." - }, - "documentTemplateMaxBytes": { - "type": [ - "integer", - "null" - ], - "description": "Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400", - "minimum": 0 - }, - "url": { - "type": [ - "string", - "null" - ], - "description": "URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated" - }, - "indexingFragments": { - "type": [ - "object", - "null" - ], - "description": "Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.", - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - }, - "searchFragments": { - "type": [ - "object", - "null" - ], - "description": "Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - }, - "request": { - "description": "Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" - }, - "response": { - "description": "Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" - }, - "headers": { - "type": [ - "object", - "null" - ], - "description": "Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", - "additionalProperties": { - "type": "string" - }, - "propertyNames": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "SummarizedTaskView": { - "type": "object", - "description": "A summarized view of a task, returned when a task is enqueued", - "required": [ - "taskUid", - "status", - "type", - "enqueuedAt" - ], - "properties": { - "taskUid": { - "type": "integer", - "format": "u-int32", - "description": "Unique sequential identifier of the task", - "minimum": 0 - }, - "indexUid": { - "type": [ - "string", - "null" - ], - "description": "Unique identifier of the targeted index. Null for global tasks" - }, - "status": { - "$ref": "#/components/schemas/Status", - "description": "Status of the task. Possible values are enqueued, processing,\nsucceeded, failed, and canceled" - }, - "type": { - "$ref": "#/components/schemas/Kind", - "description": "Type of operation performed by the task" - }, - "enqueuedAt": { - "type": "string", - "format": "date-time", - "description": "Date and time when the task was enqueued" - }, - "customMetadata": { - "type": [ - "string", - "null" - ], - "description": "Custom metadata string that was attached to this task when it was\ncreated. This can be used to associate tasks with external systems or\nadd application-specific information." - } - } - }, - "SwapIndexesPayload": { - "type": "object", - "description": "Request body for swapping two indexes", - "required": [ - "indexes", - "rename" - ], - "properties": { - "indexes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IndexUid" - }, - "description": "Array of the two index UIDs to be swapped" - }, - "rename": { - "type": "boolean", - "description": "If true, rename the first index to the second instead of swapping" - } - } - }, - "TaskView": { - "type": "object", - "description": "Represents the current state and details of an asynchronous task.\n\nTasks are created when you perform operations like adding documents,\nupdating settings, or creating indexes. Use this view to monitor task\nprogress and check for errors.", - "required": [ - "uid", - "status", - "type", - "enqueuedAt" - ], - "properties": { - "uid": { - "type": "integer", - "format": "u-int32", - "description": "The unique sequential identifier assigned to this task. Task UIDs are\nassigned in order of creation and can be used to retrieve specific\ntask information or track task dependencies.", - "example": 4312, - "minimum": 0 - }, - "batchUid": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "description": "The unique identifier of the batch that processed this task. Multiple\ntasks may share the same batch UID if they were processed together\nfor efficiency. This is `null` for tasks that haven't been processed.", - "example": 12, - "minimum": 0 - }, - "indexUid": { - "type": [ - "string", - "null" - ], - "description": "The unique identifier of the index this task operates on. This is\n`null` for global tasks like `dumpCreation` or `taskDeletion` that\ndon't target a specific index." - }, - "status": { - "$ref": "#/components/schemas/Status", - "description": "The current processing status of the task. Possible values are:\n`enqueued` (waiting), `processing` (executing), `succeeded`,\n`failed`, or `canceled`." - }, - "type": { - "$ref": "#/components/schemas/Kind", - "description": "The type of operation this task performs. Examples include\n`documentAdditionOrUpdate`, `documentDeletion`, `settingsUpdate`,\n`indexCreation`, `indexDeletion`, `dumpCreation`, etc." - }, - "canceledBy": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "description": "If this task was canceled, this field contains the UID of the\n`taskCancelation` task that canceled it. This is `null` for tasks\nthat were not canceled.", - "example": 4326, - "minimum": 0 - }, - "details": { - "type": [ - "object", - "null" - ], - "description": "Contains type-specific information about the task, such as the number\nof documents processed, settings that were applied, or filters that\nwere used. The structure varies depending on the task type." - }, - "error": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ResponseError", - "description": "If the task failed, this field contains detailed error information\nincluding an error message, error code, error type, and a link to\ndocumentation. This is `null` for tasks that succeeded or are still\nprocessing." - } - ] - }, - "duration": { - "type": [ - "string", - "null" - ], - "description": "The total time spent processing this task, formatted as an ISO-8601\nduration (e.g., `PT0.5S` for 0.5 seconds). This is `null` for tasks\nthat haven't finished processing yet.", - "example": null - }, - "enqueuedAt": { - "type": "string", - "description": "The timestamp when this task was added to the queue, formatted as an\nRFC 3339 date-time string. All tasks have an enqueued timestamp as\nit's set when the task is created.", - "example": "2024-08-08_14:12:09.393Z" - }, - "startedAt": { - "type": "string", - "description": "The timestamp when Meilisearch began processing this task, formatted\nas an RFC 3339 date-time string. This is `null` for tasks that are\nstill in the queue waiting to be processed.", - "example": "2024-08-08_14:12:09.393Z" - }, - "finishedAt": { - "type": "string", - "description": "The timestamp when this task finished processing (whether successfully\nor with an error), formatted as an RFC 3339 date-time string. This is\n`null` for tasks that haven't finished yet.", - "example": "2024-08-08_14:12:09.393Z" - }, - "network": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/DbTaskNetwork", - "description": "Network topology information for distributed deployments. Contains\ndetails about which nodes are involved in processing this task. This\nis only present when running Meilisearch in a distributed config." - } - ] - }, - "customMetadata": { - "type": [ - "string", - "null" - ], - "description": "Custom metadata string that was attached to this task when it was\ncreated. This can be used to associate tasks with external systems,\ntrack task origins, or add any application-specific information." - } - } - }, - "TypoSettings": { - "type": "object", - "description": "Configuration for typo tolerance in search queries.\n\nTypo tolerance allows Meilisearch to match documents even when search\nterms contain spelling mistakes.", - "properties": { - "enabled": { - "type": [ - "boolean", - "null" - ], - "description": "When `true`, enables typo tolerance for search queries. When `false`,\nonly exact matches are returned. Defaults to `true`.", - "example": true - }, - "minWordSizeForTypos": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/MinWordSizeTyposSetting", - "description": "Configures the minimum word length before typos are allowed. Contains\n`oneTypo` (min length for 1 typo) and `twoTypos` (min length for 2\ntypos) settings." - } - ] - }, - "disableOnWords": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "A list of words for which typo tolerance should be disabled. Use this\nfor brand names, technical terms, or other words that must be matched\nexactly. Example: `[\"iPhone\", \"macOS\"]`.", - "example": [ - "iPhone", - "phone" - ], - "uniqueItems": true - }, - "disableOnAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "A list of attributes for which typo tolerance should be disabled.\nSearches in these attributes will only return exact matches. Useful\nfor fields like product codes or IDs.", - "example": [ - "uuid", - "url" - ], - "uniqueItems": true - }, - "disableOnNumbers": { - "type": [ - "boolean", - "null" - ], - "description": "When `true`, disables typo tolerance on numeric tokens. This prevents\nnumbers like `123` from matching `132`. Defaults to `false`.", - "example": true - } - }, - "additionalProperties": false - }, - "Unchecked": { - "default": null - }, - "UpdateIndexRequest": { - "type": "object", - "description": "Request body for updating an existing index", - "properties": { - "primaryKey": { - "type": [ - "string", - "null" - ], - "description": "New primary key of the index" - }, - "uid": { - "type": [ - "string", - "null" - ], - "description": "New uid for the index (for renaming)" - } - } - }, - "UpdateStderrLogs": { - "type": "object", - "description": "Request body for updating stderr log configuration", - "required": [ - "target" - ], - "properties": { - "target": { - "type": "string", - "description": "Log targets to filter. Format: code_part=log_level (e.g.,\nmilli=trace,actix_web=off)", - "default": "info", - "example": "milli=trace,index_scheduler,actix_web=off" - } - } - }, - "Vec": { - "type": "array", - "items": { - "type": "number", - "format": "float" - } - }, - "VectorStoreBackend": { - "type": "string", - "enum": [ - "stable", - "experimental" - ] - }, - "VersionResponse": { - "type": "object", - "required": [ - "commitSha", - "commitDate", - "pkgVersion" - ], - "properties": { - "commitSha": { - "type": "string", - "description": "The commit used to compile this build of Meilisearch." - }, - "commitDate": { - "type": "string", - "description": "The date of this build." - }, - "pkgVersion": { - "type": "string", - "description": "The version of Meilisearch." - } - } - }, - "WebhookResults": { - "type": "object", - "description": "Response containing a list of all registered webhooks", - "required": [ - "results" - ], - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" - }, - "description": "Array of all webhooks configured in this Meilisearch instance. Each\nwebhook includes its UUID, URL, headers (with authorization values\nredacted), and editability status." - } - } - }, - "WebhookSettings": { - "type": "object", - "description": "Configuration for a webhook endpoint", - "properties": { - "url": { - "type": [ - "string", - "null" - ], - "description": "URL endpoint to call when tasks complete", - "example": "https://your.site/on-tasks-completed" - }, - "headers": { - "type": [ - "object", - "null" - ], - "description": "HTTP headers to include in webhook requests", - "additionalProperties": { - "type": "string" - }, - "propertyNames": { - "type": "string" - }, - "example": { - "Authorization": "Bearer a-secret-token" - } - } - } - }, - "WebhookWithMetadataRedactedAuthorization": { - "allOf": [ - { - "$ref": "#/components/schemas/WebhookSettings", - "description": "Webhook settings" - }, - { - "type": "object", - "required": [ - "uuid", - "isEditable" - ], - "properties": { - "uuid": { - "type": "string", - "format": "uuid", - "description": "Unique identifier of the webhook" - }, - "isEditable": { - "type": "boolean", - "description": "Whether the webhook can be edited" - } - } - } - ], - "description": "A webhook with metadata and redacted authorization headers" - }, - "u32": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "securitySchemes": { - "Bearer": { - "type": "http", - "scheme": "bearer", - "bearerFormat": "Uuidv4, string or JWT", - "description": "An API key is a token that you provide when making API calls. Read more about [how to secure your project](https://www.meilisearch.com/docs/learn/security/basic_security).\n\nInclude the API key to the `Authorization` header, for instance:\n`Authorization: Bearer 6436fc5237b0d6e0d64253fbaac21d135012ecf1`.\n\nIf you use a SDK, ensure you instantiate the client with the API key, for instance with JS SDK:\n`const client = new MeiliSearch({ host: 'https://your-domain.com', apiKey: '6436fc5237b0d6e0d64253fbaac21d135012ecf1' })`" - } - } - }, - "tags": [ - { - "name": "Stats", - "description": "Stats gives extended information and metrics about indexes and the Meilisearch database." - }, - { - "name": "Health", - "description": "The health check endpoint enables you to periodically test the health of your Meilisearch instance." - }, - { - "name": "Version", - "description": "Returns the version of the running Meilisearch instance." - }, - { - "name": "Backups", - "description": "Meilisearch offers two types of backups: snapshots and dumps. Snapshots are mainly intended as a safeguard, while dumps are useful when migrating Meilisearch." - }, - { - "name": "Tasks", - "description": "The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)." - }, - { - "name": "Batches", - "description": "The /batches route gives information about the progress of batches of asynchronous operations." - }, - { - "name": "Indexes", - "description": "An index is an entity that gathers a set of [documents](https://www.meilisearch.com/docs/learn/getting_started/documents) with its own [settings](https://www.meilisearch.com/docs/reference/api/settings). Learn more about indexes." - }, - { - "name": "Documents", - "description": "Documents are objects composed of fields that can store any type of data. Each field contains an attribute and its associated value. Documents are stored inside [indexes](https://www.meilisearch.com/docs/learn/getting_started/indexes)." - }, - { - "name": "Facet Search", - "description": "The `/facet-search` route allows you to search for facet values. Facet search supports prefix search and typo tolerance. The returned hits are sorted lexicographically in ascending order. You can configure how facets are sorted using the sortFacetValuesBy property of the faceting index settings." - }, - { - "name": "Similar documents", - "description": "The /similar route uses AI-powered search to return a number of documents similar to a target document.\n\nMeilisearch exposes two routes for retrieving similar documents: POST and GET. In the majority of cases, POST will offer better performance and ease of use." - }, - { - "name": "Settings", - "description": "Use the /settings route to customize search settings for a given index. You can either modify all index settings at once using the update settings endpoint, or use a child route to configure a single setting." - }, - { - "name": "Search", - "description": "Meilisearch exposes two routes to perform searches:\n\n- A POST route: this is the preferred route when using API authentication, as it allows [preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) caching and better performance.\n- A GET route: the usage of this route is discouraged, unless you have good reason to do otherwise (specific caching abilities for example)" - }, - { - "name": "Keys", - "description": "Manage API `keys` for a Meilisearch instance. Each key has a given set of permissions.\nYou must have the master key or the default admin key to access the keys route. More information about the keys and their rights.\nAccessing any route under `/keys` without having set a master key will result in an error." - }, - { - "name": "Logs", - "description": "Everything about retrieving or customizing logs.\nCurrently [experimental](https://www.meilisearch.com/docs/learn/experimental/overview)." - }, - { - "name": "Multi-search", - "description": "The `/multi-search` route allows you to perform multiple search queries on one or more indexes by bundling them into a single HTTP request. Multi-search is also known as federated search." - }, - { - "name": "Experimental features", - "description": "The `/experimental-features` route allows you to activate or deactivate some of Meilisearch's experimental features.\n\nThis route is **synchronous**. This means that no task object will be returned, and any activated or deactivated features will be made available or unavailable immediately." - }, - { - "name": "Network", - "description": "The `/network` route allows you to describe the topology of a network of Meilisearch instances.\n\nThis route is **synchronous**. This means that no task object will be returned, and any change to the network will be made available immediately." - }, - { - "name": "Webhooks", - "description": "The `/webhooks` route allows you to register endpoints to be called once tasks are processed." - } - ] -} \ No newline at end of file diff --git a/openapi.json b/openapi.json deleted file mode 100644 index e1fe2b8b4..000000000 --- a/openapi.json +++ /dev/null @@ -1,14908 +0,0 @@ -{ - "openapi": "3.1.0", - "info": { - "title": "meilisearch", - "description": "Meilisearch HTTP server", - "contact": { - "name": "Quentin de Quelen", - "email": "quentin@dequelen.me" - }, - "license": { - "name": "MIT", - "identifier": "MIT" - }, - "version": "1.22.2" - }, - "servers": [ - { - "url": "/", - "description": "Local server" - } - ], - "paths": { - "/batches": { - "get": { - "tags": [ - "Batches" - ], - "summary": "Get batches", - "description": "List all batches, regardless of index. The batch objects are contained in the results array.\nBatches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first.\nBatch results are paginated and can be filtered with query parameters.", - "operationId": "get_batches", - "parameters": [ - { - "name": "limit", - "in": "query", - "description": "Maximum number of results to return.", - "required": false, - "schema": { - "type": "integer", - "format": "u-int32", - "default": 20, - "minimum": 0 - }, - "example": 12 - }, - { - "name": "from", - "in": "query", - "description": "Fetch the next set of results from the given uid.", - "required": false, - "schema": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "example": 12421 - }, - { - "name": "reverse", - "in": "query", - "description": "The order you want to retrieve the objects.", - "required": false, - "schema": { - "type": "boolean" - }, - "example": true - }, - { - "name": "batchUids", - "in": "query", - "description": "Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "example": 12421 - }, - { - "name": "uids", - "in": "query", - "description": "Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 231, - 423, - 598, - "*" - ] - }, - { - "name": "canceledBy", - "in": "query", - "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 374, - "*" - ] - }, - { - "name": "types", - "in": "query", - "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [ - "documentAdditionOrUpdate", - "*" - ] - }, - { - "name": "statuses", - "in": "query", - "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Status" - } - }, - "example": [ - "succeeded", - "failed", - "canceled", - "enqueued", - "processing", - "*" - ] - }, - { - "name": "indexUids", - "in": "query", - "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [ - "movies", - "theater", - "*" - ] - }, - { - "name": "afterEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "afterStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "afterFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - } - ], - "responses": { - "200": { - "description": "Return the batches", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AllBatches" - }, - "example": { - "results": [ - { - "uid": 2, - "details": { - "stopWords": [ - "of", - "the" - ] - }, - "progress": null, - "stats": { - "totalNbTasks": 1, - "status": { - "succeeded": 1 - }, - "types": { - "settingsUpdate": 1 - }, - "indexUids": { - "INDEX_NAME": 1 - } - }, - "duration": "PT0.110083S", - "startedAt": "2024-12-10T15:49:04.995321Z", - "finishedAt": "2024-12-10T15:49:05.105404Z" - } - ], - "total": 3, - "limit": 1, - "from": 2, - "next": 1 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "tasks.get", - "tasks.*", - "*" - ] - } - ] - } - }, - "/batches/{batchUid}": { - "get": { - "tags": [ - "Batch number 2" - ], - "summary": "Get one batch", - "description": "Get a single batch.", - "operationId": "get_batch", - "parameters": [ - { - "name": "batchUid", - "in": "path", - "description": "The unique batch id", - "required": true, - "schema": { - "type": "string" - }, - "example": "8685" - } - ], - "responses": { - "200": { - "description": "Return the batch", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BatchView" - }, - "example": { - "uid": 1, - "details": { - "receivedDocuments": 1, - "indexedDocuments": 1 - }, - "progress": null, - "stats": { - "totalNbTasks": 1, - "status": { - "succeeded": 1 - }, - "types": { - "documentAdditionOrUpdate": 1 - }, - "indexUids": { - "INDEX_NAME": 1 - } - }, - "duration": "PT0.364788S", - "startedAt": "2024-12-10T15:48:49.672141Z", - "finishedAt": "2024-12-10T15:48:50.036929Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "tasks.get", - "tasks.*", - "*" - ] - } - ] - } - }, - "/dumps": { - "post": { - "tags": [ - "Dumps1" - ], - "summary": "Create a dumppty", - "description": "Triggers a dump creation process. Once the process is complete, a dump is created in the\n[dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory).\nIf the dump directory does not exist yet, it will be created.", - "operationId": "create_dump", - "responses": { - "202": { - "description": "Dump is being created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 0, - "indexUid": null, - "status": "enqueued", - "type": "DumpCreation", - "enqueuedAt": "2021-01-01T09:39:00.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "dumps.create", - "dumps.*", - "*" - ] - } - ] - } - }, - - "/experimental-features": { - "get": { - "tags": [ - "Experimental features" - ], - "summary": "Get all experimental features", - "description": "Get a list of all experimental features that can be activated via the /experimental-features route and whether or not they are currently activated.", - "operationId": "get_features", - "responses": { - "200": { - "description": "Experimental features are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuntimeTogglableFeatures" - }, - "example": { - "metrics": true, - "logsRoute": false, - "editDocumentsByFunction": false, - "containsFilter": false, - "network": false, - "getTaskDocumentsRoute": false, - "compositeEmbedders": false, - "chatCompletions": false, - "multimodal": false, - "vectorStoreSetting": false - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "experimental_features.get", - "experimental_features.*", - "*" - ] - } - ] - }, - "patch": { - "tags": [ - "Experimental features" - ], - "summary": "Configure experimental features", - "description": "Activate or deactivate experimental features.", - "operationId": "patch_features", - "responses": { - "200": { - "description": "Experimental features are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuntimeTogglableFeatures" - }, - "example": { - "metrics": true, - "logsRoute": false, - "editDocumentsByFunction": false, - "containsFilter": false, - "network": false, - "getTaskDocumentsRoute": false, - "compositeEmbedders": false, - "chatCompletions": false, - "multimodal": false, - "vectorStoreSetting": false - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "experimental_features.update", - "experimental_features.*", - "*" - ] - } - ] - } - }, - "/export": { - "post": { - "tags": [ - "Export" - ], - "operationId": "export", - "responses": { - "202": { - "description": "Export successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 1, - "status": "enqueued", - "type": "export", - "enqueuedAt": "2021-08-11T09:25:53.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "export", - "*" - ] - } - ] - } - }, - "/health": { - "get": { - "tags": [ - "Health" - ], - "summary": "Get Health", - "description": "The health check endpoint enables you to periodically test the health of your Meilisearch instance.", - "operationId": "get_health", - "responses": { - "200": { - "description": "Instance is healthy", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HealthResponse" - }, - "example": { - "status": "available" - } - } - } - } - } - } - }, - "/indexes": { - "get": { - "tags": [ - "Indexes" - ], - "summary": "List indexes", - "description": "List all indexes.", - "operationId": "list_indexes", - "parameters": [ - { - "name": "offset", - "in": "query", - "description": "The number of indexes to skip before starting to retrieve anything", - "required": false, - "schema": { - "type": "integer", - "minimum": 0 - }, - "example": 100 - }, - { - "name": "limit", - "in": "query", - "description": "The number of indexes to retrieve", - "required": false, - "schema": { - "type": "integer", - "default": 20, - "minimum": 0 - }, - "example": 1 - } - ], - "responses": { - "200": { - "description": "Indexes are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationView_IndexView" - }, - "example": { - "results": [ - { - "uid": "movies", - "primaryKey": "movie_id", - "createdAt": "2019-11-20T09:40:33.711324Z", - "updatedAt": "2019-11-20T09:40:33.711324Z" - } - ], - "limit": 1, - "offset": 0, - "total": 1 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "indexes.get", - "indexes.*", - "*" - ] - } - ] - }, - "post": { - "tags": [ - "Indexes" - ], - "summary": "Create index", - "description": "Create an index.", - "operationId": "create_index", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IndexCreateRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "indexCreation", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "indexes.create", - "indexes.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}": { - "get": { - "tags": [ - "Indexes" - ], - "summary": "Get index", - "description": "Get information about an index.", - "operationId": "get_index", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "The index is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IndexView" - }, - "example": { - "uid": "movies", - "primaryKey": "movie_id", - "createdAt": "2019-11-20T09:40:33.711324Z", - "updatedAt": "2019-11-20T09:40:33.711324Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "indexes.get", - "indexes.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Indexes" - ], - "summary": "Delete index", - "description": "Delete an index.", - "operationId": "delete_index", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "202": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 0, - "indexUid": "movies", - "status": "enqueued", - "type": "indexDeletion", - "enqueuedAt": "2021-01-01T09:39:00.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "indexes.delete", - "indexes.*", - "*" - ] - } - ] - }, - "patch": { - "tags": [ - "Indexes" - ], - "summary": "Update index", - "description": "Update the `primaryKey` of an index.\nReturn an error if the index doesn't exists yet or if it contains documents.", - "operationId": "update_index", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateIndexRequest" - } - } - }, - "required": true - }, - "responses": { - "202": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 0, - "indexUid": "movies", - "status": "enqueued", - "type": "indexUpdate", - "enqueuedAt": "2021-01-01T09:39:00.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "indexes.update", - "indexes.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/delete-batch": { - "post": { - "tags": [ - "Documents" - ], - "summary": "Delete documents by batch", - "description": "Delete a set of documents based on an array of document ids.", - "operationId": "delete_documents_batch", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": {} - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentAdditionOrUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.delete", - "documents.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/documents": { - "get": { - "tags": [ - "Documents" - ], - "summary": "Get documents", - "description": "Get documents by batches.", - "operationId": "get_documents", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - }, - { - "name": "offset", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "fields", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "retrieveVectors", - "in": "query", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "ids", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "filter", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "example": "popularity > 1000" - }, - { - "name": "sort", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The documents are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationView_Value" - }, - "example": { - "results": [ - { - "id": 25684, - "title": "American Ninja 5", - "poster": "https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg", - "overview": "When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.", - "release_date": 725846400 - }, - { - "id": 45881, - "title": "The Bridge of San Luis Rey", - "poster": "https://image.tmdb.org/t/p/w500/4X7quIcdkc24Cveg5XdpfRqxtYA.jpg", - "overview": "The Bridge of San Luis Rey is American author Thornton Wilder's second novel, first published in 1927 to worldwide acclaim. It tells the story of several interrelated people who die in the collapse of an Inca rope-fiber suspension bridge in Peru, and the events that lead up to their being on the bridge.[ A friar who has witnessed the tragic accident then goes about inquiring into the lives of the victims, seeking some sort of cosmic answer to the question of why each had to die. The novel won the Pulitzer Prize in 1928.", - "release_date": 1072915200 - } - ], - "limit": 20, - "offset": 0, - "total": 2 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.get", - "documents.*", - "*" - ] - } - ] - }, - "put": { - "tags": [ - "Documents" - ], - "summary": "Add or update documents", - "description": "Add a list of documents or update them if they already exist.\nIf you send an already existing document (same id) the old document will be only partially updated according to the fields of the new document. Thus, any fields not present in the new document are kept and remained unchanged.\nTo completely overwrite a document, see Add or replace documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document. `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved `_vectors` field in your documents.\n> It can accept an array of floats, multiple arrays of floats in an outer array or an object.\n> This object accepts keys corresponding to the different embedders defined your index settings.", - "operationId": "update_documents", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - }, - { - "name": "primaryKey", - "in": "query", - "description": "The primary key of the documents. primaryKey is optional. If you want to set the primary key of your index through this route,\nit only has to be done the first time you add documents to the index. After which it will be ignored if given.", - "required": false, - "schema": { - "type": "string" - }, - "example": "id" - }, - { - "name": "csvDelimiter", - "in": "query", - "description": "Customize the csv delimiter when importing CSV documents.", - "required": true, - "schema": { - "type": "string", - "default": "," - }, - "example": ";" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentAdditionOrUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.add", - "documents.*", - "*" - ] - } - ] - }, - "post": { - "tags": [ - "Documents" - ], - "summary": "Add or replace documents", - "description": "Add a list of documents or replace them if they already exist.\n\nIf you send an already existing document (same id) the whole existing document will be overwritten by the new document. Fields previously in the document not present in the new document are removed.\n\nFor a partial update of the document see Add or update documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document. `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved `_vectors` field in your documents.\n> It can accept an array of floats, multiple arrays of floats in an outer array or an object.\n> This object accepts keys corresponding to the different embedders defined your index settings.", - "operationId": "replace_documents", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - }, - { - "name": "primaryKey", - "in": "query", - "description": "The primary key of the documents. primaryKey is optional. If you want to set the primary key of your index through this route,\nit only has to be done the first time you add documents to the index. After which it will be ignored if given.", - "required": false, - "schema": { - "type": "string" - }, - "example": "id" - }, - { - "name": "csvDelimiter", - "in": "query", - "description": "Customize the csv delimiter when importing CSV documents.", - "required": true, - "schema": { - "type": "string", - "default": "," - }, - "example": ";" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentAdditionOrUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.add", - "documents.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Documents" - ], - "summary": "Delete all documents", - "description": "Delete all documents in the specified index.", - "operationId": "clear_all_documents", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentDeletion", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.delete", - "documents.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/documents/delete": { - "post": { - "tags": [ - "Documents" - ], - "summary": "Delete documents by filter", - "description": "Delete a set of documents based on a filter.", - "operationId": "delete_documents_by_filter", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DocumentDeletionByFilter" - } - } - }, - "required": true - }, - "responses": { - "202": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentDeletion", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.delete", - "documents.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/documents/edit": { - "post": { - "tags": [ - "Documents" - ], - "summary": "Edit documents by function.", - "description": "Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to edit one or more documents directly in Meilisearch.", - "operationId": "edit_documents_by_function", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DocumentEditionByFunction" - } - } - }, - "required": true - }, - "responses": { - "202": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentDeletion", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/documents/fetch": { - "post": { - "tags": [ - "Documents" - ], - "summary": "Get documents with POST", - "description": "Get a set of documents.", - "operationId": "documents_by_query_post", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BrowseQuery" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationView_Value" - }, - "example": { - "results": [ - { - "title": "The Travels of Ibn Battuta", - "genres": [ - "Travel", - "Adventure" - ], - "language": "English", - "rating": 4.5 - }, - { - "title": "Pride and Prejudice", - "genres": [ - "Classics", - "Fiction", - "Romance", - "Literature" - ], - "language": "English", - "rating": 4 - } - ], - "offset": 0, - "limit": 2, - "total": 5 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.delete", - "documents.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/documents/{documentId}": { - "get": { - "tags": [ - "Documents" - ], - "summary": "Get one document", - "description": "Get one document from its primary key.", - "operationId": "get_document", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - }, - { - "name": "documentId", - "in": "path", - "description": "The document identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "85087" - }, - { - "name": "fields", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "retrieveVectors", - "in": "query", - "required": false, - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { - "description": "The document is returned", - "content": { - "application/json": { - "schema": {}, - "example": { - "id": 25684, - "title": "American Ninja 5", - "poster": "https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg", - "overview": "When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.", - "release_date": 725846400 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Document not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Document `a` not found.", - "code": "document_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#document_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.get", - "documents.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Documents" - ], - "summary": "Delete a document", - "description": "Delete a single document by id.", - "operationId": "delete_document", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - }, - { - "name": "documentId", - "in": "path", - "description": "Document Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "853" - } - ], - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "documentAdditionOrUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "documents.delete", - "documents.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/facet-search": { - "post": { - "tags": [ - "Facet Search" - ], - "summary": "Perform a facet search", - "description": "Search for a facet value within a given facet.", - "operationId": "search", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FacetSearchQuery" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "The documents are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchResult" - }, - "example": { - "hits": [ - { - "id": 2770, - "title": "American Pie 2", - "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", - "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", - "release_date": 997405200 - }, - { - "id": 190859, - "title": "American Sniper", - "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", - "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", - "release_date": 1418256000 - } - ], - "offset": 0, - "limit": 2, - "estimatedTotalHits": 976, - "processingTimeMs": 35, - "query": "american " - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/search": { - "get": { - "tags": [ - "Indexes", - "Search" - ], - "summary": "Search an index with GET", - "description": "Search for documents matching a specific query in the given index.", - "operationId": "search_with_url_query", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - }, - { - "name": "q", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "vector", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "number", - "format": "float" - } - }, - "explode": false - }, - { - "name": "offset", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "default": 0, - "minimum": 0 - } - }, - { - "name": "limit", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "default": 20, - "minimum": 0 - } - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "hitsPerPage", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "attributesToRetrieve", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "explode": false - }, - { - "name": "retrieveVectors", - "in": "query", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "attributesToCrop", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "explode": false - }, - { - "name": "cropLength", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "default": 10, - "minimum": 0 - } - }, - { - "name": "attributesToHighlight", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "explode": false - }, - { - "name": "filter", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sort", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "distinct", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "showMatchesPosition", - "in": "query", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "showRankingScore", - "in": "query", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "showRankingScoreDetails", - "in": "query", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "facets", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "explode": false - }, - { - "name": "highlightPreTag", - "in": "query", - "required": true, - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "highlightPostTag", - "in": "query", - "required": true, - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "cropMarker", - "in": "query", - "required": true, - "schema": { - "type": "string", - "default": "…" - } - }, - { - "name": "matchingStrategy", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/MatchingStrategy" - } - }, - { - "name": "attributesToSearchOn", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "explode": false - }, - { - "name": "hybridEmbedder", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hybridSemanticRatio", - "in": "query", - "required": true, - "schema": { - "type": "number", - "format": "float" - } - }, - { - "name": "rankingScoreThreshold", - "in": "query", - "required": true, - "schema": { - "type": "number", - "format": "float" - } - }, - { - "name": "locales", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Locale" - } - }, - "explode": false - } - ], - "responses": { - "200": { - "description": "The documents are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchResult" - }, - "example": { - "hits": [ - { - "id": 2770, - "title": "American Pie 2", - "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", - "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", - "release_date": 997405200 - }, - { - "id": 190859, - "title": "American Sniper", - "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", - "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", - "release_date": 1418256000 - } - ], - "offset": 0, - "limit": 2, - "estimatedTotalHits": 976, - "processingTimeMs": 35, - "query": "american " - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ] - }, - "post": { - "tags": [ - "Indexes", - "Search" - ], - "summary": "Search with POST", - "description": "Search for documents matching a specific query in the given index.", - "operationId": "search_with_post", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchQuery" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "The documents are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchResult" - }, - "example": { - "hits": [ - { - "id": 2770, - "title": "American Pie 2", - "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", - "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", - "release_date": 997405200 - }, - { - "id": 190859, - "title": "American Sniper", - "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", - "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", - "release_date": 1418256000 - } - ], - "offset": 0, - "limit": 2, - "estimatedTotalHits": 976, - "processingTimeMs": 35, - "query": "american " - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings": { - "get": { - "tags": [ - "Settings" - ], - "summary": "All settings", - "description": "This route allows you to retrieve, configure, or reset all of an index's settings at once.", - "operationId": "get_all", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "Settings are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Settings_Unchecked" - }, - "example": {} - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset settings", - "description": "Reset all the settings of an index to their default value.", - "operationId": "delete_all", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "patch": { - "tags": [ - "Settings" - ], - "summary": "Update settings", - "description": "Update the settings of an index.\nPassing null to an index setting will reset it to its default value.\nUpdates in the settings route are partial. This means that any parameters not provided in the body will be left unchanged.\nIf the provided index does not exist, it will be created.", - "operationId": "update_all", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Settings_Unchecked" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/chat": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get chat", - "description": "Get an user defined chat", - "operationId": "getchat", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "chat is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChatSettings" - }, - "example": {} - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset chat", - "description": "Reset an index's chat to its default value", - "operationId": "deletechat", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChatSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "patch": { - "tags": [ - "Settings" - ], - "summary": "Update chat", - "description": "Update an index's user defined chat", - "operationId": "patchchat", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChatSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/dictionary": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get dictionary", - "description": "Get an user defined dictionary", - "operationId": "getdictionary", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "dictionary is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update dictionary", - "description": "Update an index's user defined dictionary", - "operationId": "putdictionary", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset dictionary", - "description": "Reset an index's dictionary to its default value", - "operationId": "deletedictionary", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/displayed-attributes": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get displayedAttributes", - "description": "Get an user defined displayedAttributes", - "operationId": "getdisplayedAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "displayedAttributes is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update displayedAttributes", - "description": "Update an index's user defined displayedAttributes", - "operationId": "putdisplayedAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset displayedAttributes", - "description": "Reset an index's displayedAttributes to its default value", - "operationId": "deletedisplayedAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/distinct-attribute": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get distinctAttribute", - "description": "Get an user defined distinctAttribute", - "operationId": "getdistinctAttribute", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "distinctAttribute is returned", - "content": { - "application/json": { - "schema": { - "type": "string" - }, - "example": "" - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update distinctAttribute", - "description": "Update an index's user defined distinctAttribute", - "operationId": "putdistinctAttribute", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset distinctAttribute", - "description": "Reset an index's distinctAttribute to its default value", - "operationId": "deletedistinctAttribute", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/embedders": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get embedders", - "description": "Get an user defined embedders", - "operationId": "getembedders", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "embedders is returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/SettingEmbeddingSettings" - }, - "propertyNames": { - "type": "string" - } - }, - "example": {} - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset embedders", - "description": "Reset an index's embedders to its default value", - "operationId": "deleteembedders", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/SettingEmbeddingSettings" - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "patch": { - "tags": [ - "Settings" - ], - "summary": "Update embedders", - "description": "Update an index's user defined embedders", - "operationId": "patchembedders", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/SettingEmbeddingSettings" - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/facet-search": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get facetSearch", - "description": "Get an user defined facetSearch", - "operationId": "getfacetSearch", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "facetSearch is returned", - "content": { - "application/json": { - "schema": { - "type": "boolean" - }, - "example": false - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update facetSearch", - "description": "Update an index's user defined facetSearch", - "operationId": "putfacetSearch", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "boolean" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset facetSearch", - "description": "Reset an index's facetSearch to its default value", - "operationId": "deletefacetSearch", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "boolean" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/faceting": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get faceting", - "description": "Get an user defined faceting", - "operationId": "getfaceting", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "faceting is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FacetingSettings" - }, - "example": {} - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset faceting", - "description": "Reset an index's faceting to its default value", - "operationId": "deletefaceting", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FacetingSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "patch": { - "tags": [ - "Settings" - ], - "summary": "Update faceting", - "description": "Update an index's user defined faceting", - "operationId": "patchfaceting", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FacetingSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/filterable-attributes": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get filterableAttributes", - "description": "Get an user defined filterableAttributes", - "operationId": "getfilterableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "filterableAttributes is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FilterableAttributesRule" - } - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update filterableAttributes", - "description": "Update an index's user defined filterableAttributes", - "operationId": "putfilterableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FilterableAttributesRule" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset filterableAttributes", - "description": "Reset an index's filterableAttributes to its default value", - "operationId": "deletefilterableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FilterableAttributesRule" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/localized-attributes": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get localizedAttributes", - "description": "Get an user defined localizedAttributes", - "operationId": "getlocalizedAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "localizedAttributes is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LocalizedAttributesRuleView" - } - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update localizedAttributes", - "description": "Update an index's user defined localizedAttributes", - "operationId": "putlocalizedAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LocalizedAttributesRuleView" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset localizedAttributes", - "description": "Reset an index's localizedAttributes to its default value", - "operationId": "deletelocalizedAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LocalizedAttributesRuleView" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/non-separator-tokens": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get nonSeparatorTokens", - "description": "Get an user defined nonSeparatorTokens", - "operationId": "getnonSeparatorTokens", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "nonSeparatorTokens is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update nonSeparatorTokens", - "description": "Update an index's user defined nonSeparatorTokens", - "operationId": "putnonSeparatorTokens", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset nonSeparatorTokens", - "description": "Reset an index's nonSeparatorTokens to its default value", - "operationId": "deletenonSeparatorTokens", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/pagination": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get pagination", - "description": "Get an user defined pagination", - "operationId": "getpagination", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "pagination is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationSettings" - }, - "example": {} - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset pagination", - "description": "Reset an index's pagination to its default value", - "operationId": "deletepagination", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "patch": { - "tags": [ - "Settings" - ], - "summary": "Update pagination", - "description": "Update an index's user defined pagination", - "operationId": "patchpagination", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/prefix-search": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get prefixSearch", - "description": "Get an user defined prefixSearch", - "operationId": "getprefixSearch", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "prefixSearch is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PrefixSearchSettings" - }, - "example": "indexingTime" - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update prefixSearch", - "description": "Update an index's user defined prefixSearch", - "operationId": "putprefixSearch", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PrefixSearchSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset prefixSearch", - "description": "Reset an index's prefixSearch to its default value", - "operationId": "deleteprefixSearch", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PrefixSearchSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/proximity-precision": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get proximityPrecision", - "description": "Get an user defined proximityPrecision", - "operationId": "getproximityPrecision", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "proximityPrecision is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProximityPrecisionView" - }, - "example": "byWord" - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update proximityPrecision", - "description": "Update an index's user defined proximityPrecision", - "operationId": "putproximityPrecision", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProximityPrecisionView" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset proximityPrecision", - "description": "Reset an index's proximityPrecision to its default value", - "operationId": "deleteproximityPrecision", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProximityPrecisionView" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/ranking-rules": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get rankingRules", - "description": "Get an user defined rankingRules", - "operationId": "getrankingRules", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "rankingRules is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RankingRuleView" - } - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update rankingRules", - "description": "Update an index's user defined rankingRules", - "operationId": "putrankingRules", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RankingRuleView" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset rankingRules", - "description": "Reset an index's rankingRules to its default value", - "operationId": "deleterankingRules", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RankingRuleView" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/search-cutoff-ms": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get searchCutoffMs", - "description": "Get an user defined searchCutoffMs", - "operationId": "getsearchCutoffMs", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "searchCutoffMs is returned", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - }, - "example": 0 - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update searchCutoffMs", - "description": "Update an index's user defined searchCutoffMs", - "operationId": "putsearchCutoffMs", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset searchCutoffMs", - "description": "Reset an index's searchCutoffMs to its default value", - "operationId": "deletesearchCutoffMs", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/searchable-attributes": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get searchableAttributes", - "description": "Get an user defined searchableAttributes", - "operationId": "getsearchableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "searchableAttributes is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update searchableAttributes", - "description": "Update an index's user defined searchableAttributes", - "operationId": "putsearchableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset searchableAttributes", - "description": "Reset an index's searchableAttributes to its default value", - "operationId": "deletesearchableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/separator-tokens": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get separatorTokens", - "description": "Get an user defined separatorTokens", - "operationId": "getseparatorTokens", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "separatorTokens is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update separatorTokens", - "description": "Update an index's user defined separatorTokens", - "operationId": "putseparatorTokens", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset separatorTokens", - "description": "Reset an index's separatorTokens to its default value", - "operationId": "deleteseparatorTokens", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/sortable-attributes": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get sortableAttributes", - "description": "Get an user defined sortableAttributes", - "operationId": "getsortableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "sortableAttributes is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update sortableAttributes", - "description": "Update an index's user defined sortableAttributes", - "operationId": "putsortableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset sortableAttributes", - "description": "Reset an index's sortableAttributes to its default value", - "operationId": "deletesortableAttributes", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/stop-words": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get stopWords", - "description": "Get an user defined stopWords", - "operationId": "getstopWords", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "stopWords is returned", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "example": [] - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update stopWords", - "description": "Update an index's user defined stopWords", - "operationId": "putstopWords", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset stopWords", - "description": "Reset an index's stopWords to its default value", - "operationId": "deletestopWords", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/synonyms": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get synonyms", - "description": "Get an user defined synonyms", - "operationId": "getsynonyms", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "synonyms is returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - } - }, - "example": {} - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "put": { - "tags": [ - "Settings" - ], - "summary": "Update synonyms", - "description": "Update an index's user defined synonyms", - "operationId": "putsynonyms", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset synonyms", - "description": "Reset an index's synonyms to its default value", - "operationId": "deletesynonyms", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/typo-tolerance": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get typoTolerance", - "description": "Get an user defined typoTolerance", - "operationId": "gettypoTolerance", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "typoTolerance is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TypoSettings" - }, - "example": {} - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset typoTolerance", - "description": "Reset an index's typoTolerance to its default value", - "operationId": "deletetypoTolerance", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TypoSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "patch": { - "tags": [ - "Settings" - ], - "summary": "Update typoTolerance", - "description": "Update an index's user defined typoTolerance", - "operationId": "patchtypoTolerance", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TypoSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/settings/vector-store": { - "get": { - "tags": [ - "Settings" - ], - "summary": "Get vectorStore", - "description": "Get an user defined vectorStore", - "operationId": "getvectorStore", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "vectorStore is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VectorStoreBackend" - }, - "example": "stable" - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.get", - "settings.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Settings" - ], - "summary": "Reset vectorStore", - "description": "Reset an index's vectorStore to its default value", - "operationId": "deletevectorStore", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VectorStoreBackend" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "patch": { - "tags": [ - "Settings" - ], - "summary": "Update vectorStore", - "description": "Update an index's user defined vectorStore", - "operationId": "patchvectorStore", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VectorStoreBackend" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": "movies", - "status": "enqueued", - "type": "settingsUpdate", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/similar": { - "get": { - "tags": [ - "Similar documents" - ], - "summary": "Get similar documents with GET", - "description": "Retrieve documents similar to a specific search result.", - "operationId": "similar_get", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - }, - { - "name": "id", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "offset", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "default": 0, - "minimum": 0 - } - }, - { - "name": "limit", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "default": 20, - "minimum": 0 - } - }, - { - "name": "attributes_to_retrieve", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "retrieve_vectors", - "in": "query", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "filter", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "show_ranking_score", - "in": "query", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "show_ranking_score_details", - "in": "query", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "ranking_score_threshold", - "in": "query", - "required": false, - "schema": { - "type": "number", - "format": "float" - } - }, - { - "name": "embedder", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The documents are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SimilarResult" - }, - "example": { - "hits": [ - { - "id": 2770, - "title": "American Pie 2", - "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", - "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", - "release_date": 997405200 - }, - { - "id": 190859, - "title": "American Sniper", - "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", - "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", - "release_date": 1418256000 - } - ], - "offset": 0, - "limit": 2, - "estimatedTotalHits": 976, - "processingTimeMs": 35, - "query": "american " - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ] - }, - "post": { - "tags": [ - "Similar documents" - ], - "summary": "Get similar documents with POST", - "description": "Retrieve documents similar to a specific search result.", - "operationId": "similar_post", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SimilarQuery" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "The documents are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SimilarResult" - }, - "example": { - "hits": [ - { - "id": 2770, - "title": "American Pie 2", - "poster": "https://image.tmdb.org/t/p/w1280/q4LNgUnRfltxzp3gf1MAGiK5LhV.jpg", - "overview": "The whole gang are back and as close as ever. They decide to get even closer by spending the summer together at a beach house. They decide to hold the biggest…", - "release_date": 997405200 - }, - { - "id": 190859, - "title": "American Sniper", - "poster": "https://image.tmdb.org/t/p/w1280/svPHnYE7N5NAGO49dBmRhq0vDQ3.jpg", - "overview": "U.S. Navy SEAL Chris Kyle takes his sole mission—protect his comrades—to heart and becomes one of the most lethal snipers in American history. His pinpoint accuracy not only saves countless lives but also makes him a prime…", - "release_date": 1418256000 - } - ], - "offset": 0, - "limit": 2, - "estimatedTotalHits": 976, - "processingTimeMs": 35, - "query": "american " - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ] - } - }, - "/indexes/{indexUid}/stats": { - "get": { - "tags": [ - "Stats" - ], - "summary": "Get stats of index", - "description": "Get the stats of an index.", - "operationId": "get_index_stats", - "parameters": [ - { - "name": "indexUid", - "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "responses": { - "200": { - "description": "The stats of the index", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IndexStats" - }, - "example": { - "numberOfDocuments": 10, - "rawDocumentDbSize": 10, - "avgDocumentSize": 10, - "numberOfEmbeddings": 10, - "numberOfEmbeddedDocuments": 10, - "isIndexing": true, - "fieldDistribution": { - "genre": 10, - "author": 9 - } - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "Index not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Index `movies` not found.", - "code": "index_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "stats.get", - "stats.*", - "*" - ] - } - ] - } - }, - "/keys": { - "get": { - "tags": [ - "Keys" - ], - "summary": "Get API Keys", - "description": "List all API Keys", - "operationId": "list_api_keys", - "parameters": [ - { - "name": "offset", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "default": 0, - "minimum": 0 - } - }, - { - "name": "limit", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "default": 20, - "minimum": 0 - } - } - ], - "responses": { - "202": { - "description": "List of keys", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationView_KeyView" - }, - "example": { - "results": [ - { - "uid": "01b4bc42-eb33-4041-b481-254d00cce834", - "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", - "name": "An API Key", - "actions": [ - "documents.add" - ], - "indexes": [ - "movies" - ], - "expiresAt": "2022-11-12T10:00:00Z", - "createdAt": "2021-11-12T10:00:00Z", - "updatedAt": "2021-11-12T10:00:00Z" - } - ], - "limit": 20, - "offset": 0, - "total": 1 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "keys.get", - "keys.*", - "*" - ] - } - ] - }, - "post": { - "tags": [ - "Keys" - ], - "summary": "Create an API Key", - "description": "Create an API Key.", - "operationId": "create_api_key", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateApiKey" - } - } - }, - "required": true - }, - "responses": { - "202": { - "description": "Key has been created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/KeyView" - }, - "example": { - "uid": "01b4bc42-eb33-4041-b481-254d00cce834", - "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", - "name": "Indexing Products API key", - "actions": [ - "documents.add" - ], - "indexes": [ - "products" - ], - "expiresAt": "2021-11-13T00:00:00Z", - "createdAt": "2021-11-12T10:00:00Z", - "updatedAt": "2021-11-12T10:00:00Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "keys.create", - "keys.*", - "*" - ] - } - ] - } - }, - "/keys/{uidOrKey}": { - "get": { - "tags": [ - "Keys" - ], - "summary": "Get an API Key", - "description": "Get an API key from its `uid` or its `key` field.", - "operationId": "get_api_key", - "parameters": [ - { - "name": "uidOrKey", - "in": "path", - "description": "The `uid` or `key` field of an existing API key", - "required": true, - "schema": { - "type": "string", - "format": "password" - }, - "example": "7b198a7f-52a0-4188-8762-9ad93cd608b2" - } - ], - "responses": { - "200": { - "description": "The key is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/KeyView" - }, - "example": { - "uid": "01b4bc42-eb33-4041-b481-254d00cce834", - "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", - "name": "An API Key", - "actions": [ - "documents.add" - ], - "indexes": [ - "movies" - ], - "expiresAt": "2022-11-12T10:00:00Z", - "createdAt": "2021-11-12T10:00:00Z", - "updatedAt": "2021-11-12T10:00:00Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "keys.get", - "keys.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Keys" - ], - "summary": "Delete a key", - "description": "Delete the specified API key.", - "operationId": "delete_api_key", - "parameters": [ - { - "name": "uidOrKey", - "in": "path", - "description": "The `uid` or `key` field of an existing API key", - "required": true, - "schema": { - "type": "string", - "format": "password" - }, - "example": "7b198a7f-52a0-4188-8762-9ad93cd608b2" - } - ], - "responses": { - "204": { - "description": "The key have been removed" - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "keys.delete", - "keys.*", - "*" - ] - } - ] - }, - "patch": { - "tags": [ - "Keys" - ], - "summary": "Update a Key", - "description": "Update the name and description of an API key.\nUpdates to keys are partial. This means you should provide only the fields you intend to update, as any fields not present in the payload will remain unchanged.", - "operationId": "patch_api_key", - "parameters": [ - { - "name": "uidOrKey", - "in": "path", - "description": "The `uid` or `key` field of an existing API key", - "required": true, - "schema": { - "type": "string", - "format": "password" - }, - "example": "7b198a7f-52a0-4188-8762-9ad93cd608b2" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchApiKey" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "The key have been updated", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/KeyView" - }, - "example": { - "uid": "01b4bc42-eb33-4041-b481-254d00cce834", - "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4", - "name": "An API Key", - "actions": [ - "documents.add" - ], - "indexes": [ - "movies" - ], - "expiresAt": "2022-11-12T10:00:00Z", - "createdAt": "2021-11-12T10:00:00Z", - "updatedAt": "2021-11-12T10:00:00Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "keys.update", - "keys.*", - "*" - ] - } - ] - } - }, - "/logs/stderr": { - "post": { - "tags": [ - "Logs" - ], - "summary": "Update target of the console logs", - "description": "This route lets you specify at runtime the level of the console logs outputted on stderr.", - "operationId": "update_stderr_target", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateStderrLogs" - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "The console logs have been updated" - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "metrics.get", - "metrics.*", - "*" - ] - } - ] - } - }, - "/logs/stream": { - "post": { - "tags": [ - "Logs" - ], - "summary": "Retrieve logs", - "description": "Stream logs over HTTP. The format of the logs depends on the configuration specified in the payload.\nThe logs are sent as multi-part, and the stream never stops, so make sure your clients correctly handle that.\nTo make the server stop sending you logs, you can call the `DELETE /logs/stream` route.\n\nThere can only be one listener at a timeand an error will be returned if you call this route while it's being used by another client.", - "operationId": "get_logs", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetLogs" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Logs are being returned", - "content": { - "application/json": { - "schema": { - "type": "string" - }, - "example": "\n2024-10-08T13:35:02.643750Z WARN HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: tracing_actix_web::middleware: Error encountered while processing the incoming HTTP request: ResponseError { code: 400, message: \"Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625\", error_code: \"feature_not_enabled\", error_type: \"invalid_request\", error_link: \"https://docs.meilisearch.com/errors#feature_not_enabled\" }\n2024-10-08T13:35:02.644191Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=400 error=Getting metrics requires enabling the `metrics` experimental feature. See https://github.com/meilisearch/product/discussions/625}: meilisearch: close time.busy=1.66ms time.idle=658µs\n2024-10-08T13:35:18.564152Z INFO HTTP request{method=PATCH host=\"localhost:7700\" route=/experimental-features query_parameters= user_agent=curl/8.6.0 status_code=200}: meilisearch: close time.busy=1.17ms time.idle=127µs\n2024-10-08T13:35:23.094987Z INFO HTTP request{method=GET host=\"localhost:7700\" route=/metrics query_parameters= user_agent=HTTPie/3.2.3 status_code=200}: meilisearch: close time.busy=2.12ms time.idle=595µs\n" - } - } - }, - "400": { - "description": "The route is already being used", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The `/logs/stream` route is currently in use by someone else.", - "code": "bad_request", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#bad_request" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "metrics.get", - "metrics.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Logs" - ], - "summary": "Stop retrieving logs", - "description": "Call this route to make the engine stops sending logs through the `POST /logs/stream` route.", - "operationId": "cancel_logs", - "responses": { - "204": { - "description": "Logs are being returned" - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "metrics.get", - "metrics.*", - "*" - ] - } - ] - } - }, - "/metrics": { - "get": { - "tags": [ - "Stats" - ], - "summary": "Get prometheus metrics", - "description": "Retrieve metrics on the engine. See https://www.meilisearch.com/docs/learn/experimental/metrics\nCurrently, [the feature is experimental](https://www.meilisearch.com/docs/learn/experimental/overview)\nwhich means it must be enabled.", - "operationId": "get_metrics", - "responses": { - "200": { - "description": "The metrics of the instance", - "content": { - "text/plain": { - "schema": { - "type": "string" - }, - "example": "\n# HELP meilisearch_db_size_bytes Meilisearch DB Size In Bytes\n# TYPE meilisearch_db_size_bytes gauge\nmeilisearch_db_size_bytes 1130496\n# HELP meilisearch_http_requests_total Meilisearch HTTP requests total\n# TYPE meilisearch_http_requests_total counter\nmeilisearch_http_requests_total{method=\"GET\",path=\"/metrics\",status=\"400\"} 1\nmeilisearch_http_requests_total{method=\"PATCH\",path=\"/experimental-features\",status=\"200\"} 1\n# HELP meilisearch_http_response_time_seconds Meilisearch HTTP response times\n# TYPE meilisearch_http_response_time_seconds histogram\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.005\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.01\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.025\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.05\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.075\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.25\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"0.75\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"1\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"2.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"7.5\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"10\"} 0\nmeilisearch_http_response_time_seconds_bucket{method=\"GET\",path=\"/metrics\",le=\"+Inf\"} 0\nmeilisearch_http_response_time_seconds_sum{method=\"GET\",path=\"/metrics\"} 0\nmeilisearch_http_response_time_seconds_count{method=\"GET\",path=\"/metrics\"} 0\n# HELP meilisearch_index_count Meilisearch Index Count\n# TYPE meilisearch_index_count gauge\nmeilisearch_index_count 1\n# HELP meilisearch_index_docs_count Meilisearch Index Docs Count\n# TYPE meilisearch_index_docs_count gauge\nmeilisearch_index_docs_count{index=\"mieli\"} 2\n# HELP meilisearch_is_indexing Meilisearch Is Indexing\n# TYPE meilisearch_is_indexing gauge\nmeilisearch_is_indexing 0\n# HELP meilisearch_last_update Meilisearch Last Update\n# TYPE meilisearch_last_update gauge\nmeilisearch_last_update 1726675964\n# HELP meilisearch_nb_tasks Meilisearch Number of tasks\n# TYPE meilisearch_nb_tasks gauge\nmeilisearch_nb_tasks{kind=\"indexes\",value=\"mieli\"} 39\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"canceled\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"enqueued\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"failed\"} 4\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"processing\"} 0\nmeilisearch_nb_tasks{kind=\"statuses\",value=\"succeeded\"} 35\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentAdditionOrUpdate\"} 9\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentDeletion\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"documentEdition\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"dumpCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexDeletion\"} 8\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexSwap\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"indexUpdate\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"settingsUpdate\"} 22\nmeilisearch_nb_tasks{kind=\"types\",value=\"snapshotCreation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskCancelation\"} 0\nmeilisearch_nb_tasks{kind=\"types\",value=\"taskDeletion\"} 0\n# HELP meilisearch_used_db_size_bytes Meilisearch Used DB Size In Bytes\n# TYPE meilisearch_used_db_size_bytes gauge\nmeilisearch_used_db_size_bytes 409600\n" - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "metrics.get", - "metrics.*", - "*" - ] - } - ] - } - }, - "/multi-search": { - "post": { - "tags": [ - "Multi-search" - ], - "summary": "Perform a multi-search", - "description": "Bundle multiple search queries in a single API request. Use this endpoint to search through multiple indexes at once.", - "operationId": "multi_search_with_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FederatedSearch" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Federated multi-search", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FederatedSearchResult" - }, - "example": { - "hits": [ - { - "id": 42, - "title": "Batman returns", - "overview": "The overview of batman returns", - "_federation": { - "indexUid": "movies", - "queriesPosition": 0 - } - }, - { - "comicsId": "batman-killing-joke", - "description": "This comic is really awesome", - "title": "Batman: the killing joke", - "_federation": { - "indexUid": "comics", - "queriesPosition": 1 - } - } - ], - "processingTimeMs": 0, - "limit": 20, - "offset": 0, - "estimatedTotalHits": 2, - "semanticHitCount": 0 - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ] - } - }, - "/network": { - "get": { - "tags": [ - "Network" - ], - "summary": "Get network topology", - "description": "Get a list of all Meilisearch instances currently known to this instance.", - "operationId": "get_network", - "responses": { - "200": { - "description": "Known nodes are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Network" - }, - "example": { - "self": "ms-0", - "remotes": { - "ms-0": { - "url": "http://localhost:7700", - "searchApiKey": null, - "writeApiKey": null - }, - "ms-1": { - "url": "http://localhost:7701", - "searchApiKey": "foo", - "writeApiKey": "bar" - }, - "ms-2": { - "url": "http://localhost:7702", - "searchApiKey": "bar", - "writeApiKey": "foo" - } - } - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "network.get", - "*" - ] - } - ] - }, - "patch": { - "tags": [ - "Network" - ], - "summary": "Configure Network", - "description": "Add or remove nodes from network.", - "operationId": "patch_network", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Network" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "New network state is returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Network" - }, - "example": { - "self": "ms-0", - "remotes": { - "ms-0": { - "url": "http://localhost:7700", - "searchApiKey": null, - "writeApiKey": null - }, - "ms-1": { - "url": "http://localhost:7701", - "searchApiKey": "foo", - "writeApiKey": "bar" - }, - "ms-2": { - "url": "http://localhost:7702", - "searchApiKey": "bar", - "writeApiKey": "foo" - } - } - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "network.update", - "*" - ] - } - ] - } - }, - "/snapshots": { - "post": { - "tags": [ - "Snapshots" - ], - "summary": "Create a snapshot", - "description": "Triggers a snapshot creation process. Once the process is complete, a snapshot is created in the snapshot directory. If the snapshot directory does not exist yet, it will be created.", - "operationId": "create_snapshot", - "responses": { - "202": { - "description": "Snapshot is being created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 0, - "indexUid": null, - "status": "enqueued", - "type": "snapshotCreation", - "enqueuedAt": "2021-01-01T09:39:00.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "snapshots.create", - "snapshots.*", - "*" - ] - } - ] - } - }, - "/stats": { - "get": { - "tags": [ - "Stats" - ], - "summary": "Get stats of all indexes.", - "description": "Get stats of all indexes.", - "operationId": "get_stats", - "responses": { - "200": { - "description": "The stats of the instance", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Stats" - }, - "example": { - "databaseSize": 567, - "usedDatabaseSize": 456, - "lastUpdate": "2019-11-20T09:40:33.711324Z", - "indexes": { - "movies": { - "numberOfDocuments": 10, - "rawDocumentDbSize": 100, - "maxDocumentSize": 16, - "avgDocumentSize": 10, - "isIndexing": true, - "fieldDistribution": { - "genre": 10, - "author": 9 - } - } - } - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "stats.get", - "stats.*", - "*" - ] - } - ] - } - }, - "/swap-indexes": { - "post": { - "tags": [ - "Indexes" - ], - "summary": "Swap indexes", - "description": "Swap the documents, settings, and task history of two or more indexes. You can only swap indexes in pairs. However, a single request can swap as many index pairs as you wish.\nSwapping indexes is an atomic transaction: either all indexes are successfully swapped, or none are.\nSwapping indexA and indexB will also replace every mention of indexA by indexB and vice-versa in the task history. enqueued tasks are left unmodified.", - "operationId": "swap_indexes", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SwapIndexesPayload" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 3, - "indexUid": null, - "status": "enqueued", - "type": "indexSwap", - "enqueuedAt": "2021-08-12T10:00:00.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "search", - "*" - ] - } - ] - } - }, - "/tasks": { - "get": { - "tags": [ - "Tasks" - ], - "summary": "Get all tasks", - "description": "Get all [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)", - "operationId": "get_tasks", - "parameters": [ - { - "name": "limit", - "in": "query", - "description": "Maximum number of results to return.", - "required": false, - "schema": { - "type": "integer", - "format": "u-int32", - "default": 20, - "minimum": 0 - }, - "example": 12 - }, - { - "name": "from", - "in": "query", - "description": "Fetch the next set of results from the given uid.", - "required": false, - "schema": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "example": 12421 - }, - { - "name": "reverse", - "in": "query", - "description": "The order you want to retrieve the objects.", - "required": false, - "schema": { - "type": "boolean" - }, - "example": true - }, - { - "name": "batchUids", - "in": "query", - "description": "Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "example": 12421 - }, - { - "name": "uids", - "in": "query", - "description": "Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 231, - 423, - 598, - "*" - ] - }, - { - "name": "canceledBy", - "in": "query", - "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 374, - "*" - ] - }, - { - "name": "types", - "in": "query", - "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [ - "documentAdditionOrUpdate", - "*" - ] - }, - { - "name": "statuses", - "in": "query", - "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Status" - } - }, - "example": [ - "succeeded", - "failed", - "canceled", - "enqueued", - "processing", - "*" - ] - }, - { - "name": "indexUids", - "in": "query", - "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [ - "movies", - "theater", - "*" - ] - }, - { - "name": "afterEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "afterStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "afterFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - } - ], - "responses": { - "200": { - "description": "Get all tasks", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AllTasks" - }, - "example": { - "results": [ - { - "uid": 144, - "indexUid": "mieli", - "status": "succeeded", - "type": "settingsUpdate", - "canceledBy": null, - "details": { - "settings": { - "filterableAttributes": [ - "play_count" - ] - } - }, - "error": null, - "duration": "PT0.009330S", - "enqueuedAt": "2024-08-08T09:01:13.348471Z", - "startedAt": "2024-08-08T09:01:13.349442Z", - "finishedAt": "2024-08-08T09:01:13.358772Z" - } - ], - "total": 1, - "limit": 1, - "from": 144, - "next": null - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "tasks.get", - "tasks.*", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Tasks" - ], - "summary": "Delete tasks", - "description": "Delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) on filter", - "operationId": "delete_tasks", - "parameters": [ - { - "name": "uids", - "in": "query", - "description": "Permits to filter tasks by their uid. By default, when the `uids` query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 231, - 423, - 598, - "*" - ] - }, - { - "name": "batchUids", - "in": "query", - "description": "Lets you filter tasks by their `batchUid`.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 231, - 423, - 598, - "*" - ] - }, - { - "name": "canceledBy", - "in": "query", - "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 374, - "*" - ] - }, - { - "name": "types", - "in": "query", - "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Kind" - } - }, - "example": [ - "documentDeletion", - "*" - ] - }, - { - "name": "statuses", - "in": "query", - "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Status" - } - }, - "example": [ - "succeeded", - "failed", - "canceled", - "*" - ] - }, - { - "name": "indexUids", - "in": "query", - "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [ - "movies", - "theater", - "*" - ] - }, - { - "name": "afterEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "afterStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "afterFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - } - ], - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "taskDeletion", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "400": { - "description": "A filter is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Query parameters to filter the tasks to delete are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.", - "code": "missing_task_filters", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#missing_task_filters" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "The task uid does not exist", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Task :taskUid not found.", - "code": "task_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors/#task_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "tasks.delete", - "tasks.*", - "*" - ] - } - ] - } - }, - "/tasks/cancel": { - "post": { - "tags": [ - "Tasks" - ], - "summary": "Cancel tasks", - "description": "Cancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", - "operationId": "cancel_tasks", - "parameters": [ - { - "name": "uids", - "in": "query", - "description": "Permits to filter tasks by their uid. By default, when the `uids` query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 231, - 423, - 598, - "*" - ] - }, - { - "name": "batchUids", - "in": "query", - "description": "Lets you filter tasks by their `batchUid`.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 231, - 423, - 598, - "*" - ] - }, - { - "name": "canceledBy", - "in": "query", - "description": "Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "example": [ - 374, - "*" - ] - }, - { - "name": "types", - "in": "query", - "description": "Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Kind" - } - }, - "example": [ - "documentDeletion", - "*" - ] - }, - { - "name": "statuses", - "in": "query", - "description": "Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Status" - } - }, - "example": [ - "succeeded", - "failed", - "canceled", - "*" - ] - }, - { - "name": "indexUids", - "in": "query", - "description": "Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": [ - "movies", - "theater", - "*" - ] - }, - { - "name": "afterEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeEnqueuedAt", - "in": "query", - "description": "Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "afterStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeStartedAt", - "in": "query", - "description": "Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "afterFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - }, - { - "name": "beforeFinishedAt", - "in": "query", - "description": "Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.", - "required": false, - "schema": { - "type": "string" - }, - "example": [ - "2024-08-08T16:37:09.971Z", - "*" - ] - } - ], - "responses": { - "200": { - "description": "Task successfully enqueued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SummarizedTaskView" - }, - "example": { - "taskUid": 147, - "indexUid": null, - "status": "enqueued", - "type": "taskCancelation", - "enqueuedAt": "2024-08-08T17:05:55.791772Z" - } - } - } - }, - "400": { - "description": "A filter is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Query parameters to filter the tasks to cancel are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.", - "code": "missing_task_filters", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#missing_task_filters" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "The task uid does not exist", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Task :taskUid not found.", - "code": "task_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors/#task_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "tasks.cancel", - "tasks.*", - "*" - ] - } - ] - } - }, - "/tasks/{taskUid}": { - "get": { - "tags": [ - "Tasks" - ], - "summary": "Get a task", - "description": "Get a [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", - "operationId": "get_task", - "parameters": [ - { - "name": "taskUid", - "in": "path", - "description": "The task identifier", - "required": true, - "schema": { - "type": "string", - "format": "u-int32" - }, - "example": 0 - } - ], - "responses": { - "200": { - "description": "Task successfully retrieved", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TaskView" - }, - "example": { - "uid": 1, - "indexUid": "movies", - "status": "succeeded", - "type": "documentAdditionOrUpdate", - "canceledBy": null, - "details": { - "receivedDocuments": 79000, - "indexedDocuments": 79000 - }, - "error": null, - "duration": "PT1S", - "enqueuedAt": "2021-01-01T09:39:00.000000Z", - "startedAt": "2021-01-01T09:39:01.000000Z", - "finishedAt": "2021-01-01T09:39:02.000000Z" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - }, - "404": { - "description": "The task uid does not exist", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Task :taskUid not found.", - "code": "task_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors/#task_not_found" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "tasks.get", - "tasks.*", - "*" - ] - } - ] - } - }, - "/version": { - "get": { - "tags": [ - "Version" - ], - "summary": "Get version", - "description": "Current version of Meilisearch.", - "operationId": "get_version", - "responses": { - "200": { - "description": "Instance is healthy", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VersionResponse" - }, - "example": { - "commitSha": "b46889b5f0f2f8b91438a08a358ba8f05fc09fc1", - "commitDate": "2021-07-08", - "pkgVersion": "0.23.0" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "version", - "*" - ] - } - ] - } - }, - "/webhooks": { - "get": { - "tags": [ - "Webhooks" - ], - "operationId": "get_webhooks", - "responses": { - "200": { - "description": "Webhooks are returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookResults" - }, - "example": { - "results": [ - { - "uuid": "550e8400-e29b-41d4-a716-446655440000", - "url": "https://your.site/on-tasks-completed", - "headers": { - "Authorization": "Bearer a-secret-token" - }, - "isEditable": true - }, - { - "uuid": "550e8400-e29b-41d4-a716-446655440001", - "url": "https://another.site/on-tasks-completed", - "isEditable": true - } - ] - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "webhooks.get", - "webhooks.*", - "*.get", - "*" - ] - } - ] - }, - "post": { - "tags": [ - "Webhooks" - ], - "operationId": "post_webhook", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookSettings" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Webhook created successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookWithMetadata" - }, - "example": { - "uuid": "550e8400-e29b-41d4-a716-446655440000", - "url": "https://your.site/on-tasks-completed", - "headers": { - "Authorization": "Bearer a-secret-token" - }, - "isEditable": true - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "webhooks.create", - "webhooks.*", - "*" - ] - } - ] - } - }, - "/webhooks/{uuid}": { - "get": { - "tags": [ - "Webhooks" - ], - "operationId": "get_webhook", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "The universally unique identifier of the webhook", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Webhook found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookWithMetadata" - }, - "example": { - "uuid": "550e8400-e29b-41d4-a716-446655440000", - "url": "https://your.site/on-tasks-completed", - "headers": { - "Authorization": "Bearer a-secret" - }, - "isEditable": true - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - }, - "404": { - "description": "Webhook not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "webhooks.get", - "webhooks.*", - "*.get", - "*" - ] - } - ] - }, - "delete": { - "tags": [ - "Webhooks" - ], - "operationId": "delete_webhook", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "The universally unique identifier of the webhook", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "Webhook deleted successfully" - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - }, - "404": { - "description": "Webhook not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "webhooks.delete", - "webhooks.*", - "*" - ] - } - ] - }, - "patch": { - "tags": [ - "Webhooks" - ], - "operationId": "patch_webhook", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "The universally unique identifier of the webhook", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookSettings" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Webhook updated successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookWithMetadata" - }, - "example": { - "uuid": "550e8400-e29b-41d4-a716-446655440000", - "url": "https://your.site/on-tasks-completed", - "headers": { - "Authorization": "Bearer a-secret-token" - }, - "isEditable": true - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - }, - "401": { - "description": "The authorization header is missing", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - } - } - } - } - }, - "security": [ - { - "Bearer": [ - "webhooks.update", - "webhooks.*", - "*" - ] - } - ] - } - } - }, - "components": { - "schemas": { - "Action": { - "type": "string", - "enum": [ - "*", - "search", - "documents.*", - "documents.add", - "documents.get", - "documents.delete", - "indexes.*", - "indexes.create", - "indexes.get", - "indexes.update", - "indexes.delete", - "indexes.swap", - "tasks.*", - "tasks.cancel", - "tasks.delete", - "tasks.get", - "settings.*", - "settings.get", - "settings.update", - "stats.*", - "stats.get", - "metrics.*", - "metrics.get", - "dumps.*", - "dumps.create", - "snapshots.*", - "snapshots.create", - "version", - "keys.create", - "keys.get", - "keys.update", - "keys.delete", - "experimental.get", - "experimental.update", - "export", - "network.get", - "network.update", - "chatCompletions", - "chats.*", - "chats.get", - "chats.delete", - "chatsSettings.*", - "chatsSettings.get", - "chatsSettings.update", - "*.get", - "webhooks.get", - "webhooks.update", - "webhooks.delete", - "webhooks.create", - "webhooks.*" - ] - }, - "AllBatches": { - "type": "object", - "required": [ - "results", - "total", - "limit" - ], - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BatchView" - } - }, - "total": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - }, - "limit": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "from": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "minimum": 0 - }, - "next": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "minimum": 0 - } - } - }, - "AllTasks": { - "type": "object", - "required": [ - "results", - "total", - "limit" - ], - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TaskView" - }, - "description": "The list of tasks that matched the filter." - }, - "total": { - "type": "integer", - "format": "u-int64", - "description": "Total number of browsable results using offset/limit parameters for the given resource.", - "minimum": 0 - }, - "limit": { - "type": "integer", - "format": "u-int32", - "description": "Limit given for the query. If limit is not provided as a query parameter, this parameter displays the default limit value.", - "minimum": 0 - }, - "from": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "description": "The first task uid returned.", - "minimum": 0 - }, - "next": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "description": "Represents the value to send in from to fetch the next slice of the results. The first item for the next slice starts at this exact number. When the returned value is null, it means that all the data have been browsed in the given order.", - "minimum": 0 - } - } - }, - "AttributePatterns": { - "type": "object", - "required": [ - "patterns" - ], - "properties": { - "patterns": { - "type": "array", - "items": { - "type": "string" - }, - "example": [ - "title", - "overview_*", - "release_date" - ] - } - } - }, - "BTreeMap": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "object", - "required": [ - "start", - "length" - ], - "properties": { - "start": { - "type": "integer", - "minimum": 0 - }, - "length": { - "type": "integer", - "minimum": 0 - }, - "indices": { - "type": [ - "array", - "null" - ], - "items": { - "type": "integer", - "minimum": 0 - } - } - } - } - }, - "propertyNames": { - "type": "string" - } - }, - "BatchStats": { - "type": "object", - "required": [ - "totalNbTasks", - "status", - "types", - "indexUids" - ], - "properties": { - "totalNbTasks": { - "$ref": "#/components/schemas/u32" - }, - "status": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "propertyNames": { - "type": "string", - "description": "The status of a task.", - "enum": [ - "enqueued", - "processing", - "succeeded", - "failed", - "canceled" - ], - "example": "processing" - } - }, - "types": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "propertyNames": { - "type": "string", - "description": "The type of the task.", - "enum": [ - "documentAdditionOrUpdate", - "documentEdition", - "documentDeletion", - "settingsUpdate", - "indexCreation", - "indexDeletion", - "indexUpdate", - "indexSwap", - "taskCancelation", - "taskDeletion", - "dumpCreation", - "snapshotCreation", - "export", - "upgradeDatabase" - ], - "example": [ - "documentAdditionOrUpdate", - "documentEdition", - "documentDeletion", - "settingsUpdate", - "indexCreation", - "indexDeletion", - "indexUpdate", - "indexSwap", - "taskCancelation", - "taskDeletion", - "dumpCreation", - "snapshotCreation", - "export", - "upgradeDatabase" - ] - } - }, - "indexUids": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "propertyNames": { - "type": "string" - } - }, - "progressTrace": { - "type": "object", - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - }, - "writeChannelCongestion": { - "type": [ - "object", - "null" - ], - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - }, - "internalDatabaseSizes": { - "type": "object", - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - } - } - }, - "BatchStatsView": { - "allOf": [ - { - "$ref": "#/components/schemas/BatchStats" - }, - { - "type": "object", - "properties": { - "embedderRequests": { - "$ref": "#/components/schemas/EmbedderStatsView" - } - } - } - ] - }, - "BatchView": { - "type": "object", - "required": [ - "uid", - "details", - "stats" - ], - "properties": { - "uid": { - "$ref": "#/components/schemas/u32" - }, - "progress": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ProgressView" - } - ] - }, - "details": { - "$ref": "#/components/schemas/DetailsView" - }, - "stats": { - "$ref": "#/components/schemas/BatchStatsView" - }, - "duration": { - "type": [ - "string", - "null" - ] - }, - "startedAt": { - "type": "string", - "format": "date-time" - }, - "finishedAt": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "batchStrategy": { - "type": "string" - } - } - }, - "BrowseQuery": { - "type": "object", - "required": [ - "offset", - "limit", - "retrieveVectors" - ], - "properties": { - "offset": { - "type": "integer", - "example": 150, - "minimum": 0 - }, - "limit": { - "type": "integer", - "default": 20, - "example": 1, - "minimum": 0 - }, - "fields": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "example": [ - "title, description" - ] - }, - "retrieveVectors": { - "type": "boolean", - "example": true - }, - "ids": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "example": [ - "cody", - "finn", - "brandy", - "gambit" - ] - }, - "filter": {}, - "sort": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "example": [ - "title:asc", - "rating:desc" - ] - } - } - }, - "ChatSearchParams": { - "type": "object", - "properties": { - "hybrid": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/HybridQuery" - } - ] - }, - "limit": { - "type": [ - "integer", - "null" - ], - "minimum": 0 - }, - "sort": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "distinct": { - "type": [ - "string", - "null" - ] - }, - "matchingStrategy": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/MatchingStrategy" - } - ] - }, - "attributesToSearchOn": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "rankingScoreThreshold": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/RankingScoreThreshold" - } - ] - } - }, - "additionalProperties": false - }, - "ChatSettings": { - "type": "object", - "properties": { - "description": { - "type": [ - "string", - "null" - ] - }, - "documentTemplate": { - "type": [ - "string", - "null" - ], - "description": "A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text." - }, - "documentTemplateMaxBytes": { - "type": [ - "integer", - "null" - ], - "description": "Rendered texts are truncated to this size. Defaults to 400.", - "minimum": 0 - }, - "searchParameters": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ChatSearchParams", - "description": "The search parameters to use for the LLM." - } - ] - } - }, - "additionalProperties": false - }, - "Code": { - "type": "string", - "enum": [ - "api_key_already_exists", - "api_key_not_found", - "bad_parameter", - "bad_request", - "database_size_limit_reached", - "document_not_found", - "dump_already_processing", - "dump_not_found", - "dump_process_failed", - "duplicate_index_found", - "immutable_api_key_actions", - "immutable_api_key_created_at", - "immutable_api_key_expires_at", - "immutable_api_key_indexes", - "immutable_api_key_key", - "immutable_api_key_uid", - "immutable_api_key_updated_at", - "immutable_index_created_at", - "immutable_index_updated_at", - "index_already_exists", - "index_creation_failed", - "index_not_found", - "index_primary_key_already_exists", - "index_primary_key_multiple_candidates_found", - "index_primary_key_no_candidate_found", - "internal", - "invalid_api_key", - "invalid_api_key_actions", - "invalid_api_key_description", - "invalid_api_key_expires_at", - "invalid_api_key_indexes", - "invalid_api_key_limit", - "invalid_api_key_name", - "invalid_api_key_offset", - "invalid_api_key_uid", - "invalid_content_type", - "invalid_document_csv_delimiter", - "invalid_document_fields", - "invalid_document_retrieve_vectors", - "missing_document_filter", - "missing_document_edition_function", - "inconsistent_document_change_headers", - "invalid_document_filter", - "invalid_document_sort", - "invalid_document_geo_field", - "invalid_document_geojson_field", - "invalid_header_value", - "invalid_vector_dimensions", - "invalid_vectors_type", - "invalid_document_id", - "invalid_document_ids", - "invalid_document_limit", - "invalid_document_offset", - "invalid_search_embedder", - "invalid_similar_embedder", - "invalid_search_hybrid_query", - "invalid_index_limit", - "invalid_index_offset", - "invalid_index_primary_key", - "invalid_index_uid", - "invalid_multi_search_facets", - "invalid_multi_search_facets_by_index", - "invalid_multi_search_facet_order", - "invalid_multi_search_federated", - "invalid_multi_search_federation_options", - "invalid_multi_search_max_values_per_facet", - "invalid_multi_search_merge_facets", - "invalid_multi_search_query_facets", - "invalid_multi_search_query_pagination", - "invalid_multi_search_query_ranking_rules", - "invalid_multi_search_query_position", - "invalid_multi_search_remote", - "invalid_multi_search_weight", - "invalid_network_remotes", - "invalid_network_self", - "invalid_network_sharding", - "invalid_network_search_api_key", - "invalid_network_write_api_key", - "invalid_network_url", - "invalid_search_attributes_to_search_on", - "invalid_search_attributes_to_crop", - "invalid_search_attributes_to_highlight", - "invalid_similar_attributes_to_retrieve", - "invalid_similar_retrieve_vectors", - "invalid_search_attributes_to_retrieve", - "invalid_search_ranking_score_threshold", - "invalid_similar_ranking_score_threshold", - "invalid_search_retrieve_vectors", - "invalid_search_crop_length", - "invalid_search_crop_marker", - "invalid_search_facets", - "invalid_search_semantic_ratio", - "invalid_search_locales", - "invalid_facet_search_exhaustive_facet_count", - "invalid_facet_search_facet_name", - "invalid_similar_id", - "invalid_search_filter", - "invalid_similar_filter", - "invalid_search_highlight_post_tag", - "invalid_search_highlight_pre_tag", - "invalid_search_hits_per_page", - "invalid_similar_limit", - "invalid_search_limit", - "invalid_search_matching_strategy", - "invalid_similar_offset", - "invalid_search_offset", - "invalid_search_page", - "invalid_search_q", - "invalid_facet_search_query", - "invalid_facet_search_name", - "facet_search_disabled", - "invalid_search_vector", - "invalid_search_media", - "invalid_search_show_matches_position", - "invalid_search_show_ranking_score", - "invalid_similar_show_ranking_score", - "invalid_search_show_ranking_score_details", - "invalid_similar_show_ranking_score_details", - "invalid_search_sort", - "invalid_search_distinct", - "invalid_search_media_and_vector", - "invalid_settings_displayed_attributes", - "invalid_settings_distinct_attribute", - "invalid_settings_proximity_precision", - "invalid_settings_facet_search", - "invalid_settings_prefix_search", - "invalid_settings_faceting", - "invalid_settings_filterable_attributes", - "invalid_settings_pagination", - "invalid_settings_search_cutoff_ms", - "invalid_settings_embedders", - "invalid_settings_ranking_rules", - "invalid_settings_searchable_attributes", - "invalid_settings_sortable_attributes", - "invalid_settings_stop_words", - "invalid_settings_non_separator_tokens", - "invalid_settings_separator_tokens", - "invalid_settings_dictionary", - "invalid_settings_synonyms", - "invalid_settings_typo_tolerance", - "invalid_settings_localized_attributes", - "invalid_state", - "invalid_store_file", - "invalid_swap_duplicate_index_found", - "invalid_swap_indexes", - "invalid_swap_rename", - "invalid_task_after_enqueued_at", - "invalid_task_after_finished_at", - "invalid_task_after_started_at", - "invalid_task_before_enqueued_at", - "invalid_task_before_finished_at", - "invalid_task_before_started_at", - "invalid_task_canceled_by", - "invalid_task_from", - "invalid_task_limit", - "invalid_task_reverse", - "invalid_task_statuses", - "invalid_task_types", - "invalid_task_uids", - "invalid_batch_uids", - "io_error", - "feature_not_enabled", - "malformed_payload", - "max_fields_limit_exceeded", - "missing_api_key_actions", - "missing_api_key_expires_at", - "missing_api_key_indexes", - "missing_authorization_header", - "missing_content_type", - "missing_document_id", - "missing_facet_search_facet_name", - "missing_index_uid", - "missing_master_key", - "missing_network_url", - "missing_payload", - "missing_search_hybrid", - "missing_swap_indexes", - "missing_task_filters", - "no_space_left_on_device", - "payload_too_large", - "remote_bad_response", - "remote_bad_request", - "remote_could_not_send_request", - "remote_invalid_api_key", - "remote_remote_error", - "remote_timeout", - "too_many_search_requests", - "task_not_found", - "task_file_not_found", - "batch_not_found", - "too_many_open_files", - "too_many_vectors", - "unretrievable_document", - "unretrievable_error_code", - "unsupported_media_type", - "vector_embedding_error", - "not_found_similar_id", - "invalid_document_edition_context", - "invalid_document_edition_function_filter", - "edit_documents_by_function_error", - "invalid_settings_index_chat", - "invalid_settings_vector_store", - "invalid_export_url", - "invalid_export_api_key", - "invalid_export_payload_size", - "invalid_export_indexes_patterns", - "invalid_export_index_filter", - "invalid_export_index_override_settings", - "unimplemented_external_function_calling", - "unimplemented_non_streaming_chat_completions", - "unimplemented_multi_choice_chat_completions", - "chat_not_found", - "invalid_chat_setting_document_template", - "invalid_chat_completion_org_id", - "invalid_chat_completion_project_id", - "invalid_chat_completion_api_version", - "invalid_chat_completion_deployment_id", - "invalid_chat_completion_source", - "invalid_chat_completion_base_api", - "invalid_chat_completion_api_key", - "invalid_chat_completion_prompts", - "invalid_chat_completion_system_prompt", - "invalid_chat_completion_search_description_prompt", - "invalid_chat_completion_search_query_param_prompt", - "invalid_chat_completion_search_filter_param_prompt", - "invalid_chat_completion_search_index_uid_param_prompt", - "invalid_chat_completion_pre_query_prompt", - "invalid_webhooks", - "invalid_webhook_url", - "invalid_webhook_headers", - "immutable_webhook", - "invalid_webhook_uuid", - "webhook_not_found", - "immutable_webhook_uuid", - "immutable_webhook_is_editable" - ] - }, - "ComputedFacets": { - "type": "object", - "required": [ - "distribution", - "stats" - ], - "properties": { - "distribution": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - }, - "propertyNames": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - } - }, - "stats": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FacetStats" - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "CreateApiKey": { - "type": "object", - "required": [ - "uid", - "actions", - "indexes" - ], - "properties": { - "description": { - "type": [ - "string", - "null" - ], - "description": "A description for the key. `null` if empty.", - "example": null - }, - "name": { - "type": [ - "string", - "null" - ], - "description": "A human-readable name for the key. `null` if empty.", - "example": "Indexing Products API key" - }, - "uid": { - "type": "string", - "format": "uuid", - "description": "A uuid v4 to identify the API Key. If not specified, it's generated by Meilisearch.", - "example": null - }, - "actions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Action" - }, - "description": "A list of actions permitted for the key. `[\"*\"]` for all actions. The `*` character can be used as a wildcard when located at the last position. e.g. `documents.*` to authorize access on all documents endpoints.", - "example": [ - "documents.add" - ] - }, - "indexes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of accessible indexes permitted for the key. `[\"*\"]` for all indexes. The `*` character can be used as a wildcard when located at the last position. e.g. `products_*` to allow access to all indexes whose names start with `products_`.", - "example": [ - "products" - ] - }, - "expiresAt": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Represent the expiration date and time as RFC 3339 format. `null` equals to no expiration time." - } - } - }, - "DetailsExportIndexSettings": { - "allOf": [ - { - "$ref": "#/components/schemas/ExportIndexSettings" - }, - { - "type": "object", - "properties": { - "matchedDocuments": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "minimum": 0 - } - } - } - ] - }, - "DetailsView": { - "allOf": [ - { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/Settings_Unchecked", - "description": "[Learn more about the settings in this guide](https://www.meilisearch.com/docs/reference/api/settings)." - } - ] - }, - { - "type": "object", - "properties": { - "receivedDocuments": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Number of documents received for documentAdditionOrUpdate task.", - "minimum": 0 - }, - "indexedDocuments": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Number of documents finally indexed for documentAdditionOrUpdate task or a documentAdditionOrUpdate batch of tasks.", - "minimum": 0 - }, - "editedDocuments": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Number of documents edited for editDocumentByFunction task.", - "minimum": 0 - }, - "primaryKey": { - "type": [ - "string", - "null" - ], - "description": "Value for the primaryKey field encountered if any for indexCreation or indexUpdate task." - }, - "providedIds": { - "type": [ - "integer", - "null" - ], - "description": "Number of provided document ids for the documentDeletion task.", - "minimum": 0 - }, - "deletedDocuments": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Number of documents finally deleted for documentDeletion and indexDeletion tasks.", - "minimum": 0 - }, - "matchedTasks": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Number of tasks that match the request for taskCancelation or taskDeletion tasks.", - "minimum": 0 - }, - "canceledTasks": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Number of tasks canceled for taskCancelation.", - "minimum": 0 - }, - "deletedTasks": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Number of tasks deleted for taskDeletion.", - "minimum": 0 - }, - "originalFilter": { - "type": [ - "string", - "null" - ], - "description": "Original filter query for taskCancelation or taskDeletion tasks." - }, - "dumpUid": { - "type": [ - "string", - "null" - ], - "description": "Identifier generated for the dump for dumpCreation task." - }, - "context": { - "type": [ - "object", - "null" - ] - }, - "function": { - "type": [ - "string", - "null" - ] - }, - "swaps": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/IndexSwap" - } - }, - "upgradeFrom": { - "type": [ - "string", - "null" - ] - }, - "upgradeTo": { - "type": [ - "string", - "null" - ] - }, - "url": { - "type": [ - "string", - "null" - ] - }, - "apiKey": { - "type": [ - "string", - "null" - ] - }, - "payloadSize": { - "type": [ - "string", - "null" - ] - }, - "indexes": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "$ref": "#/components/schemas/DetailsExportIndexSettings" - }, - "propertyNames": { - "type": "string" - } - }, - "oldIndexUid": { - "type": [ - "string", - "null" - ] - }, - "newIndexUid": { - "type": [ - "string", - "null" - ] - } - } - } - ] - }, - "DistributionShift": { - "type": "object", - "description": "Describes the mean and sigma of distribution of embedding similarity in the embedding space.\n\nThe intended use is to make the similarity score more comparable to the regular ranking score.\nThis allows to correct effects where results are too \"packed\" around a certain value.", - "required": [ - "current_mean", - "current_sigma" - ], - "properties": { - "current_mean": { - "type": "number", - "format": "float", - "description": "Value where the results are \"packed\".\n\nSimilarity scores are translated so that they are packed around 0.5 instead" - }, - "current_sigma": { - "type": "number", - "format": "float", - "description": "standard deviation of a similarity score.\n\nSet below 0.4 to make the results less packed around the mean, and above 0.4 to make them more packed." - } - } - }, - "DocumentDeletionByFilter": { - "type": "object", - "required": [ - "filter" - ], - "properties": { - "filter": {} - } - }, - "DocumentEditionByFunction": { - "type": "object", - "required": [ - "function" - ], - "properties": { - "filter": { - "description": "A string containing a RHAI function." - }, - "context": { - "description": "A string containing a filter expression." - }, - "function": { - "type": "string", - "description": "An object with data Meilisearch should make available for the editing function." - } - } - }, - "EmbedderSource": { - "type": "string", - "enum": [ - "openAi", - "huggingFace", - "ollama", - "userProvided", - "rest", - "composite" - ] - }, - "EmbedderStatsView": { - "type": "object", - "required": [ - "total", - "failed" - ], - "properties": { - "total": { - "type": "integer", - "minimum": 0 - }, - "failed": { - "type": "integer", - "minimum": 0 - }, - "lastError": { - "type": [ - "string", - "null" - ] - } - } - }, - "ErrorType": { - "type": "string", - "enum": [ - "internal", - "invalid_request", - "auth", - "system" - ] - }, - "Export": { - "type": "object", - "properties": { - "url": { - "type": [ - "string", - "null" - ], - "example": "https://ms-1234.heaven.meilisearch.com" - }, - "apiKey": { - "type": [ - "string", - "null" - ], - "example": "1234abcd" - }, - "payloadSize": { - "type": [ - "string", - "null" - ], - "example": "24MiB" - }, - "indexes": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "$ref": "#/components/schemas/ExportIndexSettings" - }, - "propertyNames": { - "type": "string" - }, - "example": { - "*": { - "filter": null - } - } - } - } - }, - "ExportIndexSettings": { - "type": "object", - "properties": { - "filter": { - "type": [ - "string", - "null" - ], - "example": "genres = action" - }, - "overrideSettings": { - "type": [ - "boolean", - "null" - ], - "example": true - } - } - }, - "FacetSearchQuery": { - "type": "object", - "required": [ - "facet_name", - "matching_strategy" - ], - "properties": { - "facet_query": { - "type": [ - "string", - "null" - ] - }, - "facet_name": { - "type": "string" - }, - "q": { - "type": [ - "string", - "null" - ] - }, - "vector": { - "type": [ - "array", - "null" - ], - "items": { - "type": "number", - "format": "float" - } - }, - "media": {}, - "hybrid": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/HybridQuery" - } - ] - }, - "filter": {}, - "matching_strategy": { - "$ref": "#/components/schemas/MatchingStrategy" - }, - "attributes_to_search_on": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "ranking_score_threshold": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/RankingScoreThreshold" - } - ] - }, - "locales": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/Locale" - } - }, - "exhaustive_facet_count": { - "type": [ - "boolean", - "null" - ] - } - } - }, - "FacetStats": { - "type": "object", - "required": [ - "min", - "max" - ], - "properties": { - "min": { - "type": "number", - "format": "double" - }, - "max": { - "type": "number", - "format": "double" - } - } - }, - "FacetValuesSort": { - "type": "string", - "enum": [ - "alpha", - "count" - ] - }, - "FacetingSettings": { - "type": "object", - "properties": { - "maxValuesPerFacet": { - "type": [ - "integer", - "null" - ], - "example": 10, - "minimum": 0 - }, - "sortFacetValuesBy": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "$ref": "#/components/schemas/FacetValuesSort" - }, - "propertyNames": { - "type": "string" - }, - "example": { - "genre": "count" - } - } - }, - "additionalProperties": false - }, - "FederatedFacets": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ComputedFacets" - }, - "propertyNames": { - "type": "string" - } - }, - "FederatedSearch": { - "type": "object", - "required": [ - "queries" - ], - "properties": { - "queries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SearchQueryWithIndex" - } - }, - "federation": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/Federation" - } - ] - } - } - }, - "FederatedSearchResult": { - "allOf": [ - { - "$ref": "#/components/schemas/HitsInfo" - }, - { - "type": "object", - "required": [ - "hits", - "processingTimeMs" - ], - "properties": { - "hits": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SearchHit" - } - }, - "processingTimeMs": { - "type": "integer", - "minimum": 0 - }, - "queryVectors": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "$ref": "#/components/schemas/Vec" - }, - "propertyNames": { - "type": "integer", - "minimum": 0 - } - }, - "semanticHitCount": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "minimum": 0 - }, - "facetDistribution": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - }, - "propertyNames": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - } - }, - "facetStats": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "$ref": "#/components/schemas/FacetStats" - }, - "propertyNames": { - "type": "string" - } - }, - "facetsByIndex": { - "$ref": "#/components/schemas/FederatedFacets" - }, - "remoteErrors": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "$ref": "#/components/schemas/ResponseError" - }, - "propertyNames": { - "type": "string" - } - } - } - } - ] - }, - "Federation": { - "type": "object", - "required": [ - "limit", - "offset", - "facetsByIndex" - ], - "properties": { - "limit": { - "type": "integer", - "minimum": 0 - }, - "offset": { - "type": "integer", - "minimum": 0 - }, - "facetsByIndex": { - "type": "object", - "additionalProperties": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "propertyNames": { - "type": "string", - "description": "An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long", - "example": "movies" - } - }, - "mergeFacets": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/MergeFacets" - } - ] - } - } - }, - "FederationOptions": { - "type": "object", - "required": [ - "weight" - ], - "properties": { - "weight": { - "type": "number", - "format": "double" - }, - "remote": { - "type": [ - "string", - "null" - ] - }, - "queryPosition": { - "type": [ - "integer", - "null" - ], - "minimum": 0 - } - } - }, - "FilterFeatures": { - "type": "object", - "properties": { - "equality": { - "type": "boolean" - }, - "comparison": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "FilterableAttributesFeatures": { - "type": "object", - "properties": { - "facetSearch": { - "type": "boolean" - }, - "filter": { - "$ref": "#/components/schemas/FilterFeatures" - } - }, - "additionalProperties": false - }, - "FilterableAttributesPatterns": { - "type": "object", - "required": [ - "attributePatterns" - ], - "properties": { - "attributePatterns": { - "$ref": "#/components/schemas/AttributePatterns" - }, - "features": { - "$ref": "#/components/schemas/FilterableAttributesFeatures" - } - }, - "additionalProperties": false - }, - "FilterableAttributesRule": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/FilterableAttributesPatterns" - } - ] - }, - "GetLogs": { - "type": "object", - "required": [ - "target", - "mode", - "profileMemory" - ], - "properties": { - "target": { - "type": "string", - "description": "Lets you specify which parts of the code you want to inspect and is formatted like that: code_part=log_level,code_part=log_level\n- If the `code_part` is missing, then the `log_level` will be applied to everything.\n- If the `log_level` is missing, then the `code_part` will be selected in `info` log level.", - "default": "info", - "example": "milli=trace,index_scheduler,actix_web=off" - }, - "mode": { - "oneOf": [ - { - "$ref": "#/components/schemas/LogMode", - "description": "Lets you customize the format of the logs." - } - ], - "default": "Human" - }, - "profileMemory": { - "type": "boolean", - "description": "A boolean to indicate if you want to profile the memory as well. This is only useful while using the `profile` mode.\nBe cautious, though; it slows down the engine a lot.", - "default": false - } - } - }, - "HealthResponse": { - "type": "object", - "required": [ - "status" - ], - "properties": { - "status": { - "$ref": "#/components/schemas/HealthStatus", - "description": "The status of the instance." - } - } - }, - "HealthStatus": { - "type": "string", - "enum": [ - "available" - ] - }, - "HitsInfo": { - "oneOf": [ - { - "type": "object", - "required": [ - "hitsPerPage", - "page", - "totalPages", - "totalHits" - ], - "properties": { - "hitsPerPage": { - "type": "integer", - "minimum": 0 - }, - "page": { - "type": "integer", - "minimum": 0 - }, - "totalPages": { - "type": "integer", - "minimum": 0 - }, - "totalHits": { - "type": "integer", - "minimum": 0 - } - } - }, - { - "type": "object", - "required": [ - "limit", - "offset", - "estimatedTotalHits" - ], - "properties": { - "limit": { - "type": "integer", - "minimum": 0 - }, - "offset": { - "type": "integer", - "minimum": 0 - }, - "estimatedTotalHits": { - "type": "integer", - "minimum": 0 - } - } - } - ] - }, - "HybridQuery": { - "type": "object", - "required": [ - "embedder" - ], - "properties": { - "semanticRatio": { - "type": "number", - "format": "float" - }, - "embedder": { - "type": "string" - } - } - }, - "IndexCreateRequest": { - "type": "object", - "required": [ - "uid" - ], - "properties": { - "uid": { - "$ref": "#/components/schemas/IndexUid", - "description": "The name of the index" - }, - "primaryKey": { - "type": [ - "string", - "null" - ], - "description": "The primary key of the index", - "example": "id" - } - } - }, - "IndexStats": { - "type": "object", - "description": "Stats of an `Index`, as known to the `stats` route.", - "required": [ - "numberOfDocuments", - "rawDocumentDbSize", - "avgDocumentSize", - "isIndexing", - "fieldDistribution" - ], - "properties": { - "numberOfDocuments": { - "type": "integer", - "format": "u-int64", - "description": "Number of documents in the index", - "minimum": 0 - }, - "rawDocumentDbSize": { - "type": "integer", - "format": "u-int64", - "description": "Size of the documents database, in bytes.", - "minimum": 0 - }, - "avgDocumentSize": { - "type": "integer", - "format": "u-int64", - "description": "Average size of a document in the documents database.", - "minimum": 0 - }, - "isIndexing": { - "type": "boolean", - "description": "Whether or not the index is currently ingesting document" - }, - "numberOfEmbeddings": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Number of embeddings in the index", - "minimum": 0 - }, - "numberOfEmbeddedDocuments": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Number of embedded documents in the index", - "minimum": 0 - }, - "fieldDistribution": { - "type": "object", - "description": "Association of every field name with the number of times it occurs in the documents.", - "additionalProperties": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "IndexSwap": { - "type": "object", - "required": [ - "indexes" - ], - "properties": { - "indexes": { - "type": "array", - "items": false, - "prefixItems": [ - { - "type": "string" - }, - { - "type": "string" - } - ] - }, - "rename": { - "type": "boolean" - } - } - }, - "IndexUid": { - "type": "string", - "description": "An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long", - "example": "movies" - }, - "IndexView": { - "type": "object", - "required": [ - "uid", - "createdAt", - "updatedAt" - ], - "properties": { - "uid": { - "type": "string", - "description": "Unique identifier for the index" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "An `RFC 3339` format for date/time/duration." - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "description": "An `RFC 3339` format for date/time/duration." - }, - "primaryKey": { - "type": [ - "string", - "null" - ], - "description": "Custom primaryKey for documents" - } - } - }, - "KeyView": { - "type": "object", - "required": [ - "key", - "uid", - "actions", - "indexes", - "createdAt", - "updatedAt" - ], - "properties": { - "name": { - "type": [ - "string", - "null" - ], - "description": "The name of the API Key if any" - }, - "description": { - "type": [ - "string", - "null" - ], - "description": "The description of the API Key if any" - }, - "key": { - "type": "string", - "description": "The actual API Key you can send to Meilisearch" - }, - "uid": { - "type": "string", - "format": "uuid", - "description": "The `Uuid` specified while creating the key or autogenerated by Meilisearch." - }, - "actions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Action" - }, - "description": "The actions accessible with this key." - }, - "indexes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The indexes accessible with this key." - }, - "expiresAt": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "The expiration date of the key. Once this timestamp is exceeded the key is not deleted but cannot be used anymore." - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The date of creation of this API Key.", - "readOnly": true - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "description": "The date of the last update made on this key.", - "readOnly": true - } - } - }, - "Kind": { - "type": "string", - "description": "The type of the task.", - "enum": [ - "documentAdditionOrUpdate", - "documentEdition", - "documentDeletion", - "settingsUpdate", - "indexCreation", - "indexDeletion", - "indexUpdate", - "indexSwap", - "taskCancelation", - "taskDeletion", - "dumpCreation", - "snapshotCreation", - "export", - "upgradeDatabase" - ], - "example": [ - "documentAdditionOrUpdate", - "documentEdition", - "documentDeletion", - "settingsUpdate", - "indexCreation", - "indexDeletion", - "indexUpdate", - "indexSwap", - "taskCancelation", - "taskDeletion", - "dumpCreation", - "snapshotCreation", - "export", - "upgradeDatabase" - ] - }, - "Locale": { - "type": "string", - "enum": [ - "af", - "ak", - "am", - "ar", - "az", - "be", - "bn", - "bg", - "ca", - "cs", - "da", - "de", - "el", - "en", - "eo", - "et", - "fi", - "fr", - "gu", - "he", - "hi", - "hr", - "hu", - "hy", - "id", - "it", - "jv", - "ja", - "kn", - "ka", - "km", - "ko", - "la", - "lv", - "lt", - "ml", - "mr", - "mk", - "my", - "ne", - "nl", - "nb", - "or", - "pa", - "fa", - "pl", - "pt", - "ro", - "ru", - "si", - "sk", - "sl", - "sn", - "es", - "sr", - "sv", - "ta", - "te", - "tl", - "th", - "tk", - "tr", - "uk", - "ur", - "uz", - "vi", - "yi", - "zh", - "zu", - "afr", - "aka", - "amh", - "ara", - "aze", - "bel", - "ben", - "bul", - "cat", - "ces", - "dan", - "deu", - "ell", - "eng", - "epo", - "est", - "fin", - "fra", - "guj", - "heb", - "hin", - "hrv", - "hun", - "hye", - "ind", - "ita", - "jav", - "jpn", - "kan", - "kat", - "khm", - "kor", - "lat", - "lav", - "lit", - "mal", - "mar", - "mkd", - "mya", - "nep", - "nld", - "nob", - "ori", - "pan", - "pes", - "pol", - "por", - "ron", - "rus", - "sin", - "slk", - "slv", - "sna", - "spa", - "srp", - "swe", - "tam", - "tel", - "tgl", - "tha", - "tuk", - "tur", - "ukr", - "urd", - "uzb", - "vie", - "yid", - "zho", - "zul", - "cmn" - ] - }, - "LocalizedAttributesRuleView": { - "type": "object", - "required": [ - "attributePatterns", - "locales" - ], - "properties": { - "attributePatterns": { - "$ref": "#/components/schemas/AttributePatterns" - }, - "locales": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Locale" - } - } - } - }, - "LogMode": { - "type": "string", - "enum": [ - "human", - "json", - "profile" - ] - }, - "MatchingStrategy": { - "type": "string", - "description": "This is unfortunately a duplication of the struct in .\nThe reason why it is duplicated is because milli cannot depend on meilisearch. It would be cyclic imports.", - "enum": [ - "last", - "all", - "frequency" - ] - }, - "MergeFacets": { - "type": "object", - "properties": { - "maxValuesPerFacet": { - "type": [ - "integer", - "null" - ], - "minimum": 0 - } - } - }, - "MinWordSizeTyposSetting": { - "type": "object", - "properties": { - "oneTypo": { - "type": [ - "integer", - "null" - ], - "format": "u-int8", - "example": 5, - "minimum": 0 - }, - "twoTypos": { - "type": [ - "integer", - "null" - ], - "format": "u-int8", - "example": 9, - "minimum": 0 - } - }, - "additionalProperties": false - }, - "Network": { - "type": "object", - "properties": { - "remotes": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "$ref": "#/components/schemas/Remote" - }, - "propertyNames": { - "type": "string" - }, - "example": "http://localhost:7700" - }, - "self": { - "type": [ - "string", - "null" - ], - "example": "ms-00" - }, - "sharding": { - "type": [ - "boolean", - "null" - ], - "example": true - } - } - }, - "Origin": { - "type": "object", - "required": [ - "remoteName", - "taskUid" - ], - "properties": { - "remoteName": { - "type": "string" - }, - "taskUid": { - "type": "integer", - "minimum": 0 - } - } - }, - "OverridePooling": { - "type": "string", - "enum": [ - "useModel", - "forceCls", - "forceMean" - ] - }, - "PaginationSettings": { - "type": "object", - "properties": { - "maxTotalHits": { - "type": [ - "integer", - "null" - ], - "example": 250, - "minimum": 0 - } - }, - "additionalProperties": false - }, - "PaginationView_IndexView": { - "type": "object", - "required": [ - "results", - "offset", - "limit", - "total" - ], - "properties": { - "results": { - "type": "array", - "items": { - "type": "object", - "required": [ - "uid", - "createdAt", - "updatedAt" - ], - "properties": { - "uid": { - "type": "string", - "description": "Unique identifier for the index" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "An `RFC 3339` format for date/time/duration." - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "description": "An `RFC 3339` format for date/time/duration." - }, - "primaryKey": { - "type": [ - "string", - "null" - ], - "description": "Custom primaryKey for documents" - } - } - } - }, - "offset": { - "type": "integer", - "minimum": 0 - }, - "limit": { - "type": "integer", - "minimum": 0 - }, - "total": { - "type": "integer", - "minimum": 0 - } - } - }, - "PaginationView_KeyView": { - "type": "object", - "required": [ - "results", - "offset", - "limit", - "total" - ], - "properties": { - "results": { - "type": "array", - "items": { - "type": "object", - "required": [ - "key", - "uid", - "actions", - "indexes", - "createdAt", - "updatedAt" - ], - "properties": { - "name": { - "type": [ - "string", - "null" - ], - "description": "The name of the API Key if any" - }, - "description": { - "type": [ - "string", - "null" - ], - "description": "The description of the API Key if any" - }, - "key": { - "type": "string", - "description": "The actual API Key you can send to Meilisearch" - }, - "uid": { - "type": "string", - "format": "uuid", - "description": "The `Uuid` specified while creating the key or autogenerated by Meilisearch." - }, - "actions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Action" - }, - "description": "The actions accessible with this key." - }, - "indexes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The indexes accessible with this key." - }, - "expiresAt": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "The expiration date of the key. Once this timestamp is exceeded the key is not deleted but cannot be used anymore." - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The date of creation of this API Key.", - "readOnly": true - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "description": "The date of the last update made on this key.", - "readOnly": true - } - } - } - }, - "offset": { - "type": "integer", - "minimum": 0 - }, - "limit": { - "type": "integer", - "minimum": 0 - }, - "total": { - "type": "integer", - "minimum": 0 - } - } - }, - "PaginationView_Value": { - "type": "object", - "required": [ - "results", - "offset", - "limit", - "total" - ], - "properties": { - "results": { - "type": "array", - "items": {} - }, - "offset": { - "type": "integer", - "minimum": 0 - }, - "limit": { - "type": "integer", - "minimum": 0 - }, - "total": { - "type": "integer", - "minimum": 0 - } - } - }, - "PatchApiKey": { - "type": "object", - "properties": { - "description": { - "type": [ - "string", - "null" - ], - "example": "This key is used to update documents in the products index" - }, - "name": { - "type": [ - "string", - "null" - ], - "example": "Indexing Products API key" - } - } - }, - "PrefixSearchSettings": { - "type": "string", - "enum": [ - "indexingTime", - "disabled" - ] - }, - "ProgressStepView": { - "type": "object", - "required": [ - "currentStep", - "finished", - "total" - ], - "properties": { - "currentStep": { - "type": "string" - }, - "finished": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - }, - "total": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - } - }, - "ProgressView": { - "type": "object", - "required": [ - "steps", - "percentage" - ], - "properties": { - "steps": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProgressStepView" - } - }, - "percentage": { - "type": "number", - "format": "float" - } - } - }, - "ProximityPrecisionView": { - "type": "string", - "enum": [ - "byWord", - "byAttribute" - ] - }, - "RankingRuleView": { - "oneOf": [ - { - "type": "string", - "description": "Sorted by decreasing number of matched query terms.\nQuery words at the front of an attribute is considered better than if it was at the back.", - "enum": [ - "Words" - ] - }, - { - "type": "string", - "description": "Sorted by increasing number of typos.", - "enum": [ - "Typo" - ] - }, - { - "type": "string", - "description": "Sorted by increasing distance between matched query terms.", - "enum": [ - "Proximity" - ] - }, - { - "type": "string", - "description": "Documents with quey words contained in more important\nattributes are considered better.", - "enum": [ - "Attribute" - ] - }, - { - "type": "string", - "description": "Dynamically sort at query time the documents. None, one or multiple Asc/Desc sortable\nattributes can be used in place of this criterion at query time.", - "enum": [ - "Sort" - ] - }, - { - "type": "string", - "description": "Sorted by the similarity of the matched words with the query words.", - "enum": [ - "Exactness" - ] - }, - { - "type": "object", - "description": "Sorted by the increasing value of the field specified.", - "required": [ - "Asc" - ], - "properties": { - "Asc": { - "type": "string", - "description": "Sorted by the increasing value of the field specified." - } - } - }, - { - "type": "object", - "description": "Sorted by the decreasing value of the field specified.", - "required": [ - "Desc" - ], - "properties": { - "Desc": { - "type": "string", - "description": "Sorted by the decreasing value of the field specified." - } - } - } - ] - }, - "RankingScoreThreshold": { - "type": "number", - "format": "double" - }, - "Remote": { - "type": "object", - "properties": { - "url": { - "type": [ - "string", - "null" - ], - "example": { - "ms-0": { - "url": "http://localhost:7700", - "searchApiKey": null, - "writeApiKey": null - }, - "ms-1": { - "url": "http://localhost:7701", - "searchApiKey": "foo", - "writeApiKey": "bar" - }, - "ms-2": { - "url": "http://localhost:7702", - "searchApiKey": "bar", - "writeApiKey": "foo" - } - } - }, - "searchApiKey": { - "type": [ - "string", - "null" - ], - "example": "XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU" - }, - "writeApiKey": { - "type": [ - "string", - "null" - ], - "example": "XWnBI8QHUc-4IlqbKPLUDuhftNq19mQtjc6JvmivzJU" - } - } - }, - "RemoteTask": { - "type": "object", - "properties": { - "taskUid": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/u32" - } - ] - }, - "error": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ResponseError" - } - ] - } - } - }, - "ResponseError": { - "type": "object", - "required": [ - "message", - "code", - "type", - "link" - ], - "properties": { - "message": { - "type": "string", - "description": "The error message." - }, - "code": { - "$ref": "#/components/schemas/Code", - "description": "The error code." - }, - "type": { - "$ref": "#/components/schemas/ErrorType", - "description": "The error type." - }, - "link": { - "type": "string", - "description": "A link to the documentation about this specific error." - } - } - }, - "RuntimeTogglableFeatures": { - "type": "object", - "properties": { - "metrics": { - "type": [ - "boolean", - "null" - ] - }, - "logsRoute": { - "type": [ - "boolean", - "null" - ] - }, - "editDocumentsByFunction": { - "type": [ - "boolean", - "null" - ] - }, - "containsFilter": { - "type": [ - "boolean", - "null" - ] - }, - "network": { - "type": [ - "boolean", - "null" - ] - }, - "getTaskDocumentsRoute": { - "type": [ - "boolean", - "null" - ] - }, - "compositeEmbedders": { - "type": [ - "boolean", - "null" - ] - }, - "chatCompletions": { - "type": [ - "boolean", - "null" - ] - }, - "multimodal": { - "type": [ - "boolean", - "null" - ] - }, - "vectorStoreSetting": { - "type": [ - "boolean", - "null" - ] - } - } - }, - "SearchHit": { - "type": "object", - "properties": { - "_formatted": { - "type": "object", - "additionalProperties": true - }, - "_matchesPosition": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/BTreeMap" - } - ] - }, - "_rankingScore": { - "type": [ - "number", - "null" - ], - "format": "double" - }, - "_rankingScoreDetails": { - "type": [ - "object", - "null" - ], - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - } - }, - "additionalProperties": {} - }, - "SearchQuery": { - "type": "object", - "required": [ - "offset", - "limit", - "retrieve_vectors", - "crop_length", - "show_matches_position", - "show_ranking_score", - "show_ranking_score_details", - "highlight_pre_tag", - "highlight_post_tag", - "crop_marker", - "matching_strategy" - ], - "properties": { - "q": { - "type": [ - "string", - "null" - ] - }, - "vector": { - "type": [ - "array", - "null" - ], - "items": { - "type": "number", - "format": "float" - } - }, - "media": {}, - "hybrid": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/HybridQuery" - } - ] - }, - "offset": { - "type": "integer", - "default": 0, - "minimum": 0 - }, - "limit": { - "type": "integer", - "default": 20, - "minimum": 0 - }, - "page": { - "type": [ - "integer", - "null" - ], - "minimum": 0 - }, - "hits_per_page": { - "type": [ - "integer", - "null" - ], - "minimum": 0 - }, - "attributes_to_retrieve": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "retrieve_vectors": { - "type": "boolean" - }, - "attributes_to_crop": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "crop_length": { - "type": "integer", - "default": 10, - "minimum": 0 - }, - "attributes_to_highlight": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "show_matches_position": { - "type": "boolean" - }, - "show_ranking_score": { - "type": "boolean" - }, - "show_ranking_score_details": { - "type": "boolean" - }, - "filter": {}, - "sort": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "distinct": { - "type": [ - "string", - "null" - ] - }, - "facets": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "highlight_pre_tag": { - "type": "string", - "default": "" - }, - "highlight_post_tag": { - "type": "string", - "default": "" - }, - "crop_marker": { - "type": "string", - "default": "…" - }, - "matching_strategy": { - "$ref": "#/components/schemas/MatchingStrategy" - }, - "attributes_to_search_on": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "ranking_score_threshold": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/RankingScoreThreshold" - } - ] - }, - "locales": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/Locale" - } - } - } - }, - "SearchQueryWithIndex": { - "type": "object", - "description": "A `SearchQuery` + an index UID and optional FederationOptions.", - "required": [ - "indexUid", - "retrieveVectors", - "cropLength", - "showRankingScore", - "showRankingScoreDetails", - "showMatchesPosition", - "highlightPreTag", - "highlightPostTag", - "cropMarker", - "matchingStrategy" - ], - "properties": { - "indexUid": { - "$ref": "#/components/schemas/IndexUid" - }, - "q": { - "type": [ - "string", - "null" - ] - }, - "vector": { - "type": [ - "array", - "null" - ], - "items": { - "type": "number", - "format": "float" - } - }, - "media": {}, - "hybrid": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/HybridQuery" - } - ] - }, - "offset": { - "type": [ - "integer", - "null" - ], - "minimum": 0 - }, - "limit": { - "type": [ - "integer", - "null" - ], - "minimum": 0 - }, - "page": { - "type": [ - "integer", - "null" - ], - "minimum": 0 - }, - "hitsPerPage": { - "type": [ - "integer", - "null" - ], - "minimum": 0 - }, - "attributesToRetrieve": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "retrieveVectors": { - "type": "boolean" - }, - "attributesToCrop": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "cropLength": { - "type": "integer", - "minimum": 0 - }, - "attributesToHighlight": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "showRankingScore": { - "type": "boolean" - }, - "showRankingScoreDetails": { - "type": "boolean" - }, - "showMatchesPosition": { - "type": "boolean" - }, - "filter": {}, - "sort": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "distinct": { - "type": [ - "string", - "null" - ] - }, - "facets": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "highlightPreTag": { - "type": "string" - }, - "highlightPostTag": { - "type": "string" - }, - "cropMarker": { - "type": "string" - }, - "matchingStrategy": { - "$ref": "#/components/schemas/MatchingStrategy" - }, - "attributesToSearchOn": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "rankingScoreThreshold": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/RankingScoreThreshold" - } - ] - }, - "locales": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/Locale" - } - }, - "federationOptions": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/FederationOptions" - } - ] - } - } - }, - "SearchResult": { - "allOf": [ - { - "$ref": "#/components/schemas/HitsInfo" - }, - { - "type": "object", - "required": [ - "hits", - "query", - "processingTimeMs" - ], - "properties": { - "hits": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SearchHit" - } - }, - "query": { - "type": "string" - }, - "queryVector": { - "type": [ - "array", - "null" - ], - "items": { - "type": "number", - "format": "float" - } - }, - "processingTimeMs": { - "type": "integer", - "minimum": 0 - }, - "facetDistribution": { - "type": [ - "object", - "null" - ], - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - }, - "facetStats": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "$ref": "#/components/schemas/FacetStats" - }, - "propertyNames": { - "type": "string" - } - }, - "semanticHitCount": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "minimum": 0 - } - } - } - ] - }, - "SearchResultWithIndex": { - "allOf": [ - { - "$ref": "#/components/schemas/SearchResult" - }, - { - "type": "object", - "required": [ - "indexUid" - ], - "properties": { - "indexUid": { - "type": "string" - } - } - } - ] - }, - "SearchResults": { - "type": "object", - "required": [ - "results" - ], - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SearchResultWithIndex" - } - } - } - }, - "SettingEmbeddingSettings": { - "type": "object", - "description": "\"Technical\" type that is required due to utoipa.\n\nWe did not find a way to implement [`utoipa::ToSchema`] for the [`Setting`] enum,\nbut most types can use the `value_type` macro parameter to workaround that issue.\n\nHowever that type is used in the settings route, including through the macro that auto-generate\nall the settings route, so we can't remap the `value_type`.", - "properties": { - "inner": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "object", - "properties": { - "source": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/EmbedderSource", - "description": "The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`" - } - ] - }, - "model": { - "type": [ - "string", - "null" - ], - "description": "The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`" - }, - "revision": { - "type": [ - "string", - "null" - ], - "description": "The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`" - }, - "pooling": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/OverridePooling", - "description": "The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior." - } - ] - }, - "apiKey": { - "type": [ - "string", - "null" - ], - "description": "The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings" - }, - "dimensions": { - "type": [ - "string", - "null" - ], - "description": "The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text." - }, - "binaryQuantized": { - "type": [ - "boolean", - "null" - ], - "description": "Whether to binary quantize the embeddings of this embedder.\n\nBinary quantized embeddings are smaller than regular embeddings, which improves\ndisk usage and retrieval speed, at the cost of relevancy.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🏗️ When set to `true`, embeddings are not regenerated, but they are binary quantized, which takes time.\n\n# Defaults\n\n- Defaults to `false`\n\n# Note\n\nAs binary quantization is a destructive operation, it is not possible to disable again this setting after\nfirst enabling it. If you are unsure of whether the performance-relevancy tradeoff is right for you,\nwe recommend to use this parameter on a test index first." - }, - "documentTemplate": { - "type": [ - "boolean", - "null" - ], - "description": "A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text." - }, - "documentTemplateMaxBytes": { - "type": [ - "integer", - "null" - ], - "description": "Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400", - "minimum": 0 - }, - "url": { - "type": [ - "string", - "null" - ], - "description": "URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated" - }, - "indexingFragments": { - "type": [ - "object", - "null" - ], - "description": "Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.", - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - }, - "searchFragments": { - "type": [ - "object", - "null" - ], - "description": "Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - }, - "request": { - "description": "Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" - }, - "response": { - "description": "Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" - }, - "headers": { - "type": [ - "object", - "null" - ], - "description": "Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", - "additionalProperties": { - "type": "string" - }, - "propertyNames": { - "type": "string" - } - }, - "searchEmbedder": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/SubEmbeddingSettings" - } - ] - }, - "indexingEmbedder": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/SubEmbeddingSettings" - } - ] - }, - "distribution": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/DistributionShift", - "description": "Affine transformation applied to the semantic score to make it more comparable to the ranking score.\n\n# Availability\n\n- This parameter is available for all embedders\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings" - } - ] - } - }, - "additionalProperties": false - } - ] - } - } - }, - "Settings_Checked": { - "type": "object", - "description": "Holds all the settings for an index. `T` can either be `Checked` if they represents settings\nwhose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a\ncall to `check` will return a `Settings` from a `Settings`.", - "properties": { - "displayedAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Fields displayed in the returned documents.", - "example": [ - "id", - "title", - "description", - "url" - ] - }, - "searchableAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Fields in which to search for matching query words sorted by order of importance.", - "example": [ - "title", - "description" - ] - }, - "filterableAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/FilterableAttributesRule" - }, - "description": "Attributes to use for faceting and filtering. See [Filtering and Faceted Search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).", - "example": [ - "release_date", - "genre" - ] - }, - "sortableAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Attributes to use when sorting search results.", - "example": [ - "release_date" - ] - }, - "rankingRules": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of ranking rules sorted by order of importance. The order is customizable.\n[A list of ordered built-in ranking rules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).", - "example": [ - "words", - "typo", - "proximity", - "attribute", - "exactness" - ] - }, - "stopWords": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of words ignored when present in search queries.", - "example": [ - "the", - "a", - "them", - "their" - ] - }, - "nonSeparatorTokens": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of characters not delimiting where one term begins and ends.", - "example": [ - " ", - "\n" - ] - }, - "separatorTokens": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of characters delimiting where one term begins and ends.", - "example": [ - "S" - ] - }, - "dictionary": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of strings Meilisearch should parse as a single term.", - "example": [ - "iPhone pro" - ] - }, - "synonyms": { - "type": [ - "object", - "null" - ], - "description": "List of associated words treated similarly. A word associated to an array of word as synonyms.", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - }, - "example": { - "he": [ - "she", - "they", - "them" - ], - "phone": [ - "iPhone", - "android" - ] - } - }, - "distinctAttribute": { - "type": [ - "string", - "null" - ], - "description": "Search returns documents with distinct (different) values of the given field.", - "example": "sku" - }, - "proximityPrecision": { - "type": [ - "string", - "null" - ], - "description": "Precision level when calculating the proximity ranking rule.", - "example": "byAttribute" - }, - "typoTolerance": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/TypoSettings", - "description": "Customize typo tolerance feature." - } - ] - }, - "faceting": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/FacetingSettings", - "description": "Faceting settings." - } - ] - }, - "pagination": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/PaginationSettings", - "description": "Pagination settings." - } - ] - }, - "embedders": { - "type": [ - "object", - "null" - ], - "description": "Embedder required for performing semantic search queries.", - "additionalProperties": { - "$ref": "#/components/schemas/SettingEmbeddingSettings" - }, - "propertyNames": { - "type": "string" - } - }, - "searchCutoffMs": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Maximum duration of a search query.", - "example": 50, - "minimum": 0 - }, - "localizedAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/LocalizedAttributesRuleView" - }, - "example": 50 - }, - "facetSearch": { - "type": [ - "boolean", - "null" - ], - "example": true - }, - "prefixSearch": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/PrefixSearchSettings" - } - ] - }, - "chat": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ChatSettings", - "description": "Customize the chat prompting." - } - ] - }, - "vectorStore": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/VectorStoreBackend" - } - ] - } - }, - "additionalProperties": false - }, - "Settings_Unchecked": { - "type": "object", - "description": "Holds all the settings for an index. `T` can either be `Checked` if they represents settings\nwhose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a\ncall to `check` will return a `Settings` from a `Settings`.", - "properties": { - "displayedAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Fields displayed in the returned documents.", - "example": [ - "id", - "title", - "description", - "url" - ] - }, - "searchableAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Fields in which to search for matching query words sorted by order of importance.", - "example": [ - "title", - "description" - ] - }, - "filterableAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/FilterableAttributesRule" - }, - "description": "Attributes to use for faceting and filtering. See [Filtering and Faceted Search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).", - "example": [ - "release_date", - "genre" - ] - }, - "sortableAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "Attributes to use when sorting search results.", - "example": [ - "release_date" - ] - }, - "rankingRules": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of ranking rules sorted by order of importance. The order is customizable.\n[A list of ordered built-in ranking rules](https://www.meilisearch.com/docs/learn/relevancy/relevancy).", - "example": [ - "words", - "typo", - "proximity", - "attribute", - "exactness" - ] - }, - "stopWords": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of words ignored when present in search queries.", - "example": [ - "the", - "a", - "them", - "their" - ] - }, - "nonSeparatorTokens": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of characters not delimiting where one term begins and ends.", - "example": [ - " ", - "\n" - ] - }, - "separatorTokens": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of characters delimiting where one term begins and ends.", - "example": [ - "S" - ] - }, - "dictionary": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "description": "List of strings Meilisearch should parse as a single term.", - "example": [ - "iPhone pro" - ] - }, - "synonyms": { - "type": [ - "object", - "null" - ], - "description": "List of associated words treated similarly. A word associated to an array of word as synonyms.", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - }, - "example": { - "he": [ - "she", - "they", - "them" - ], - "phone": [ - "iPhone", - "android" - ] - } - }, - "distinctAttribute": { - "type": [ - "string", - "null" - ], - "description": "Search returns documents with distinct (different) values of the given field.", - "example": "sku" - }, - "proximityPrecision": { - "type": [ - "string", - "null" - ], - "description": "Precision level when calculating the proximity ranking rule.", - "example": "byAttribute" - }, - "typoTolerance": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/TypoSettings", - "description": "Customize typo tolerance feature." - } - ] - }, - "faceting": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/FacetingSettings", - "description": "Faceting settings." - } - ] - }, - "pagination": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/PaginationSettings", - "description": "Pagination settings." - } - ] - }, - "embedders": { - "type": [ - "object", - "null" - ], - "description": "Embedder required for performing semantic search queries.", - "additionalProperties": { - "$ref": "#/components/schemas/SettingEmbeddingSettings" - }, - "propertyNames": { - "type": "string" - } - }, - "searchCutoffMs": { - "type": [ - "integer", - "null" - ], - "format": "u-int64", - "description": "Maximum duration of a search query.", - "example": 50, - "minimum": 0 - }, - "localizedAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/components/schemas/LocalizedAttributesRuleView" - }, - "example": 50 - }, - "facetSearch": { - "type": [ - "boolean", - "null" - ], - "example": true - }, - "prefixSearch": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/PrefixSearchSettings" - } - ] - }, - "chat": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ChatSettings", - "description": "Customize the chat prompting." - } - ] - }, - "vectorStore": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/VectorStoreBackend" - } - ] - } - }, - "additionalProperties": false - }, - "SimilarQuery": { - "type": "object", - "required": [ - "id", - "offset", - "limit", - "embedder", - "retrieve_vectors", - "show_ranking_score", - "show_ranking_score_details", - "ranking_score_threshold" - ], - "properties": { - "id": { - "type": "string" - }, - "offset": { - "type": "integer", - "minimum": 0 - }, - "limit": { - "type": "integer", - "minimum": 0 - }, - "filter": {}, - "embedder": { - "type": "string" - }, - "attributes_to_retrieve": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "retrieve_vectors": { - "type": "boolean" - }, - "show_ranking_score": { - "type": "boolean" - }, - "show_ranking_score_details": { - "type": "boolean" - }, - "ranking_score_threshold": { - "type": "number", - "format": "double" - } - } - }, - "SimilarResult": { - "allOf": [ - { - "$ref": "#/components/schemas/HitsInfo" - }, - { - "type": "object", - "required": [ - "hits", - "id", - "processingTimeMs" - ], - "properties": { - "hits": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SearchHit" - } - }, - "id": { - "type": "string" - }, - "processingTimeMs": { - "type": "integer", - "minimum": 0 - } - } - } - ] - }, - "Stats": { - "type": "object", - "required": [ - "databaseSize", - "usedDatabaseSize", - "indexes" - ], - "properties": { - "databaseSize": { - "type": "integer", - "format": "u-int64", - "description": "The disk space used by the database, in bytes.", - "minimum": 0 - }, - "usedDatabaseSize": { - "type": "integer", - "format": "u-int64", - "description": "The size of the database, in bytes.", - "minimum": 0 - }, - "lastUpdate": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "The date of the last update in the RFC 3339 formats. Can be `null` if no update has ever been processed." - }, - "indexes": { - "type": "object", - "description": "The stats of every individual index your API key lets you access.", - "additionalProperties": { - "$ref": "#/components/schemas/IndexStats" - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "Status": { - "type": "string", - "description": "The status of a task.", - "enum": [ - "enqueued", - "processing", - "succeeded", - "failed", - "canceled" - ], - "example": "processing" - }, - "SubEmbeddingSettings": { - "type": "object", - "properties": { - "source": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/EmbedderSource", - "description": "The source used to provide the embeddings.\n\nWhich embedder parameters are available and mandatory is determined by the value of this setting.\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- Defaults to `openAi`" - } - ] - }, - "model": { - "type": [ - "string", - "null" - ], - "description": "The name of the model to use.\n\n# Mandatory\n\n- This parameter is mandatory for source `ollama`\n\n# Availability\n\n- This parameter is available for sources `openAi`, `huggingFace`, `ollama`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings.\n\n# Defaults\n\n- For source `openAi`, defaults to `text-embedding-3-small`\n- For source `huggingFace`, defaults to `BAAI/bge-base-en-v1.5`" - }, - "revision": { - "type": [ - "string", - "null" - ], - "description": "The revision (commit SHA1) of the model to use.\n\nIf unspecified, Meilisearch picks the latest revision of the model.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- When `model` is set to default, defaults to `617ca489d9e86b49b8167676d8220688b99db36e`\n- Otherwise, defaults to `null`" - }, - "pooling": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/OverridePooling", - "description": "The pooling method to use.\n\n# Availability\n\n- This parameter is available for source `huggingFace`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings\n\n# Defaults\n\n- Defaults to `useModel`\n\n# Compatibility Note\n\n- Embedders created before this parameter was available default to `forceMean` to preserve the existing behavior." - } - ] - }, - "apiKey": { - "type": [ - "string", - "null" - ], - "description": "The API key to pass to the remote embedder while making requests.\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the key is read from `OPENAI_API_KEY`, then `MEILI_OPENAI_API_KEY`.\n- For other sources, no bearer token is sent if this parameter is not set.\n\n# Note\n\n- This setting is partially hidden when returned by the settings" - }, - "dimensions": { - "type": [ - "string", - "null" - ], - "description": "The expected dimensions of the embeddings produced by this embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `userProvided`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama`, `rest`, `userProvided`\n\n# 🔄 Reindexing\n\n- 🏗️ When the source is `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings\n\n# Defaults\n\n- For source `openAi`, the dimensions is the maximum allowed by the model.\n- For sources `ollama` and `rest`, the dimensions are inferred by embedding a sample text." - }, - "documentTemplate": { - "type": [ - "boolean", - "null" - ], - "description": "A liquid template used to render documents to a text that can be embedded.\n\nMeillisearch interpolates the template for each document and sends the resulting text to the embedder.\nThe embedder then generates document vectors based on this text.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest\n\n# 🔄 Reindexing\n\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text." - }, - "documentTemplateMaxBytes": { - "type": [ - "integer", - "null" - ], - "description": "Rendered texts are truncated to this size.\n\n# Availability\n\n- This parameter is available for source `openAi`, `huggingFace`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated\n\n# Default\n\n- Defaults to 400", - "minimum": 0 - }, - "url": { - "type": [ - "string", - "null" - ], - "description": "URL to reach the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `openAi`, `ollama` and `rest`\n\n# 🔄 Reindexing\n\n- 🌱 When modified for source `openAi`, embeddings are never regenerated\n- 🏗️ When modified for sources `ollama` and `rest`, embeddings are always regenerated" - }, - "indexingFragments": { - "type": [ - "object", - "null" - ], - "description": "Template fragments that will be reassembled and sent to the remote embedder at indexing time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.", - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - }, - "searchFragments": { - "type": [ - "object", - "null" - ], - "description": "Template fragments that will be reassembled and sent to the remote embedder at search time.\n\n# Availability\n\n- This parameter is available for sources `rest`.\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", - "additionalProperties": {}, - "propertyNames": { - "type": "string" - } - }, - "request": { - "description": "Template request to send to the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" - }, - "response": { - "description": "Template response indicating how to find the embeddings in the response from the remote embedder.\n\n# Mandatory\n\n- This parameter is mandatory for source `rest`\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🏗️ Changing the value of this parameter always regenerates embeddings" - }, - "headers": { - "type": [ - "object", - "null" - ], - "description": "Additional headers to send to the remote embedder.\n\n# Availability\n\n- This parameter is available for source `rest`\n\n# 🔄 Reindexing\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", - "additionalProperties": { - "type": "string" - }, - "propertyNames": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "SummarizedTaskView": { - "type": "object", - "required": [ - "taskUid", - "status", - "type", - "enqueuedAt" - ], - "properties": { - "taskUid": { - "type": "integer", - "format": "u-int32", - "description": "The task unique identifier.", - "minimum": 0 - }, - "indexUid": { - "type": [ - "string", - "null" - ], - "description": "The index affected by this task. May be `null` if the task is not linked to any index." - }, - "status": { - "$ref": "#/components/schemas/Status", - "description": "The status of the task." - }, - "type": { - "$ref": "#/components/schemas/Kind", - "description": "The type of the task." - }, - "enqueuedAt": { - "type": "string", - "format": "date-time", - "description": "The date on which the task was enqueued." - } - } - }, - "SwapIndexesPayload": { - "type": "object", - "required": [ - "indexes", - "rename" - ], - "properties": { - "indexes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IndexUid" - }, - "description": "Array of the two indexUids to be swapped" - }, - "rename": { - "type": "boolean", - "description": "If set to true, instead of swapping the left and right indexes it'll change the name of the first index to the second" - } - } - }, - "TaskNetwork": { - "oneOf": [ - { - "type": "object", - "required": [ - "origin" - ], - "properties": { - "origin": { - "$ref": "#/components/schemas/Origin" - } - } - }, - { - "type": "object", - "required": [ - "remote_tasks" - ], - "properties": { - "remote_tasks": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/RemoteTask" - }, - "propertyNames": { - "type": "string" - } - } - } - } - ] - }, - "TaskView": { - "type": "object", - "required": [ - "uid", - "status", - "type", - "enqueuedAt" - ], - "properties": { - "uid": { - "type": "integer", - "format": "u-int32", - "description": "The unique sequential identifier of the task.", - "example": 4312, - "minimum": 0 - }, - "batchUid": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "description": "The unique identifier of the index where this task is operated.", - "example": "movies", - "minimum": 0 - }, - "indexUid": { - "type": [ - "string", - "null" - ] - }, - "status": { - "$ref": "#/components/schemas/Status" - }, - "type": { - "$ref": "#/components/schemas/Kind", - "description": "The type of the task." - }, - "canceledBy": { - "type": [ - "integer", - "null" - ], - "format": "u-int32", - "description": "The uid of the task that performed the taskCancelation if the task has been canceled.", - "example": 4326, - "minimum": 0 - }, - "details": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/DetailsView" - } - ] - }, - "error": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ResponseError" - } - ] - }, - "duration": { - "type": [ - "string", - "null" - ], - "description": "Total elasped time the engine was in processing state expressed as a `ISO-8601` duration format.", - "example": null - }, - "enqueuedAt": { - "type": "string", - "description": "An `RFC 3339` format for date/time/duration.", - "example": "2024-08-08_14:12:09.393Z" - }, - "startedAt": { - "type": "string", - "description": "An `RFC 3339` format for date/time/duration.", - "example": "2024-08-08_14:12:09.393Z" - }, - "finishedAt": { - "type": "string", - "description": "An `RFC 3339` format for date/time/duration.", - "example": "2024-08-08_14:12:09.393Z" - }, - "network": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/TaskNetwork" - } - ] - } - } - }, - "TypoSettings": { - "type": "object", - "properties": { - "enabled": { - "type": [ - "boolean", - "null" - ], - "example": true - }, - "minWordSizeForTypos": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/MinWordSizeTyposSetting" - } - ] - }, - "disableOnWords": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "example": [ - "iPhone", - "phone" - ], - "uniqueItems": true - }, - "disableOnAttributes": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - }, - "example": [ - "uuid", - "url" - ], - "uniqueItems": true - }, - "disableOnNumbers": { - "type": [ - "boolean", - "null" - ], - "example": true - } - }, - "additionalProperties": false - }, - "Unchecked": { - "default": null - }, - "UpdateIndexRequest": { - "type": "object", - "properties": { - "primaryKey": { - "type": [ - "string", - "null" - ], - "description": "The new primary key of the index" - }, - "uid": { - "type": [ - "string", - "null" - ], - "description": "The new uid of the index (for renaming)" - } - } - }, - "UpdateStderrLogs": { - "type": "object", - "required": [ - "target" - ], - "properties": { - "target": { - "type": "string", - "description": "Lets you specify which parts of the code you want to inspect and is formatted like that: code_part=log_level,code_part=log_level\n- If the `code_part` is missing, then the `log_level` will be applied to everything.\n- If the `log_level` is missing, then the `code_part` will be selected in `info` log level.", - "default": "info", - "example": "milli=trace,index_scheduler,actix_web=off" - } - } - }, - "Vec": { - "type": "array", - "items": { - "type": "number", - "format": "float" - } - }, - "VectorStoreBackend": { - "type": "string", - "enum": [ - "stable", - "experimental" - ] - }, - "VersionResponse": { - "type": "object", - "required": [ - "commitSha", - "commitDate", - "pkgVersion" - ], - "properties": { - "commitSha": { - "type": "string", - "description": "The commit used to compile this build of Meilisearch." - }, - "commitDate": { - "type": "string", - "description": "The date of this build." - }, - "pkgVersion": { - "type": "string", - "description": "The version of Meilisearch." - } - } - }, - "WebhookResults": { - "type": "object", - "required": [ - "results" - ], - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WebhookWithMetadata" - } - } - } - }, - "WebhookSettings": { - "type": "object", - "properties": { - "url": { - "type": [ - "string", - "null" - ], - "example": "https://your.site/on-tasks-completed" - }, - "headers": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "type": "string" - }, - "propertyNames": { - "type": "string" - }, - "example": { - "Authorization": "Bearer a-secret-token" - } - } - } - }, - "WebhookWithMetadata": { - "allOf": [ - { - "$ref": "#/components/schemas/WebhookSettings" - }, - { - "type": "object", - "required": [ - "uuid", - "isEditable" - ], - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - }, - "isEditable": { - "type": "boolean" - } - } - } - ] - }, - "u32": { - "type": "integer", - "format": "u-int32", - "minimum": 0 - } - }, - "securitySchemes": { - "Bearer": { - "type": "http", - "scheme": "bearer", - "bearerFormat": "Uuidv4, string or JWT", - "description": "An API key is a token that you provide when making API calls. Include the token in a header parameter called `Authorization`.\nExample: `Authorization: Bearer 8fece4405662dd830e4cb265e7e047aab2e79672a760a12712d2a263c9003509`" - } - } - }, - "tags": [ - { - "name": "Stats", - "description": "Stats gives extended information and metrics about indexes and the Meilisearch database." - }, - { - "name": "Tasks", - "description": "The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html).", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/tasks" - } - }, - { - "name": "Batches", - "description": "The /batches route gives information about the progress of batches of asynchronous operations.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/batches", - } - }, - { - "name": "Indexes", - "description": "An index is an entity that gathers a set of [documents](https://www.meilisearch.com/docs/learn/getting_started/documents) with its own [settings](https://www.meilisearch.com/docs/reference/api/settings). Learn more about indexes.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/indexes", - } - }, - { - "name": "Documents", - "description": "Documents are objects composed of fields that can store any type of data. Each field contains an attribute and its associated value. Documents are stored inside [indexes](https://www.meilisearch.com/docs/learn/getting_started/indexes).", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/learn/getting_started/documents" - } - }, - { - "name": "Facet Search", - "description": "The `/facet-search` route allows you to search for facet values. Facet search supports prefix search and typo tolerance. The returned hits are sorted lexicographically in ascending order. You can configure how facets are sorted using the sortFacetValuesBy property of the faceting index settings.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/facet_search" - } - }, - { - "name": "Similar documents", - "description": "The /similar route uses AI-powered search to return a number of documents similar to a target document.\n\nMeilisearch exposes two routes for retrieving similar documents: POST and GET. In the majority of cases, POST will offer better performance and ease of use.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/similar" - } - }, - { - "name": "Settings", - "description": "Use the /settings route to customize search settings for a given index. You can either modify all index settings at once using the update settings endpoint, or use a child route to configure a single setting.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/settings" - } - }, - { - "name": "Search", - "description": "Meilisearch exposes two routes to perform searches:\n\n- A POST route: this is the preferred route when using API authentication, as it allows [preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) caching and better performance.\n- A GET route: the usage of this route is discouraged, unless you have good reason to do otherwise (specific caching abilities for example)", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/search" - } - }, - { - "name": "Snapshots", - "description": "The snapshots route allows the creation of database snapshots. Snapshots are .snapshot files that can be used to launch Meilisearch.\nCreating a snapshot is also referred to as exporting it, whereas launching Meilisearch with a snapshot is referred to as importing it.\nDuring a snapshot export, all indexes of the current instance are exported—together with their documents and settings—and saved as a single .snapshot file.\nDuring a snapshot import, all indexes contained in the indicated .snapshot file are imported along with their associated documents and settings.\nSnapshot imports are performed at launch using an option.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/snapshots" - } - }, - { - "name": "Dumps2", - "description": "The `dumps` route allows the creation of database dumps.\nDumps are `.dump` files that can be used to launch Meilisearch. Dumps are compatible between Meilisearch versions.\nCreating a dump is also referred to as exporting it, whereas launching Meilisearch with a dump is referred to as importing it.\nDuring a [dump export](https://www.meilisearch.com/docs/reference/api/dump#create-a-dump), all indexes of the current instance are\nexported—together with their documents and settings—and saved as a single `.dump` file. During a dump import,\nall indexes contained in the indicated `.dump` file are imported along with their associated documents and settings.\nAny existing index with the same uid as an index in the dump file will be overwritten.\nDump imports are [performed at launch](https://www.meilisearch.com/docs/learn/advanced/dumps#importing-a-dump) using an option.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/dump", - "description": "lorem ipsum" - } - }, - { - "name": "Keys", - "description": "Manage API `keys` for a Meilisearch instance. Each key has a given set of permissions.\nYou must have the master key or the default admin key to access the keys route. More information about the keys and their rights.\nAccessing any route under `/keys` without having set a master key will result in an error.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/keys" - } - }, - { - "name": "Logs", - "description": "Everything about retrieving or customizing logs.\nCurrently [experimental](https://www.meilisearch.com/docs/learn/experimental/overview).", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/learn/experimental/log_customization" - } - }, - { - "name": "Multi-search", - "description": "The `/multi-search` route allows you to perform multiple search queries on one or more indexes by bundling them into a single HTTP request. Multi-search is also known as federated search.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/multi_search" - } - }, - { - "name": "Experimental features", - "description": "The `/experimental-features` route allows you to activate or deactivate some of Meilisearch's experimental features.\n\nThis route is **synchronous**. This means that no task object will be returned, and any activated or deactivated features will be made available or unavailable immediately.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/experimental_features" - } - }, - { - "name": "Export", - "description": "The `/export` route allows you to trigger an export process to a remote Meilisearch instance.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/export" - } - }, - { - "name": "Network", - "description": "The `/network` route allows you to describe the topology of a network of Meilisearch instances.\n\nThis route is **synchronous**. This means that no task object will be returned, and any change to the network will be made available immediately.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/network" - } - }, - { - "name": "Webhooks", - "description": "The `/webhooks` route allows you to register endpoints to be called once tasks are processed.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/webhooks" - } - } - ] -} \ No newline at end of file From 1e775d61566c09362fff52b5d8f539909d90c9bf Mon Sep 17 00:00:00 2001 From: curquiza Date: Tue, 10 Feb 2026 23:01:08 +0100 Subject: [PATCH 30/45] Rename a job in CI --- .github/workflows/post-deployment.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/post-deployment.yml b/.github/workflows/post-deployment.yml index 6ea5c9cf2..7bfb901e4 100644 --- a/.github/workflows/post-deployment.yml +++ b/.github/workflows/post-deployment.yml @@ -11,7 +11,7 @@ on: # - 'main' jobs: - fetch-code-samples: + build-code-samples: runs-on: ubuntu-latest outputs: run_openapi_automation: ${{ steps.openapi_automation.outputs.run }} @@ -59,15 +59,15 @@ jobs: echo "No changes in the Git working directory." fi - # We need to wait for fetch-code-samples to commit first so we can push a separate commit + # We need to wait for build-code-samples to commit first so we can push a separate commit # (avoid stacking both changes in one run and keep history clear). # Only runs when docs.json has "internal-meili-fetch-automation": true. # In case of issues with the latest release OpenAPI file: fetch the desired OpenAPI file # manually, then set "internal-meili-fetch-automation" to false to prevent this automation from running. fetch-openapi-files: runs-on: ubuntu-latest - needs: fetch-code-samples - if: needs.fetch-code-samples.outputs.run_openapi_automation == 'true' + needs: build-code-samples + if: needs.build-code-samples.outputs.run_openapi_automation == 'true' steps: - name: Checkout repository From 3969b6ba8189610c23b566b983b79a1b9bfc8932 Mon Sep 17 00:00:00 2001 From: curquiza Date: Wed, 11 Feb 2026 00:39:56 +0100 Subject: [PATCH 31/45] Add name to CI job --- .github/workflows/post-deployment.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/post-deployment.yml b/.github/workflows/post-deployment.yml index 7bfb901e4..d84e722f8 100644 --- a/.github/workflows/post-deployment.yml +++ b/.github/workflows/post-deployment.yml @@ -12,6 +12,7 @@ on: jobs: build-code-samples: + name: Build code samples runs-on: ubuntu-latest outputs: run_openapi_automation: ${{ steps.openapi_automation.outputs.run }} @@ -65,6 +66,7 @@ jobs: # In case of issues with the latest release OpenAPI file: fetch the desired OpenAPI file # manually, then set "internal-meili-fetch-automation" to false to prevent this automation from running. fetch-openapi-files: + name: Fetch OpenAPI files from Meilisearch release runs-on: ubuntu-latest needs: build-code-samples if: needs.build-code-samples.outputs.run_openapi_automation == 'true' From e1dc9405829d37917436450ae359743199ce2db6 Mon Sep 17 00:00:00 2001 From: curquiza Date: Wed, 11 Feb 2026 00:40:37 +0100 Subject: [PATCH 32/45] Make post deployment work on every commit on main --- .github/workflows/post-deployment.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/post-deployment.yml b/.github/workflows/post-deployment.yml index d84e722f8..5a67e1802 100644 --- a/.github/workflows/post-deployment.yml +++ b/.github/workflows/post-deployment.yml @@ -4,11 +4,11 @@ name: Post Deployment on: workflow_dispatch: - # schedule: - # - cron: '0 23 * * *' # Every day at 11:00 PM UTC - # push: - # branches: - # - 'main' + schedule: + - cron: '0 23 * * *' # Every day at 11:00 PM UTC + push: + branches: + - 'main' jobs: build-code-samples: From e154cd201da33d03d32082452abb2e97cbc69b2a Mon Sep 17 00:00:00 2001 From: curquiza Date: Wed, 11 Feb 2026 11:49:35 +0100 Subject: [PATCH 33/45] Improve CI for code samples --- .github/workflows/docs-sdk-code-samples-check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs-sdk-code-samples-check.yml b/.github/workflows/docs-sdk-code-samples-check.yml index 22e674e29..701c2cd6c 100644 --- a/.github/workflows/docs-sdk-code-samples-check.yml +++ b/.github/workflows/docs-sdk-code-samples-check.yml @@ -1,7 +1,7 @@ # Runs daily and on workflow_dispatch. # - Job 1: Fails if local code samples are not properly used (route comment → OpenAPI, no comment → snippet in docs). # - Job 2: Fails if any SDK has code samples not present in the local .code-samples.meilisearch.yaml. -# - Job 3: Informational only (never fails) – lists local samples missing from each SDK. +# - Job 3: Informational only (never fails) – lists CodeSamples* import keys missing from each SDK. name: Check Docs & SDK code sample files on: @@ -37,7 +37,7 @@ jobs: run: node scripts/check-unused-sdk-samples.mjs # Informational only – this job never fails. - # Lists local samples that are missing from each SDK. + # Lists code sample keys referenced by CodeSamples* imports in the docs that are missing from each SDK. missing-sdk-samples: name: "[Info only - never fails] Missing SDK code samples" runs-on: ubuntu-latest From 6f383f1519a1d326eba2c36fb11962b0dc8d6c65 Mon Sep 17 00:00:00 2001 From: curquiza Date: Fri, 13 Feb 2026 18:02:31 +0100 Subject: [PATCH 34/45] Make CI fetch only 1 open-api-file --- .github/workflows/post-deployment.yml | 16 ++++++++-------- ...pi.mjs => fetch-meilisearch-openapi-file.mjs} | 9 ++------- 2 files changed, 10 insertions(+), 15 deletions(-) rename scripts/{fetch-openapi.mjs => fetch-meilisearch-openapi-file.mjs} (90%) diff --git a/.github/workflows/post-deployment.yml b/.github/workflows/post-deployment.yml index 5a67e1802..fdc27efbc 100644 --- a/.github/workflows/post-deployment.yml +++ b/.github/workflows/post-deployment.yml @@ -65,8 +65,8 @@ jobs: # Only runs when docs.json has "internal-meili-fetch-automation": true. # In case of issues with the latest release OpenAPI file: fetch the desired OpenAPI file # manually, then set "internal-meili-fetch-automation" to false to prevent this automation from running. - fetch-openapi-files: - name: Fetch OpenAPI files from Meilisearch release + fetch-openapi-file: + name: Fetch OpenAPI file from Meilisearch release runs-on: ubuntu-latest needs: build-code-samples if: needs.build-code-samples.outputs.run_openapi_automation == 'true' @@ -81,13 +81,13 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v6 - - name: Fetch latest OpenAPI files from Meilisearch release - run: node scripts/fetch-openapi.mjs + - name: Fetch latest meilisearch-openapi.json from Meilisearch release + run: node scripts/fetch-meilisearch-openapi-file.mjs - name: Check for changes id: openapi_changes run: | - if git diff --quiet assets/open-api/; then + if git diff --quiet assets/open-api/meilisearch-openapi.json; then echo "has_changes=false" >> "$GITHUB_ENV" else echo "has_changes=true" >> "$GITHUB_ENV" @@ -99,9 +99,9 @@ jobs: echo "There are changes in the OpenAPI file." git config user.name "meili-bot" git config user.email "robot@meilisearch.com" - git add assets/open-api/ - git commit -m "[AUTOMATION POST DEPLOYMENT] Update OpenAPI files from latest Meilisearch release" + git add assets/open-api/meilisearch-openapi.json + git commit -m "[AUTOMATION POST DEPLOYMENT] Update meilisearch-openapi.json from latest Meilisearch release" git push origin main else - echo "No changes in the OpenAPI files." + echo "No changes in the OpenAPI file." fi diff --git a/scripts/fetch-openapi.mjs b/scripts/fetch-meilisearch-openapi-file.mjs similarity index 90% rename from scripts/fetch-openapi.mjs rename to scripts/fetch-meilisearch-openapi-file.mjs index 9993da043..b81930571 100644 --- a/scripts/fetch-openapi.mjs +++ b/scripts/fetch-meilisearch-openapi-file.mjs @@ -2,9 +2,7 @@ /** * Fetches the latest Meilisearch release from GitHub and replaces - * the OpenAPI assets in assets/open-api/ with those from that release: - * - meilisearch-openapi-mintlify.json - * - meilisearch-openapi.json + * assets/open-api/meilisearch-openapi.json with the one from that release. * * Optional: set GITHUB_PAT or GH_TOKEN for higher API rate limits. */ @@ -17,10 +15,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url)); const REPO_ROOT = path.resolve(__dirname, ".."); const OPENAPI_DIR = path.join(REPO_ROOT, "assets", "open-api"); -const OPENAPI_ASSET_NAMES = [ - "meilisearch-openapi-mintlify.json", - "meilisearch-openapi.json", -]; +const OPENAPI_ASSET_NAMES = ["meilisearch-openapi.json"]; const GITHUB_API_LATEST = "https://api.github.com/repos/meilisearch/meilisearch/releases/latest"; From 73938e77083e675a0761d3d09a8e75514bd6b944 Mon Sep 17 00:00:00 2001 From: curquiza Date: Fri, 13 Feb 2026 18:25:22 +0100 Subject: [PATCH 35/45] Add code sample for /fields route --- .code-samples.meilisearch.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.code-samples.meilisearch.yaml b/.code-samples.meilisearch.yaml index 6095601cf..345b4e1d8 100644 --- a/.code-samples.meilisearch.yaml +++ b/.code-samples.meilisearch.yaml @@ -1576,3 +1576,8 @@ multi_search_remote_federated_1: |- } } ] +# post_indexes_indexUid_fields +list_index_fields_1: |- + curl \ + -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/fields' \ + -H 'Content-Type: application/json' From 64b932b65085313bead1c571ad4bb46d7109c5b4 Mon Sep 17 00:00:00 2001 From: curquiza Date: Fri, 13 Feb 2026 18:49:43 +0100 Subject: [PATCH 36/45] Add script to generate open-api-file for mintlify --- .../meilisearch-openapi-mintlify.json | 3024 +++++++++-------- package.json | 1 + scripts/generate-mintlify-openapi.mjs | 377 ++ 3 files changed, 1894 insertions(+), 1508 deletions(-) create mode 100644 scripts/generate-mintlify-openapi.mjs diff --git a/assets/open-api/meilisearch-openapi-mintlify.json b/assets/open-api/meilisearch-openapi-mintlify.json index 8158e2a66..baff46e9a 100644 --- a/assets/open-api/meilisearch-openapi-mintlify.json +++ b/assets/open-api/meilisearch-openapi-mintlify.json @@ -295,8 +295,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.GetBatches();" + "lang": "cURL", + "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches'" }, { "lang": "JS", @@ -315,12 +315,12 @@ "source": "client.batches" }, { - "lang": "Rust", - "source": "let mut query = meilisearch_sdk::batches::BatchesQuery::new(&client);\nquery.with_limit(20);\nlet batches: meilisearch_sdk::batches::BatchesResults =\n client.get_batches_with(&query).await.unwrap();" + "lang": "Go", + "source": "client.GetBatches();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches'" + "lang": "Rust", + "source": "let mut query = meilisearch_sdk::batches::BatchesQuery::new(&client);\nquery.with_limit(20);\nlet batches: meilisearch_sdk::batches::BatchesResults =\n client.get_batches_with(&query).await.unwrap();" } ] } @@ -408,8 +408,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.GetBatch(BATCH_UID);" + "lang": "cURL", + "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches/BATCH_UID'" }, { "lang": "JS", @@ -428,12 +428,12 @@ "source": "client.batch(BATCH_UID)" }, { - "lang": "Rust", - "source": "let uid: u32 = 42;\nlet batch: meilisearch_sdk::batches::Batch = client\n .get_batch(uid)\n .await\n .unwrap();" + "lang": "Go", + "source": "client.GetBatch(BATCH_UID);" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'http://MEILISEARCH_URL/batches/BATCH_UID'" + "lang": "Rust", + "source": "let uid: u32 = 42;\nlet batch: meilisearch_sdk::batches::Batch = client\n .get_batch(uid)\n .await\n .unwrap();" } ] } @@ -492,25 +492,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.CreateDumpAsync();" - }, - { - "lang": "Dart", - "source": "await client.createDump();" - }, - { - "lang": "Go", - "source": "resp, err := client.CreateDump()" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/dumps'" }, { "lang": "JS", "source": "client.createDump()" }, - { - "lang": "Java", - "source": "client.createDump();" - }, { "lang": "PHP", "source": "$client->createDump();" @@ -519,21 +507,33 @@ "lang": "Python", "source": "client.create_dump()" }, + { + "lang": "Java", + "source": "client.createDump();" + }, { "lang": "Ruby", "source": "client.create_dump" }, + { + "lang": "Go", + "source": "resp, err := client.CreateDump()" + }, + { + "lang": "C#", + "source": "await client.CreateDumpAsync();" + }, { "lang": "Rust", "source": "client\n .create_dump()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.createDump { result in\n switch result {\n case .success(let dumpStatus):\n print(dumpStatus)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.createDump();" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/dumps'" + "lang": "Swift", + "source": "client.createDump { result in\n switch result {\n case .success(let dumpStatus):\n print(dumpStatus)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -597,20 +597,20 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.ExperimentalFeatures().Get()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/experimental-features/'" }, { "lang": "Ruby", "source": "client.experimental_features" }, { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nlet res = features\n .get()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.ExperimentalFeatures().Get()" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/experimental-features/'" + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nlet res = features\n .get()\n .await\n .unwrap();" } ] }, @@ -672,20 +672,20 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.ExperimentalFeatures().SetMetrics(true).Update()" + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/experimental-features/' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"metrics\": true\n }'" }, { "lang": "Ruby", "source": "client.update_experimental_features(metrics: true)" }, { - "lang": "Rust", - "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nfeatures.set_metrics(true)\nlet res = features\n .update()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.ExperimentalFeatures().SetMetrics(true).Update()" }, { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/experimental-features/' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"metrics\": true\n }'" + "lang": "Rust", + "source": "let client = Client::new(\"http://localhost:7700\", Some(\"apiKey\"));\nlet features = ExperimentalFeatures::new(&client);\nfeatures.set_metrics(true)\nlet res = features\n .update()\n .await\n .unwrap();" } ] } @@ -751,13 +751,13 @@ } ], "x-codeSamples": [ - { - "lang": "Java", - "source": "Map indexes = new HashMap<>();\nindexes.put(\"*\", ExportIndexFilter.builder().overrideSettings(true).build());\nExportRequest request = ExportRequest.builder().url(\"TARGET_INSTANCE_URL\").indexes(indexes).build();\nclient.export(request);" - }, { "lang": "cURL", "source": "curl \\\n -X POST 'MEILISEARCH_URL/export' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"TARGET_INSTANCE_URL\",\n \"indexes\": {\n \"*\": {\n \"overrideSettings\": true\n }\n }\n }'" + }, + { + "lang": "Java", + "source": "Map indexes = new HashMap<>();\nindexes.put(\"*\", ExportIndexFilter.builder().overrideSettings(true).build());\nExportRequest request = ExportRequest.builder().url(\"TARGET_INSTANCE_URL\").indexes(indexes).build();\nclient.export(request);" } ] } @@ -787,19 +787,19 @@ }, "x-codeSamples": [ { - "lang": "C#", - "source": "await client.HealthAsync();" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/health'" }, { - "lang": "Dart", - "source": "await client.health();" + "lang": "JS", + "source": "client.health()" }, { - "lang": "Go", - "source": "client.Health()" + "lang": "PHP", + "source": "$client->health();" }, { - "lang": "JS", + "lang": "Python", "source": "client.health()" }, { @@ -807,28 +807,28 @@ "source": "client.health();" }, { - "lang": "PHP", - "source": "$client->health();" + "lang": "Ruby", + "source": "client.health" }, { - "lang": "Python", - "source": "client.health()" + "lang": "Go", + "source": "client.Health()" }, { - "lang": "Ruby", - "source": "client.health" + "lang": "C#", + "source": "await client.HealthAsync();" }, { "lang": "Rust", "source": "// health() return an Err() if the server is not healthy, so this example would panic due to the unwrap\nclient\n .health()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.health { (result) in\n switch result {\n case .success:\n print(\"Healthy!\")\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.health();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/health'" + "lang": "Swift", + "source": "client.health { (result) in\n switch result {\n case .success:\n print(\"Healthy!\")\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -918,25 +918,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.GetAllIndexesAsync(new IndexesQuery { Limit = 3 });" - }, - { - "lang": "Dart", - "source": "await client.getIndexes(params: IndexesQuery(limit: 3));" - }, - { - "lang": "Go", - "source": "client.GetIndexes(&meilisearch.IndexesQuery{\n Limit: 3,\n})" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes?limit=3'" }, { "lang": "JS", "source": "client.getIndexes({ limit: 3 })" }, - { - "lang": "Java", - "source": "IndexesQuery query = new IndexesQuery().setLimit(3);\nclient.getIndexes(query);" - }, { "lang": "PHP", "source": "$client->getIndexes((new IndexesQuery())->setLimit(3));" @@ -945,21 +933,33 @@ "lang": "Python", "source": "client.get_indexes({'limit': 3})" }, + { + "lang": "Java", + "source": "IndexesQuery query = new IndexesQuery().setLimit(3);\nclient.getIndexes(query);" + }, { "lang": "Ruby", "source": "client.indexes(limit: 3)" }, + { + "lang": "Go", + "source": "client.GetIndexes(&meilisearch.IndexesQuery{\n Limit: 3,\n})" + }, + { + "lang": "C#", + "source": "await client.GetAllIndexesAsync(new IndexesQuery { Limit = 3 });" + }, { "lang": "Rust", "source": "let mut indexes = IndexesQuery::new(&client)\n .with_limit(3)\n .execute()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.getIndexes { (result) in\n switch result {\n case .success(let indexes):\n print(indexes)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.getIndexes(params: IndexesQuery(limit: 3));" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes?limit=3'" + "lang": "Swift", + "source": "client.getIndexes { (result) in\n switch result {\n case .success(let indexes):\n print(indexes)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -1026,25 +1026,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "TaskInfo task = await client.CreateIndexAsync(\"movies\", \"id\");" - }, - { - "lang": "Dart", - "source": "await client.createIndex('movies', primaryKey: 'id');" - }, - { - "lang": "Go", - "source": "client.CreateIndex(&meilisearch.IndexConfig{\n Uid: \"movies\",\n PrimaryKey: \"id\",\n})" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"uid\": \"movies\",\n \"primaryKey\": \"id\"\n }'" }, { "lang": "JS", "source": "client.createIndex('movies', { primaryKey: 'id' })" }, - { - "lang": "Java", - "source": "client.createIndex(\"movies\", \"id\");" - }, { "lang": "PHP", "source": "$client->createIndex('movies', ['primaryKey' => 'id']);" @@ -1053,21 +1041,33 @@ "lang": "Python", "source": "client.create_index('movies', {'primaryKey': 'id'})" }, + { + "lang": "Java", + "source": "client.createIndex(\"movies\", \"id\");" + }, { "lang": "Ruby", "source": "client.create_index('movies', primary_key: 'id')" }, + { + "lang": "Go", + "source": "client.CreateIndex(&meilisearch.IndexConfig{\n Uid: \"movies\",\n PrimaryKey: \"id\",\n})" + }, + { + "lang": "C#", + "source": "TaskInfo task = await client.CreateIndexAsync(\"movies\", \"id\");" + }, { "lang": "Rust", "source": "client.create_index(\"movies\", Some(\"id\"))\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.createIndex(uid: \"movies\", primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.createIndex('movies', primaryKey: 'id');" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"uid\": \"movies\",\n \"primaryKey\": \"id\"\n }'" + "lang": "Swift", + "source": "client.createIndex(uid: \"movies\", primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -1153,25 +1153,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.GetIndexAsync(\"movies\");" - }, - { - "lang": "Dart", - "source": "await client.getIndex('movies');" - }, - { - "lang": "Go", - "source": "client.GetIndex(\"movies\")" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies'" }, { "lang": "JS", "source": "client.index('movies').getRawInfo()" }, - { - "lang": "Java", - "source": "client.getIndex(\"movies\");" - }, { "lang": "PHP", "source": "$client->index('movies')->fetchRawInfo();" @@ -1180,21 +1168,33 @@ "lang": "Python", "source": "client.get_index('movies')" }, + { + "lang": "Java", + "source": "client.getIndex(\"movies\");" + }, { "lang": "Ruby", "source": "client.fetch_index('movies')" }, + { + "lang": "Go", + "source": "client.GetIndex(\"movies\")" + }, + { + "lang": "C#", + "source": "await client.GetIndexAsync(\"movies\");" + }, { "lang": "Rust", "source": "let movies: Index = client\n .get_index(\"movies\")\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.getIndex(\"movies\") { (result) in\n switch result {\n case .success(let index):\n print(index)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.getIndex('movies');" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies'" + "lang": "Swift", + "source": "client.getIndex(\"movies\") { (result) in\n switch result {\n case .success(let index):\n print(index)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -1263,25 +1263,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.DeleteIndexAsync(\"movies\");" - }, - { - "lang": "Dart", - "source": "await client.index('movies').delete();\nt_one_document_1: \"await client.index('movies').getDocument(25684,\\n fields: ['id', 'title', 'poster', 'release_date']);\"" - }, - { - "lang": "Go", - "source": "client.DeleteIndex(\"movies\")\n// OR\nclient.Index(\"movies\").Delete()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies'" }, { "lang": "JS", "source": "client.deleteIndex('movies')" }, - { - "lang": "Java", - "source": "client.deleteIndex(\"movies\");" - }, { "lang": "PHP", "source": "$client->deleteIndex('movies');" @@ -1290,21 +1278,33 @@ "lang": "Python", "source": "client.delete_index('movies')\n// OR\nclient.index('movies').delete()" }, + { + "lang": "Java", + "source": "client.deleteIndex(\"movies\");" + }, { "lang": "Ruby", "source": "client.delete_index('movies')" }, { - "lang": "Rust", - "source": "client.index(\"movies\")\n .delete()\n .await\n .unwrap();" - }, + "lang": "Go", + "source": "client.DeleteIndex(\"movies\")\n// OR\nclient.Index(\"movies\").Delete()" + }, { - "lang": "Swift", - "source": "client.index(\"movies\").delete { (result) in\n switch result {\n case .success:\n print(\"Index deleted\")\n case .failure(let error):\n print(error)\n }\n}" + "lang": "C#", + "source": "await client.DeleteIndexAsync(\"movies\");" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies'" + "lang": "Rust", + "source": "client.index(\"movies\")\n .delete()\n .await\n .unwrap();" + }, + { + "lang": "Dart", + "source": "await client.index('movies').delete();\nget_one_document_1: \"await client.index('movies').getDocument(25684,\\n fields: ['id', 'title', 'poster', 'release_date']);\"" + }, + { + "lang": "Swift", + "source": "client.index(\"movies\").delete { (result) in\n switch result {\n case .success:\n print(\"Index deleted\")\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -1383,25 +1383,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "TaskInfo task = await client.UpdateIndexAsync(\"movies\", \"id\");" - }, - { - "lang": "Dart", - "source": "await client.index('movies').update(primaryKey: 'id');" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateIndex(&meilisearch.UpdateIndexRequestParams{\n PrimaryKey: \"id\",\n})" + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"primaryKey\": \"id\" }'" }, { "lang": "JS", "source": "client.updateIndex('movies', { primaryKey: 'id' })" }, - { - "lang": "Java", - "source": "client.updateIndex(\"movies\", \"id\");" - }, { "lang": "PHP", "source": "$client->updateIndex('movies', ['primaryKey' => 'id']);" @@ -1410,21 +1398,33 @@ "lang": "Python", "source": "client.index('movies').update(primary_key='id')" }, + { + "lang": "Java", + "source": "client.updateIndex(\"movies\", \"id\");" + }, { "lang": "Ruby", "source": "client.index('movies').update(primary_key: 'movie_id')" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateIndex(&meilisearch.UpdateIndexRequestParams{\n PrimaryKey: \"id\",\n})" + }, + { + "lang": "C#", + "source": "TaskInfo task = await client.UpdateIndexAsync(\"movies\", \"id\");" + }, { "lang": "Rust", "source": "let task = IndexUpdater::new(\"movies\", &client)\n .with_primary_key(\"movie_review_id\")\n .execute()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").update(primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').update(primaryKey: 'id');" }, { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"primaryKey\": \"id\" }'" + "lang": "Swift", + "source": "client.index(\"movies\").update(primaryKey: \"id\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -1494,24 +1494,32 @@ ], "x-codeSamples": [ { - "lang": "Java", - "source": "client.index(\"INDEX_NAME\").compact();" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_UID/compact'" + }, + { + "lang": "PHP", + "source": "$client->index('movies')->compact();" }, { "lang": "Python", "source": "client.index('movies').compact()" }, + { + "lang": "Java", + "source": "client.index(\"INDEX_NAME\").compact();" + }, { "lang": "Ruby", "source": "client.index('INDEX_UID').compact" }, { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"INDEX_UID\")\n .compact()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"INDEX_UID\").Compact();" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_UID/compact'" + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"INDEX_UID\")\n .compact()\n .await\n .unwrap();" } ] } @@ -1684,21 +1692,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() { Limit = 2, Filter = \"genres = action\" });" - }, - { - "lang": "Go", - "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"movies\").GetDocuments(&meilisearch.DocumentsQuery{\n Limit: 2,\n Filter: \"genres = action\",\n}, &result)" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents?limit=2&filter=genres=action'" }, { "lang": "JS", "source": "client.index('movies').getDocuments({\n limit: 2,\n filter: 'genres = action',\n sort: ['release_date:desc']\n})" }, - { - "lang": "Java", - "source": "DocumentsQuery query = new DocumentsQuery().setLimit(2).setFilter(new String[] {\"genres = action\"});\nclient.index(\"movies\").getDocuments(query, TargetClassName.class);" - }, { "lang": "PHP", "source": "$client->index('movies')->getDocuments((new DocumentsQuery())->setFilter('genres = action')->setLimit(2));" @@ -1707,10 +1707,22 @@ "lang": "Python", "source": "client.index('movies').get_documents({\n 'limit':2, 'filter': 'genres=action',\n 'sort': ['rating:desc', 'release_date:asc'] # list format\n})" }, + { + "lang": "Java", + "source": "DocumentsQuery query = new DocumentsQuery().setLimit(2).setFilter(new String[] {\"genres = action\"});\nclient.index(\"movies\").getDocuments(query, TargetClassName.class);" + }, { "lang": "Ruby", "source": "client.index('movies').get_documents(limit: 2, filter: 'genres = action')" }, + { + "lang": "Go", + "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"movies\").GetDocuments(&meilisearch.DocumentsQuery{\n Limit: 2,\n Filter: \"genres = action\",\n}, &result)" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() { Limit = 2, Filter = \"genres = action\" });" + }, { "lang": "Rust", "source": "let index = client.index(\"movies\");\nlet documents: DocumentsResults = DocumentsQuery::new(&index)\n .with_filter(\"genres = action\")\n .with_limit(2)\n .execute::()\n .await\n .unwrap();" @@ -1718,10 +1730,6 @@ { "lang": "Swift", "source": "client.index(\"movies\").getDocuments(params: DocumentsQuery(limit: 2)) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let movies):\n print(movies)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents?limit=2&filter=genres=action'" } ] }, @@ -1839,21 +1847,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "var movie = new[]\n{\n new Movie { Id = \"287947\", Title = \"Shazam ⚡️\", Genres = \"comedy\" }\n};\nawait index.UpdateDocumentsAsync(movie);" - }, - { - "lang": "Go", - "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\",\n },\n}\noptions := &meilisearch.DocumentOptions{SkipCreation: true}\nclient.Index(\"movies\").UpdateDocuments(documents, options)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\"\n }\n ]'" }, { "lang": "JS", "source": "client.index('movies').updateDocuments([{\n id: 287947,\n title: 'Shazam ⚡️',\n genres: 'comedy'\n}])" }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateDocuments(\"[{\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam ⚡️\\\",\"\n + \"\\\"genres\\\": \\\"comedy\\\"\"\n + \"}]\"\n);" - }, { "lang": "PHP", "source": "$client->index('movies')->updateDocuments([\n [\n 'id' => 287947,\n 'title' => 'Shazam ⚡️',\n 'genres' => 'comedy'\n ]\n]);" @@ -1862,10 +1862,22 @@ "lang": "Python", "source": "client.index('movies').update_documents([{\n 'id': 287947,\n 'title': 'Shazam ⚡️',\n 'genres': 'comedy'\n}], skip_creation=True)" }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateDocuments(\"[{\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam ⚡️\\\",\"\n + \"\\\"genres\\\": \\\"comedy\\\"\"\n + \"}]\"\n);" + }, { "lang": "Ruby", "source": "client.index('movies').update_documents([\n {\n id: 287947,\n title: 'Shazam ⚡️',\n genres: 'comedy'\n }\n])" }, + { + "lang": "Go", + "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\",\n },\n}\noptions := &meilisearch.DocumentOptions{SkipCreation: true}\nclient.Index(\"movies\").UpdateDocuments(documents, options)" + }, + { + "lang": "C#", + "source": "var movie = new[]\n{\n new Movie { Id = \"287947\", Title = \"Shazam ⚡️\", Genres = \"comedy\" }\n};\nawait index.UpdateDocumentsAsync(movie);" + }, { "lang": "Rust", "source": "// Define the type of our documents\n#[derive(Serialize, Deserialize)]\nstruct IncompleteMovie {\n id: usize,\n title: String,\n genres: String\n}\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .add_or_update(&[\n IncompleteMovie {\n id: 287947,\n title: \"Shazam ⚡️\".to_string(),\n genres: \"comedy\".to_string()\n }\n ], None)\n .await\n .unwrap();" @@ -1873,10 +1885,6 @@ { "lang": "Swift", "source": "let documentJsonString = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\"\n }\n]\n\"\"\"\nlet documents: Data = documentJsonString.data(using: .utf8)!\n\nclient.index(\"movies\").updateDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam ⚡️\",\n \"genres\": \"comedy\"\n }\n ]'" } ] }, @@ -1994,25 +2002,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "var movie = new[]\n{\n new Movie\n {\n Id = \"287947\",\n Title = \"Shazam\",\n Poster = \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n Overview = \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n ReleaseDate = \"2019-03-23\"\n }\n};\nawait index.AddDocumentsAsync(movie);" - }, - { - "lang": "Dart", - "source": "await client.index('movies').addDocuments([\n {\n 'id': 287947,\n 'title': 'Shazam',\n 'poster':\n 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview':\n 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n }\n]);\nd_or_update_documents_1: \"await client.index('movies').updateDocuments([\\n {\\n 'id': 287947,\\n 'title': 'Shazam ⚡️',\\n 'genres': 'comedy',\\n }\\n]);\"" - }, - { - "lang": "Go", - "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\",\n },\n}\noptions := &meilisearch.DocumentOptions{SkipCreation: false}\nclient.Index(\"movies\").AddDocuments(documents, options)" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n ]'" }, { "lang": "JS", "source": "client.index('movies').addDocuments([{\n id: 287947,\n title: 'Shazam',\n poster: 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n overview: 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n release_date: '2019-03-23'\n}])" }, - { - "lang": "Java", - "source": "client.index(\"movies\").addDocuments(\"[{\"\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam\\\",\"\n + \"\\\"poster\\\": \\\"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\\\",\"\n + \"\\\"overview\\\": \\\"A boy is given the ability to become an adult superhero in times of need with a single magic word.\\\",\"\n + \"\\\"release_date\\\": \\\"2019-03-23\\\"\"\n + \"}]\"\n);" - }, { "lang": "PHP", "source": "$client->index('movies')->addDocuments([\n [\n 'id' => 287947,\n 'title' => 'Shazam',\n 'poster' => 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview' => 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date' => '2019-03-23'\n ]\n]);" @@ -2021,21 +2017,33 @@ "lang": "Python", "source": "client.index('movies').add_documents([{\n 'id': 287947,\n 'title': 'Shazam',\n 'poster': 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview': 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n}], skip_creation=True)" }, + { + "lang": "Java", + "source": "client.index(\"movies\").addDocuments(\"[{\"\n + \"\\\"id\\\": 287947,\"\n + \"\\\"title\\\": \\\"Shazam\\\",\"\n + \"\\\"poster\\\": \\\"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\\\",\"\n + \"\\\"overview\\\": \\\"A boy is given the ability to become an adult superhero in times of need with a single magic word.\\\",\"\n + \"\\\"release_date\\\": \\\"2019-03-23\\\"\"\n + \"}]\"\n);" + }, { "lang": "Ruby", "source": "client.index('movies').add_documents([\n {\n id: 287947,\n title: 'Shazam',\n poster: 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n overview: 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n release_date: '2019-03-23'\n }\n])" }, + { + "lang": "Go", + "source": "documents := []map[string]interface{}{\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\",\n },\n}\noptions := &meilisearch.DocumentOptions{SkipCreation: false}\nclient.Index(\"movies\").AddDocuments(documents, options)" + }, + { + "lang": "C#", + "source": "var movie = new[]\n{\n new Movie\n {\n Id = \"287947\",\n Title = \"Shazam\",\n Poster = \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n Overview = \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n ReleaseDate = \"2019-03-23\"\n }\n};\nawait index.AddDocumentsAsync(movie);" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .add_or_replace(&[\n Movie {\n id: 287947,\n title: \"Shazam\".to_string(),\n poster: \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\".to_string(),\n overview: \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\".to_string(),\n release_date: \"2019-03-23\".to_string(),\n }\n ], None)\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "let documentJsonString = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n]\n\"\"\"\nlet documents: Data = documentJsonString.data(using: .utf8)!\n\nclient.index(\"movies\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').addDocuments([\n {\n 'id': 287947,\n 'title': 'Shazam',\n 'poster':\n 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',\n 'overview':\n 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',\n 'release_date': '2019-03-23'\n }\n]);\nadd_or_update_documents_1: \"await client.index('movies').updateDocuments([\\n {\\n 'id': 287947,\\n 'title': 'Shazam ⚡️',\\n 'genres': 'comedy',\\n }\\n]);\"" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"id\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n ]'" + "lang": "Swift", + "source": "let documentJsonString = \"\"\"\n[\n {\n \"reference_number\": 287947,\n \"title\": \"Shazam\",\n \"poster\": \"https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg\",\n \"overview\": \"A boy is given the ability to become an adult superhero in times of need with a single magic word.\",\n \"release_date\": \"2019-03-23\"\n }\n]\n\"\"\"\nlet documents: Data = documentJsonString.data(using: .utf8)!\n\nclient.index(\"movies\").addDocuments(documents: documents) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -2104,25 +2112,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteAllDocumentsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').deleteAllDocuments();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteAllDocuments()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/documents'" }, { "lang": "JS", "source": "client.index('movies').deleteAllDocuments()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").deleteAllDocuments();" - }, { "lang": "PHP", "source": "$client->index('movies')->deleteAllDocuments();" @@ -2131,21 +2127,33 @@ "lang": "Python", "source": "client.index('movies').delete_all_documents()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").deleteAllDocuments();" + }, { "lang": "Ruby", "source": "client.index('movies').delete_all_documents" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").DeleteAllDocuments()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteAllDocumentsAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_all_documents()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").deleteAllDocuments() { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').deleteAllDocuments();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/documents'" + "lang": "Swift", + "source": "client.index(\"movies\").deleteAllDocuments() { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -2226,21 +2234,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new DeleteDocumentsQuery() { Filter = \"genres = action OR genres = adventure\" });" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteDocumentsByFilter(\"genres=action OR genres=adventure\")" + "lang": "cURL", + "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/movies/documents/delete \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"genres = action OR genres = adventure\"\n }'" }, { "lang": "JS", "source": "client.index('movies').deleteDocuments({\n filter: 'genres = action OR genres = adventure'\n})" }, - { - "lang": "Java", - "source": "String filter = \"genres = action OR genres = adventure\";\nclient.index(\"movies\").deleteDocumentsByFilter(filter);" - }, { "lang": "PHP", "source": "$client->index('movies')->deleteDocuments(['filter' => 'genres = action OR genres = adventure']);" @@ -2249,17 +2249,25 @@ "lang": "Python", "source": "client.index('movies').delete_documents(filter='genres=action OR genres=adventure')" }, + { + "lang": "Java", + "source": "String filter = \"genres = action OR genres = adventure\";\nclient.index(\"movies\").deleteDocumentsByFilter(filter);" + }, { "lang": "Ruby", "source": "client.index('movies').delete_documents(filter: 'genres = action OR genres = adventure')" }, { - "lang": "Rust", - "source": "let index = client.index(\"movies\");\nlet task = DocumentDeletionQuery::new(&index)\n .with_filter(\"genres = action OR genres = adventure\")\n .execute()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"movies\").DeleteDocumentsByFilter(\"genres=action OR genres=adventure\")" }, { - "lang": "cURL", - "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/movies/documents/delete \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"genres = action OR genres = adventure\"\n }'" + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new DeleteDocumentsQuery() { Filter = \"genres = action OR genres = adventure\" });" + }, + { + "lang": "Rust", + "source": "let index = client.index(\"movies\");\nlet task = DocumentDeletionQuery::new(&index)\n .with_filter(\"genres = action OR genres = adventure\")\n .execute()\n .await\n .unwrap();" } ] } @@ -2341,21 +2349,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new[] { \"23488\", \"153738\", \"437035\", \"363869\" });" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteDocuments([]string{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\",\n})" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents/delete-batch' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n 23488,\n 153738,\n 437035,\n 363869\n ]'" }, { "lang": "JS", "source": "client.index('movies').deleteDocuments([23488, 153738, 437035, 363869])" }, - { - "lang": "Java", - "source": "client.index(\"movies\").deleteDocuments(Arrays.asList(new String[]\n{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\"\n}));" - }, { "lang": "PHP", "source": "$client->index('movies')->deleteDocuments([23488, 153738, 437035, 363869]);" @@ -2364,17 +2364,25 @@ "lang": "Python", "source": "client.index('movies').delete_documents([23488, 153738, 437035, 363869])" }, + { + "lang": "Java", + "source": "client.index(\"movies\").deleteDocuments(Arrays.asList(new String[]\n{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\"\n}));" + }, { "lang": "Ruby", "source": "client.index('movies').delete_documents([23488, 153738, 437035, 363869])" }, { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_documents(&[23488, 153738, 437035, 363869])\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"movies\").DeleteDocuments([]string{\n \"23488\",\n \"153738\",\n \"437035\",\n \"363869\",\n})" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/documents/delete-batch' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n 23488,\n 153738,\n 437035,\n 363869\n ]'" + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteDocumentsAsync(new[] { \"23488\", \"153738\", \"437035\", \"363869\" });" + }, + { + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_documents(&[23488, 153738, 437035, 363869])\n .await\n .unwrap();" } ] } @@ -2556,21 +2564,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() {\n Limit = 3,\n Fields = new List { \"title\", \"genres\", \"rating\", \"language\"},\n Filter = \"(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English\"\n});" - }, - { - "lang": "Go", - "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"books\").GetDocuments(&meilisearch.DocumentsQuery{\n Fields: []string{\"title\", \"genres\", \"rating\", \"language\"},\n Filter: \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n}, &result)" + "lang": "cURL", + "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/books/documents/fetch \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n \"fields\": [\"title\", \"genres\", \"rating\", \"language\"],\n \"limit\": 3\n }'" }, { "lang": "JS", "source": "client.index('books').getDocuments({\n filter: '(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English',\n fields: ['title', 'genres', 'rating', 'language'],\n limit: 3,\n sort: ['release_date:desc']\n})" }, - { - "lang": "Java", - "source": "DocumentsQuery query = new DocumentsQuery()\n .setFilter(new String[] {\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\"})\n .setFields(new String[] {\"title\", \"genres\", \"rating\", \"language\"})\n .setLimit(3);\nclient.index(\"books\").getDocuments(query, TargetClassName.class);" - }, { "lang": "PHP", "source": "$client->index('books')->getDocuments(\n (new DocumentsQuery())\n ->setFilter('(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English')\n ->setLimit(3)\n ->setFields(['title', 'genres', 'rating', 'language'])\n);" @@ -2579,17 +2579,25 @@ "lang": "Python", "source": "client.index('books').get_documents({\n 'limit':3,\n 'fields': ['title', 'genres', 'rating', 'language'],\n 'filter': '(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English',\n 'sort': 'rating:desc, title:asc' # comma-separated string format\n})" }, + { + "lang": "Java", + "source": "DocumentsQuery query = new DocumentsQuery()\n .setFilter(new String[] {\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\"})\n .setFields(new String[] {\"title\", \"genres\", \"rating\", \"language\"})\n .setLimit(3);\nclient.index(\"books\").getDocuments(query, TargetClassName.class);" + }, { "lang": "Ruby", "source": "client.index('books').get_documents(\n filter: '(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English',\n limit: 3,\n fields: ['title', 'genres', 'rating', 'language']\n)" }, { - "lang": "Rust", - "source": "let index = client.index(\"books\");\nlet documents: DocumentsResults = DocumentsQuery::new(&index)\n .with_filter(\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\")\n .with_fields([\"title\", \"genres\", \"rating\", \"language\"])\n .with_limit(2)\n .execute::()\n .await\n .unwrap();" + "lang": "Go", + "source": "var result meilisearch.DocumentsResult\n\nclient.Index(\"books\").GetDocuments(&meilisearch.DocumentsQuery{\n Fields: []string{\"title\", \"genres\", \"rating\", \"language\"},\n Filter: \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n}, &result)" }, { - "lang": "cURL", - "source": "curl \\\n -X POST MEILISEARCH_URL/indexes/books/documents/fetch \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"filter\": \"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\",\n \"fields\": [\"title\", \"genres\", \"rating\", \"language\"],\n \"limit\": 3\n }'" + "lang": "C#", + "source": "await client.Index(\"movies\").GetDocumentsAsync(new DocumentsQuery() {\n Limit = 3,\n Fields = new List { \"title\", \"genres\", \"rating\", \"language\"},\n Filter = \"(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English\"\n});" + }, + { + "lang": "Rust", + "source": "let index = client.index(\"books\");\nlet documents: DocumentsResults = DocumentsQuery::new(&index)\n .with_filter(\"(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English\")\n .with_fields([\"title\", \"genres\", \"rating\", \"language\"])\n .with_limit(2)\n .execute::()\n .await\n .unwrap();" } ] } @@ -2705,21 +2713,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDocumentAsync(25684, new List { \"id\", \"title\", \"poster\", \"release_date\" });" - }, - { - "lang": "Go", - "source": "var a interface{}\nclient.Index(\"movies\").GetDocument(\"25684\",&meilisearch.DocumentQuery{\n Fields: []string{\"id\", \"title\", \"poster\", \"release_date\"},\n}, &a)" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents/25684?fields=id,title,poster,release_date'" }, { "lang": "JS", "source": "client\n .index('movies')\n .getDocument(25684, { fields: ['id', 'title', 'poster', 'release_date'] })" }, - { - "lang": "Java", - "source": "DocumentQuery query = new DocumentQuery().setFields(new String[] {\"id\", \"title\", \"poster\", \"release_date\"});\nclient.index(\"movies\").getDocument(\"25684\", query);" - }, { "lang": "PHP", "source": "$client->index('movies')->getDocument(25684, ['id', 'title', 'poster', 'release_date']);" @@ -2728,10 +2728,22 @@ "lang": "Python", "source": "client.index('movies').get_document(25684, {\n 'fields': ['id', 'title', 'poster', 'release_date']\n})" }, + { + "lang": "Java", + "source": "DocumentQuery query = new DocumentQuery().setFields(new String[] {\"id\", \"title\", \"poster\", \"release_date\"});\nclient.index(\"movies\").getDocument(\"25684\", query);" + }, { "lang": "Ruby", "source": "client.index('movies').document(25684, fields: ['id', 'title', 'poster', 'release_date'])" }, + { + "lang": "Go", + "source": "var a interface{}\nclient.Index(\"movies\").GetDocument(\"25684\",&meilisearch.DocumentQuery{\n Fields: []string{\"id\", \"title\", \"poster\", \"release_date\"},\n}, &a)" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetDocumentAsync(25684, new List { \"id\", \"title\", \"poster\", \"release_date\" });" + }, { "lang": "Rust", "source": "let index = client\n .index(\"movies\");\nlet document = DocumentQuery::new(&index)\n .with_fields([\"id\", \"title\", \"poster\", \"release_date\"])\n .execute::(\"25684\")\n .await\n .unwrap();" @@ -2739,10 +2751,6 @@ { "lang": "Swift", "source": "client.index(\"movies\").getDocument(25684) { (result: Result) in\n switch result {\n case .success(let movie):\n print(movie)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/documents/25684?fields=id,title,poster,release_date'" } ] }, @@ -2821,25 +2829,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").DeleteOneDocumentAsync(\"25684\");" - }, - { - "lang": "Dart", - "source": "await client.index('movies').deleteDocument(25684);\nlete_documents_by_batch_1: \"await client.index('movies').deleteDocuments(\\n DeleteDocumentsQuery(\\n ids: [23488, 153738, 437035, 363869],\\n ),\\n );\"" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").DeleteDocument(\"25684\")" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/documents/25684'" }, { "lang": "JS", "source": "client.index('movies').deleteDocument(25684)" }, - { - "lang": "Java", - "source": "client.index(\"movies\").deleteDocument(\"25684\");" - }, { "lang": "PHP", "source": "$client->index('movies')->deleteDocument(25684);" @@ -2848,21 +2844,33 @@ "lang": "Python", "source": "client.index('movies').delete_document(25684)" }, + { + "lang": "Java", + "source": "client.index(\"movies\").deleteDocument(\"25684\");" + }, { "lang": "Ruby", "source": "client.index('movies').delete_document(25684)" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").DeleteDocument(\"25684\")" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").DeleteOneDocumentAsync(\"25684\");" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .delete_document(25684)\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").deleteDocument(\"25684\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').deleteDocument(25684);\ndelete_documents_by_batch_1: \"await client.index('movies').deleteDocuments(\\n DeleteDocumentsQuery(\\n ids: [23488, 153738, 437035, 363869],\\n ),\\n );\"" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/documents/25684'" + "lang": "Swift", + "source": "client.index(\"movies\").deleteDocument(\"25684\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -2974,21 +2982,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "var query = new SearchFacetsQuery()\n{\n FacetQuery = \"fiction\",\n Filter = \"rating > 3\"\n};\nawait client.Index(\"books\").FacetSearchAsync(\"genres\", query);" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").FacetSearch(&meilisearch.FacetSearchRequest{\n FacetQuery: \"fiction\",\n FacetName: \"genres\",\n Filter: \"rating > 3\",\n})" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"facetQuery\": \"fiction\",\n \"facetName\": \"genres\",\n \"filter\": \"rating > 3\"\n }'" }, { "lang": "JS", "source": "client.index('books').searchForFacetValues({\n facetQuery: 'fiction',\n facetName: 'genres'\n filter: 'rating > 3'\n})" }, - { - "lang": "Java", - "source": "FacetSearchRequest fsr = FacetSearchRequest.builder().facetName(\"genres\").facetQuery(\"fiction\").filter(new String[]{\"rating > 3\"}).build();\nclient.index(\"books\").facetSearch(fsr);" - }, { "lang": "PHP", "source": "$client->index('books')->facetSearch(\n (new FacetSearchQuery())\n ->setFacetQuery('fiction')\n ->setFacetName('genres')\n ->setFilter(['rating > 3'])\n);" @@ -2997,17 +2997,25 @@ "lang": "Python", "source": "client.index('books').facet_search('genres', 'fiction', {\n 'filter': 'rating > 3'\n})" }, + { + "lang": "Java", + "source": "FacetSearchRequest fsr = FacetSearchRequest.builder().facetName(\"genres\").facetQuery(\"fiction\").filter(new String[]{\"rating > 3\"}).build();\nclient.index(\"books\").facetSearch(fsr);" + }, { "lang": "Ruby", "source": "client.index('books').facet_search('genres', 'fiction', filter: 'rating > 3')" }, { - "lang": "Rust", - "source": "let res = client.index(\"books\")\n .facet_search(\"genres\")\n .with_facet_query(\"fiction\")\n .with_filter(\"rating > 3\")\n .execute()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"books\").FacetSearch(&meilisearch.FacetSearchRequest{\n FacetQuery: \"fiction\",\n FacetName: \"genres\",\n Filter: \"rating > 3\",\n})" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/books/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"facetQuery\": \"fiction\",\n \"facetName\": \"genres\",\n \"filter\": \"rating > 3\"\n }'" + "lang": "C#", + "source": "var query = new SearchFacetsQuery()\n{\n FacetQuery = \"fiction\",\n Filter = \"rating > 3\"\n};\nawait client.Index(\"books\").FacetSearchAsync(\"genres\", query);" + }, + { + "lang": "Rust", + "source": "let res = client.index(\"books\")\n .facet_search(\"genres\")\n .with_facet_query(\"fiction\")\n .with_filter(\"rating > 3\")\n .execute()\n .await\n .unwrap();" } ] } @@ -3420,13 +3428,13 @@ } ], "x-codeSamples": [ - { - "lang": "JS", - "source": "client.index('movies').searchGet('American ninja')" - }, { "lang": "cURL", "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/search?q=american%20ninja'" + }, + { + "lang": "JS", + "source": "client.index('movies').searchGet('American ninja')" } ] }, @@ -3537,19 +3545,19 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").SearchAsync(\"American ninja\");\nt_task_1: |\nTaskInfo task = await client.GetTaskAsync(1);\nt_all_tasks_1: |\nResourceResults taskResult = await client.GetTasksAsync();" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"american ninja\" }'" }, { - "lang": "Dart", - "source": "await client.index('movies').search('American ninja');" + "lang": "JS", + "source": "client.index('movies').search('American ninja')" }, { - "lang": "Go", - "source": "client.Index(\"movies\").Search(\"american ninja\", &meilisearch.SearchRequest{})" + "lang": "PHP", + "source": "$client->index('movies')->search('american ninja');" }, { - "lang": "JS", + "lang": "Python", "source": "client.index('movies').search('American ninja')" }, { @@ -3557,28 +3565,28 @@ "source": "client.index(\"movies\").search(\"American ninja\");" }, { - "lang": "PHP", - "source": "$client->index('movies')->search('american ninja');" + "lang": "Ruby", + "source": "client.index('movies').search('american ninja')" }, { - "lang": "Python", - "source": "client.index('movies').search('American ninja')" + "lang": "Go", + "source": "client.Index(\"movies\").Search(\"american ninja\", &meilisearch.SearchRequest{})" }, { - "lang": "Ruby", - "source": "client.index('movies').search('american ninja')" + "lang": "C#", + "source": "await client.Index(\"movies\").SearchAsync(\"American ninja\");\nget_task_1: |\nTaskInfo task = await client.GetTaskAsync(1);\nget_all_tasks_1: |\nResourceResults taskResult = await client.GetTasksAsync();" }, { "lang": "Rust", "source": "let results: SearchResults = client\n .index(\"movies\")\n .search()\n .with_query(\"american ninja\")\n .execute()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "let searchParameters = SearchParameters(query: \"American ninja\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').search('American ninja');" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/movies/search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{ \"q\": \"american ninja\" }'" + "lang": "Swift", + "source": "let searchParameters = SearchParameters(query: \"American ninja\")\nclient.index(\"movies\").search(searchParameters) { (result: Result, Swift.Error>) in\n switch result {\n case .success(let searchResult):\n print(searchResult)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -3643,25 +3651,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSettingsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getSettings();\ndate_settings_1: \"await client.index('movies').updateSettings(\\n IndexSettings(\\n rankingRules: [\\n 'words',\\n 'typo',\\n 'proximity',\\n 'attribute',\\n 'sort',\\n 'exactness',\\n 'release_date:desc',\\n 'rank:desc'\\n ],\\n distinctAttribute: 'movie_id',\\n searchableAttributes: ['title', 'overview', 'genres'],\\n displayedAttributes: [\\n 'title',\\n 'overview',\\n 'genres',\\n 'release_date'\\n ],\\n stopWords: ['the', 'a', 'an'],\\n sortableAttributes: ['title', 'release_date'],\\n synonyms: {\\n 'wolverine': ['xmen', 'logan'],\\n 'logan': ['wolverine'],\\n },\\n ),\\n );\"" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSettings()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings'" }, { "lang": "JS", "source": "client.index('movies').getSettings()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").getSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->getSettings();" @@ -3670,21 +3666,33 @@ "lang": "Python", "source": "client.index('movies').get_settings()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").getSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').settings" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetSettings()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetSettingsAsync();" + }, { "lang": "Rust", "source": "let settings: Settings = client\n .index(\"movies\")\n .get_settings()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").getSettings { (result) in\n switch result {\n case .success(let setting):\n print(setting)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').getSettings();\nupdate_settings_1: \"await client.index('movies').updateSettings(\\n IndexSettings(\\n rankingRules: [\\n 'words',\\n 'typo',\\n 'proximity',\\n 'attribute',\\n 'sort',\\n 'exactness',\\n 'release_date:desc',\\n 'rank:desc'\\n ],\\n distinctAttribute: 'movie_id',\\n searchableAttributes: ['title', 'overview', 'genres'],\\n displayedAttributes: [\\n 'title',\\n 'overview',\\n 'genres',\\n 'release_date'\\n ],\\n stopWords: ['the', 'a', 'an'],\\n sortableAttributes: ['title', 'release_date'],\\n synonyms: {\\n 'wolverine': ['xmen', 'logan'],\\n 'logan': ['wolverine'],\\n },\\n ),\\n );\"" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings'" + "lang": "Swift", + "source": "client.index(\"movies\").getSettings { (result) in\n switch result {\n case .success(let setting):\n print(setting)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -3753,25 +3761,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSettingsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetSettings();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetSettings()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings'" }, { "lang": "JS", "source": "client.index('movies').resetSettings()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->resetSettings();" @@ -3780,21 +3776,33 @@ "lang": "Python", "source": "client.index('movies').reset_settings()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').reset_settings" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetSettings()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSettingsAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_settings()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").resetSettings { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').resetSettings();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings'" + "lang": "Swift", + "source": "client.index(\"movies\").resetSettings { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -3873,21 +3881,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "Settings newSettings = new Settings\n{\n RankingRules = new string[]\n {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n },\n DistinctAttribute = \"movie_id\",\n SearchableAttributes = new string[] { \"title\", \"overview\", \"genres\" },\n DisplayedAttributes = new string[] { \"title\", \"overview\", \"genres\", \"release_date\" },\n SortableAttributes = new string[] { \"title\", \"release_date\" },\n StopWords = new string[] { \"the\", \"a\", \"an\" },\n Synonyms = new Dictionary>\n {\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\" } },\n },\n FilterableAttributes = new string[] { },\n TypoTolerance = new TypoTolerance\n {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeForTypos = new TypoTolerance.TypoSize\n {\n OneTypo = 8,\n TwoTypos = 10\n }\n },\n SearchCutoffMs = 150\n};\nTaskInfo task = await client.Index(\"movies\").UpdateSettingsAsync(newFilters);" - }, - { - "lang": "Go", - "source": "distinctAttribute := \"movie_id\"\nsettings := meilisearch.Settings{\n RankingRules: []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\",\n },\n DistinctAttribute: &distinctAttribute,\n SearchableAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n },\n DisplayedAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n },\n StopWords: []string{\n \"the\",\n \"a\",\n \"an\",\n },\n SortableAttributes: []string{\n \"title\",\n \"release_date\",\n },\n Synonyms: map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\"},\n },\n TypoTolerance: &meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 8,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n },\n Pagination: &meilisearch.Pagination{\n MaxTotalHits: 5000,\n },\n Faceting: &meilisearch.Faceting{\n MaxValuesPerFacet: 200,\n },\n SearchCutoffMs: 150,\n}\nclient.Index(\"movies\").UpdateSettings(&settings)" + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"rankingRules\": [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ],\n \"distinctAttribute\": \"movie_id\",\n \"searchableAttributes\": [\n \"title\",\n \"overview\",\n \"genres\"\n ],\n \"displayedAttributes\": [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ],\n \"stopWords\": [\n \"the\",\n \"a\",\n \"an\"\n ],\n \"sortableAttributes\": [\n \"title\",\n \"release_date\"\n ],\n \"synonyms\": {\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\"wolverine\"]\n },\n \"typoTolerance\": {\n \"minWordSizeForTypos\": {\n \"oneTypo\": 8,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n },\n \"pagination\": {\n \"maxTotalHits\": 5000\n },\n \"faceting\": {\n \"maxValuesPerFacet\": 200\n },\n \"searchCutoffMs\": 150\n }'" }, { "lang": "JS", "source": "client.index('movies').updateSettings({\n rankingRules: [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n distinctAttribute: 'movie_id',\n searchableAttributes: [\n 'title',\n 'overview',\n 'genres'\n ],\n displayedAttributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n stopWords: [\n 'the',\n 'a',\n 'an'\n ],\n sortableAttributes: [\n 'title',\n 'release_date'\n ],\n synonyms: {\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine']\n },\n typoTolerance: {\n 'minWordSizeForTypos': {\n 'oneTypo': 8,\n 'twoTypos': 10\n },\n 'disableOnAttributes': [\n 'title'\n ]\n },\n pagination: {\n maxTotalHits: 5000\n },\n faceting: {\n maxValuesPerFacet: 200\n },\n searchCutoffMs: 150\n})" }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setRankingRules(\n new String[] {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n });\nsettings.setDistinctAttribute(\"movie_id\");\nsettings.setSearchableAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\"\n });\nsettings.setDisplayedAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n });\nsettings.setStopWords(\n new String[] {\n \"the\",\n \"a\",\n \"an\"\n });\nsettings.setSortableAttributes(\n new String[] {\n \"title\",\n \"release_date\"\n });\n\nHashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nsettings.setSynonyms(synonyms);\n\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 8);\n put(\"twoTypos\", 10);\n }\n };\nTypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\nsettings.setTypoTolerance(typoTolerance);\nsettings.setSearchCutoffMs(150);\nclient.index(\"movies\").updateSettings(settings);" - }, { "lang": "PHP", "source": "$client->index('movies')->updateSettings([\n 'rankingRules' => [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n 'distinctAttribute' => 'movie_id',\n 'searchableAttributes' => [\n 'title',\n 'overview',\n 'genres'\n ],\n 'displayedAttributes' => [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n 'stopWords' => [\n 'the',\n 'a',\n 'an'\n ],\n 'sortableAttributes' => [\n 'title',\n 'release_date'\n ],\n 'synonyms' => [\n 'wolverine' => ['xmen', 'logan'],\n 'logan' => ['wolverine']\n ],\n 'typoTolerance' => [\n 'minWordSizeForTypos' => [\n 'oneTypo' => 8,\n 'twoTypos' => 10\n ],\n 'disableOnAttributes' => ['title']\n ],\n 'pagination' => [\n 'maxTotalHits' => 5000\n ],\n 'faceting' => [\n 'maxValuesPerFacet' => 200\n ],\n 'searchCutoffMs' => 150\n]);" @@ -3896,10 +3896,22 @@ "lang": "Python", "source": "client.index('movies').update_settings({\n 'rankingRules': [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n 'distinctAttribute': 'movie_id',\n 'searchableAttributes': [\n 'title',\n 'overview',\n 'genres'\n ],\n 'displayedAttributes': [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n 'sortableAttributes': [\n 'title',\n 'release_date'\n ],\n 'stopWords': [\n 'the',\n 'a',\n 'an'\n ],\n 'synonyms': {\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine']\n },\n 'typoTolerance': {\n 'minWordSizeForTypos': {\n 'oneTypo': 8,\n 'twoTypos': 10\n },\n 'disableOnAttributes': ['title']\n },\n 'pagination': {\n 'maxTotalHits': 5000\n },\n 'faceting': {\n 'maxValuesPerFacet': 200\n },\n 'searchCutoffMs': 150\n})" }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setRankingRules(\n new String[] {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n });\nsettings.setDistinctAttribute(\"movie_id\");\nsettings.setSearchableAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\"\n });\nsettings.setDisplayedAttributes(\n new String[] {\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n });\nsettings.setStopWords(\n new String[] {\n \"the\",\n \"a\",\n \"an\"\n });\nsettings.setSortableAttributes(\n new String[] {\n \"title\",\n \"release_date\"\n });\n\nHashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nsettings.setSynonyms(synonyms);\n\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 8);\n put(\"twoTypos\", 10);\n }\n };\nTypoTolerance typoTolerance = new TypoTolerance();\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\nsettings.setTypoTolerance(typoTolerance);\nsettings.setSearchCutoffMs(150);\nclient.index(\"movies\").updateSettings(settings);" + }, { "lang": "Ruby", "source": "client.index('movies').update_settings({\n ranking_rules: [\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:desc',\n 'rank:desc'\n ],\n distinct_attribute: 'movie_id',\n searchable_attributes: [\n 'title',\n 'overview',\n 'genres'\n ],\n displayed_attributes: [\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n ],\n stop_words: [\n 'the',\n 'a',\n 'an'\n ],\n sortable_attributes: [\n 'title',\n 'release_date'\n ],\n synonyms: {\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine']\n },\n pagination: {\n max_total_hits: 5000\n },\n faceting: {\n max_values_per_facet: 200\n },\n search_cutoff_ms: 150\n})" }, + { + "lang": "Go", + "source": "distinctAttribute := \"movie_id\"\nsettings := meilisearch.Settings{\n RankingRules: []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\",\n },\n DistinctAttribute: &distinctAttribute,\n SearchableAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n },\n DisplayedAttributes: []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n },\n StopWords: []string{\n \"the\",\n \"a\",\n \"an\",\n },\n SortableAttributes: []string{\n \"title\",\n \"release_date\",\n },\n Synonyms: map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\"},\n },\n TypoTolerance: &meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 8,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n },\n Pagination: &meilisearch.Pagination{\n MaxTotalHits: 5000,\n },\n Faceting: &meilisearch.Faceting{\n MaxValuesPerFacet: 200,\n },\n SearchCutoffMs: 150,\n}\nclient.Index(\"movies\").UpdateSettings(&settings)" + }, + { + "lang": "C#", + "source": "Settings newSettings = new Settings\n{\n RankingRules = new string[]\n {\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n },\n DistinctAttribute = \"movie_id\",\n SearchableAttributes = new string[] { \"title\", \"overview\", \"genres\" },\n DisplayedAttributes = new string[] { \"title\", \"overview\", \"genres\", \"release_date\" },\n SortableAttributes = new string[] { \"title\", \"release_date\" },\n StopWords = new string[] { \"the\", \"a\", \"an\" },\n Synonyms = new Dictionary>\n {\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\" } },\n },\n FilterableAttributes = new string[] { },\n TypoTolerance = new TypoTolerance\n {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeForTypos = new TypoTolerance.TypoSize\n {\n OneTypo = 8,\n TwoTypos = 10\n }\n },\n SearchCutoffMs = 150\n};\nTaskInfo task = await client.Index(\"movies\").UpdateSettingsAsync(newFilters);" + }, { "lang": "Rust", "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"wolverine\"), vec![\"xmen\", \"logan\"]);\nsynonyms.insert(String::from(\"logan\"), vec![\"wolverine\"]);\n\nlet min_word_size_for_typos = MinWordSizeForTypos {\n one_typo: Some(4),\n two_typos; Some(12)\n}\nlet typo_tolerance = TypoToleranceSettings {\n enabled: Some(true),\n disable_on_attributes: Some(vec![\"title\".to_string()]),\n disable_on_words: Some(vec![])\n min_word_size_for_typos: Some(min_word_size_for_typos),\n};\n\nlet settings = Settings::new()\n .with_ranking_rules([\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ])\n .with_distinct_attribute(Some(\"movie_id\"))\n .with_searchable_attributes([\n \"title\",\n \"overview\",\n \"genres\"\n ])\n .with_displayed_attributes([\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ])\n .with_stop_words([\n \"the\",\n \"a\",\n \"an\"\n ])\n .with_sortable_attributes([\n \"title\",\n \"release_date\"\n ])\n .with_synonyms(synonyms)\n .with_typo_tolerance(typo_tolerance)\n .with_search_cutoff(150);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_settings(&settings)\n .await\n .unwrap();" @@ -3907,10 +3919,6 @@ { "lang": "Swift", "source": "let settings = Setting(rankingRules: [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n], searchableAttributes: [\n \"title\",\n \"overview\",\n \"genres\"\n], displayedAttributes: [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n], stopWords: [\n \"the\",\n \"a\",\n \"an\"\n], synonyms: [\n \"wolverine\": [\"xmen\", \"logan\"],\n \"logan\": [\"wolverine\"]\n], distinctAttribute: \"movie_id\",\nsortableAttributes: [\n \"title\",\n \"release_date\"\n])\nclient.index(\"movies\").updateSettings(settings) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/movies/settings' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"rankingRules\": [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:desc\",\n \"rank:desc\"\n ],\n \"distinctAttribute\": \"movie_id\",\n \"searchableAttributes\": [\n \"title\",\n \"overview\",\n \"genres\"\n ],\n \"displayedAttributes\": [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ],\n \"stopWords\": [\n \"the\",\n \"a\",\n \"an\"\n ],\n \"sortableAttributes\": [\n \"title\",\n \"release_date\"\n ],\n \"synonyms\": {\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\"wolverine\"]\n },\n \"typoTolerance\": {\n \"minWordSizeForTypos\": {\n \"oneTypo\": 8,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n },\n \"pagination\": {\n \"maxTotalHits\": 5000\n },\n \"faceting\": {\n \"maxValuesPerFacet\": 200\n },\n \"searchCutoffMs\": 150\n }'" } ] } @@ -4205,21 +4213,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "var indexDictionary = await client.Index(\"books\").GetDictionaryAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetDictionary()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/dictionary'" }, { "lang": "JS", "source": "client.index('books').getDictionary()" }, - { - "lang": "Java", - "source": "client.index(\"books\").getDictionarySettings();" - }, { "lang": "PHP", "source": "$client->index('books')->getDictionary();" @@ -4228,10 +4228,22 @@ "lang": "Python", "source": "client.index('books').get_dictionary()" }, + { + "lang": "Java", + "source": "client.index(\"books\").getDictionarySettings();" + }, { "lang": "Ruby", "source": "client.index('books').dictionary" }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetDictionary()" + }, + { + "lang": "C#", + "source": "var indexDictionary = await client.Index(\"books\").GetDictionaryAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('books')\n .get_dictionary()\n .await\n .unwrap();" @@ -4239,10 +4251,6 @@ { "lang": "Swift", "source": "client.index(\"books\").getDictionary { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/dictionary'" } ] }, @@ -4325,21 +4333,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "var newDictionary = new string[] { \"J. R. R.\", \"W. E. B.\" };\nawait client.Index(\"books\").UpdateDictionaryAsync(newDictionary);" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateDictionary([]string{\n \"J. R. R.\",\n \"W. E. B.\",\n})" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/dictionary' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"J. R. R.\",\n \"W. E. B.\"\n ]'" }, { "lang": "JS", "source": "client.index('books').updateDictionary(['J. R. R.', 'W. E. B.'])" }, - { - "lang": "Java", - "source": "client.index(\"books\").updateDictionarySettings(new String[] {\"J. R. R.\", \"W. E. B.\"});" - }, { "lang": "PHP", "source": "$client->index('books')->updateDictionary(['J. R. R.', 'W. E. B.']);" @@ -4348,10 +4348,22 @@ "lang": "Python", "source": "client.index('books').update_dictionary([\"J. R. R.\", \"W. E. B.\"])" }, + { + "lang": "Java", + "source": "client.index(\"books\").updateDictionarySettings(new String[] {\"J. R. R.\", \"W. E. B.\"});" + }, { "lang": "Ruby", "source": "client.index('books').update_dictionary(['J. R. R.', 'W. E. B.'])" }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateDictionary([]string{\n \"J. R. R.\",\n \"W. E. B.\",\n})" + }, + { + "lang": "C#", + "source": "var newDictionary = new string[] { \"J. R. R.\", \"W. E. B.\" };\nawait client.Index(\"books\").UpdateDictionaryAsync(newDictionary);" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('books')\n .set_dictionary(['J. R. R.', 'W. E. B.'])\n .await\n .unwrap();" @@ -4359,10 +4371,6 @@ { "lang": "Swift", "source": "client.index(\"books\").updateDictionary([\"J. R. R.\", \"W. E. B.\"]) { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/dictionary' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"J. R. R.\",\n \"W. E. B.\"\n ]'" } ] }, @@ -4445,21 +4453,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"books\").ResetDictionaryAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetDictionary()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/dictionary'" }, { "lang": "JS", "source": "client.index('books').resetDictionary()" }, - { - "lang": "Java", - "source": "client.index(\"books\").resetDictionarySettings();" - }, { "lang": "PHP", "source": "$client->index('books')->resetDictionary();" @@ -4468,10 +4468,22 @@ "lang": "Python", "source": "client.index('books').reset_dictionary()" }, + { + "lang": "Java", + "source": "client.index(\"books\").resetDictionarySettings();" + }, { "lang": "Ruby", "source": "client.index('books').reset_dictionary" }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetDictionary()" + }, + { + "lang": "C#", + "source": "await client.Index(\"books\").ResetDictionaryAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('books')\n .reset_dictionary()\n .await\n .unwrap();" @@ -4479,10 +4491,6 @@ { "lang": "Swift", "source": "client.index(\"books\").resetDictionary { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/dictionary'" } ] } @@ -4550,25 +4558,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetDisplayedAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getDisplayedAttributes();\ndate_displayed_attributes_1: \"await client.index('movies').updateDisplayedAttributes([\\n 'title',\\n 'overview',\\n 'genres',\\n 'release_date',\\n]);\"" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetDisplayedAttributes()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" }, { "lang": "JS", "source": "client.index('movies').getDisplayedAttributes()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").getDisplayedAttributesSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->getDisplayedAttributes();" @@ -4577,21 +4573,33 @@ "lang": "Python", "source": "client.index('movies').get_displayed_attributes()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").getDisplayedAttributesSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').get_displayed_attributes" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetDisplayedAttributes()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetDisplayedAttributesAsync();" + }, { "lang": "Rust", "source": "let displayed_attributes: Vec = client\n .index(\"movies\")\n .get_displayed_attributes()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").getDisplayedAttributes { (result) in\n switch result {\n case .success(let displayedAttributes):\n print(displayedAttributes)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').getDisplayedAttributes();\nupdate_displayed_attributes_1: \"await client.index('movies').updateDisplayedAttributes([\\n 'title',\\n 'overview',\\n 'genres',\\n 'release_date',\\n]);\"" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" + "lang": "Swift", + "source": "client.index(\"movies\").getDisplayedAttributes { (result) in\n switch result {\n case .success(let displayedAttributes):\n print(displayedAttributes)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -4673,21 +4681,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateDisplayedAttributesAsync(new[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" - }, - { - "lang": "Go", - "source": "displayedAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n}\nclient.Index(\"movies\").UpdateDisplayedAttributes(&displayedAttributes)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ]'" }, { "lang": "JS", "source": "client.index('movies').updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateDisplayedAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" - }, { "lang": "PHP", "source": "$client->index('movies')->updateDisplayedAttributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n]);" @@ -4696,10 +4696,22 @@ "lang": "Python", "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateDisplayedAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" + }, { "lang": "Ruby", "source": "client.index('movies').update_displayed_attributes([\n 'title',\n 'overview',\n 'genres',\n 'release_date'\n])" }, + { + "lang": "Go", + "source": "displayedAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\",\n}\nclient.Index(\"movies\").UpdateDisplayedAttributes(&displayedAttributes)" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateDisplayedAttributesAsync(new[]\n{\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n});" + }, { "lang": "Rust", "source": "let displayed_attributes = [\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_displayed_attributes(&displayed_attributes)\n .await\n .unwrap();" @@ -4707,10 +4719,6 @@ { "lang": "Swift", "source": "let displayedAttributes: [String] = [\"title\", \"overview\", \"genres\", \"release_date\"]\nclient.index(\"movies\").updateDisplayedAttributes(displayedAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\",\n \"release_date\"\n ]'" } ] }, @@ -4792,25 +4800,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetDisplayedAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetDisplayedAttributes();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetDisplayedAttributes()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" }, { "lang": "JS", "source": "client.index('movies').resetDisplayedAttributes()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetDisplayedAttributesSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->resetDisplayedAttributes();" @@ -4819,21 +4815,33 @@ "lang": "Python", "source": "client.index('movies').reset_displayed_attributes()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetDisplayedAttributesSettings();\nget_typo_tolerance_1:\nclient.index(\"books\").getTypoToleranceSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').reset_displayed_attributes" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetDisplayedAttributes()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetDisplayedAttributesAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_displayed_attributes()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").resetDisplayedAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').resetDisplayedAttributes();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes'" + "lang": "Swift", + "source": "client.index(\"movies\").resetDisplayedAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -4898,25 +4906,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "string result = await client.Index(\"shoes\").GetDistinctAttributeAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('shoes').getDistinctAttribute();" - }, - { - "lang": "Go", - "source": "client.Index(\"shoes\").GetDistinctAttribute()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" }, { "lang": "JS", "source": "client.index('shoes').getDistinctAttribute()" }, - { - "lang": "Java", - "source": "client.index(\"shoes\").getDistinctAttributeSettings();" - }, { "lang": "PHP", "source": "$client->index('shoes')->getDistinctAttribute();" @@ -4925,21 +4921,33 @@ "lang": "Python", "source": "client.index('shoes').get_distinct_attribute()" }, + { + "lang": "Java", + "source": "client.index(\"shoes\").getDistinctAttributeSettings();" + }, { "lang": "Ruby", "source": "client.index('shoes').distinct_attribute" }, + { + "lang": "Go", + "source": "client.Index(\"shoes\").GetDistinctAttribute()" + }, + { + "lang": "C#", + "source": "string result = await client.Index(\"shoes\").GetDistinctAttributeAsync();" + }, { "lang": "Rust", "source": "let distinct_attribute: Option = client\n .index(\"shoes\")\n .get_distinct_attribute()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"shoes\").getDistinctAttribute { (result) in\n switch result {\n case .success(let distinctAttribute):\n print(distinctAttribute)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('shoes').getDistinctAttribute();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" + "lang": "Swift", + "source": "client.index(\"shoes\").getDistinctAttribute { (result) in\n switch result {\n case .success(let distinctAttribute):\n print(distinctAttribute)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -5018,25 +5026,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "TaskInfo result = await client.Index(\"shoes\").UpdateDistinctAttributeAsync(\"skuid\");" - }, - { - "lang": "Dart", - "source": "await client.index('shoes').updateDistinctAttribute('skuid');" - }, - { - "lang": "Go", - "source": "client.Index(\"shoes\").UpdateDistinctAttribute(\"skuid\")" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"skuid\"'" }, { "lang": "JS", "source": "client.index('shoes').updateDistinctAttribute('skuid')" }, - { - "lang": "Java", - "source": "client.index(\"shoes\").updateDistinctAttributeSettings(\"skuid\");" - }, { "lang": "PHP", "source": "$client->index('shoes')->updateDistinctAttribute('skuid');" @@ -5045,21 +5041,33 @@ "lang": "Python", "source": "client.index('shoes').update_distinct_attribute('skuid')" }, + { + "lang": "Java", + "source": "client.index(\"shoes\").updateDistinctAttributeSettings(\"skuid\");" + }, { "lang": "Ruby", "source": "client.index('shoes').update_distinct_attribute('skuid')" }, + { + "lang": "Go", + "source": "client.Index(\"shoes\").UpdateDistinctAttribute(\"skuid\")" + }, + { + "lang": "C#", + "source": "TaskInfo result = await client.Index(\"shoes\").UpdateDistinctAttributeAsync(\"skuid\");" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"shoes\")\n .set_distinct_attribute(\"skuid\")\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"shoes\").updateDistinctAttribute(\"skuid\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('shoes').updateDistinctAttribute('skuid');" }, { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"skuid\"'" + "lang": "Swift", + "source": "client.index(\"shoes\").updateDistinctAttribute(\"skuid\") { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -5138,25 +5146,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "TaskInfo result = await client.Index(\"shoes\").ResetDistinctAttributeAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('shoes').resetDistinctAttribute();" - }, - { - "lang": "Go", - "source": "client.Index(\"shoes\").ResetDistinctAttribute()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" }, { "lang": "JS", "source": "client.index('shoes').resetDistinctAttribute()" }, - { - "lang": "Java", - "source": "client.index(\"shoes\").resetDistinctAttributeSettings();" - }, { "lang": "PHP", "source": "$client->index('shoes')->resetDistinctAttribute();" @@ -5165,21 +5161,33 @@ "lang": "Python", "source": "client.index('shoes').reset_distinct_attribute()" }, + { + "lang": "Java", + "source": "client.index(\"shoes\").resetDistinctAttributeSettings();" + }, { "lang": "Ruby", "source": "client.index('shoes').reset_distinct_attribute" }, + { + "lang": "Go", + "source": "client.Index(\"shoes\").ResetDistinctAttribute()" + }, + { + "lang": "C#", + "source": "TaskInfo result = await client.Index(\"shoes\").ResetDistinctAttributeAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"shoes\")\n .reset_distinct_attribute()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"shoes\").resetDistinctAttribute { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('shoes').resetDistinctAttribute();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute'" + "lang": "Swift", + "source": "client.index(\"shoes\").resetDistinctAttribute { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -5249,6 +5257,10 @@ } ], "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" + }, { "lang": "Ruby", "source": "client.index('INDEX_NAME').embedders" @@ -5256,10 +5268,6 @@ { "lang": "Rust", "source": "let embedders = index.get_embedders().await.unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" } ] }, @@ -5343,6 +5351,10 @@ } ], "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" + }, { "lang": "Ruby", "source": "client.index('INDEX_NAME').reset_embedders" @@ -5350,10 +5362,6 @@ { "lang": "Rust", "source": "index.reset_embedders().await.unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders'" } ] }, @@ -5437,6 +5445,10 @@ } ], "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"default\": {\n \"source\": \"openAi\",\n \"apiKey\": \"OPEN_AI_API_KEY\",\n \"model\": \"text-embedding-3-small\",\n \"documentTemplate\": \"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\"\n }\n }'" + }, { "lang": "JS", "source": "client.index('INDEX_NAME').updateEmbedders({\n default: {\n source: 'openAi',\n apiKey: 'OPEN_AI_API_KEY',\n model: 'text-embedding-3-small',\n documentTemplate: 'A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}'\n }\n});" @@ -5452,10 +5464,6 @@ { "lang": "Rust", "source": "let embedders = HashMap::from([(\n String::from(\"default\"),\n Embedder {\n source: EmbedderSource::OpenAi,\n api_key: Some(String::from(\"OPEN_AI_API_KEY\")),\n model: Some(String::from(\"text-embedding-3-small\")),\n document_template: Some(String::from(\"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\")),\n ..Embedder::default()\n }\n)]);\nlet task = index\n .set_embedders(&embedders)\n .await\n .unwrap();" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"default\": {\n \"source\": \"openAi\",\n \"apiKey\": \"OPEN_AI_API_KEY\",\n \"model\": \"text-embedding-3-small\",\n \"documentTemplate\": \"A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}\"\n }\n }'" } ] } @@ -5520,8 +5528,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.Index(\"books\").GetFacetSearch()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" }, { "lang": "JS", @@ -5540,12 +5548,12 @@ "source": "client.index('INDEX_UID').facet_search_setting" }, { - "lang": "Rust", - "source": "let facet_search: bool = client\n .index(INDEX_UID)\n .get_facet_search()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"books\").GetFacetSearch()" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" + "lang": "Rust", + "source": "let facet_search: bool = client\n .index(INDEX_UID)\n .get_facet_search()\n .await\n .unwrap();" } ] }, @@ -5624,8 +5632,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.Index(\"books\").UpdateFacetSearch(false)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary 'false'" }, { "lang": "JS", @@ -5644,12 +5652,12 @@ "source": "client.index('INDEX_UID').update_facet_search_setting(false)" }, { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_facet_search(false)\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"books\").UpdateFacetSearch(false)" }, { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary 'false'" + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_facet_search(false)\n .await\n .unwrap();" } ] }, @@ -5728,8 +5736,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.Index(\"books\").ResetFacetSearch()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" }, { "lang": "JS", @@ -5748,12 +5756,12 @@ "source": "client.index('INDEX_UID').reset_facet_search_setting" }, { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_facet_search()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"books\").ResetFacetSearch()" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search'" + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_facet_search()\n .await\n .unwrap();" } ] } @@ -5818,25 +5826,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetFacetingAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getFaceting();\ndate_faceting_settings_1: \"await client.index('books').updateFaceting(Faceting(\\n maxValuesPerFacet: 2,\\n sortFacetValuesBy: {\\n '*': FacetingSortTypes.alpha,\\n 'genres': FacetingSortTypes.count\\n }));\"" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetFaceting()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/faceting'" }, { "lang": "JS", "source": "client.index('books').getFaceting()" }, - { - "lang": "Java", - "source": "client.index(\"books\").getFacetingSettings();" - }, { "lang": "PHP", "source": "$client->index('books')->getFaceting();" @@ -5845,17 +5841,29 @@ "lang": "Python", "source": "client.index('books').get_faceting_settings()" }, + { + "lang": "Java", + "source": "client.index(\"books\").getFacetingSettings();" + }, { "lang": "Ruby", "source": "client.index('books').faceting" }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetFaceting()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetFacetingAsync();" + }, { "lang": "Rust", "source": "let faceting: FacetingSettings = client\n .index(\"books\")\n .get_faceting()\n .await\n .unwrap();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/faceting'" + "lang": "Dart", + "source": "await client.index('movies').getFaceting();\nupdate_faceting_settings_1: \"await client.index('books').updateFaceting(Faceting(\\n maxValuesPerFacet: 2,\\n sortFacetValuesBy: {\\n '*': FacetingSortTypes.alpha,\\n 'genres': FacetingSortTypes.count\\n }));\"" } ] }, @@ -5934,25 +5942,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetFacetingAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetFaceting();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetFaceting()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/faceting'" }, { "lang": "JS", "source": "client.index('books').resetFaceting()" }, - { - "lang": "Java", - "source": "client.index(\"books\").resetFacetingSettings();" - }, { "lang": "PHP", "source": "$client->index('books')->resetFaceting();" @@ -5961,17 +5957,29 @@ "lang": "Python", "source": "client.index('books').reset_faceting_settings()" }, + { + "lang": "Java", + "source": "client.index(\"books\").resetFacetingSettings();" + }, { "lang": "Ruby", "source": "index('books').reset_faceting" }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetFaceting()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetFacetingAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_faceting()\n .await\n .unwrap();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/faceting'" + "lang": "Dart", + "source": "await client.index('movies').resetFaceting();" } ] }, @@ -6050,21 +6058,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "var faceting = new Faceting\n{\n MaxValuesPerFacet = 2,\n SortFacetValuesBy = new Dictionary\n {\n [\"*\"] = SortFacetValuesByType.Alpha,\n [\"genres\"] = SortFacetValuesByType.Count\n }\n};\nawait client.Index(\"books\").UpdateFacetingAsync(faceting);" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateFaceting(&meilisearch.Faceting{\n MaxValuesPerFacet: 2,\n SortFacetValuesBy: {\n \"*\": SortFacetTypeAlpha,\n \"genres\": SortFacetTypeCount,\n }\n})" + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/faceting' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxValuesPerFacet\": 2,\n \"sortFacetValuesBy\": {\n \"*\": \"alpha\",\n \"genres\": \"count\"\n }\n }'" }, { "lang": "JS", "source": "client.index('books').updateFaceting({\n maxValuesPerFacet: 2\n sortFacetValuesBy: {\n '*': 'alpha',\n genres: 'count'\n }\n})" }, - { - "lang": "Java", - "source": "Faceting newFaceting = new Faceting();\nnewFaceting.setMaxValuesPerFacet(2);\nHashMap facetSortValues = new HashMap<>();\nfacetSortValues.put(\"*\", FacetSortValue.ALPHA);\nfacetSortValues.put(\"genres\", FacetSortValue.COUNT);\nnewFaceting.setSortFacetValuesBy(facetSortValues);\nclient.index(\"books\").updateFacetingSettings(newFaceting);" - }, { "lang": "PHP", "source": "$client->index('books')->updateFaceting([\n 'maxValuesPerFacet' => 2,\n 'sortFacetValuesBy' => ['*' => 'alpha', 'genres' => 'count']\n]);" @@ -6073,17 +6073,25 @@ "lang": "Python", "source": "params = {\n 'maxValuesPerFacet': 2,\n 'sortFacetValuesBy': {\n '*': 'count',\n 'genres': 'count'\n }\n}\nclient.index('books').update_faceting_settings(params)" }, + { + "lang": "Java", + "source": "Faceting newFaceting = new Faceting();\nnewFaceting.setMaxValuesPerFacet(2);\nHashMap facetSortValues = new HashMap<>();\nfacetSortValues.put(\"*\", FacetSortValue.ALPHA);\nfacetSortValues.put(\"genres\", FacetSortValue.COUNT);\nnewFaceting.setSortFacetValuesBy(facetSortValues);\nclient.index(\"books\").updateFacetingSettings(newFaceting);" + }, { "lang": "Ruby", "source": "client.index('books').update_faceting({\n max_values_per_facet: 2,\n sort_facet_values_by: {\n '*': 'alpha',\n genres: 'count'\n }\n})" }, { - "lang": "Rust", - "source": "let mut facet_sort_setting = BTreeMap::new();\nfacet_sort_setting.insert(String::from(\"*\"), FacetSortValue::Alpha);\nfacet_sort_setting.insert(String::from(\"genres\"), FacetSortValue::Count);\nlet mut faceting = FacetingSettings {\n max_values_per_facet: 2,\n sort_facet_values_by: Some(facet_sort_setting),\n};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_faceting(&faceting)\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"books\").UpdateFaceting(&meilisearch.Faceting{\n MaxValuesPerFacet: 2,\n SortFacetValuesBy: {\n \"*\": SortFacetTypeAlpha,\n \"genres\": SortFacetTypeCount,\n }\n})" }, { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/faceting' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxValuesPerFacet\": 2,\n \"sortFacetValuesBy\": {\n \"*\": \"alpha\",\n \"genres\": \"count\"\n }\n }'" + "lang": "C#", + "source": "var faceting = new Faceting\n{\n MaxValuesPerFacet = 2,\n SortFacetValuesBy = new Dictionary\n {\n [\"*\"] = SortFacetValuesByType.Alpha,\n [\"genres\"] = SortFacetValuesByType.Count\n }\n};\nawait client.Index(\"books\").UpdateFacetingAsync(faceting);" + }, + { + "lang": "Rust", + "source": "let mut facet_sort_setting = BTreeMap::new();\nfacet_sort_setting.insert(String::from(\"*\"), FacetSortValue::Alpha);\nfacet_sort_setting.insert(String::from(\"genres\"), FacetSortValue::Count);\nlet mut faceting = FacetingSettings {\n max_values_per_facet: 2,\n sort_facet_values_by: Some(facet_sort_setting),\n};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_faceting(&faceting)\n .await\n .unwrap();" } ] } @@ -6151,25 +6159,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "IEnumerable attributes = await client.Index(\"movies\").GetFilterableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getFilterableAttributes();\ndate_filterable_attributes_1: \"await client\\n .index('movies')\\n .updateFilterableAttributes(['genres', 'director']);\"" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetFilterableAttributes()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" }, { "lang": "JS", "source": "client.index('movies').getFilterableAttributes()" }, - { - "lang": "Java", - "source": "// Granular filterable attributes API (v1.14+)\nclient.index(\"movies\").getGranularFilterableAttributesSettings();\n// Legacy String[] API\nclient.index(\"movies\").getFilterableAttributesSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->getFilterableAttributes();" @@ -6178,21 +6174,33 @@ "lang": "Python", "source": "client.index('movies').get_filterable_attributes()" }, + { + "lang": "Java", + "source": "// Granular filterable attributes API (v1.14+)\nclient.index(\"movies\").getGranularFilterableAttributesSettings();\n// Legacy String[] API\nclient.index(\"movies\").getFilterableAttributesSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').filterable_attributes" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetFilterableAttributes()" + }, + { + "lang": "C#", + "source": "IEnumerable attributes = await client.Index(\"movies\").GetFilterableAttributesAsync();" + }, { "lang": "Rust", "source": "let filterable_attributes: Vec = client\n .index(\"movies\")\n .get_filterable_attributes()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").getFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').getFilterableAttributes();\nupdate_filterable_attributes_1: \"await client\\n .index('movies')\\n .updateFilterableAttributes(['genres', 'director']);\"" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" + "lang": "Swift", + "source": "client.index(\"movies\").getFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -6274,21 +6282,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "List attributes = new() { \"genres\", \"director\" };\nTaskInfo result = await client.Index(\"movies\").UpdateFilterableAttributesAsync(attributes);" - }, - { - "lang": "Go", - "source": "filterableAttributes := []interface{}{\n \"genres\",\n \"director\",\n AttributeRule{\n AttributePatterns: []string{\"tag\"}\n Features: AttributeFeatures{\n FacetSearch: false,\n Filter: FilterFeatures{\n Equality: true,\n Comparison: false,\n }\n }\n },\n map[string]interface{}{\n \"attributePatterns\": []interface{}{\"year\"}\n \"features\": map[string]interface{}{\n \"facetSearch\": false,\n \"filter\": map[string]interface{}{\n \"equality\": true,\n \"comparison\": true,\n }\n }\n }\n}\nclient.Index(\"movies\").UpdateFilterableAttributes(&filterableAttributes)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"genres\",\n \"director\",\n {\n \"attributePatterns\": [\"*_ratings\"],\n \"features\": {\n \"facetSearch\": false,\n \"filter\": {\n \"equality\": true,\n \"comparison\": false\n }\n }\n }\n ]'" }, { "lang": "JS", "source": "client.index('movies')\n .updateFilterableAttributes([\n \"genres\",\n {\n attributePatterns: [\"genre\"],\n features: {\n facetSearch: true,\n filter: { equality: true, comparison: false },\n },\n }\n ])" }, - { - "lang": "Java", - "source": "FilterableAttributesConfig genres = FilterableAttributesConfig.simple(\"genres\");\n\nFilterableAttributesFilter directorFilter = new FilterableAttributesFilter();\ndirectorFilter.setEquality(true);\ndirectorFilter.setComparison(false);\n\nFilterableAttributesFeatures directorFeatures = new FilterableAttributesFeatures();\ndirectorFeatures.setFacetSearch(true);\ndirectorFeatures.setFilter(directorFilter);\n\nFilterableAttributesConfig director = new FilterableAttributesConfig();\ndirector.setAttributePatterns(new String[] {\"director\"});\ndirector.setFeatures(directorFeatures);\n\n// Update settings\nclient.index(\"movies\").updateGranularFilterableAttributesSettings(\n new FilterableAttributesConfig[] {genres, director});" - }, { "lang": "PHP", "source": "$client->index('movies')->updateFilterableAttributes([\n 'author',\n [\n 'attributePatterns' => ['genres'],\n 'features' => [\n 'facetSearch' => true,\n 'filter' => [\n 'equality' => true,\n 'comparison' => false,\n ],\n ],\n ],\n]);" @@ -6297,10 +6297,22 @@ "lang": "Python", "source": "client.index('movies').update_filterable_attributes([\n 'genres',\n 'director'\n])" }, + { + "lang": "Java", + "source": "FilterableAttributesConfig genres = FilterableAttributesConfig.simple(\"genres\");\n\nFilterableAttributesFilter directorFilter = new FilterableAttributesFilter();\ndirectorFilter.setEquality(true);\ndirectorFilter.setComparison(false);\n\nFilterableAttributesFeatures directorFeatures = new FilterableAttributesFeatures();\ndirectorFeatures.setFacetSearch(true);\ndirectorFeatures.setFilter(directorFilter);\n\nFilterableAttributesConfig director = new FilterableAttributesConfig();\ndirector.setAttributePatterns(new String[] {\"director\"});\ndirector.setFeatures(directorFeatures);\n\n// Update settings\nclient.index(\"movies\").updateGranularFilterableAttributesSettings(\n new FilterableAttributesConfig[] {genres, director});" + }, { "lang": "Ruby", "source": "client.index('movies').update_filterable_attributes([\n 'genres',\n 'director'\n])" }, + { + "lang": "Go", + "source": "filterableAttributes := []interface{}{\n \"genres\",\n \"director\",\n AttributeRule{\n AttributePatterns: []string{\"tag\"}\n Features: AttributeFeatures{\n FacetSearch: false,\n Filter: FilterFeatures{\n Equality: true,\n Comparison: false,\n }\n }\n },\n map[string]interface{}{\n \"attributePatterns\": []interface{}{\"year\"}\n \"features\": map[string]interface{}{\n \"facetSearch\": false,\n \"filter\": map[string]interface{}{\n \"equality\": true,\n \"comparison\": true,\n }\n }\n }\n}\nclient.Index(\"movies\").UpdateFilterableAttributes(&filterableAttributes)" + }, + { + "lang": "C#", + "source": "List attributes = new() { \"genres\", \"director\" };\nTaskInfo result = await client.Index(\"movies\").UpdateFilterableAttributesAsync(attributes);" + }, { "lang": "Rust", "source": "use meilisearch_sdk::settings::{\n FilterableAttribute,\n FilterableAttributesSettings,\n FilterFeatures,\n FilterFeatureModes,\n};\n\n// Mixed legacy + new syntax\nlet filterable_attributes: Vec = vec![\n // legacy: plain attribute name\n \"author\".into(),\n // new syntax: settings object\n FilterableAttribute::Settings(FilterableAttributesSettings {\n attribute_patterns: vec![\"genre\".to_string()],\n features: FilterFeatures {\n facet_search: true,\n filter: FilterFeatureModes { equality: true, comparison: false },\n },\n }),\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_filterable_attributes_advanced(filterable_attributes)\n .await\n .unwrap();" @@ -6308,10 +6320,6 @@ { "lang": "Swift", "source": "client.index(\"movies\").updateFilterableAttributes([\"genre\", \"director\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"genres\",\n \"director\",\n {\n \"attributePatterns\": [\"*_ratings\"],\n \"features\": {\n \"facetSearch\": false,\n \"filter\": {\n \"equality\": true,\n \"comparison\": false\n }\n }\n }\n ]'" } ] }, @@ -6393,25 +6401,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "TaskInfo result = await client.Index(\"movies\").ResetFilterableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetFilterableAttributes();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetFilterableAttributes()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" }, { "lang": "JS", "source": "client.index('movies').resetFilterableAttributes()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetFilterableAttributesSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->resetFilterableAttributes();" @@ -6420,21 +6416,33 @@ "lang": "Python", "source": "client.index('movies').reset_filterable_attributes()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetFilterableAttributesSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').reset_filterable_attributes" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetFilterableAttributes()" + }, + { + "lang": "C#", + "source": "TaskInfo result = await client.Index(\"movies\").ResetFilterableAttributesAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_filterable_attributes()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").resetFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').resetFilterableAttributes();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes'" + "lang": "Swift", + "source": "client.index(\"movies\").resetFilterableAttributes { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -6502,17 +6510,13 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.index(\"INDEX_NAME\").GetLocalizedAttributes()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" }, { "lang": "JS", "source": "client.index('INDEX_NAME').getLocalizedAttributes()" }, - { - "lang": "Java", - "source": "client.index(\"INDEX_NAME\").getLocalizedAttributesSettings();" - }, { "lang": "PHP", "source": "$client->index('INDEX_NAME')->getLocalizedAttributes();" @@ -6521,17 +6525,21 @@ "lang": "Python", "source": "client.index('INDEX_NAME').get_localized_attributes()" }, + { + "lang": "Java", + "source": "client.index(\"INDEX_NAME\").getLocalizedAttributesSettings();" + }, { "lang": "Ruby", "source": "client.index('INDEX_NAME').localized_attributes" }, { - "lang": "Rust", - "source": "let localized_attributes: Option> = client\n .index(\"books\")\n .get_localized_attributes()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.index(\"INDEX_NAME\").GetLocalizedAttributes()" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" + "lang": "Rust", + "source": "let localized_attributes: Option> = client\n .index(\"books\")\n .get_localized_attributes()\n .await\n .unwrap();" } ] }, @@ -6613,17 +6621,13 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.index(\"INDEX_NAME\").UpdateLocalizedAttributes([]*LocalizedAttributes{\n { AttributePatterns: [\"*_ja\"], Locales: [\"jpn\"] },\n})" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\"locales\": [\"jpn\"], \"attributePatterns\": [\"*_ja\"]}\n ]'" }, { "lang": "JS", "source": "client.index('INDEX_NAME').updateLocalizedAttributes([\n { attributePatterns: ['*_ja'], locales: ['jpn'] },\n])" }, - { - "lang": "Java", - "source": "LocalizedAttribute attribute = new LocalizedAttribute();\nattribute.setAttributePatterns(new String[] {\"jpn\"});\nattribute.setLocales(new String[] {\"*_ja\"});\n\nclient.index(\"INDEX_NAME\").updateLocalizedAttributesSettings(\n new LocalizedAttributes[] {attribute}\n);" - }, { "lang": "PHP", "source": "$client->index('INDEX_NAME')->updateLocalizedAttributes([\n 'locales' => ['jpn'],\n 'attributePatterns' => ['*_ja']\n]);" @@ -6632,17 +6636,21 @@ "lang": "Python", "source": "client.index('INDEX_NAME').update_localized_attributes([\n {'attribute_patterns': ['*_ja'], 'locales': ['jpn']}\n])" }, + { + "lang": "Java", + "source": "LocalizedAttribute attribute = new LocalizedAttribute();\nattribute.setAttributePatterns(new String[] {\"jpn\"});\nattribute.setLocales(new String[] {\"*_ja\"});\n\nclient.index(\"INDEX_NAME\").updateLocalizedAttributesSettings(\n new LocalizedAttributes[] {attribute}\n);" + }, { "lang": "Ruby", "source": "client.index('INDEX_NAME').update_localized_attributes([\n { attribute_patterns: ['*_ja'], locales: ['jpn'] },\n])" }, { - "lang": "Rust", - "source": "let localized_attributes = vec![LocalizedAttributes {\n locales: vec![\"jpn\".to_string()],\n attribute_patterns: vec![\"*_ja\".to_string()],\n}];\nlet task: TaskInfo = client\n .index(\"books\")\n .set_localized_attributes(&localizced_attributes)\n .await\n .unwrap();" + "lang": "Go", + "source": "client.index(\"INDEX_NAME\").UpdateLocalizedAttributes([]*LocalizedAttributes{\n { AttributePatterns: [\"*_ja\"], Locales: [\"jpn\"] },\n})" }, { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\"locales\": [\"jpn\"], \"attributePatterns\": [\"*_ja\"]}\n ]'" + "lang": "Rust", + "source": "let localized_attributes = vec![LocalizedAttributes {\n locales: vec![\"jpn\".to_string()],\n attribute_patterns: vec![\"*_ja\".to_string()],\n}];\nlet task: TaskInfo = client\n .index(\"books\")\n .set_localized_attributes(&localizced_attributes)\n .await\n .unwrap();" } ] }, @@ -6724,17 +6732,13 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.index(\"INDEX_NAME\").ResetLocalizedAttributes()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" }, { "lang": "JS", "source": "client.index('INDEX_NAME').resetLocalizedAttributes()" }, - { - "lang": "Java", - "source": "client.index(\"INDEX_NAME\").resetLocalizedAttributesSettings();" - }, { "lang": "PHP", "source": "$client->index('INDEX_NAME')->resetLocalizedAttributes();" @@ -6743,17 +6747,21 @@ "lang": "Python", "source": "client.index('INDEX_NAME').reset_localized_attributes()" }, + { + "lang": "Java", + "source": "client.index(\"INDEX_NAME\").resetLocalizedAttributesSettings();" + }, { "lang": "Ruby", "source": "client.index('INDEX_NAME').reset_localized_attributes" }, { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_localized_attributes()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.index(\"INDEX_NAME\").ResetLocalizedAttributes()" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'" + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_localized_attributes()\n .await\n .unwrap();" } ] } @@ -6822,21 +6830,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetNonSeparatorTokensAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").GetNonSeparatorTokens()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" }, { "lang": "JS", "source": "client.index('books').getNonSeparatorTokens()" }, - { - "lang": "Java", - "source": "client.index(\"articles\").getNonSeparatorTokensSettings();" - }, { "lang": "PHP", "source": "$client->index('articles')->getNonSeparatorTokens();" @@ -6845,10 +6845,22 @@ "lang": "Python", "source": "client.index('articles').get_non_separator_tokens()" }, + { + "lang": "Java", + "source": "client.index(\"articles\").getNonSeparatorTokensSettings();" + }, { "lang": "Ruby", "source": "client.index('articles').non_separator_tokens" }, + { + "lang": "Go", + "source": "client.Index(\"articles\").GetNonSeparatorTokens()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetNonSeparatorTokensAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('articles')\n .get_non_separator_tokens()\n .await\n .unwrap();" @@ -6856,10 +6868,6 @@ { "lang": "Swift", "source": "client.index(\"books\").getNonSeparatorTokens { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" } ] }, @@ -6942,21 +6950,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateNonSeparatorTokensAsync(new[] { \"@\", \"#\" });" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").UpdateNonSeparatorTokens([]string{\n \"@\",\n \"#\",\n})" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"@\", \"#\"]'" }, { "lang": "JS", "source": "client.index('books').updateNonSeparatorTokens(['@', '#'])" }, - { - "lang": "Java", - "source": "String[] newSeparatorTokens = { \"@\", \"#\" };\nclient.index(\"articles\").updateNonSeparatorTokensSettings(newSeparatorTokens);" - }, { "lang": "PHP", "source": "$client->index('articles')->updateNonSeparatorTokens(['@', '#']);" @@ -6965,10 +6965,22 @@ "lang": "Python", "source": "client.index('articles').update_non_separator_tokens([\"@\", \"#\"])" }, + { + "lang": "Java", + "source": "String[] newSeparatorTokens = { \"@\", \"#\" };\nclient.index(\"articles\").updateNonSeparatorTokensSettings(newSeparatorTokens);" + }, { "lang": "Ruby", "source": "client.index('articles').update_non_separator_tokens(['@', '#'])" }, + { + "lang": "Go", + "source": "client.Index(\"articles\").UpdateNonSeparatorTokens([]string{\n \"@\",\n \"#\",\n})" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateNonSeparatorTokensAsync(new[] { \"@\", \"#\" });" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('articles')\n .set_non_separator_tokens(&vec!['@'.to_string(), '#'.to_string()])\n .await\n .unwrap();" @@ -6976,10 +6988,6 @@ { "lang": "Swift", "source": "client.index(\"books\").updateNonSeparatorTokens([\"@\", \"#\"]) { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"@\", \"#\"]'" } ] }, @@ -7062,21 +7070,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetNonSeparatorTokensAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").ResetNonSeparatorTokens()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" }, { "lang": "JS", "source": "client.index('books').resetNonSeparatorTokens()" }, - { - "lang": "Java", - "source": "client.index(\"articles\").resetNonSeparatorTokensSettings();" - }, { "lang": "PHP", "source": "$client->index('articles')->resetNonSeparatorTokens();" @@ -7085,10 +7085,22 @@ "lang": "Python", "source": "client.index('articles').reset_non_separator_tokens()" }, + { + "lang": "Java", + "source": "client.index(\"articles\").resetNonSeparatorTokensSettings();" + }, { "lang": "Ruby", "source": "client.index('articles').reset_non_separator_tokens" }, + { + "lang": "Go", + "source": "client.Index(\"articles\").ResetNonSeparatorTokens()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetNonSeparatorTokensAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('articles')\n .reset_non_separator_tokens()\n .await\n .unwrap();" @@ -7096,10 +7108,6 @@ { "lang": "Swift", "source": "client.index(\"books\").resetNonSeparatorTokens { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens'" } ] } @@ -7164,25 +7172,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetPaginationAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getPagination();\ndate_pagination_settings_1: \"await client\\n .index('books')\\n .updatePagination(Pagination(maxTotalHits: 100));\"" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetPagination()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/pagination'" }, { "lang": "JS", "source": "client.index('books').getPagination()" }, - { - "lang": "Java", - "source": "client.index(\"books\").getPaginationSettings();" - }, { "lang": "PHP", "source": "$client->index('books')->getPagination();" @@ -7191,17 +7187,29 @@ "lang": "Python", "source": "client.index('books').get_pagination_settings()" }, + { + "lang": "Java", + "source": "client.index(\"books\").getPaginationSettings();" + }, { "lang": "Ruby", "source": "index('books').pagination" }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetPagination()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetPaginationAsync();" + }, { "lang": "Rust", "source": "let pagination: PaginationSetting = client\n .index(\"books\")\n .get_pagination()\n .await\n .unwrap();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/pagination'" + "lang": "Dart", + "source": "await client.index('movies').getPagination();\nupdate_pagination_settings_1: \"await client\\n .index('books')\\n .updatePagination(Pagination(maxTotalHits: 100));\"" } ] }, @@ -7280,25 +7288,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetPaginationAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetPagination();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetPagination()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/pagination'" }, { "lang": "JS", "source": "client.index('books').resetPagination()" }, - { - "lang": "Java", - "source": "client.index(\"books\").resetPaginationSettings();" - }, { "lang": "PHP", "source": "$client->index('books')->resetPagination();" @@ -7307,17 +7303,29 @@ "lang": "Python", "source": "client.index('books').reset_pagination_settings()" }, + { + "lang": "Java", + "source": "client.index(\"books\").resetPaginationSettings();" + }, { "lang": "Ruby", "source": "index('books').reset_pagination" }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetPagination()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetPaginationAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_pagination()\n .await\n .unwrap();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/pagination'" + "lang": "Dart", + "source": "await client.index('movies').resetPagination();" } ] }, @@ -7396,21 +7404,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "var pagination = new Pagination {\n MaxTotalHits = 20\n};\nawait client.Index(\"movies\").UpdatePaginationAsync(pagination);" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdatePagination(&meilisearch.Pagination{\n MaxTotalHits: 100,\n})" + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/pagination' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxTotalHits\": 100\n }'" }, { "lang": "JS", "source": "client.index('books').updateSettings({ pagination: { maxTotalHits: 100 }})" }, - { - "lang": "Java", - "source": "Pagination newPagination = new Pagination();\nnewPagination.setMaxTotalHits(100);\nclient.index(\"books\").updatePaginationSettings(newPagination);" - }, { "lang": "PHP", "source": "$client->index('books')->updateSettings([\n 'pagination' => [\n 'maxTotalHits' => 100\n ]\n]);" @@ -7419,17 +7419,25 @@ "lang": "Python", "source": "client.index('books').update_pagination_settings({'maxTotalHits': 100})" }, + { + "lang": "Java", + "source": "Pagination newPagination = new Pagination();\nnewPagination.setMaxTotalHits(100);\nclient.index(\"books\").updatePaginationSettings(newPagination);" + }, { "lang": "Ruby", "source": "index('books').update_pagination({ max_total_hits: 100 })" }, { - "lang": "Rust", - "source": "let pagination = PaginationSetting {max_total_hits:100};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_pagination(pagination)\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"books\").UpdatePagination(&meilisearch.Pagination{\n MaxTotalHits: 100,\n})" }, { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/pagination' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"maxTotalHits\": 100\n }'" + "lang": "C#", + "source": "var pagination = new Pagination {\n MaxTotalHits = 20\n};\nawait client.Index(\"movies\").UpdatePaginationAsync(pagination);" + }, + { + "lang": "Rust", + "source": "let pagination = PaginationSetting {max_total_hits:100};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_pagination(pagination)\n .await\n .unwrap();" } ] } @@ -7494,8 +7502,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.Index(\"books\").GetPrefixSearch()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" }, { "lang": "JS", @@ -7514,12 +7522,12 @@ "source": "client.index('INDEX_UID').prefix_search" }, { - "lang": "Rust", - "source": "let prefix_search: PrefixSearchSettings = client\n .index(INDEX_UID)\n .get_prefix_search()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"books\").GetPrefixSearch()" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" + "lang": "Rust", + "source": "let prefix_search: PrefixSearchSettings = client\n .index(INDEX_UID)\n .get_prefix_search()\n .await\n .unwrap();" } ] }, @@ -7598,8 +7606,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.Index(\"books\").UpdatePrefixSearch(\"disabled\")" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"disabled\"'" }, { "lang": "JS", @@ -7618,12 +7626,12 @@ "source": "client.index('INDEX_UID').update_prefix_search('disabled')" }, { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_prefix_search(PrefixSearchSettings::Disabled)\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"books\").UpdatePrefixSearch(\"disabled\")" }, { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"disabled\"'" + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .set_prefix_search(PrefixSearchSettings::Disabled)\n .await\n .unwrap();" } ] }, @@ -7702,8 +7710,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.Index(\"books\").ResetPrefixSearch()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" }, { "lang": "JS", @@ -7722,12 +7730,12 @@ "source": "client.index('INDEX_UID').reset_prefix_search" }, { - "lang": "Rust", - "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_prefix_search()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.Index(\"books\").ResetPrefixSearch()" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search'" + "lang": "Rust", + "source": "let task: TaskInfo = client\n .index(INDEX_UID)\n .reset_prefix_search()\n .await\n .unwrap();" } ] } @@ -7792,21 +7800,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"books\").GetProximityPrecisionAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetProximityPrecision()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" }, { "lang": "JS", "source": "client.index('books').getProximityPrecision()" }, - { - "lang": "Java", - "source": "client.index(\"books\").getProximityPrecisionSettings();" - }, { "lang": "PHP", "source": "$client->index('books')->getProximityPrecision();" @@ -7815,10 +7815,22 @@ "lang": "Python", "source": "client.index('books').get_proximity_precision()" }, + { + "lang": "Java", + "source": "client.index(\"books\").getProximityPrecisionSettings();" + }, { "lang": "Ruby", "source": "client.index('books').proximity_precision" }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetProximityPrecision()" + }, + { + "lang": "C#", + "source": "await client.Index(\"books\").GetProximityPrecisionAsync();" + }, { "lang": "Rust", "source": "let proximity_precision: String = client\n .index(\"books\")\n .get_proximity_precision()\n .await\n .unwrap();" @@ -7826,10 +7838,6 @@ { "lang": "Swift", "source": "let precisionValue = try await self.client.index(\"books\").getProximityPrecision()" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" } ] }, @@ -7908,21 +7916,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"books\").UpdateProximityPrecisionAsync(\"byAttribute\");" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateProximityPrecision(ByAttribute)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/proximity-precision' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"byAttribute\"'" }, { "lang": "JS", "source": "client.index('books').updateProximityPrecision('byAttribute')" }, - { - "lang": "Java", - "source": "client.index(\"books\").updateProximityPrecisionSettings(\"byAttribute\");" - }, { "lang": "PHP", "source": "$client->index('books')->updateProximityPrecision('byAttribute');" @@ -7931,10 +7931,22 @@ "lang": "Python", "source": "client.index('books').update_proximity_precision(ProximityPrecision.BY_ATTRIBUTE)" }, + { + "lang": "Java", + "source": "client.index(\"books\").updateProximityPrecisionSettings(\"byAttribute\");" + }, { "lang": "Ruby", "source": "client.index('books').update_proximity_precision('byAttribute')" }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateProximityPrecision(ByAttribute)" + }, + { + "lang": "C#", + "source": "await client.Index(\"books\").UpdateProximityPrecisionAsync(\"byAttribute\");" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"books\")\n .set_proximity_precision(\"byAttribute\".to_string())\n .await\n .unwrap();" @@ -7942,10 +7954,6 @@ { "lang": "Swift", "source": "let task = try await self.client.index(\"books\").updateProximityPrecision(.byWord)" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/proximity-precision' \\\n -H 'Content-Type: application/json' \\\n --data-binary '\"byAttribute\"'" } ] }, @@ -8024,21 +8032,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"books\").ResetProximityPrecisionAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetProximityPrecision()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" }, { "lang": "JS", "source": "client.index('books').resetProximityPrecision()" }, - { - "lang": "Java", - "source": "client.index(\"books\").resetProximityPrecisionSettings();" - }, { "lang": "PHP", "source": "$client->index('books')->resetProximityPrecision();" @@ -8047,10 +8047,22 @@ "lang": "Python", "source": "client.index('books').reset_proximity_precision()" }, + { + "lang": "Java", + "source": "client.index(\"books\").resetProximityPrecisionSettings();" + }, { "lang": "Ruby", "source": "client.index('books').reset_proximity_precision" }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetProximityPrecision()" + }, + { + "lang": "C#", + "source": "await client.Index(\"books\").ResetProximityPrecisionAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_proximity_precision()\n .await\n .unwrap();" @@ -8058,10 +8070,6 @@ { "lang": "Swift", "source": "let task = try await self.client.index(\"books\").resetProximityPrecision()" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/proximity-precision'" } ] } @@ -8129,25 +8137,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetRankingRulesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getRankingRules();\ndate_ranking_rules_1: \"await client.index('movies').updateRankingRules([\\n 'words',\\n 'typo',\\n 'proximity',\\n 'attribute',\\n 'sort',\\n 'exactness',\\n 'release_date:asc',\\n 'rank:desc',\\n]);\"" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetRankingRules()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" }, { "lang": "JS", "source": "client.index('movies').getRankingRules()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").getRankingRulesSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->getRankingRules();" @@ -8156,21 +8152,33 @@ "lang": "Python", "source": "client.index('movies').get_ranking_rules()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").getRankingRulesSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').ranking_rules" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetRankingRules()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetRankingRulesAsync();" + }, { "lang": "Rust", "source": "let ranking_rules: Vec = client\n .index(\"movies\")\n .get_ranking_rules()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").getRankingRules { (result) in\n switch result {\n case .success(let rankingRules):\n print(rankingRules)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').getRankingRules();\nupdate_ranking_rules_1: \"await client.index('movies').updateRankingRules([\\n 'words',\\n 'typo',\\n 'proximity',\\n 'attribute',\\n 'sort',\\n 'exactness',\\n 'release_date:asc',\\n 'rank:desc',\\n]);\"" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" + "lang": "Swift", + "source": "client.index(\"movies\").getRankingRules { (result) in\n switch result {\n case .success(let rankingRules):\n print(rankingRules)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -8252,21 +8260,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateRankingRulesAsync(new[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});" - }, - { - "lang": "Go", - "source": "rankingRules := []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\",\n}\nclient.Index(\"movies\").UpdateRankingRules(&rankingRules)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n ]'" }, { "lang": "JS", "source": "client.index('movies').updateRankingRules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" }, - { - "lang": "Java", - "source": "Settings settings = new Settings();\nsettings.setRankingRules(new String[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});\nclient.index(\"movies\").updateSettings(settings);" - }, { "lang": "PHP", "source": "$client->index('movies')->updateRankingRules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n]);" @@ -8275,10 +8275,22 @@ "lang": "Python", "source": "client.index('movies').update_ranking_rules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" }, + { + "lang": "Java", + "source": "Settings settings = new Settings();\nsettings.setRankingRules(new String[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});\nclient.index(\"movies\").updateSettings(settings);" + }, { "lang": "Ruby", "source": "client.index('movies').update_ranking_rules([\n 'words',\n 'typo',\n 'proximity',\n 'attribute',\n 'sort',\n 'exactness',\n 'release_date:asc',\n 'rank:desc'\n])" }, + { + "lang": "Go", + "source": "rankingRules := []string{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\",\n}\nclient.Index(\"movies\").UpdateRankingRules(&rankingRules)" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateRankingRulesAsync(new[]\n{\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n});" + }, { "lang": "Rust", "source": "let ranking_rules = [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\",\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_ranking_rules(&ranking_rules)\n .await\n .unwrap();" @@ -8286,10 +8298,6 @@ { "lang": "Swift", "source": "let rankingRules: [String] = [\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n]\nclient.index(\"movies\").updateRankingRules(rankingRules) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"words\",\n \"typo\",\n \"proximity\",\n \"attribute\",\n \"sort\",\n \"exactness\",\n \"release_date:asc\",\n \"rank:desc\"\n ]'" } ] }, @@ -8371,25 +8379,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetRankingRulesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetRankingRules();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetRankingRules()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" }, { "lang": "JS", "source": "client.index('movies').resetRankingRules()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetRankingRulesSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->resetRankingRules();" @@ -8398,21 +8394,33 @@ "lang": "Python", "source": "client.index('movies').reset_ranking_rules()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetRankingRulesSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').reset_ranking_rules" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetRankingRules()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetRankingRulesAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_ranking_rules()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").resetRankingRules { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').resetRankingRules();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules'" + "lang": "Swift", + "source": "client.index(\"movies\").resetRankingRules { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -8479,21 +8487,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "var searchCutoff = await client.Index(\"movies\").GetSearchCutoffMsAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSearchCutoffMs()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" }, { "lang": "JS", "source": "client.index('movies').getSearchCutoffMs()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").getSearchCutoffMsSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->getSearchCutoffMs();" @@ -8502,10 +8502,22 @@ "lang": "Python", "source": "client.index('movies').get_search_cutoff_ms()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").getSearchCutoffMsSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').search_cutoff_ms" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetSearchCutoffMs()" + }, + { + "lang": "C#", + "source": "var searchCutoff = await client.Index(\"movies\").GetSearchCutoffMsAsync();" + }, { "lang": "Rust", "source": "let search_cutoff_ms: String = client\n .index(\"movies\")\n .get_search_cutoff_ms()\n .await\n .unwrap();" @@ -8513,10 +8525,6 @@ { "lang": "Swift", "source": "let precisionValue = try await self.client.index(\"books\").getSearchCutoffMs()" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" } ] }, @@ -8597,21 +8605,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSearchCutoffMsAsync(150);" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").UpdateSearchCutoffMs(150)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '150'" }, { "lang": "JS", "source": "client.index('movies').updateSearchCutoffMs(150)" }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateSearchCutoffMsSettings(150);" - }, { "lang": "PHP", "source": "$client->index('movies')->updateSearchCutoffMs(150);" @@ -8620,10 +8620,22 @@ "lang": "Python", "source": "client.index('movies').update_search_cutoff_ms(150)" }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateSearchCutoffMsSettings(150);" + }, { "lang": "Ruby", "source": "client.index('movies').update_search_cutoff_ms(150)" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").UpdateSearchCutoffMs(150)" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSearchCutoffMsAsync(150);" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .set_search_cutoff_ms(Some(150))\n .await\n .unwrap();" @@ -8631,10 +8643,6 @@ { "lang": "Swift", "source": "let task = try await self.client.index(\"books\").updateSearchCutoffMs(150)" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '150'" } ] }, @@ -8715,21 +8723,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSearchCutoffMsAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetSearchCutoffMs()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" }, { "lang": "JS", "source": "client.index('movies').resetSearchCutoffMs()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetSearchCutoffMsSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->resetSearchCutoffMs();" @@ -8738,10 +8738,22 @@ "lang": "Python", "source": "client.index('movies').reset_search_cutoff_ms()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetSearchCutoffMsSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').reset_search_cutoff_ms" }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetSearchCutoffMs()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSearchCutoffMsAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_search_cutoff_ms()\n .await\n .unwrap();" @@ -8749,10 +8761,6 @@ { "lang": "Swift", "source": "let task = try await self.client.index(\"books\").resetSearchCutoffMs()" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms'" } ] } @@ -8820,25 +8828,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSearchableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getSearchableAttributes();\ndate_searchable_attributes_1: \"await client\\n .index('movies')\\n .updateSearchableAttributes(['title', 'overview', 'genres']);\"" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSearchableAttributes()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" }, { "lang": "JS", "source": "client.index('movies').getSearchableAttributes()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").getSearchableAttributesSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->getSearchableAttributes();" @@ -8847,21 +8843,33 @@ "lang": "Python", "source": "client.index('movies').get_searchable_attributes()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").getSearchableAttributesSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').searchable_attributes" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetSearchableAttributes()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetSearchableAttributesAsync();" + }, { "lang": "Rust", "source": "let searchable_attributes: Vec = client\n .index(\"movies\")\n .get_searchable_attributes()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").getSearchableAttributes { (result) in\n switch result {\n case .success(let searchableAttributes):\n print(searchableAttributes)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').getSearchableAttributes();\nupdate_searchable_attributes_1: \"await client\\n .index('movies')\\n .updateSearchableAttributes(['title', 'overview', 'genres']);\"" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" + "lang": "Swift", + "source": "client.index(\"movies\").getSearchableAttributes { (result) in\n switch result {\n case .success(let searchableAttributes):\n print(searchableAttributes)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -8943,21 +8951,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSearchableAttributesAsync(new[] {\"title\", \"overview\", \"genres\"});" - }, - { - "lang": "Go", - "source": "searchableAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n}\nclient.Index(\"movies\").UpdateSearchableAttributes(&searchableAttributes)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\"\n ]'" }, { "lang": "JS", "source": "client.index('movies').updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n])" }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateSearchableAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\"\n});" - }, { "lang": "PHP", "source": "$client->index('movies')->updateSearchableAttributes([\n 'title',\n 'overview',\n 'genres'\n]);" @@ -8966,10 +8966,22 @@ "lang": "Python", "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateSearchableAttributesSettings(new String[]\n{\n \"title\",\n \"overview\",\n \"genres\"\n});" + }, { "lang": "Ruby", "source": "client.index('movies').update_searchable_attributes([\n 'title',\n 'overview',\n 'genres'\n])" }, + { + "lang": "Go", + "source": "searchableAttributes := []string{\n \"title\",\n \"overview\",\n \"genres\",\n}\nclient.Index(\"movies\").UpdateSearchableAttributes(&searchableAttributes)" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSearchableAttributesAsync(new[] {\"title\", \"overview\", \"genres\"});" + }, { "lang": "Rust", "source": "let searchable_attributes = [\n \"title\",\n \"overview\",\n \"genres\"\n];\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_searchable_attributes(&searchable_attributes)\n .await\n .unwrap();" @@ -8977,10 +8989,6 @@ { "lang": "Swift", "source": "let searchableAttributes: [String] = [\"title\", \"overview\", \"genres\"]\nclient.index(\"movies\").updateSearchableAttributes(searchableAttributes) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"title\",\n \"overview\",\n \"genres\"\n ]'" } ] }, @@ -9062,25 +9070,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSearchableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetSearchableAttributes();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetSearchableAttributes()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" }, { "lang": "JS", "source": "client.index('movies').resetSearchableAttributes()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetSearchableAttributesSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->resetSearchableAttributes();" @@ -9089,21 +9085,33 @@ "lang": "Python", "source": "client.index('movies').reset_searchable_attributes()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetSearchableAttributesSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').reset_searchable_attributes" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetSearchableAttributes()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSearchableAttributesAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_searchable_attributes()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").resetSearchableAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').resetSearchableAttributes();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes'" + "lang": "Swift", + "source": "client.index(\"movies\").resetSearchableAttributes { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -9172,21 +9180,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSeparatorTokensAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").GetSeparatorTokens()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" }, { "lang": "JS", "source": "client.index('books').getSeparatorTokens()" }, - { - "lang": "Java", - "source": "client.index(\"articles\").getSeparatorTokensSettings();" - }, { "lang": "PHP", "source": "$client->index('articles')->getSeparatorTokens();" @@ -9196,8 +9196,20 @@ "source": "client.index('articles').get_separator_tokens()" }, { - "lang": "Ruby", - "source": "client.index('articles').separator_tokens" + "lang": "Java", + "source": "client.index(\"articles\").getSeparatorTokensSettings();" + }, + { + "lang": "Ruby", + "source": "client.index('articles').separator_tokens" + }, + { + "lang": "Go", + "source": "client.Index(\"articles\").GetSeparatorTokens()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetSeparatorTokensAsync();" }, { "lang": "Rust", @@ -9206,10 +9218,6 @@ { "lang": "Swift", "source": "client.index(\"books\").getSeparatorTokens { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" } ] }, @@ -9292,21 +9300,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateSeparatorTokensAsync(new[] { \"|\", \"…\" });" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").UpdateSeparatorTokens([]string{\n \"|\",\n \"…\",\n})" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"|\", \"…\"]'" }, { "lang": "JS", "source": "client.index('books').updateSeparatorTokens(['|', '…'])" }, - { - "lang": "Java", - "source": "String[] newSeparatorTokens = { \"|\", \"…\" };\nclient.index(\"articles\").updateSeparatorTokensSettings(newSeparatorTokens);" - }, { "lang": "PHP", "source": "$client->index('articles')->updateSeparatorTokens(['|', '…']);" @@ -9315,10 +9315,22 @@ "lang": "Python", "source": "client.index('articles').update_separator_tokens([\"|\", \"…\"])" }, + { + "lang": "Java", + "source": "String[] newSeparatorTokens = { \"|\", \"…\" };\nclient.index(\"articles\").updateSeparatorTokensSettings(newSeparatorTokens);" + }, { "lang": "Ruby", "source": "client.index('articles').update_separator_tokens(['|', '…'])" }, + { + "lang": "Go", + "source": "client.Index(\"articles\").UpdateSeparatorTokens([]string{\n \"|\",\n \"…\",\n})" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateSeparatorTokensAsync(new[] { \"|\", \"…\" });" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('articles')\n .set_separator_tokens(&vec!['|'.to_string(), '…'.to_string()])\n .await\n .unwrap();" @@ -9326,10 +9338,6 @@ { "lang": "Swift", "source": "client.index(\"books\").updateSeparatorTokens([\"|\", \"…\"]) { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\"|\", \"…\"]'" } ] }, @@ -9412,21 +9420,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSeparatorTokensAsync();" - }, - { - "lang": "Go", - "source": "client.Index(\"articles\").ResetSeparatorTokens()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" }, { "lang": "JS", "source": "client.index('books').resetSeparatorTokens()" }, - { - "lang": "Java", - "source": "client.index(\"articles\").resetSeparatorTokensSettings();" - }, { "lang": "PHP", "source": "$client->index('articles')->resetSeparatorTokens();" @@ -9435,10 +9435,22 @@ "lang": "Python", "source": "client.index('articles').reset_separator_tokens()" }, + { + "lang": "Java", + "source": "client.index(\"articles\").resetSeparatorTokensSettings();" + }, { "lang": "Ruby", "source": "client.index('articles').reset_separator_tokens" }, + { + "lang": "Go", + "source": "client.Index(\"articles\").ResetSeparatorTokens()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSeparatorTokensAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index('articles')\n .reset_separator_tokens()\n .await\n .unwrap();" @@ -9446,10 +9458,6 @@ { "lang": "Swift", "source": "client.index(\"books\").resetSeparatorTokens { result in\n // handle result\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens'" } ] } @@ -9518,25 +9526,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"books\").GetSortableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('books').getSortableAttributes();\ndate_sortable_attributes_1: \"await client.index('books').updateSortableAttributes(['price', 'author']);\"" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetSortableAttributes()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" }, { "lang": "JS", "source": "client.index('books').getSortableAttributes()" }, - { - "lang": "Java", - "source": "client.index(\"books\").getSortableAttributesSettings();" - }, { "lang": "PHP", "source": "$client->index('books')->getSortableAttributes();" @@ -9545,21 +9541,33 @@ "lang": "Python", "source": "client.index('books').get_sortable_attributes()" }, + { + "lang": "Java", + "source": "client.index(\"books\").getSortableAttributesSettings();" + }, { "lang": "Ruby", "source": "client.index('books').sortable_attributes" }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetSortableAttributes()" + }, + { + "lang": "C#", + "source": "await client.Index(\"books\").GetSortableAttributesAsync();" + }, { "lang": "Rust", "source": "let sortable_attributes: Vec = client\n .index(\"books\")\n .get_sortable_attributes()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"books\").getSortableAttributes { (result: Result, Swift.Error>) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('books').getSortableAttributes();\nupdate_sortable_attributes_1: \"await client.index('books').updateSortableAttributes(['price', 'author']);\"" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" + "lang": "Swift", + "source": "client.index(\"books\").getSortableAttributes { (result: Result, Swift.Error>) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -9642,21 +9650,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"books\").UpdateSortableAttributesAsync(new [] { \"price\", \"author\" });" - }, - { - "lang": "Go", - "source": "sortableAttributes := []string{\n \"price\",\n \"author\",\n}\nclient.Index(\"books\").UpdateSortableAttributes(&sortableAttributes)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"price\",\n \"author\"\n ]'" }, { "lang": "JS", "source": "client.index('books')\n .updateSortableAttributes([\n 'price',\n 'author'\n ])" }, - { - "lang": "Java", - "source": "client.index(\"books\").updateSortableAttributesSettings(new String[] {\"price\", \"author\"});" - }, { "lang": "PHP", "source": "$client->index('books')->updateSortableAttributes([\n 'price',\n 'author'\n]);" @@ -9665,10 +9665,22 @@ "lang": "Python", "source": "client.index('books').update_sortable_attributes([\n 'price',\n 'author'\n])" }, + { + "lang": "Java", + "source": "client.index(\"books\").updateSortableAttributesSettings(new String[] {\"price\", \"author\"});" + }, { "lang": "Ruby", "source": "client.index('books').update_sortable_attributes([\n 'price',\n 'author'\n])" }, + { + "lang": "Go", + "source": "sortableAttributes := []string{\n \"price\",\n \"author\",\n}\nclient.Index(\"books\").UpdateSortableAttributes(&sortableAttributes)" + }, + { + "lang": "C#", + "source": "await client.Index(\"books\").UpdateSortableAttributesAsync(new [] { \"price\", \"author\" });" + }, { "lang": "Rust", "source": "let sortable_attributes = [\n \"price\",\n \"author\"\n];\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_sortable_attributes(&sortable_attributes)\n .await\n .unwrap();" @@ -9676,10 +9688,6 @@ { "lang": "Swift", "source": "client.index(\"books\").updateSortableAttributes([\"price\", \"author\"]) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"price\",\n \"author\"\n ]'" } ] }, @@ -9762,25 +9770,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"books\").ResetSortableAttributesAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('books').resetSortableAttributes();\narch_parameter_guide_sort_1: \"await client\\n .index('books')\\n .search('science fiction', SearchQuery(sort: ['price:asc']));\"" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetSortableAttributes()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" }, { "lang": "JS", "source": "client.index('books').resetSortableAttributes()" }, - { - "lang": "Java", - "source": "client.index(\"books\").resetSortableAttributesSettings();" - }, { "lang": "PHP", "source": "$client->index('books')->resetSortableAttributes();" @@ -9789,21 +9785,33 @@ "lang": "Python", "source": "client.index('books').reset_sortable_attributes()" }, + { + "lang": "Java", + "source": "client.index(\"books\").resetSortableAttributesSettings();" + }, { "lang": "Ruby", "source": "client.index('books').reset_sortable_attributes" }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetSortableAttributes()" + }, + { + "lang": "C#", + "source": "await client.Index(\"books\").ResetSortableAttributesAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_sortable_attributes()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"books\").resetSortableAttributes() { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('books').resetSortableAttributes();\nsearch_parameter_guide_sort_1: \"await client\\n .index('books')\\n .search('science fiction', SearchQuery(sort: ['price:asc']));\"" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes'" + "lang": "Swift", + "source": "client.index(\"books\").resetSortableAttributes() { (result) in\n switch result {\n case .success(let attributes):\n print(attributes)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -9872,25 +9880,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetStopWordsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getStopWords();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetStopWords()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" }, { "lang": "JS", "source": "client.index('movies').getStopWords()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").getStopWordsSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->getStopWords();" @@ -9899,21 +9895,33 @@ "lang": "Python", "source": "client.index('movies').get_stop_words()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").getStopWordsSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').stop_words" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetStopWords()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetStopWordsAsync();" + }, { "lang": "Rust", "source": "let stop_words: Vec = client\n .index(\"movies\")\n .get_stop_words()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").getStopWords { (result) in\n switch result {\n case .success(let stopWords):\n print(stopWords)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').getStopWords();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" + "lang": "Swift", + "source": "client.index(\"movies\").getStopWords { (result) in\n switch result {\n case .success(let stopWords):\n print(stopWords)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -9996,25 +10004,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").UpdateStopWordsAsync(new[] {\"of\", \"the\", \"to\"});" - }, - { - "lang": "Dart", - "source": "await client.index('movies').updateStopWords(['of', 'the', 'to']);" - }, - { - "lang": "Go", - "source": "stopWords := []string{\"of\", \"the\", \"to\"}\nclient.Index(\"movies\").UpdateStopWords(&stopWords)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/stop-words' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"the\",\n \"of\",\n \"to\"\n ]'" }, { "lang": "JS", "source": "client.index('movies').updateStopWords(['of', 'the', 'to'])" }, - { - "lang": "Java", - "source": "client.index(\"movies\").updateStopWordsSettings(new String[] {\"of\", \"the\", \"to\"});" - }, { "lang": "PHP", "source": "$client->index('movies')->updateStopWords(['the', 'of', 'to']);" @@ -10023,21 +10019,33 @@ "lang": "Python", "source": "client.index('movies').update_stop_words(['of', 'the', 'to'])" }, + { + "lang": "Java", + "source": "client.index(\"movies\").updateStopWordsSettings(new String[] {\"of\", \"the\", \"to\"});" + }, { "lang": "Ruby", "source": "client.index('movies').update_stop_words(['of', 'the', 'to'])" }, + { + "lang": "Go", + "source": "stopWords := []string{\"of\", \"the\", \"to\"}\nclient.Index(\"movies\").UpdateStopWords(&stopWords)" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").UpdateStopWordsAsync(new[] {\"of\", \"the\", \"to\"});" + }, { "lang": "Rust", "source": "let stop_words = [\"of\", \"the\", \"to\"];\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_stop_words(&stop_words)\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "let stopWords: [String] = [\"of\", \"the\", \"to\"]\nclient.index(\"movies\").updateStopWords(stopWords) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').updateStopWords(['of', 'the', 'to']);" }, { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/stop-words' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n \"the\",\n \"of\",\n \"to\"\n ]'" + "lang": "Swift", + "source": "let stopWords: [String] = [\"of\", \"the\", \"to\"]\nclient.index(\"movies\").updateStopWords(stopWords) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -10120,48 +10128,48 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetStopWordsAsync();" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" }, { - "lang": "Dart", - "source": "await client.index('movies').resetStopWords();" + "lang": "JS", + "source": "client.index('movies').resetStopWords()" }, { - "lang": "Go", - "source": "client.Index(\"movies\").ResetStopWords()" + "lang": "PHP", + "source": "$client->index('movies')->resetStopWords();" }, { - "lang": "JS", - "source": "client.index('movies').resetStopWords()" + "lang": "Python", + "source": "client.index('movies').reset_stop_words()" }, { "lang": "Java", "source": "client.index(\"movies\").resetStopWordsSettings();" }, { - "lang": "PHP", - "source": "$client->index('movies')->resetStopWords();" + "lang": "Ruby", + "source": "client.index('movies').reset_stop_words" }, { - "lang": "Python", - "source": "client.index('movies').reset_stop_words()" + "lang": "Go", + "source": "client.Index(\"movies\").ResetStopWords()" }, { - "lang": "Ruby", - "source": "client.index('movies').reset_stop_words" + "lang": "C#", + "source": "await client.Index(\"movies\").ResetStopWordsAsync();" }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_stop_words()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").resetStopWords { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').resetStopWords();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/stop-words'" + "lang": "Swift", + "source": "client.index(\"movies\").resetStopWords { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -10235,25 +10243,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetSynonymsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getSynonyms();\ndate_synonyms_1: \"await client.index('movies').updateSynonyms({\\n 'wolverine': ['xmen', 'logan'],\\n 'logan': ['wolverine', 'xmen'],\\n 'wow': ['world of warcraft'],\\n});\"" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetSynonyms()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" }, { "lang": "JS", "source": "client.index('movies').getSynonyms()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").getSynonymsSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->getSynonyms();" @@ -10262,21 +10258,33 @@ "lang": "Python", "source": "client.index('movies').get_synonyms()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").getSynonymsSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').synonyms" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetSynonyms()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetSynonymsAsync();" + }, { "lang": "Rust", "source": "let synonyms: HashMap> = client\n .index(\"movies\")\n .get_synonyms()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").getSynonyms { (result) in\n switch result {\n case .success(let synonyms):\n print(synonyms)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').getSynonyms();\nupdate_synonyms_1: \"await client.index('movies').updateSynonyms({\\n 'wolverine': ['xmen', 'logan'],\\n 'logan': ['wolverine', 'xmen'],\\n 'wow': ['world of warcraft'],\\n});\"" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" + "lang": "Swift", + "source": "client.index(\"movies\").getSynonyms { (result) in\n switch result {\n case .success(let synonyms):\n print(synonyms)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -10364,21 +10372,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "var synonyms = new Dictionary>\n{\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\", \"xmen\" } },\n { \"wow\", new string[] { \"world of warcraft\" } }\n};\nawait client.Index(\"movies\").UpdateSynonymsAsync(synonyms);" - }, - { - "lang": "Go", - "source": "synonyms := map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\", \"xmen\"},\n \"wow\": []string{\"world of warcraft\"},\n}\nclient.Index(\"movies\").UpdateSynonyms(&synonyms)" + "lang": "cURL", + "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/synonyms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\n \"wolverine\",\n \"xmen\"\n ],\n \"wow\": [\"world of warcraft\"]\n }'" }, { "lang": "JS", "source": "client.index('movies').updateSynonyms({\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine', 'xmen'],\n wow: ['world of warcraft']\n})" }, - { - "lang": "Java", - "source": "HashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nclient.index(\"movies\").updateSynonymsSettings(synonyms);" - }, { "lang": "PHP", "source": "$client->index('movies')->updateSynonyms([\n 'wolverine' => ['xmen', 'logan'],\n 'logan' => ['wolverine', 'xmen'],\n 'wow' => ['world of warcraft']\n]);" @@ -10387,10 +10387,22 @@ "lang": "Python", "source": "client.index('movies').update_synonyms({\n 'wolverine': ['xmen', 'logan'],\n 'logan': ['wolverine', 'xmen'],\n 'wow': ['world of warcraft']\n})" }, + { + "lang": "Java", + "source": "HashMap synonyms = new HashMap();\nsynonyms.put(\"wolverine\", new String[] {\"xmen\", \"logan\"});\nsynonyms.put(\"logan\", new String[] {\"wolverine\"});\nclient.index(\"movies\").updateSynonymsSettings(synonyms);" + }, { "lang": "Ruby", "source": "client.index('movies').update_synonyms({\n wolverine: ['xmen', 'logan'],\n logan: ['wolverine', 'xmen'],\n wow: ['world of warcraft']\n})" }, + { + "lang": "Go", + "source": "synonyms := map[string][]string{\n \"wolverine\": []string{\"xmen\", \"logan\"},\n \"logan\": []string{\"wolverine\", \"xmen\"},\n \"wow\": []string{\"world of warcraft\"},\n}\nclient.Index(\"movies\").UpdateSynonyms(&synonyms)" + }, + { + "lang": "C#", + "source": "var synonyms = new Dictionary>\n{\n { \"wolverine\", new string[] { \"xmen\", \"logan\" } },\n { \"logan\", new string[] { \"wolverine\", \"xmen\" } },\n { \"wow\", new string[] { \"world of warcraft\" } }\n};\nawait client.Index(\"movies\").UpdateSynonymsAsync(synonyms);" + }, { "lang": "Rust", "source": "let mut synonyms = std::collections::HashMap::new();\nsynonyms.insert(String::from(\"wolverine\"), vec![String::from(\"xmen\"), String::from(\"logan\")]);\nsynonyms.insert(String::from(\"logan\"), vec![String::from(\"xmen\"), String::from(\"wolverine\")]);\nsynonyms.insert(String::from(\"wow\"), vec![String::from(\"world of warcraft\")]);\n\nlet task: TaskInfo = client\n .index(\"movies\")\n .set_synonyms(&synonyms)\n .await\n .unwrap();" @@ -10398,10 +10410,6 @@ { "lang": "Swift", "source": "let synonyms: [String: [String]] = [\n \"wolverine\": [\"xmen\", \"logan\"],\n \"logan\": [\"wolverine\", \"xmen\"],\n \"wow\": [\"world of warcraft\"]\n]\nclient.index(\"movies\").updateSynonyms(synonyms) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PUT 'MEILISEARCH_URL/indexes/movies/settings/synonyms' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"wolverine\": [\n \"xmen\",\n \"logan\"\n ],\n \"logan\": [\n \"wolverine\",\n \"xmen\"\n ],\n \"wow\": [\"world of warcraft\"]\n }'" } ] }, @@ -10489,25 +10497,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").ResetSynonymsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').resetSynonyms();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").ResetSynonyms()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" }, { "lang": "JS", "source": "client.index('movies').resetSynonyms()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").resetSynonymsSettings();" - }, { "lang": "PHP", "source": "$client->index('movies')->resetSynonyms();" @@ -10516,21 +10512,33 @@ "lang": "Python", "source": "client.index('movies').reset_synonyms()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").resetSynonymsSettings();" + }, { "lang": "Ruby", "source": "client.index('movies').reset_synonyms" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").ResetSynonyms()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").ResetSynonymsAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"movies\")\n .reset_synonyms()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").resetSynonyms { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').resetSynonyms();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/synonyms'" + "lang": "Swift", + "source": "client.index(\"movies\").resetSynonyms { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -10595,12 +10603,8 @@ ], "x-codeSamples": [ { - "lang": "Dart", - "source": "await client.index('books').getTypoTolerance();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").GetTypoTolerance()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" }, { "lang": "JS", @@ -10618,13 +10622,17 @@ "lang": "Ruby", "source": "index('books').typo_tolerance" }, + { + "lang": "Go", + "source": "client.Index(\"books\").GetTypoTolerance()" + }, { "lang": "Rust", "source": "let typo_tolerance: TypoToleranceSettings = client\n .index(\"books\")\n .get_typo_tolerance()\n .await\n .unwrap();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" + "lang": "Dart", + "source": "await client.index('books').getTypoTolerance();" } ] }, @@ -10703,25 +10711,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"books\").ResetTypoToleranceAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('books').resetTypoTolerance();" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").ResetTypoTolerance()" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" }, { "lang": "JS", "source": "client.index('books').resetTypoTolerance()" }, - { - "lang": "Java", - "source": "client.index(\"books\").resetTypoToleranceSettings();" - }, { "lang": "PHP", "source": "$client->index('books')->resetTypoTolerance();" @@ -10730,17 +10726,29 @@ "lang": "Python", "source": "client.index('books').reset_typo_tolerance()" }, + { + "lang": "Java", + "source": "client.index(\"books\").resetTypoToleranceSettings();" + }, { "lang": "Ruby", "source": "index('books').reset_typo_tolerance" }, + { + "lang": "Go", + "source": "client.Index(\"books\").ResetTypoTolerance()" + }, + { + "lang": "C#", + "source": "await client.Index(\"books\").ResetTypoToleranceAsync();" + }, { "lang": "Rust", "source": "let task: TaskInfo = client\n .index(\"books\")\n .reset_typo_tolerance()\n .await\n .unwrap();" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance'" + "lang": "Dart", + "source": "await client.index('books').resetTypoTolerance();" } ] }, @@ -10819,25 +10827,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "var typoTolerance = new TypoTolerance {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeTypos = new TypoTolerance.TypoSize {\n OneTypo = 4,\n TwoTypos = 10\n }\n};\n\nawait client.Index(\"books\").UpdateTypoToleranceAsync(typoTolerance);" - }, - { - "lang": "Dart", - "source": "final toUpdate = TypoTolerance(\n minWordSizeForTypos: MinWordSizeForTypos(\n oneTypo: 4,\n twoTypos: 10,\n ),\n disableOnAttributes: ['title'],\n);\nawait client.index('books').updateTypoTolerance(toUpdate);" - }, - { - "lang": "Go", - "source": "client.Index(\"books\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 4,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n})" + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"minWordSizeForTypos\": {\n \"oneTypo\": 4,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n }'" }, { "lang": "JS", "source": "client.index('books').updateTypoTolerance({\n minWordSizeForTypos: {\n oneTypo: 4,\n twoTypos: 10\n },\n disableOnAttributes: [\n 'title'\n ]\n})" }, - { - "lang": "Java", - "source": "TypoTolerance typoTolerance = new TypoTolerance();\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 4);\n put(\"twoTypos\", 10);\n }\n };\n\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\ntypoTolerance.setDisableOnAttributes(new String[] {\"title\"});\n\nclient.index(\"books\").updateTypoToleranceSettings(typoTolerance);" - }, { "lang": "PHP", "source": "$client->index('books')->updateTypoTolerance([\n 'minWordSizeForTypos' => [\n 'oneTypo' => 4,\n 'twoTypos' => 10\n ],\n 'disableOnAttributes' => [\n 'title'\n ]\n]);" @@ -10846,17 +10842,29 @@ "lang": "Python", "source": "client.index('books').update_typo_tolerance({\n 'minWordSizeForTypos': {\n 'oneTypo': 4,\n 'twoTypos': 10\n },\n 'disableOnAttributes': [\n 'title'\n ]\n})" }, + { + "lang": "Java", + "source": "TypoTolerance typoTolerance = new TypoTolerance();\nHashMap minWordSizeTypos =\n new HashMap() {\n {\n put(\"oneTypo\", 4);\n put(\"twoTypos\", 10);\n }\n };\n\ntypoTolerance.setMinWordSizeForTypos(minWordSizeTypos);\ntypoTolerance.setDisableOnAttributes(new String[] {\"title\"});\n\nclient.index(\"books\").updateTypoToleranceSettings(typoTolerance);" + }, { "lang": "Ruby", "source": "index('books').update_typo_tolerance({\n min_word_size_for_typos: {\n one_typo: 4,\n two_typos: 10\n },\n disable_on_attributes: ['title']\n})" }, + { + "lang": "Go", + "source": "client.Index(\"books\").UpdateTypoTolerance(&meilisearch.TypoTolerance{\n MinWordSizeForTypos: meilisearch.MinWordSizeForTypos{\n OneTypo: 4,\n TwoTypos: 10,\n },\n DisableOnAttributes: []string{\"title\"},\n})" + }, + { + "lang": "C#", + "source": "var typoTolerance = new TypoTolerance {\n DisableOnAttributes = new string[] { \"title\" },\n MinWordSizeTypos = new TypoTolerance.TypoSize {\n OneTypo = 4,\n TwoTypos = 10\n }\n};\n\nawait client.Index(\"books\").UpdateTypoToleranceAsync(typoTolerance);" + }, { "lang": "Rust", "source": "let typo_tolerance = TypoToleranceSettings {\n enabled: Some(false),\n disable_on_attributes: None,\n disable_on_words: None,\n min_word_size_for_typos: None,\n};\n\nlet task: TaskInfo = client\n .index(\"books\")\n .set_typo_tolerance(&typo_tolerance)\n .await\n .unwrap();" }, { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"minWordSizeForTypos\": {\n \"oneTypo\": 4,\n \"twoTypos\": 10\n },\n \"disableOnAttributes\": [\"title\"]\n }'" + "lang": "Dart", + "source": "final toUpdate = TypoTolerance(\n minWordSizeForTypos: MinWordSizeForTypos(\n oneTypo: 4,\n twoTypos: 10,\n ),\n disableOnAttributes: ['title'],\n);\nawait client.index('books').updateTypoTolerance(toUpdate);" } ] } @@ -11402,8 +11410,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "resp := new(meilisearch.SimilarDocumentResult)\nclient.Index(\"INDEX_NAME\").SearchSimilarDocuments(&meilisearch.SimilarDocumentQuery{\n Id: \"TARGET_DOCUMENT_ID\",\n Embedder: \"default\",\n}, resp)" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/similar' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"id\": TARGET_DOCUMENT_ID,\n \"embedder\": \"EMBEDDER_NAME\"\n }'" }, { "lang": "JS", @@ -11422,12 +11430,12 @@ "source": "client.index('INDEX_NAME').search_similar_documents('TARGET_DOCUMENT_ID', embedder: 'default')" }, { - "lang": "Rust", - "source": "let results = index\n .similar_search(\"TARGET_DOCUMENT_ID\", \"EMBEDDER_NAME\")\n .execute()\n .await\n .unwrap();" + "lang": "Go", + "source": "resp := new(meilisearch.SimilarDocumentResult)\nclient.Index(\"INDEX_NAME\").SearchSimilarDocuments(&meilisearch.SimilarDocumentQuery{\n Id: \"TARGET_DOCUMENT_ID\",\n Embedder: \"default\",\n}, resp)" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/similar' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \\\n --data-binary '{\n \"id\": TARGET_DOCUMENT_ID,\n \"embedder\": \"EMBEDDER_NAME\"\n }'" + "lang": "Rust", + "source": "let results = index\n .similar_search(\"TARGET_DOCUMENT_ID\", \"EMBEDDER_NAME\")\n .execute()\n .await\n .unwrap();" } ] } @@ -11519,25 +11527,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.Index(\"movies\").GetStatsAsync();" - }, - { - "lang": "Dart", - "source": "await client.index('movies').getStats();" - }, - { - "lang": "Go", - "source": "client.Index(\"movies\").GetStats()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/stats'" }, { "lang": "JS", "source": "client.index('movies').getStats()" }, - { - "lang": "Java", - "source": "client.index(\"movies\").getStats();" - }, { "lang": "PHP", "source": "$client->index('movies')->stats();" @@ -11546,21 +11542,33 @@ "lang": "Python", "source": "client.index('movies').get_stats()" }, + { + "lang": "Java", + "source": "client.index(\"movies\").getStats();" + }, { "lang": "Ruby", "source": "client.index('movies').stats" }, + { + "lang": "Go", + "source": "client.Index(\"movies\").GetStats()" + }, + { + "lang": "C#", + "source": "await client.Index(\"movies\").GetStatsAsync();" + }, { "lang": "Rust", "source": "let stats: IndexStats = client\n .index(\"movies\")\n .get_stats()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.index(\"movies\").stats { (result) in\n switch result {\n case .success(let stats):\n print(stats)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.index('movies').getStats();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/indexes/movies/stats'" + "lang": "Swift", + "source": "client.index(\"movies\").stats { (result) in\n switch result {\n case .success(let stats):\n print(stats)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -11658,24 +11666,12 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "ResourceResults keyResult = await client.GetKeysAsync(new KeysQuery { Limit = 3 });" - }, - { - "lang": "Dart", - "source": "await client.getKeys(params: KeysQuery(limit: 3));\neate_a_key_1: \"await client.createKey(\\n description: 'Add documents: Products API key',\\n actions: ['documents.add'],\\n indexes: ['products'],\\n expiresAt: DateTime(2042, 04, 02));\"\ndate_a_key_1: \"await client.updateKey(\\n '6062abda-a5aa-4414-ac91-ecd7944c0f8d',\\n description: 'Manage documents: Products\\/Reviews API key',\\n name: 'Products\\/Reviews API key',\\n);\"" - }, - { - "lang": "Go", - "source": "client.GetKeys(&meilisearch.KeysQuery{\n Limit: 3\n});" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys?limit=3' \\\n -H 'Authorization: Bearer MASTER_KEY'" }, { "lang": "JS", - "source": "client.getKeys({ limit: 3 })" - }, - { - "lang": "Java", - "source": "KeysQuery query = new KeysQuery().setLimit(3);\nclient.getKeys(query);" + "source": "client.getKeys({ limit: 3 })" }, { "lang": "PHP", @@ -11685,21 +11681,33 @@ "lang": "Python", "source": "client.get_keys({'limit': 3})" }, + { + "lang": "Java", + "source": "KeysQuery query = new KeysQuery().setLimit(3);\nclient.getKeys(query);" + }, { "lang": "Ruby", "source": "client.keys(limit: 3)" }, + { + "lang": "Go", + "source": "client.GetKeys(&meilisearch.KeysQuery{\n Limit: 3\n});" + }, + { + "lang": "C#", + "source": "ResourceResults keyResult = await client.GetKeysAsync(new KeysQuery { Limit = 3 });" + }, { "lang": "Rust", "source": "let mut query = KeysQuery::new()\n .with_limit(3)\n .execute(&client)\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.getKeys(params: KeysQuery(limit: 3)) { result in\n switch result {\n case .success(let keys):\n print(keys)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.getKeys(params: KeysQuery(limit: 3));\ncreate_a_key_1: \"await client.createKey(\\n description: 'Add documents: Products API key',\\n actions: ['documents.add'],\\n indexes: ['products'],\\n expiresAt: DateTime(2042, 04, 02));\"\nupdate_a_key_1: \"await client.updateKey(\\n '6062abda-a5aa-4414-ac91-ecd7944c0f8d',\\n description: 'Manage documents: Products\\/Reviews API key',\\n name: 'Products\\/Reviews API key',\\n);\"" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys?limit=3' \\\n -H 'Authorization: Bearer MASTER_KEY'" + "lang": "Swift", + "source": "client.getKeys(params: KeysQuery(limit: 3)) { result in\n switch result {\n case .success(let keys):\n print(keys)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -11774,21 +11782,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "Key keyOptions = new Key\n{\n Description = \"Add documents: Products API key\",\n Actions = new KeyAction[] { KeyAction.DocumentsAdd },\n Indexes = new string[] { \"products\" },\n ExpiresAt = DateTime.Parse(\"2042-04-02T00:42:42Z\")\n};\nKey createdKey = await this.client.CreateKeyAsync(keyOptions);" - }, - { - "lang": "Go", - "source": "client.CreateKey(&meilisearch.Key{\n Description: \"Add documents: Products API key\",\n Actions: []string{\"documents.add\"},\n Indexes: []string{\"products\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/keys' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"description\": \"Add documents: Products API key\",\n \"actions\": [\"documents.add\"],\n \"indexes\": [\"products\"],\n \"expiresAt\": \"2042-04-02T00:42:42Z\"\n }'" }, { "lang": "JS", "source": "client.createKey({\n description: 'Add documents: Products API key',\n actions: ['documents.add'],\n indexes: ['products'],\n expiresAt: '2021-11-13T00:00:00Z'\n})" }, - { - "lang": "Java", - "source": "SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\nDate dateParsed = format.parse(\"2042-04-02T00:42:42Z\");\n\nKey keyInfo = new Key();\n\nkeyInfo.setDescription(\"Add documents: Products API key\");\nkeyInfo.setActions(new String[] {\"documents.add\"});\nkeyInfo.setIndexes(new String[] {\"products\"});\nkeyInfo.setExpiresAt(dateParsed);\n\nclient.createKey(keyInfo);" - }, { "lang": "PHP", "source": "$client->createKey([\n 'description' => 'Add documents: Products API key',\n 'actions' => ['documents.add'],\n 'indexes' => ['products'],\n 'expiresAt' => '2042-04-02T00:42:42Z',\n]);" @@ -11797,10 +11797,22 @@ "lang": "Python", "source": "client.create_key(options={\n 'description': 'Add documents: Products API key',\n 'actions': ['documents.add'],\n 'indexes': ['products'],\n 'expiresAt': '2042-04-02T00:42:42Z'\n})" }, + { + "lang": "Java", + "source": "SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\nDate dateParsed = format.parse(\"2042-04-02T00:42:42Z\");\n\nKey keyInfo = new Key();\n\nkeyInfo.setDescription(\"Add documents: Products API key\");\nkeyInfo.setActions(new String[] {\"documents.add\"});\nkeyInfo.setIndexes(new String[] {\"products\"});\nkeyInfo.setExpiresAt(dateParsed);\n\nclient.createKey(keyInfo);" + }, { "lang": "Ruby", "source": "client.create_key(\n description: 'Add documents: Products API key',\n actions: ['documents.add'],\n indexes: ['products'],\n expires_at: '2042-04-02T00:42:42Z'\n)" }, + { + "lang": "Go", + "source": "client.CreateKey(&meilisearch.Key{\n Description: \"Add documents: Products API key\",\n Actions: []string{\"documents.add\"},\n Indexes: []string{\"products\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" + }, + { + "lang": "C#", + "source": "Key keyOptions = new Key\n{\n Description = \"Add documents: Products API key\",\n Actions = new KeyAction[] { KeyAction.DocumentsAdd },\n Indexes = new string[] { \"products\" },\n ExpiresAt = DateTime.Parse(\"2042-04-02T00:42:42Z\")\n};\nKey createdKey = await this.client.CreateKeyAsync(keyOptions);" + }, { "lang": "Rust", "source": "let mut key_options = KeyBuilder::new();\nkey_options\n .with_name(\"Add documents: Products API key\")\n .with_action(Action::DocumentsAdd)\n .with_expires_at(time::macros::datetime!(2042 - 04 - 02 00:42:42 UTC))\n .with_index(\"products\");\nlet new_key = client\n .create_key(key_options)\n .await\n .unwrap();" @@ -11808,10 +11820,6 @@ { "lang": "Swift", "source": "let keyParams = KeyParams(\n description: \"Add documents: Products API key\",\n actions: [\"documents.add\"],\n indexes: [\"products\"],\n expiresAt: \"2042-04-02T00:42:42Z\"\n)\nclient.createKey(keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/keys' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"description\": \"Add documents: Products API key\",\n \"actions\": [\"documents.add\"],\n \"indexes\": [\"products\"],\n \"expiresAt\": \"2042-04-02T00:42:42Z\"\n }'" } ] } @@ -11891,25 +11899,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "Key key = await client.GetKeyAsync(\"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4\");" - }, - { - "lang": "Dart", - "source": "await client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" - }, - { - "lang": "Go", - "source": "client.GetKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" }, { "lang": "JS", "source": "client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" }, - { - "lang": "Java", - "source": "client.getKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\");" - }, { "lang": "PHP", "source": "$client->getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" @@ -11918,21 +11914,33 @@ "lang": "Python", "source": "client.get_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" }, + { + "lang": "Java", + "source": "client.getKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\");" + }, { "lang": "Ruby", "source": "client.key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" }, + { + "lang": "Go", + "source": "client.GetKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + }, + { + "lang": "C#", + "source": "Key key = await client.GetKeyAsync(\"d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4\");" + }, { "lang": "Rust", "source": "let key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.getKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" + "lang": "Swift", + "source": "client.getKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -11988,25 +11996,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "client.DeleteKeyAsync(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" - }, - { - "lang": "Dart", - "source": "await client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" - }, - { - "lang": "Go", - "source": "client.DeleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" }, { "lang": "JS", "source": "client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" }, - { - "lang": "Java", - "source": "client.deleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" - }, { "lang": "PHP", "source": "$client->deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" @@ -12015,21 +12011,33 @@ "lang": "Python", "source": "client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" }, + { + "lang": "Java", + "source": "client.deleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + }, { "lang": "Ruby", "source": "client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d')" }, + { + "lang": "Go", + "source": "client.DeleteKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + }, + { + "lang": "C#", + "source": "client.DeleteKeyAsync(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")" + }, { "lang": "Rust", - "source": "let key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();\nclient\n .delete_key(&key)\n .await?;\nthorization_header_1:\nlet client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet keys = client\n.get_keys()\n.await\n.unwrap();" + "source": "let key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();\nclient\n .delete_key(&key)\n .await?;\nauthorization_header_1:\nlet client = Client::new(\"http://localhost:7700\", Some(\"masterKey\"));\nlet keys = client\n.get_keys()\n.await\n.unwrap();" }, { - "lang": "Swift", - "source": "client.deleteKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success:\n print(\"success\")\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d');" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY'" + "lang": "Swift", + "source": "client.deleteKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\") { result in\n switch result {\n case .success:\n print(\"success\")\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -12117,21 +12125,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.UpdateKeyAsync(\n \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\",\n description: \"Manage documents: Products/Reviews API key\",\n name: \"Products/Reviews API key\"\n)" - }, - { - "lang": "Go", - "source": "client.UpdateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", &meilisearch.Key{\n Description: \"Manage documents: Products/Reviews API key\",\n Actions: []string{\"documents.add\", \"document.delete\"},\n Indexes: []string{\"products\", \"reviews\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"name\": \"Products/Reviews API key\",\n \"description\": \"Manage documents: Products/Reviews API key\"\n }'" }, { "lang": "JS", "source": "client.updateKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d', {\n name: 'Products/Reviews API key',\n description: 'Manage documents: Products/Reviews API key',\n})" }, - { - "lang": "Java", - "source": "KeyUpdate keyChanges = new KeyUpdate();\nkeyChanges.setName(\"Products/Reviews API key\");\nkeyChanges.setDescription(\"Manage documents: Products/Reviews API key\");\n\nclient.updateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", keyChanges);" - }, { "lang": "PHP", "source": "$client->updateKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n [\n 'name' => 'Products/Reviews API key',\n 'description' => 'Manage documents: Products/Reviews API key'\n ]);" @@ -12140,10 +12140,22 @@ "lang": "Python", "source": "client.update_key(key_or_uid='6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n options={\n 'name': 'Products/Reviews API key',\n 'description': 'Manage documents: Products/Reviews API key'\n})" }, + { + "lang": "Java", + "source": "KeyUpdate keyChanges = new KeyUpdate();\nkeyChanges.setName(\"Products/Reviews API key\");\nkeyChanges.setDescription(\"Manage documents: Products/Reviews API key\");\n\nclient.updateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", keyChanges);" + }, { "lang": "Ruby", "source": "client.update_key(\n '6062abda-a5aa-4414-ac91-ecd7944c0f8d',\n {\n description: 'Manage documents: Products/Reviews API key',\n name: 'Products/Reviews API key'\n }\n)" }, + { + "lang": "Go", + "source": "client.UpdateKey(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", &meilisearch.Key{\n Description: \"Manage documents: Products/Reviews API key\",\n Actions: []string{\"documents.add\", \"document.delete\"},\n Indexes: []string{\"products\", \"reviews\"},\n ExpiresAt: time.Date(2042, time.April, 02, 0, 42, 42, 0, time.UTC),\n})" + }, + { + "lang": "C#", + "source": "await client.UpdateKeyAsync(\n \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\",\n description: \"Manage documents: Products/Reviews API key\",\n name: \"Products/Reviews API key\"\n)" + }, { "lang": "Rust", "source": "let mut key = client\n .get_key(\"6062abda-a5aa-4414-ac91-ecd7944c0f8d\")\n .await\n .unwrap();\nkey\n .with_description(\"Manage documents: Products/Reviews API key\".to_string())\n .with_name(\"Products/Reviews API key\".to_string())\n .update(&client)\n .await\n .unwrap();" @@ -12151,10 +12163,6 @@ { "lang": "Swift", "source": "let keyParams = KeyUpdateParams(\n description: \"Manage documents: Products/Reviews API key\",\n name: \"Products/Reviews API key\"\n)\n\nclient.updateKey(keyOrUid: \"6062abda-a5aa-4414-ac91-ecd7944c0f8d\", keyParams: keyParams) { result in\n switch result {\n case .success(let key):\n print(key)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \\\n -H 'Authorization: Bearer MASTER_KEY' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"name\": \"Products/Reviews API key\",\n \"description\": \"Manage documents: Products/Reviews API key\"\n }'" } ] } @@ -12476,21 +12484,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.MultiSearchAsync(new MultiSearchQuery()\n{\n Queries = new System.Collections.Generic.List()\n {\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"booh\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"nemo\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movie_ratings\",\n Q = \"us\",\n },\n }\n});" - }, - { - "lang": "Go", - "source": "client.MultiSearch(&MultiSearchRequest{\n Queries: []SearchRequest{\n {\n IndexUID: \"movies\",\n Query: \"pooh\",\n Limit: 5,\n },\n {\n IndexUID: \"movies\",\n Query: \"nemo\",\n Limit: 5,\n },\n {\n IndexUID: \"movie_ratings\",\n Query: \"us\",\n },\n },\n})" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/multi-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"queries\": [\n {\n \"indexUid\": \"movies\",\n \"q\": \"pooh\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movies\",\n \"q\": \"nemo\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movie_ratings\",\n \"q\": \"us\"\n }\n ]\n }'" }, { "lang": "JS", "source": "client.multiSearch({ queries: [\n {\n indexUid: 'movies',\n q: 'pooh',\n limit: 5,\n },\n {\n indexUid: 'movies',\n q: 'nemo',\n limit: 5,\n },\n {\n indexUid: 'movie_ratings',\n q: 'us',\n },\n]})" }, - { - "lang": "Java", - "source": "MultiSearchRequest multiSearchRequest = new MultiSearchRequest();\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"pooh\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"nemo\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movie_ratings\").setQuery(\"us\"));\n\nclient.multiSearch(multiSearchRequest);\nt_similar_post_1:\nSimilarDocumentRequest query = new SimilarDocumentRequest()\n .setId(\"143\")\n .setEmbedder(\"manual\");\nclient.index(\"movies\").searchSimilarDocuments(query)" - }, { "lang": "PHP", "source": "$client->multiSearch([\n (new SearchQuery())\n ->setIndexUid('movies')\n ->setQuery('pooh')\n ->setLimit(5),\n (new SearchQuery())\n ->setIndexUid('movies')\n ->setQuery('nemo')\n ->setLimit(5),\n (new SearchQuery())\n ->setIndexUid('movie_ratings')\n ->setQuery('us')\n ]);" @@ -12499,17 +12499,25 @@ "lang": "Python", "source": "client.multi_search(\n [\n {'indexUid': 'movies', 'q': 'pooh', 'limit': 5},\n {'indexUid': 'movies', 'q': 'nemo', 'limit': 5},\n {'indexUid': 'movie_ratings', 'q': 'us'}\n ]\n)" }, + { + "lang": "Java", + "source": "MultiSearchRequest multiSearchRequest = new MultiSearchRequest();\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"pooh\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movies\").setQuery(\"nemo\").setLimit(5));\nmultiIndexSearch.addQuery(new IndexSearchRequest(\"movie_ratings\").setQuery(\"us\"));\n\nclient.multiSearch(multiSearchRequest);\nget_similar_post_1:\nSimilarDocumentRequest query = new SimilarDocumentRequest()\n .setId(\"143\")\n .setEmbedder(\"manual\");\nclient.index(\"movies\").searchSimilarDocuments(query)" + }, { "lang": "Ruby", "source": "client.multi_search([\n { index_uid: 'books', q: 'prince' },\n { index_uid: 'movies', q: 'pooh', limit: 5 }\n { index_uid: 'movies', q: 'nemo', limit: 5 }\n { index_uid: 'movie_ratings', q: 'us' }\n])" }, { - "lang": "Rust", - "source": "let movie = client.index(\"movie\");\nlet movie_ratings = client.index(\"movie_ratings\");\n\nlet search_query_1 = SearchQuery::new(&movie)\n .with_query(\"pooh\")\n .with_limit(5)\n .build();\nlet search_query_2 = SearchQuery::new(&movie)\n .with_query(\"nemo\")\n .with_limit(5)\n .build();\nlet search_query_3 = SearchQuery::new(&movie_ratings)\n .with_query(\"us\")\n .build();\n\nlet response = client\n .multi_search()\n .with_search_query(search_query_1)\n .with_search_query(search_query_2)\n .with_search_query(search_query_3)\n .execute::()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.MultiSearch(&MultiSearchRequest{\n Queries: []SearchRequest{\n {\n IndexUID: \"movies\",\n Query: \"pooh\",\n Limit: 5,\n },\n {\n IndexUID: \"movies\",\n Query: \"nemo\",\n Limit: 5,\n },\n {\n IndexUID: \"movie_ratings\",\n Query: \"us\",\n },\n },\n})" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/multi-search' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"queries\": [\n {\n \"indexUid\": \"movies\",\n \"q\": \"pooh\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movies\",\n \"q\": \"nemo\",\n \"limit\": 5\n },\n {\n \"indexUid\": \"movie_ratings\",\n \"q\": \"us\"\n }\n ]\n }'" + "lang": "C#", + "source": "await client.MultiSearchAsync(new MultiSearchQuery()\n{\n Queries = new System.Collections.Generic.List()\n {\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"booh\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movies\",\n Q = \"nemo\",\n Limit = 5\n },\n new SearchQuery() {\n IndexUid = \"movie_ratings\",\n Q = \"us\",\n },\n }\n});" + }, + { + "lang": "Rust", + "source": "let movie = client.index(\"movie\");\nlet movie_ratings = client.index(\"movie_ratings\");\n\nlet search_query_1 = SearchQuery::new(&movie)\n .with_query(\"pooh\")\n .with_limit(5)\n .build();\nlet search_query_2 = SearchQuery::new(&movie)\n .with_query(\"nemo\")\n .with_limit(5)\n .build();\nlet search_query_3 = SearchQuery::new(&movie_ratings)\n .with_query(\"us\")\n .build();\n\nlet response = client\n .multi_search()\n .with_search_query(search_query_1)\n .with_search_query(search_query_2)\n .with_search_query(search_query_3)\n .execute::()\n .await\n .unwrap();" } ] } @@ -12580,8 +12588,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.GetNetwork();" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/network'" }, { "lang": "PHP", @@ -12592,12 +12600,12 @@ "source": "client.get_all_networks()" }, { - "lang": "Rust", - "source": "let network = client\n .get_network_state()\n .await\n .unwrap();" + "lang": "Go", + "source": "client.GetNetwork();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/network'" + "lang": "Rust", + "source": "let network = client\n .get_network_state()\n .await\n .unwrap();" } ] }, @@ -12676,8 +12684,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.UpdateNetwork(&meilisearch.UpdateNetworkRequest{\n Self: meilisearch.String(\"ms-00\"),\n Leader: meilisearch.String(\"ms-00\"),\n Remotes: meilisearch.NewOpt(map[string]meilisearch.Opt[meilisearch.Remote]{\n \"ms-00\": meilisearch.NewOpt(meilisearch.Remote{\n URL: meilisearch.String(\"https://meilisearch.com\"),\n SearchAPIKey: meilisearch.String(\"ReadKey\"),\n WriteAPIKey: meilisearch.String(\"WriteKey\"),\n },\n },\n});" + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/network' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"self\": \"ms-00\",\n \"remotes\": {\n \"ms-00\": {\n \"url\": \"http://INSTANCE_URL\",\n \"searchApiKey\": \"INSTANCE_API_KEY\"\n },\n \"ms-01\": {\n \"url\": \"http://ANOTHER_INSTANCE_URL\",\n \"searchApiKey\": \"ANOTHER_INSTANCE_API_KEY\"\n }\n }\n }'" }, { "lang": "PHP", @@ -12688,12 +12696,12 @@ "source": "client.add_or_update_networks({\n \"remotes\": {\n \"http://localhost:7700\": {\n \"searchApiKey\": \"masterKey\"\n }\n },\n \"leader\": None\n})" }, { - "lang": "Rust", - "source": "let mut remotes = std::collections::HashMap::new();\nremotes.insert(String::from(\"ms-01\"), Some(meilisearch_sdk::network::RemoteConfig {\n url: \"https://ms-01.enterprise.meilisearch.com\".to_string(),\n search_api_key: \"SEARCH_API_KEY\".to_string(),\n write_api_key: Some(\"WRITE_API_KEY\".to_string()),\n}));\n// Remove ms-00 from the topology\nremotes.insert(String::from(\"ms-00\"), None);\n\nlet update = meilisearch_sdk::network::NetworkUpdate {\n leader: Some(\"ms-01\".to_string()),\n remotes: Some(remotes),\n ..meilisearch_sdk::network::NetworkUpdate::default()\n};\n\nlet task: TaskInfo = client\n .update_network_state(&update)\n .await\n .unwrap();" + "lang": "Go", + "source": "client.UpdateNetwork(&meilisearch.UpdateNetworkRequest{\n Self: meilisearch.String(\"ms-00\"),\n Leader: meilisearch.String(\"ms-00\"),\n Remotes: meilisearch.NewOpt(map[string]meilisearch.Opt[meilisearch.Remote]{\n \"ms-00\": meilisearch.NewOpt(meilisearch.Remote{\n URL: meilisearch.String(\"https://meilisearch.com\"),\n SearchAPIKey: meilisearch.String(\"ReadKey\"),\n WriteAPIKey: meilisearch.String(\"WriteKey\"),\n },\n },\n});" }, { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/network' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"self\": \"ms-00\",\n \"remotes\": {\n \"ms-00\": {\n \"url\": \"http://INSTANCE_URL\",\n \"searchApiKey\": \"INSTANCE_API_KEY\"\n },\n \"ms-01\": {\n \"url\": \"http://ANOTHER_INSTANCE_URL\",\n \"searchApiKey\": \"ANOTHER_INSTANCE_API_KEY\"\n }\n }\n }'" + "lang": "Rust", + "source": "let mut remotes = std::collections::HashMap::new();\nremotes.insert(String::from(\"ms-01\"), Some(meilisearch_sdk::network::RemoteConfig {\n url: \"https://ms-01.enterprise.meilisearch.com\".to_string(),\n search_api_key: \"SEARCH_API_KEY\".to_string(),\n write_api_key: Some(\"WRITE_API_KEY\".to_string()),\n}));\n// Remove ms-00 from the topology\nremotes.insert(String::from(\"ms-00\"), None);\n\nlet update = meilisearch_sdk::network::NetworkUpdate {\n leader: Some(\"ms-01\".to_string()),\n remotes: Some(remotes),\n ..meilisearch_sdk::network::NetworkUpdate::default()\n};\n\nlet task: TaskInfo = client\n .update_network_state(&update)\n .await\n .unwrap();" } ] } @@ -12752,21 +12760,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.CreateSnapshotAsync();" - }, - { - "lang": "Go", - "source": "client.CreateSnapshot()" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/snapshots'" }, { "lang": "JS", "source": "client.createSnapshot()" }, - { - "lang": "Java", - "source": "client.createSnapshot();" - }, { "lang": "PHP", "source": "$client->createSnapshot();" @@ -12775,10 +12775,22 @@ "lang": "Python", "source": "client.create_snapshot()" }, + { + "lang": "Java", + "source": "client.createSnapshot();" + }, { "lang": "Ruby", "source": "client.create_snapshot" }, + { + "lang": "Go", + "source": "client.CreateSnapshot()" + }, + { + "lang": "C#", + "source": "await client.CreateSnapshotAsync();" + }, { "lang": "Rust", "source": "client\n .create_snapshot()\n .await\n .unwrap();" @@ -12786,10 +12798,6 @@ { "lang": "Swift", "source": "let task = try await self.client.createSnapshot()" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/snapshots'" } ] } @@ -12859,25 +12867,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.GetStatsAsync();" - }, - { - "lang": "Dart", - "source": "await client.getStats();" - }, - { - "lang": "Go", - "source": "client.GetStats()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/stats'" }, { "lang": "JS", "source": "client.getStats()" }, - { - "lang": "Java", - "source": "client.getStats();" - }, { "lang": "PHP", "source": "$client->stats();" @@ -12886,21 +12882,33 @@ "lang": "Python", "source": "client.get_all_stats()" }, + { + "lang": "Java", + "source": "client.getStats();" + }, { "lang": "Ruby", "source": "client.stats" }, + { + "lang": "Go", + "source": "client.GetStats()" + }, + { + "lang": "C#", + "source": "await client.GetStatsAsync();" + }, { "lang": "Rust", "source": "let stats: ClientStats = client\n .get_stats()\n .await\n .unwrap();" }, + { + "lang": "Dart", + "source": "await client.getStats();" + }, { "lang": "Swift", "source": "client.allStats { (result) in\n switch result {\n case .success(let stats):\n print(stats)\n case .failure(let error):\n print(error)\n }\n}" - }, - { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/stats'" } ] } @@ -12971,21 +12979,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.SwapIndexesAsync(new List { new IndexSwap(\"indexA\", \"indexB\"), new IndexSwap(\"indexX\", \"indexY\") } });" - }, - { - "lang": "Go", - "source": "client.SwapIndexes([]SwapIndexesParams{\n {Indexes: []string{\"indexA\", \"indexB\"}},\n {Indexes: []string{\"indexX\", \"indexY\"}},\n})" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/swap-indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"indexes\": [\n \"indexA\",\n \"indexB\"\n ]\n },\n {\n \"indexes\": [\n \"indexX\",\n \"indexY\"\n ]\n }\n ]'" }, { "lang": "JS", "source": "client.swapIndexes([\n { 'indexes': ['indexA', 'indexB'] },\n { 'indexes': ['indexX', 'indexY'] }\n])" }, - { - "lang": "Java", - "source": "SwapIndexesParams[] params =\n new SwapIndexesParams[] {\n new SwapIndexesParams().setIndexes(new String[] {\"indexA\", \"indexB\"}),\n new SwapIndexesParams().setIndexes(new String[] {\"indexX\", \"indexY\"})\n };\nTaskInfo task = client.swapIndexes(params);" - }, { "lang": "PHP", "source": "$client->swapIndexes([['indexA', 'indexB'], ['indexX', 'indexY']]);" @@ -12994,10 +12994,22 @@ "lang": "Python", "source": "client.swap_indexes([{'indexes': ['indexA', 'indexB']}, {'indexes': ['indexX', 'indexY']}])" }, + { + "lang": "Java", + "source": "SwapIndexesParams[] params =\n new SwapIndexesParams[] {\n new SwapIndexesParams().setIndexes(new String[] {\"indexA\", \"indexB\"}),\n new SwapIndexesParams().setIndexes(new String[] {\"indexX\", \"indexY\"})\n };\nTaskInfo task = client.swapIndexes(params);" + }, { "lang": "Ruby", "source": "client.swap_indexes(['indexA', 'indexB'], ['indexX', 'indexY'])" }, + { + "lang": "Go", + "source": "client.SwapIndexes([]SwapIndexesParams{\n {Indexes: []string{\"indexA\", \"indexB\"}},\n {Indexes: []string{\"indexX\", \"indexY\"}},\n})" + }, + { + "lang": "C#", + "source": "await client.SwapIndexesAsync(new List { new IndexSwap(\"indexA\", \"indexB\"), new IndexSwap(\"indexX\", \"indexY\") } });" + }, { "lang": "Rust", "source": "client.swap_indexes([\n &SwapIndexes {\n indexes: (\n \"indexA\".to_string(),\n \"indexB\".to_string(),\n ),\n }, &SwapIndexes {\n indexes: (\n \"indexX\".to_string(),\n \"indexY\".to_string(),\n ),\n}])" @@ -13005,10 +13017,6 @@ { "lang": "Swift", "source": "let task = try await self.client.swapIndexes([\n (\"indexA\", \"indexB\"),\n (\"indexX\", \"indexY\")\n])" - }, - { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/swap-indexes' \\\n -H 'Content-Type: application/json' \\\n --data-binary '[\n {\n \"indexes\": [\n \"indexA\",\n \"indexB\"\n ]\n },\n {\n \"indexes\": [\n \"indexX\",\n \"indexY\"\n ]\n }\n ]'" } ] } @@ -13276,21 +13284,13 @@ ], "x-codeSamples": [ { - "lang": "Dart", - "source": "await client.getTasks();" - }, - { - "lang": "Go", - "source": "client.GetTasks(nil);" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks'" }, { "lang": "JS", "source": "client.tasks.getTasks()" }, - { - "lang": "Java", - "source": "client.getTasks();" - }, { "lang": "PHP", "source": "$client->getTasks();" @@ -13299,21 +13299,29 @@ "lang": "Python", "source": "client.get_tasks()" }, + { + "lang": "Java", + "source": "client.getTasks();" + }, { "lang": "Ruby", "source": "client.tasks" }, + { + "lang": "Go", + "source": "client.GetTasks(nil);" + }, { "lang": "Rust", "source": "let tasks: TasksResults = client\n .get_tasks()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.getTasks { (result) in\n switch result {\n case .success(let tasks):\n print(tasks)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.getTasks();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks'" + "lang": "Swift", + "source": "client.getTasks { (result) in\n switch result {\n case .success(let tasks):\n print(tasks)\n case .failure(let error):\n print(error)\n }\n}" } ] }, @@ -13567,25 +13575,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.DeleteTasksAsync(new DeleteTasksQuery { Uids = new List { 1, 2 } });" - }, - { - "lang": "Dart", - "source": "await client.deleteTasks(params: DeleteTasksQuery(uids: [1, 2]));" - }, - { - "lang": "Go", - "source": "client.DeleteTaks(&meilisearch.DeleteTasksQuery{\n UIDS: []int64{1, 2},\n});" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/tasks?uids=1,2'" }, { "lang": "JS", "source": "client.tasks.deleteTasks({ uids: [1, 2] })" }, - { - "lang": "Java", - "source": "DeleteTasksQuery query = new DeleteTasksQuery().setUids(new int[] {1, 2})\nclient.deleteTasks(query);" - }, { "lang": "PHP", "source": "$client->deleteTasks((new DeleteTasksQuery())->setUids([1, 2]));" @@ -13594,21 +13590,33 @@ "lang": "Python", "source": "client.delete_tasks({'uids': ['1', '2']})" }, + { + "lang": "Java", + "source": "DeleteTasksQuery query = new DeleteTasksQuery().setUids(new int[] {1, 2})\nclient.deleteTasks(query);" + }, { "lang": "Ruby", "source": "client.delete_tasks(uids: [1, 2])" }, + { + "lang": "Go", + "source": "client.DeleteTaks(&meilisearch.DeleteTasksQuery{\n UIDS: []int64{1, 2},\n});" + }, + { + "lang": "C#", + "source": "await client.DeleteTasksAsync(new DeleteTasksQuery { Uids = new List { 1, 2 } });" + }, { "lang": "Rust", "source": "let mut query = tasks::TasksDeleteQuery::new(&client);\nquery.with_uids([1, 2]);\n\nlet res = client.delete_tasks_with(&query).await.unwrap();" }, { - "lang": "Swift", - "source": "client.deleteTasks(filter: DeleteTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.deleteTasks(params: DeleteTasksQuery(uids: [1, 2]));" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/tasks?uids=1,2'" + "lang": "Swift", + "source": "client.deleteTasks(filter: DeleteTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -13864,25 +13872,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.CancelTasksAsync(new CancelTasksQuery { Uids = new List { 1, 2 } });" - }, - { - "lang": "Dart", - "source": "await client.cancelTasks(params: CancelTasksQuery(uids: [1, 2]));" - }, - { - "lang": "Go", - "source": "client.CancelTasks(&meilisearch.CancelTasksQuery{\n UIDS: []int64{1, 2},\n});" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/tasks/cancel?uids=1,2'" }, { "lang": "JS", "source": "client.tasks.cancelTasks({ uids: [1, 2] })" }, - { - "lang": "Java", - "source": "CancelTasksQuery query = new CancelTasksQuery().setUids(new int[] {1, 2})\nclient.cancelTasks(query);" - }, { "lang": "PHP", "source": "$client->cancelTasks((new CancelTasksQuery())->setUids([1, 2]));" @@ -13891,21 +13887,33 @@ "lang": "Python", "source": "client.cancel_tasks({'uids': ['1', '2']})" }, + { + "lang": "Java", + "source": "CancelTasksQuery query = new CancelTasksQuery().setUids(new int[] {1, 2})\nclient.cancelTasks(query);" + }, { "lang": "Ruby", "source": "client.cancel_tasks(uids: [1, 2])" }, + { + "lang": "Go", + "source": "client.CancelTasks(&meilisearch.CancelTasksQuery{\n UIDS: []int64{1, 2},\n});" + }, + { + "lang": "C#", + "source": "await client.CancelTasksAsync(new CancelTasksQuery { Uids = new List { 1, 2 } });" + }, { "lang": "Rust", "source": "let mut query = tasks::TasksCancelQuery::new(&client);\nquery.with_uids([1, 2]);\n\nlet res = client.cancel_task_with(&query).await.unwrap();" }, { - "lang": "Swift", - "source": "client.cancelTasks(filter: CancelTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.cancelTasks(params: CancelTasksQuery(uids: [1, 2]));\nswap_indexes_1: \"await client.swapIndexes([\\n SwapIndex(['indexA', 'indexB']),\\n SwapIndex(['indexX', 'indexY']),\\n]);\"\nsearch_parameter_guide_hitsperpage_1: \"await client\\n .index('movies')\\n .search('', SearchQuery(hitsPerPage: 15))\\n .asPaginatedResult();\"\nsearch_parameter_guide_page_1: \"await client\\n .index('movies')\\n .search('', SearchQuery(page: 2))\\n .asPaginatedResult();\"\nsynonyms_guide_1: \"await client.index('movies').updateSynonyms({\\n 'great': ['fantastic'],\\n 'fantastic': ['great'],\\n});\"\ndate_guide_index_1: \"\\/\\/import 'dart:io';\\n\\/\\/import 'dart:convert';\\nfinal json = await File('games.json').readAsString();\\nawait client.index('games').addDocumentsJson(json);\"\ndate_guide_filterable_attributes_1: \"await client\\n .index('games')\\n .updateFilterableAttributes(['release_timestamp']);\"\ndate_guide_filter_1: \"await client.index('games').search(\\n '',\\n SearchQuery(\\n filterExpression: Meili.and([\\n Meili.gte(\\n 'release_timestamp'.toMeiliAttribute(),\\n Meili.value(DateTime(2017, 12, 31, 23, 0)),\\n ),\\n Meili.lt(\\n 'release_timestamp'.toMeiliAttribute(),\\n Meili.value(DateTime(2022, 12, 31, 23, 0)),\\n ),\\n ]),\\n ),\\n );\"\ndate_guide_sortable_attributes_1: \"await client\\n .index('games')\\n .updateSortableAttributes(['release_timestamp']);\"\ndate_guide_sort_1: \"await client\\n .index('games')\\n .search('', SearchQuery(sort: ['release_timestamp:desc']));\"" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/tasks/cancel?uids=1,2'" + "lang": "Swift", + "source": "client.cancelTasks(filter: CancelTasksQuery(uids: [1, 2])) { (result) in\n switch result {\n case .success(let taskInfo):\n print(taskInfo)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -13999,21 +14007,13 @@ ], "x-codeSamples": [ { - "lang": "Dart", - "source": "await client.getTask(1);" - }, - { - "lang": "Go", - "source": "client.GetTask(1);" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks/1'" }, { "lang": "JS", "source": "client.tasks.getTask(1)" }, - { - "lang": "Java", - "source": "client.getTask(1);" - }, { "lang": "PHP", "source": "$client->getTask(1);" @@ -14022,21 +14022,29 @@ "lang": "Python", "source": "client.get_task(1)" }, + { + "lang": "Java", + "source": "client.getTask(1);" + }, { "lang": "Ruby", "source": "client.task(1)" }, + { + "lang": "Go", + "source": "client.GetTask(1);" + }, { "lang": "Rust", "source": "let task: Task = client\n .get_task(1)\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.getTask(taskUid: 1) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" + "lang": "Dart", + "source": "await client.getTask(1);" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/tasks/1'" + "lang": "Swift", + "source": "client.getTask(taskUid: 1) { (result) in\n switch result {\n case .success(let task):\n print(task)\n case .failure(let error):\n print(error)\n }\n }" } ] } @@ -14092,25 +14100,13 @@ ], "x-codeSamples": [ { - "lang": "C#", - "source": "await client.GetVersionAsync();" - }, - { - "lang": "Dart", - "source": "await client.getVersion();" - }, - { - "lang": "Go", - "source": "client.GetVersion()" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/version'" }, { "lang": "JS", "source": "client.getVersion()" }, - { - "lang": "Java", - "source": "client.getVersion();" - }, { "lang": "PHP", "source": "$client->version();" @@ -14119,21 +14115,33 @@ "lang": "Python", "source": "client.get_version()" }, + { + "lang": "Java", + "source": "client.getVersion();" + }, { "lang": "Ruby", "source": "client.version" }, + { + "lang": "Go", + "source": "client.GetVersion()" + }, + { + "lang": "C#", + "source": "await client.GetVersionAsync();" + }, { "lang": "Rust", "source": "let version: Version = client\n .get_version()\n .await\n .unwrap();" }, { - "lang": "Swift", - "source": "client.version { (result) in\n switch result {\n case .success(let version):\n print(version)\n case .failure(let error):\n print(error)\n }\n}" + "lang": "Dart", + "source": "await client.getVersion();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/version'" + "lang": "Swift", + "source": "client.version { (result) in\n switch result {\n case .success(let version):\n print(version)\n case .failure(let error):\n print(error)\n }\n}" } ] } @@ -14203,8 +14211,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.ListWebhooks();" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks'" }, { "lang": "JS", @@ -14215,12 +14223,12 @@ "source": "client.get_webhooks()" }, { - "lang": "Rust", - "source": "let webhooks = client.get_webhooks().await.unwrap();" + "lang": "Go", + "source": "client.ListWebhooks();" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks'" + "lang": "Rust", + "source": "let webhooks = client.get_webhooks().await.unwrap();" } ] }, @@ -14292,8 +14300,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.AddWebhook(&meilisearch.AddWebhookRequest{\n URL: \"WEBHOOK_TARGET_URL\",\n Headers: map[string]string{\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n },\n});" + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/webhooks' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"WEBHOOK_TARGET_URL\",\n \"headers\": {\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n }\n }'" }, { "lang": "JS", @@ -14304,12 +14312,12 @@ "source": "client.create_webhook({\n 'url': 'https://example.com/webhook',\n 'headers': {\"Authorization\":\"\", \"X-Custom-Header\":\"test\"},\n})" }, { - "lang": "Rust", - "source": "let mut payload = meilisearch_sdk::webhooks::WebhookCreate::new(\"WEBHOOK_TARGET_URL\");\npayload\n .insert_header(\"authorization\", \"SECURITY_KEY\")\n .insert_header(\"referer\", \"https://example.com\");\nlet webhook = client.create_webhook(&payload).await.unwrap();" + "lang": "Go", + "source": "client.AddWebhook(&meilisearch.AddWebhookRequest{\n URL: \"WEBHOOK_TARGET_URL\",\n Headers: map[string]string{\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n },\n});" }, { - "lang": "cURL", - "source": "curl \\\n -X POST 'MEILISEARCH_URL/webhooks' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"url\": \"WEBHOOK_TARGET_URL\",\n \"headers\": {\n \"authorization\": \"SECURITY_KEY\",\n \"referer\": \"https://example.com\"\n }\n }'" + "lang": "Rust", + "source": "let mut payload = meilisearch_sdk::webhooks::WebhookCreate::new(\"WEBHOOK_TARGET_URL\");\npayload\n .insert_header(\"authorization\", \"SECURITY_KEY\")\n .insert_header(\"referer\", \"https://example.com\");\nlet webhook = client.create_webhook(&payload).await.unwrap();" } ] } @@ -14386,8 +14394,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.GetWebhook(\"WEBHOOK_UUID\");" + "lang": "cURL", + "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID'" }, { "lang": "JS", @@ -14398,12 +14406,12 @@ "source": "client.get_webhook('WEBHOOK_UID')" }, { - "lang": "Rust", - "source": "let webhook = client.get_webhook(\"WEBHOOK_UUID\").await.unwrap();" + "lang": "Go", + "source": "client.GetWebhook(\"WEBHOOK_UUID\");" }, { - "lang": "cURL", - "source": "curl \\\n -X GET 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID'" + "lang": "Rust", + "source": "let webhook = client.get_webhook(\"WEBHOOK_UUID\").await.unwrap();" } ] }, @@ -14462,8 +14470,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.DeleteWebhook(\"WEBHOOK_UUID\");" + "lang": "cURL", + "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID'" }, { "lang": "JS", @@ -14474,12 +14482,12 @@ "source": "client.delete_webhook('WEBHOOK_UID')" }, { - "lang": "Rust", - "source": "client.delete_webhook(\"WEBHOOK_UUID\").await.unwrap();" + "lang": "Go", + "source": "client.DeleteWebhook(\"WEBHOOK_UUID\");" }, { - "lang": "cURL", - "source": "curl \\\n -X DELETE 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID'" + "lang": "Rust", + "source": "client.delete_webhook(\"WEBHOOK_UUID\").await.unwrap();" } ] }, @@ -14563,8 +14571,8 @@ ], "x-codeSamples": [ { - "lang": "Go", - "source": "client.UpdateWebhook(\"WEBHOOK_UUID\", &meilisearch.UpdateWebhookRequest{\n Header: map[string]string{\n \"referer\": \"\"\n },\n});" + "lang": "cURL", + "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"header\": {\n \"referer\": null\n }\n }'" }, { "lang": "JS", @@ -14575,12 +14583,12 @@ "source": "client.update_webhook('WEBHOOK_UID', {\n 'url': 'https://example.com/new-webhook',\n 'headers': {\"Authorization\":\"\", \"X-Custom-Header\":\"test\"},\n})" }, { - "lang": "Rust", - "source": "let mut update = meilisearch_sdk::webhooks::WebhookUpdate::new();\nupdate.remove_header(\"referer\");\nlet webhook = client\n .update_webhook(\"WEBHOOK_UUID\", &update)\n .await\n .unwrap();" + "lang": "Go", + "source": "client.UpdateWebhook(\"WEBHOOK_UUID\", &meilisearch.UpdateWebhookRequest{\n Header: map[string]string{\n \"referer\": \"\"\n },\n});" }, { - "lang": "cURL", - "source": "curl \\\n -X PATCH 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID' \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\n \"header\": {\n \"referer\": null\n }\n }'" + "lang": "Rust", + "source": "let mut update = meilisearch_sdk::webhooks::WebhookUpdate::new();\nupdate.remove_header(\"referer\");\nlet webhook = client\n .update_webhook(\"WEBHOOK_UUID\", &update)\n .await\n .unwrap();" } ] } @@ -20037,4 +20045,4 @@ } } ] -} \ No newline at end of file +} diff --git a/package.json b/package.json index 88b14ba6d..2dff49b55 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "markdownlint-cli": "^0.47.0" }, "scripts": { + "generate-mintlify-openapi": "node scripts/generate-mintlify-openapi.mjs", "marklint": "markdownlint '**/*.mdx' --config .markdownlint.jsonc", "marklint:fix": "markdownlint '**/*.mdx' --config .markdownlint.jsonc --fix", "proselint": "vale --glob='!.github/*' ." diff --git a/scripts/generate-mintlify-openapi.mjs b/scripts/generate-mintlify-openapi.mjs new file mode 100644 index 000000000..fce1ba2ac --- /dev/null +++ b/scripts/generate-mintlify-openapi.mjs @@ -0,0 +1,377 @@ +#!/usr/bin/env node + +/** + * Generates a Mintlify-ready OpenAPI file from assets/open-api/meilisearch-openapi.json. + * + * - Fetches code samples from the docs repo and SDK repos (.code-samples.meilisearch.yaml), + * maps them to OpenAPI operation keys (e.g. get_indexes), and injects x-codeSamples. + * - Removes null or "null" description fields in tags (and nested objects) for Mintlify. + * + * Output: assets/open-api/meilisearch-openapi-mintlify.json + * + * Optional: set GITHUB_PAT or GH_TOKEN for higher rate limits when fetching SDK samples. + */ + +import fs from "fs"; +import path from "path"; +import { fileURLToPath } from "url"; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const REPO_ROOT = path.resolve(__dirname, ".."); +const OPENAPI_DIR = path.join(REPO_ROOT, "assets", "open-api"); +const SOURCE_OPENAPI = path.join(OPENAPI_DIR, "meilisearch-openapi.json"); +const TARGET_OPENAPI = path.join(OPENAPI_DIR, "meilisearch-openapi-mintlify.json"); +const LOCAL_CODE_SAMPLES = path.join(REPO_ROOT, ".code-samples.meilisearch.yaml"); + +const HTTP_METHODS = ["get", "post", "put", "patch", "delete"]; + +const CODE_SAMPLES_ORDER = [ + "cURL", + "JS", + "PHP", + "Python", + "Java", + "Ruby", + "Go", + "C#", + "Rust", + "Dart", + "Swift", +]; + +const DOCS_LANG = "cURL"; + +const CODE_SAMPLES_SOURCES = [ + { + url: "https://raw.githubusercontent.com/meilisearch/documentation/refs/heads/main/.code-samples.meilisearch.yaml", + lang: "cURL", + }, + { + url: "https://raw.githubusercontent.com/meilisearch/meilisearch-dotnet/refs/heads/main/.code-samples.meilisearch.yaml", + lang: "C#", + }, + { + url: "https://raw.githubusercontent.com/meilisearch/meilisearch-dart/refs/heads/main/.code-samples.meilisearch.yaml", + lang: "Dart", + }, + { + url: "https://raw.githubusercontent.com/meilisearch/meilisearch-go/refs/heads/main/.code-samples.meilisearch.yaml", + lang: "Go", + }, + { + url: "https://raw.githubusercontent.com/meilisearch/meilisearch-java/refs/heads/main/.code-samples.meilisearch.yaml", + lang: "Java", + }, + { + url: "https://raw.githubusercontent.com/meilisearch/meilisearch-js/refs/heads/main/.code-samples.meilisearch.yaml", + lang: "JS", + }, + { + url: "https://raw.githubusercontent.com/meilisearch/meilisearch-php/refs/heads/main/.code-samples.meilisearch.yaml", + lang: "PHP", + }, + { + url: "https://raw.githubusercontent.com/meilisearch/meilisearch-python/refs/heads/main/.code-samples.meilisearch.yaml", + lang: "Python", + }, + { + url: "https://raw.githubusercontent.com/meilisearch/meilisearch-ruby/refs/heads/main/.code-samples.meilisearch.yaml", + lang: "Ruby", + }, + { + url: "https://raw.githubusercontent.com/meilisearch/meilisearch-rust/refs/heads/main/.code-samples.meilisearch.yaml", + lang: "Rust", + }, + { + url: "https://raw.githubusercontent.com/meilisearch/meilisearch-swift/refs/heads/main/.code-samples.meilisearch.yaml", + lang: "Swift", + }, +]; + +function getHeaders() { + const token = process.env.GITHUB_PAT || process.env.GH_TOKEN; + const headers = {}; + if (token) headers.Authorization = `Bearer ${token}`; + return headers; +} + +async function fetchUrl(url) { + const res = await fetch(url, { headers: getHeaders() }); + if (!res.ok) { + throw new Error(`Failed to fetch ${url}: ${res.status} ${res.statusText}`); + } + return res.text(); +} + +function isHttpMethodPrefixed(word) { + return HTTP_METHODS.some( + (method) => word.startsWith(method) && word.slice(method.length).startsWith("_") + ); +} + +/** + * Builds mapping from OpenAPI key (e.g. get_indexes) to code sample ID (e.g. list_all_indexes_1) + * from the documentation .code-samples file. + * Lines starting with "# " (hash + space), single word (no spaces) starting with HTTP method + underscore. + * Next line: first word before ":" is the sample ID. Only first match per key. + */ +function buildOpenapiKeyMapping(content) { + const mapping = new Map(); + const lines = content.split(/\r?\n/); + + for (let i = 0; i < lines.length - 1; i++) { + const line = lines[i]; + const nextLine = lines[i + 1]; + + const afterHash = line.startsWith("# ") ? line.slice(2).trim() : null; + if (afterHash == null) continue; + if (afterHash.includes(" ") || !isHttpMethodPrefixed(afterHash)) continue; + + const sampleId = nextLine.split(":")[0]?.trim(); + if (!sampleId) continue; + + if (!mapping.has(afterHash)) { + mapping.set(afterHash, sampleId); + } + } + + return mapping; +} + +/** + * Parses code samples from a YAML-like file. + * Sample: line containing ": |-", ID is first word before ":". + * Value: lines until next ": |-" or line starting with "#" at column 0 or EOF. + * Dedent by first line's indentation. + */ +function parseCodeSamplesFromFile(content) { + const samples = new Map(); + let currentSampleId = null; + const currentLines = []; + let baseIndent = null; + + const flush = () => { + if (currentSampleId) { + const value = currentLines.join("\n").trimEnd(); + samples.set(currentSampleId, value); + } + currentSampleId = null; + currentLines.length = 0; + baseIndent = null; + }; + + for (const line of content.split(/\r?\n/)) { + if (line.includes(": |-")) { + flush(); + const id = line.split(":")[0]?.trim(); + if (id) currentSampleId = id; + continue; + } + + if (line.startsWith("#")) { + flush(); + continue; + } + + if (currentSampleId != null) { + if (line.trim() === "") { + if (currentLines.length > 0) currentLines.push(""); + continue; + } + const indent = line.length - line.trimStart().length; + if (baseIndent == null) baseIndent = indent; + const dedented = indent >= baseIndent ? line.slice(baseIndent) : line.trimStart(); + currentLines.push(dedented); + } + } + + // Save last sample + if (currentSampleId) { + const value = currentLines.join("\n").trimEnd(); + samples.set(currentSampleId, value); + } + + return samples; +} + +function toCamelCase(s) { + return s.replace(/_([a-z])/g, (_, c) => c.toUpperCase()); +} + +/** + * OpenAPI path + method -> code sample key. + * e.g. /indexes/{index_uid}/documents, GET -> get_indexes_indexUid_documents + */ +function pathToKey(pathStr, method) { + const methodLower = method.toLowerCase(); + const segments = pathStr + .replace(/^\//, "") + .split("/") + .map((seg) => { + if (seg.startsWith("{") && seg.endsWith("}")) { + const param = seg.slice(1, -1); + return toCamelCase(param); + } + return seg.replace(/-/g, "_"); + }); + const pathPart = segments.join("_"); + return pathPart ? `${methodLower}_${pathPart}` : methodLower; +} + +/** + * Fetches all code samples and returns a Map: openapiKey -> [{ lang, source }, ...] + */ +async function fetchAllCodeSamples(options = {}) { + const { debug = false } = options; + + // Documentation repo (cURL): always use local .code-samples.meilisearch.yaml + if (!fs.existsSync(LOCAL_CODE_SAMPLES)) { + throw new Error( + `Local code samples file not found: ${LOCAL_CODE_SAMPLES}. Run this script from the documentation repository root.` + ); + } + const docsContent = fs.readFileSync(LOCAL_CODE_SAMPLES, "utf8"); + + const openapiKeyToSampleId = buildOpenapiKeyMapping(docsContent); + const allSamples = new Map(); // openapiKey -> [{ lang, source }] + + for (const { url, lang } of CODE_SAMPLES_SOURCES) { + let content; + if (lang === DOCS_LANG) { + content = docsContent; + } else { + try { + content = await fetchUrl(url); + } catch (err) { + console.warn(`Warning: Failed to fetch code samples for ${lang}: ${err.message}`); + continue; + } + } + + const sampleIdToCode = parseCodeSamplesFromFile(content); + for (const [openapiKey, sampleId] of openapiKeyToSampleId) { + const source = sampleIdToCode.get(sampleId); + if (source !== undefined) { + if (!allSamples.has(openapiKey)) allSamples.set(openapiKey, []); + allSamples.get(openapiKey).push({ lang, source }); + } + } + } + + if (debug) { + console.error("\n=== OpenAPI Key to Sample ID Mapping ===\n"); + for (const key of [...openapiKeyToSampleId.keys()].sort()) { + console.error(` ${key} -> ${openapiKeyToSampleId.get(key)}`); + } + console.error("\n=== Code Samples ===\n"); + for (const key of [...allSamples.keys()].sort()) { + const langs = allSamples.get(key).map((s) => s.lang); + console.error(` ${key} -> ${langs.join(", ")}`); + } + } + + return allSamples; +} + +function addCodeSamplesToOpenapi(openapi, codeSamples, options = {}) { + const { debug = false } = options; + const paths = openapi.paths; + if (!paths || typeof paths !== "object") throw new Error("OpenAPI spec missing 'paths' object"); + + const routesWithSamples = []; + const routesWithoutSamples = []; + + for (const [pathStr, pathItem] of Object.entries(paths)) { + if (pathItem == null || typeof pathItem !== "object") continue; + + for (const method of HTTP_METHODS) { + const operation = pathItem[method]; + if (operation == null) continue; + + const key = pathToKey(pathStr, method); + const samples = codeSamples.get(key); + + if (samples && samples.length > 0) { + routesWithSamples.push(key); + const sorted = [...samples].sort((a, b) => { + const posA = CODE_SAMPLES_ORDER.indexOf(a.lang); + const posB = CODE_SAMPLES_ORDER.indexOf(b.lang); + const idxA = posA === -1 ? CODE_SAMPLES_ORDER.length : posA; + const idxB = posB === -1 ? CODE_SAMPLES_ORDER.length : posB; + return idxA - idxB || a.lang.localeCompare(b.lang); + }); + operation["x-codeSamples"] = sorted.map(({ lang, source }) => ({ lang, source })); + } else { + routesWithoutSamples.push(key); + } + } + } + + if (debug) { + routesWithoutSamples.sort(); + if (routesWithoutSamples.length > 0) { + console.error("=== Routes without code samples ===\n"); + routesWithoutSamples.forEach((k) => console.error(` ${k}`)); + } + const total = + routesWithSamples.length + routesWithoutSamples.length; + const pct = total > 0 ? ((routesWithSamples.length / total) * 100).toFixed(1) : "0"; + console.error("\n=== Summary ===\n"); + console.error(` Total routes: ${total}`); + console.error(` With code samples: ${routesWithSamples.length} (${pct}%)`); + console.error(` Missing code samples: ${routesWithoutSamples.length}\n`); + } +} + +function removeNullDescriptionsRecursive(value) { + if (value && typeof value === "object" && !Array.isArray(value)) { + if ("description" in value) { + const d = value.description; + if (d == null || (typeof d === "string" && d === "null")) { + delete value.description; + } + } + for (const k of Object.keys(value)) { + removeNullDescriptionsRecursive(value[k]); + } + } else if (Array.isArray(value)) { + value.forEach(removeNullDescriptionsRecursive); + } +} + +function cleanNullDescriptions(openapi) { + const tags = openapi.tags; + if (Array.isArray(tags)) { + tags.forEach(removeNullDescriptionsRecursive); + } +} + +async function main() { + const debug = process.argv.includes("--debug"); + + if (!fs.existsSync(SOURCE_OPENAPI)) { + throw new Error(`Source OpenAPI file not found: ${SOURCE_OPENAPI}`); + } + + console.log("Reading OpenAPI spec..."); + const openapi = JSON.parse(fs.readFileSync(SOURCE_OPENAPI, "utf8")); + + console.log("Fetching code samples..."); + const codeSamples = await fetchAllCodeSamples({ debug }); + addCodeSamplesToOpenapi(openapi, codeSamples, { debug }); + + console.log("Cleaning null descriptions for Mintlify..."); + cleanNullDescriptions(openapi); + + if (!fs.existsSync(OPENAPI_DIR)) { + fs.mkdirSync(OPENAPI_DIR, { recursive: true }); + } + + fs.writeFileSync(TARGET_OPENAPI, JSON.stringify(openapi, null, 2), "utf8"); + console.log(`Written: ${TARGET_OPENAPI}`); +} + +main().catch((err) => { + console.error(err); + process.exit(1); +}); From 8bd663c316014a5ed2eaff3c924f90399d3c4476 Mon Sep 17 00:00:00 2001 From: curquiza Date: Fri, 13 Feb 2026 18:53:03 +0100 Subject: [PATCH 37/45] Add script to package.json --- .github/workflows/docs-sdk-code-samples-check.yml | 6 +++--- .github/workflows/openapi-code-samples-check.yml | 4 ++-- .github/workflows/post-deployment.yml | 4 ++-- package.json | 6 ++++++ 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docs-sdk-code-samples-check.yml b/.github/workflows/docs-sdk-code-samples-check.yml index 701c2cd6c..4eef0e996 100644 --- a/.github/workflows/docs-sdk-code-samples-check.yml +++ b/.github/workflows/docs-sdk-code-samples-check.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v6 - name: Check local code samples are used - run: node scripts/check-code-samples-usage.mjs + run: npm run check-code-samples-usage # Fails if an SDK's .code-samples.meilisearch.yaml contains keys absent from # the local .code-samples.meilisearch.yaml (those SDK samples are useless). @@ -34,7 +34,7 @@ jobs: run: npm ci - name: Check for unused SDK code samples - run: node scripts/check-unused-sdk-samples.mjs + run: npm run check-unused-sdk-samples # Informational only – this job never fails. # Lists code sample keys referenced by CodeSamples* imports in the docs that are missing from each SDK. @@ -48,4 +48,4 @@ jobs: run: npm ci - name: List missing SDK code samples (informational, never fails) - run: node scripts/check-missing-sdk-samples.mjs + run: npm run check-missing-sdk-samples diff --git a/.github/workflows/openapi-code-samples-check.yml b/.github/workflows/openapi-code-samples-check.yml index 9c3112326..066a1bddc 100644 --- a/.github/workflows/openapi-code-samples-check.yml +++ b/.github/workflows/openapi-code-samples-check.yml @@ -19,7 +19,7 @@ jobs: - name: Check routes have cURL in x-codeSamples run: | - node scripts/check-openapi-code-samples.mjs curl-check assets/open-api/meilisearch-openapi-mintlify.json + npm run check-openapi-code-samples -- curl-check assets/open-api/meilisearch-openapi-mintlify.json # Informational only: list routes and missing code sample languages. # This job never fails the workflow (information check only). @@ -31,4 +31,4 @@ jobs: - name: List routes and missing code samples (informational, never fails) run: | - node scripts/check-openapi-code-samples.mjs info assets/open-api/meilisearch-openapi-mintlify.json || true + npm run check-openapi-code-samples -- info assets/open-api/meilisearch-openapi-mintlify.json || true diff --git a/.github/workflows/post-deployment.yml b/.github/workflows/post-deployment.yml index fdc27efbc..d4f3d77ab 100644 --- a/.github/workflows/post-deployment.yml +++ b/.github/workflows/post-deployment.yml @@ -36,7 +36,7 @@ jobs: run: npm install - name: Generate code sample snippets - run: node scripts/generate-code-sample-snippets.mjs + run: npm run generate-code-sample-snippets - name: Check for changes id: changes @@ -82,7 +82,7 @@ jobs: uses: actions/setup-node@v6 - name: Fetch latest meilisearch-openapi.json from Meilisearch release - run: node scripts/fetch-meilisearch-openapi-file.mjs + run: npm run fetch-meilisearch-openapi - name: Check for changes id: openapi_changes diff --git a/package.json b/package.json index 2dff49b55..ad6c8052e 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,12 @@ }, "scripts": { "generate-mintlify-openapi": "node scripts/generate-mintlify-openapi.mjs", + "fetch-meilisearch-openapi": "node scripts/fetch-meilisearch-openapi-file.mjs", + "generate-code-sample-snippets": "node scripts/generate-code-sample-snippets.mjs", + "check-unused-sdk-samples": "node scripts/check-unused-sdk-samples.mjs", + "check-openapi-code-samples": "node scripts/check-openapi-code-samples.mjs", + "check-missing-sdk-samples": "node scripts/check-missing-sdk-samples.mjs", + "check-code-samples-usage": "node scripts/check-code-samples-usage.mjs", "marklint": "markdownlint '**/*.mdx' --config .markdownlint.jsonc", "marklint:fix": "markdownlint '**/*.mdx' --config .markdownlint.jsonc --fix", "proselint": "vale --glob='!.github/*' ." From b4bf130db94077303cb1cde9aebd1ff74b8de9f7 Mon Sep 17 00:00:00 2001 From: curquiza Date: Fri, 13 Feb 2026 18:59:49 +0100 Subject: [PATCH 38/45] Fix code samples import --- reference/api/authorization.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/api/authorization.mdx b/reference/api/authorization.mdx index a4a954fef..0cc77f9a5 100644 --- a/reference/api/authorization.mdx +++ b/reference/api/authorization.mdx @@ -4,8 +4,8 @@ sidebarTitle: Authorization description: How to authenticate with the Meilisearch API using API keys and the Authorization header. --- -import CodeSamplesAuthorizationHeader1 from '/snippets/samples/code_samples_authorization_header_1.mdx'; -import CodeSamplesUpdatingGuideCheckVersionOldAuthorizationHeader from '/snippets/samples/code_samples_updating_guide_check_version_old_authorization_header.mdx'; +import CodeSamplesAuthorizationHeader1 from '/snippets/generated-code-samples/code_samples_authorization_header_1.mdx'; +import CodeSamplesUpdatingGuideCheckVersionOldAuthorizationHeader from '/snippets/generated-code-samples/code_samples_updating_guide_check_version_old_authorization_header.mdx'; If you are new to Meilisearch, check out the [getting started guide](/learn/self_hosted/getting_started_with_self_hosted_meilisearch). From 79c8b0f50e8c6a1f6298791d96ebd51821bb8309 Mon Sep 17 00:00:00 2001 From: curquiza Date: Fri, 13 Feb 2026 19:14:15 +0100 Subject: [PATCH 39/45] Rename script --- .github/workflows/post-deployment.yml | 4 ++-- package.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/post-deployment.yml b/.github/workflows/post-deployment.yml index d4f3d77ab..04727ec86 100644 --- a/.github/workflows/post-deployment.yml +++ b/.github/workflows/post-deployment.yml @@ -36,7 +36,7 @@ jobs: run: npm install - name: Generate code sample snippets - run: npm run generate-code-sample-snippets + run: npm run generate-code-sample-snippets-file - name: Check for changes id: changes @@ -82,7 +82,7 @@ jobs: uses: actions/setup-node@v6 - name: Fetch latest meilisearch-openapi.json from Meilisearch release - run: npm run fetch-meilisearch-openapi + run: npm run fetch-meilisearch-openapi-file - name: Check for changes id: openapi_changes diff --git a/package.json b/package.json index ad6c8052e..ec540597b 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,9 @@ "markdownlint-cli": "^0.47.0" }, "scripts": { - "generate-mintlify-openapi": "node scripts/generate-mintlify-openapi.mjs", - "fetch-meilisearch-openapi": "node scripts/fetch-meilisearch-openapi-file.mjs", - "generate-code-sample-snippets": "node scripts/generate-code-sample-snippets.mjs", + "generate-mintlify-openapi-file": "node scripts/generate-mintlify-openapi.mjs", + "fetch-meilisearch-openapi-file": "node scripts/fetch-meilisearch-openapi-file.mjs", + "generate-code-sample-snippets-file": "node scripts/generate-code-sample-snippets.mjs", "check-unused-sdk-samples": "node scripts/check-unused-sdk-samples.mjs", "check-openapi-code-samples": "node scripts/check-openapi-code-samples.mjs", "check-missing-sdk-samples": "node scripts/check-missing-sdk-samples.mjs", From 49fd96fbfacdfde9df76c06f179f40abea8fa542 Mon Sep 17 00:00:00 2001 From: curquiza Date: Fri, 13 Feb 2026 19:14:24 +0100 Subject: [PATCH 40/45] Add new openAPI files --- .../meilisearch-openapi-mintlify.json | 672 ++++++++++++++---- assets/open-api/meilisearch-openapi.json | 664 +++++++++++++---- 2 files changed, 1037 insertions(+), 299 deletions(-) diff --git a/assets/open-api/meilisearch-openapi-mintlify.json b/assets/open-api/meilisearch-openapi-mintlify.json index baff46e9a..dfe9c52b3 100644 --- a/assets/open-api/meilisearch-openapi-mintlify.json +++ b/assets/open-api/meilisearch-openapi-mintlify.json @@ -15,7 +15,7 @@ }, "servers": [ { - "url": "/", + "url": "http://localhost:7700", "description": "Local server" } ], @@ -23,16 +23,16 @@ "/batches": { "get": { "tags": [ - "Batches" + "Async task management" ], - "summary": "Get batches", - "description": "List all batches, regardless of index. The batch objects are contained in\nthe results array. Batches are always returned in descending order of uid.\nThis means that by default, the most recently created batch objects appear\nfirst. Batch results are paginated and can be filtered with query\nparameters.", + "summary": "List batches", + "description": "The `/batches` route gives information about the progress of batches of [asynchronous operations](/learn/async/asynchronous_operations).\n\nBatches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first. Batch results are paginated and can be filtered with query parameters.", "operationId": "get_batches", "parameters": [ { "name": "limit", "in": "query", - "description": "Maximum number of results to return.", + "description": "Maximum number of batches to return", "required": false, "schema": { "type": "integer", @@ -45,7 +45,7 @@ { "name": "from", "in": "query", - "description": "Fetch the next set of results from the given uid.", + "description": "`uid` of the first batch returned", "required": false, "schema": { "type": "integer", @@ -57,7 +57,7 @@ { "name": "reverse", "in": "query", - "description": "The order you want to retrieve the objects.", + "description": "If `true`, returns results in the reverse order, from oldest to most recent", "required": false, "schema": { "type": "boolean" @@ -259,10 +259,10 @@ "finishedAt": "2024-12-10T15:49:05.105404Z" } ], - "total": 3, - "limit": 1, - "from": 2, - "next": 1 + "total": 1, + "limit": 20, + "from": 1, + "next": null } } } @@ -328,10 +328,10 @@ "/batches/{batchUid}": { "get": { "tags": [ - "Batches" + "Async task management" ], - "summary": "Get one batch", - "description": "Get a single batch.", + "summary": "Get batch", + "description": "Get a single batch by its unique identifier.\n\nThe `/batches` route gives information about the progress of batches of [asynchronous operations](/learn/async/asynchronous_operations).", "operationId": "get_batch", "parameters": [ { @@ -354,7 +354,7 @@ "$ref": "#/components/schemas/BatchView" }, "example": { - "uid": 1, + "uid": 0, "details": { "receivedDocuments": 1, "indexedDocuments": 1 @@ -441,9 +441,9 @@ "/dumps": { "post": { "tags": [ - "Dumps" + "Backups" ], - "summary": "Create a dump", + "summary": "Create dump", "description": "Triggers a dump creation process. Once the process is complete, a dump is created in the\n[dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory).\nIf the dump directory does not exist yet, it will be created.", "operationId": "create_dump", "responses": { @@ -543,7 +543,7 @@ "tags": [ "Experimental features" ], - "summary": "Get all experimental features", + "summary": "List experimental features", "description": "Get a list of all experimental features that can be activated via the\n/experimental-features route and whether or not they are currently\nactivated.", "operationId": "get_features", "responses": { @@ -693,7 +693,7 @@ "/export": { "post": { "tags": [ - "Export" + "Documents" ], "summary": "Export to a remote Meilisearch", "description": "Triggers an export process to a remote Meilisearch instance. This allows you to send\ndocuments and settings from the current instance to another Meilisearch server.", @@ -767,7 +767,7 @@ "tags": [ "Health" ], - "summary": "Get Health", + "summary": "Get health", "description": "The health check endpoint enables you to periodically test the health of\nyour Meilisearch instance.", "operationId": "get_health", "responses": { @@ -1432,9 +1432,9 @@ "/indexes/{indexUid}/compact": { "post": { "tags": [ - "Compact an index" + "Indexes" ], - "summary": "Compact an index", + "summary": "Compact index", "description": "Triggers a compaction process on the specified index. Compaction reorganizes the index database to make it smaller and more efficient.", "operationId": "compact", "parameters": [ @@ -1529,7 +1529,7 @@ "tags": [ "Documents" ], - "summary": "Get documents", + "summary": "List documents with GET", "description": "Get documents by batches.", "operationId": "get_documents", "parameters": [ @@ -2392,7 +2392,7 @@ "tags": [ "Documents" ], - "summary": "Edit documents by function.", + "summary": "Edit documents by function", "description": "Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to\nedit one or more documents directly in Meilisearch.", "operationId": "edit_documents_by_function", "parameters": [ @@ -2473,7 +2473,7 @@ "tags": [ "Documents" ], - "summary": "Get documents with POST", + "summary": "List documents with POST", "description": "Get a set of documents.", "operationId": "documents_by_query_post", "parameters": [ @@ -2607,7 +2607,7 @@ "tags": [ "Documents" ], - "summary": "Get one document", + "summary": "Get document", "description": "Get one document from its primary key.", "operationId": "get_document", "parameters": [ @@ -2758,7 +2758,7 @@ "tags": [ "Documents" ], - "summary": "Delete a document", + "summary": "Delete document", "description": "Delete a single document by id.", "operationId": "delete_document", "parameters": [ @@ -2880,7 +2880,7 @@ "tags": [ "Facet Search" ], - "summary": "Perform a facet search", + "summary": "Search in facets", "description": "Search for a facet value within a given facet.", "operationId": "search", "parameters": [ @@ -3020,13 +3020,156 @@ ] } }, + "/indexes/{indexUid}/fields": { + "post": { + "tags": [ + "Indexes" + ], + "summary": "List index fields", + "description": "Returns a paginated list of fields in the index with their metadata: whether they are displayed, searchable, sortable, filterable, distinct, have a custom ranking rule (asc/desc), and for filterable fields the sort order for facet values.", + "operationId": "post_index_fields", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Unique identifier of the index whose fields to list", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListFields" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationView_Field" + }, + "example": { + "results": [ + { + "name": "title", + "displayed": { + "enabled": true + }, + "searchable": { + "enabled": true + }, + "sortable": { + "enabled": true + }, + "distinct": { + "enabled": false + }, + "rankingRule": { + "enabled": false, + "order": null + }, + "filterable": { + "enabled": false, + "sortBy": "count", + "facetSearch": false, + "equality": false, + "comparison": false + }, + "localized": { + "locales": [] + } + }, + { + "name": "genre", + "displayed": { + "enabled": true + }, + "searchable": { + "enabled": false + }, + "sortable": { + "enabled": false + }, + "distinct": { + "enabled": false + }, + "rankingRule": { + "enabled": false, + "order": null + }, + "filterable": { + "enabled": true, + "sortBy": "alpha", + "facetSearch": true, + "equality": true, + "comparison": false + }, + "localized": { + "locales": [] + } + } + ], + "offset": 0, + "limit": 20, + "total": 2 + } + } + } + }, + "401": { + "description": "Missing or invalid authorization header", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "fields.post", + "fields.*", + "*" + ] + } + ], + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl \\\n -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/fields' \\\n -H 'Content-Type: application/json'" + } + ] + } + }, "/indexes/{indexUid}/search": { "get": { "tags": [ - "Indexes", "Search" ], - "summary": "Search an index with GET", + "summary": "Search with GET", "description": "Search for documents matching a specific query in the given index.", "operationId": "search_with_url_query", "parameters": [ @@ -3440,7 +3583,6 @@ }, "post": { "tags": [ - "Indexes", "Search" ], "summary": "Search with POST", @@ -3596,7 +3738,7 @@ "tags": [ "Settings" ], - "summary": "All settings", + "summary": "List settings", "description": "This route allows you to retrieve, configure, or reset all of an index's settings at once.", "operationId": "get_all", "parameters": [ @@ -11578,8 +11720,8 @@ "tags": [ "Keys" ], - "summary": "Get API Keys", - "description": "List all API Keys", + "summary": "List API keys", + "description": "List all API keys", "operationId": "list_api_keys", "parameters": [ { @@ -11715,7 +11857,7 @@ "tags": [ "Keys" ], - "summary": "Create an API Key", + "summary": "Create API key", "description": "Create an API Key.", "operationId": "create_api_key", "requestBody": { @@ -11829,7 +11971,7 @@ "tags": [ "Keys" ], - "summary": "Get an API Key", + "summary": "Get API key", "description": "Get an API key from its `uid` or its `key` field.", "operationId": "get_api_key", "parameters": [ @@ -11948,7 +12090,7 @@ "tags": [ "Keys" ], - "summary": "Delete a key", + "summary": "Delete API key", "description": "Delete the specified API key.", "operationId": "delete_api_key", "parameters": [ @@ -12045,7 +12187,7 @@ "tags": [ "Keys" ], - "summary": "Update a Key", + "summary": "Update API key", "description": "Update the name and description of an API key. Updates to keys are partial.\nThis means you should provide only the fields you intend to update, as any\nfields not present in the payload will remain unchanged.", "operationId": "patch_api_key", "parameters": [ @@ -12170,7 +12312,7 @@ "/logs/stderr": { "post": { "tags": [ - "Logs" + "Experimental features" ], "summary": "Update target of the console logs", "description": "This route lets you specify at runtime the level of the console logs\noutputted on stderr.", @@ -12226,7 +12368,7 @@ "/logs/stream": { "post": { "tags": [ - "Logs" + "Experimental features" ], "summary": "Retrieve logs", "description": "Stream logs over HTTP. The format of the logs depends on the\nconfiguration specified in the payload. The logs are sent as multi-part,\nand the stream never stops, so make sure your clients correctly handle\nthat. To make the server stop sending you logs, you can call the `DELETE\n/logs/stream` route.\n\nThere can only be one listener at a timeand an error will be returned if\nyou call this route while it's being used by another client.", @@ -12304,7 +12446,7 @@ }, "delete": { "tags": [ - "Logs" + "Experimental features" ], "summary": "Stop retrieving logs", "description": "Call this route to make the engine stops sending logs through the `POST\n/logs/stream` route.", @@ -12404,7 +12546,7 @@ "/multi-search": { "post": { "tags": [ - "Multi-search" + "Search" ], "summary": "Perform a multi-search", "description": "Bundle multiple search queries in a single API request. Use this endpoint\nto search through multiple indexes at once.", @@ -12525,7 +12667,7 @@ "/network": { "get": { "tags": [ - "Network" + "Experimental features" ], "summary": "Get network topology", "description": "Get a list of all Meilisearch instances currently known to this instance.", @@ -12611,9 +12753,9 @@ }, "patch": { "tags": [ - "Network" + "Experimental features" ], - "summary": "Configure Network", + "summary": "Configure network topology", "description": "Add or remove nodes from network.", "operationId": "patch_network", "requestBody": { @@ -12709,9 +12851,9 @@ "/snapshots": { "post": { "tags": [ - "Snapshots" + "Backups" ], - "summary": "Create a snapshot", + "summary": "Create snapshot", "description": "Triggers a snapshot creation process. Once the process is complete, a snapshot is created in the snapshot directory. If the snapshot directory does not exist yet, it will be created.", "operationId": "create_snapshot", "responses": { @@ -12807,7 +12949,7 @@ "tags": [ "Stats" ], - "summary": "Get stats of all indexes.", + "summary": "Get stats of all indexes", "description": "Get stats of all indexes.", "operationId": "get_stats", "responses": { @@ -13024,16 +13166,16 @@ "/tasks": { "get": { "tags": [ - "Tasks" + "Async task management" ], - "summary": "Get all tasks", + "summary": "List tasks", "description": "Get all [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)", "operationId": "get_tasks", "parameters": [ { "name": "limit", "in": "query", - "description": "Maximum number of results to return.", + "description": "Maximum number of batches to return", "required": false, "schema": { "type": "integer", @@ -13046,7 +13188,7 @@ { "name": "from", "in": "query", - "description": "Fetch the next set of results from the given uid.", + "description": "`uid` of the first batch returned", "required": false, "schema": { "type": "integer", @@ -13058,7 +13200,7 @@ { "name": "reverse", "in": "query", - "description": "The order you want to retrieve the objects.", + "description": "If `true`, returns results in the reverse order, from oldest to most recent", "required": false, "schema": { "type": "boolean" @@ -13327,7 +13469,7 @@ }, "delete": { "tags": [ - "Tasks" + "Async task management" ], "summary": "Delete tasks", "description": "Delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) on filter", @@ -13624,7 +13766,7 @@ "/tasks/cancel": { "post": { "tags": [ - "Tasks" + "Async task management" ], "summary": "Cancel tasks", "description": "Cancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", @@ -13921,9 +14063,9 @@ "/tasks/{taskUid}": { "get": { "tags": [ - "Tasks" + "Async task management" ], - "summary": "Get a task", + "summary": "Get task", "description": "Get a [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", "operationId": "get_task", "parameters": [ @@ -14236,7 +14378,7 @@ "tags": [ "Webhooks" ], - "summary": "Create a webhook", + "summary": "Create webhook", "description": "Create a new webhook to receive task notifications.", "operationId": "post_webhook", "requestBody": { @@ -14327,7 +14469,7 @@ "tags": [ "Webhooks" ], - "summary": "Get a webhook", + "summary": "Get webhook", "description": "Get a single webhook by its UUID.", "operationId": "get_webhook", "parameters": [ @@ -14419,7 +14561,7 @@ "tags": [ "Webhooks" ], - "summary": "Delete a webhook", + "summary": "Delete webhook", "description": "Delete an existing webhook by its UUID.", "operationId": "delete_webhook", "parameters": [ @@ -14495,7 +14637,7 @@ "tags": [ "Webhooks" ], - "summary": "Update a webhook", + "summary": "Update webhook", "description": "Update an existing webhook's URL or headers.", "operationId": "patch_webhook", "parameters": [ @@ -16391,6 +16533,147 @@ } } }, + "Field": { + "type": "object", + "required": [ + "name", + "displayed", + "searchable", + "sortable", + "distinct", + "rankingRule", + "filterable", + "localized" + ], + "properties": { + "name": { + "type": "string" + }, + "displayed": { + "$ref": "#/components/schemas/FieldDisplayConfig" + }, + "searchable": { + "$ref": "#/components/schemas/FieldSearchConfig" + }, + "sortable": { + "$ref": "#/components/schemas/FieldSortableConfig" + }, + "distinct": { + "$ref": "#/components/schemas/FieldDistinctConfig" + }, + "rankingRule": { + "$ref": "#/components/schemas/FieldRankingRuleConfig" + }, + "filterable": { + "$ref": "#/components/schemas/FieldFilterableConfig" + }, + "localized": { + "$ref": "#/components/schemas/FieldLocalizedConfig" + } + } + }, + "FieldDisplayConfig": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "FieldDistinctConfig": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "FieldFilterableConfig": { + "type": "object", + "required": [ + "enabled", + "sortBy", + "facetSearch", + "equality", + "comparison" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "sortBy": { + "$ref": "#/components/schemas/FacetValuesSort" + }, + "facetSearch": { + "type": "boolean" + }, + "equality": { + "type": "boolean" + }, + "comparison": { + "type": "boolean" + } + } + }, + "FieldLocalizedConfig": { + "type": "object", + "required": [ + "locales" + ], + "properties": { + "locales": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "FieldRankingRuleConfig": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "order": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "FieldSearchConfig": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "FieldSortableConfig": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + }, "FilterFeatures": { "type": "object", "description": "Controls which filter operators are allowed for an attribute. This\nprovides fine-grained control over filtering capabilities.", @@ -16850,6 +17133,95 @@ ], "example": "documentAdditionOrUpdate" }, + "ListFields": { + "type": "object", + "required": [ + "offset", + "limit" + ], + "properties": { + "offset": { + "type": "integer", + "description": "Number of fields to skip. Defaults to 0.", + "minimum": 0 + }, + "limit": { + "type": "integer", + "description": "Maximum number of fields to return. Defaults to 20.", + "minimum": 0 + }, + "filter": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ListFieldsFilter", + "description": "Optional filter to restrict which fields are returned (e.g. by attribute patterns or by capability: displayed, searchable, sortable, filterable, etc.)." + } + ] + } + } + }, + "ListFieldsFilter": { + "type": "object", + "description": "Filter fields by attribute name patterns or by capability (displayed, searchable, sortable, etc.). All criteria are ANDed.", + "properties": { + "attribute_patterns": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/AttributePatterns", + "description": "Only include fields whose names match these patterns (e.g. `[\"title\", \"desc*\"]`)." + } + ] + }, + "displayed": { + "type": [ + "boolean", + "null" + ], + "description": "Only include fields that are displayed (true) or not displayed (false) in search results." + }, + "searchable": { + "type": [ + "boolean", + "null" + ], + "description": "Only include fields that are searchable (true) or not searchable (false)." + }, + "sortable": { + "type": [ + "boolean", + "null" + ], + "description": "Only include fields that are sortable (true) or not sortable (false)." + }, + "distinct": { + "type": [ + "boolean", + "null" + ], + "description": "Only include fields that are used as distinct attribute (true) or not (false)." + }, + "ranking_rule": { + "type": [ + "boolean", + "null" + ], + "description": "Only include fields that have a custom ranking rule (asc/desc) (true) or not (false)." + }, + "filterable": { + "type": [ + "boolean", + "null" + ], + "description": "Only include fields that are filterable (true) or not filterable (false)." + } + } + }, "Locale": { "type": "string", "enum": [ @@ -17224,9 +17596,77 @@ }, "additionalProperties": false }, + "PaginationView_Field": { + "type": "object", + "required": [ + "results", + "offset", + "limit", + "total" + ], + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "required": [ + "name", + "displayed", + "searchable", + "sortable", + "distinct", + "rankingRule", + "filterable", + "localized" + ], + "properties": { + "name": { + "type": "string" + }, + "displayed": { + "$ref": "#/components/schemas/FieldDisplayConfig" + }, + "searchable": { + "$ref": "#/components/schemas/FieldSearchConfig" + }, + "sortable": { + "$ref": "#/components/schemas/FieldSortableConfig" + }, + "distinct": { + "$ref": "#/components/schemas/FieldDistinctConfig" + }, + "rankingRule": { + "$ref": "#/components/schemas/FieldRankingRuleConfig" + }, + "filterable": { + "$ref": "#/components/schemas/FieldFilterableConfig" + }, + "localized": { + "$ref": "#/components/schemas/FieldLocalizedConfig" + } + } + }, + "description": "Array of items for the current page" + }, + "offset": { + "type": "integer", + "description": "Number of items skipped", + "minimum": 0 + }, + "limit": { + "type": "integer", + "description": "Maximum number of items returned", + "minimum": 0 + }, + "total": { + "type": "integer", + "description": "Total number of items matching the query", + "minimum": 0 + } + } + }, "PaginationView_IndexView": { "type": "object", - "description": "Paginated response wrapper", "required": [ "results", "offset", @@ -17289,7 +17729,6 @@ }, "PaginationView_KeyView": { "type": "object", - "description": "Paginated response wrapper", "required": [ "results", "offset", @@ -17391,7 +17830,6 @@ }, "PaginationView_Value": { "type": "object", - "description": "Paginated response wrapper", "required": [ "results", "offset", @@ -19901,7 +20339,7 @@ "type": "http", "scheme": "bearer", "bearerFormat": "Uuidv4, string or JWT", - "description": "An API key is a token that you provide when making API calls. Include the token in a header parameter called `Authorization`.\nExample: `Authorization: Bearer 8fece4405662dd830e4cb265e7e047aab2e79672a760a12712d2a263c9003509`" + "description": "An API key is a token that you provide when making API calls. Read more about [how to secure your project](https://www.meilisearch.com/docs/learn/security/basic_security).\n\nInclude the API key to the `Authorization` header, for instance:\n`Authorization: Bearer 6436fc5237b0d6e0d64253fbaac21d135012ecf1`.\n\nIf you use a SDK, ensure you instantiate the client with the API key, for instance with JS SDK:\n`const client = new MeiliSearch({ host: 'https://your-domain.com', apiKey: '6436fc5237b0d6e0d64253fbaac21d135012ecf1' })`" } } }, @@ -19918,131 +20356,65 @@ "name": "Version", "description": "Returns the version of the running Meilisearch instance." }, + { + "name": "Backups", + "description": "Meilisearch offers two types of backups: snapshots and dumps. Snapshots are mainly intended as a safeguard, while dumps are useful when migrating Meilisearch." + }, { "name": "Tasks", - "description": "The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html).", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/tasks" - } + "description": "The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)." }, { "name": "Batches", - "description": "The /batches route gives information about the progress of batches of asynchronous operations.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/batches" - } + "description": "The /batches route gives information about the progress of batches of asynchronous operations." }, { "name": "Indexes", - "description": "An index is an entity that gathers a set of [documents](https://www.meilisearch.com/docs/learn/getting_started/documents) with its own [settings](https://www.meilisearch.com/docs/reference/api/settings). Learn more about indexes.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/indexes" - } + "description": "An index is an entity that gathers a set of [documents](https://www.meilisearch.com/docs/learn/getting_started/documents) with its own [settings](https://www.meilisearch.com/docs/reference/api/settings). Learn more about indexes." }, { "name": "Documents", - "description": "Documents are objects composed of fields that can store any type of data. Each field contains an attribute and its associated value. Documents are stored inside [indexes](https://www.meilisearch.com/docs/learn/getting_started/indexes).", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/learn/getting_started/documents" - } + "description": "Documents are objects composed of fields that can store any type of data. Each field contains an attribute and its associated value. Documents are stored inside [indexes](https://www.meilisearch.com/docs/learn/getting_started/indexes)." }, { "name": "Facet Search", - "description": "The `/facet-search` route allows you to search for facet values. Facet search supports prefix search and typo tolerance. The returned hits are sorted lexicographically in ascending order. You can configure how facets are sorted using the sortFacetValuesBy property of the faceting index settings.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/facet_search" - } + "description": "The `/facet-search` route allows you to search for facet values. Facet search supports prefix search and typo tolerance. The returned hits are sorted lexicographically in ascending order. You can configure how facets are sorted using the sortFacetValuesBy property of the faceting index settings." }, { "name": "Similar documents", - "description": "The /similar route uses AI-powered search to return a number of documents similar to a target document.\n\nMeilisearch exposes two routes for retrieving similar documents: POST and GET. In the majority of cases, POST will offer better performance and ease of use.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/similar" - } + "description": "The /similar route uses AI-powered search to return a number of documents similar to a target document.\n\nMeilisearch exposes two routes for retrieving similar documents: POST and GET. In the majority of cases, POST will offer better performance and ease of use." }, { "name": "Settings", - "description": "Use the /settings route to customize search settings for a given index. You can either modify all index settings at once using the update settings endpoint, or use a child route to configure a single setting.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/settings" - } - }, - { - "name": "Compact an index", - "description": "The /compact route uses compacts the database to reorganize and make it smaller and more efficient.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/compact" - } + "description": "Use the /settings route to customize search settings for a given index. You can either modify all index settings at once using the update settings endpoint, or use a child route to configure a single setting." }, { "name": "Search", - "description": "Meilisearch exposes two routes to perform searches:\n\n- A POST route: this is the preferred route when using API authentication, as it allows [preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) caching and better performance.\n- A GET route: the usage of this route is discouraged, unless you have good reason to do otherwise (specific caching abilities for example)", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/search" - } - }, - { - "name": "Snapshots", - "description": "The snapshots route allows the creation of database snapshots. Snapshots are .snapshot files that can be used to launch Meilisearch.\nCreating a snapshot is also referred to as exporting it, whereas launching Meilisearch with a snapshot is referred to as importing it.\nDuring a snapshot export, all indexes of the current instance are exported—together with their documents and settings—and saved as a single .snapshot file.\nDuring a snapshot import, all indexes contained in the indicated .snapshot file are imported along with their associated documents and settings.\nSnapshot imports are performed at launch using an option.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/snapshots" - } - }, - { - "name": "Dumps", - "description": "The `dumps` route allows the creation of database dumps.\nDumps are `.dump` files that can be used to launch Meilisearch. Dumps are compatible between Meilisearch versions.\nCreating a dump is also referred to as exporting it, whereas launching Meilisearch with a dump is referred to as importing it.\nDuring a [dump export](https://www.meilisearch.com/docs/reference/api/dump#create-a-dump), all indexes of the current instance are\nexported—together with their documents and settings—and saved as a single `.dump` file. During a dump import,\nall indexes contained in the indicated `.dump` file are imported along with their associated documents and settings.\nAny existing index with the same uid as an index in the dump file will be overwritten.\nDump imports are [performed at launch](https://www.meilisearch.com/docs/learn/advanced/dumps#importing-a-dump) using an option.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/dump" - } + "description": "Meilisearch exposes two routes to perform searches:\n\n- A POST route: this is the preferred route when using API authentication, as it allows [preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) caching and better performance.\n- A GET route: the usage of this route is discouraged, unless you have good reason to do otherwise (specific caching abilities for example)" }, { "name": "Keys", - "description": "Manage API `keys` for a Meilisearch instance. Each key has a given set of permissions.\nYou must have the master key or the default admin key to access the keys route. More information about the keys and their rights.\nAccessing any route under `/keys` without having set a master key will result in an error.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/keys" - } + "description": "Manage API `keys` for a Meilisearch instance. Each key has a given set of permissions.\nYou must have the master key or the default admin key to access the keys route. More information about the keys and their rights.\nAccessing any route under `/keys` without having set a master key will result in an error." }, { "name": "Logs", - "description": "Everything about retrieving or customizing logs.\nCurrently [experimental](https://www.meilisearch.com/docs/learn/experimental/overview).", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/learn/experimental/log_customization" - } + "description": "Everything about retrieving or customizing logs.\nCurrently [experimental](https://www.meilisearch.com/docs/learn/experimental/overview)." }, { "name": "Multi-search", - "description": "The `/multi-search` route allows you to perform multiple search queries on one or more indexes by bundling them into a single HTTP request. Multi-search is also known as federated search.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/multi_search" - } + "description": "The `/multi-search` route allows you to perform multiple search queries on one or more indexes by bundling them into a single HTTP request. Multi-search is also known as federated search." }, { "name": "Experimental features", - "description": "The `/experimental-features` route allows you to activate or deactivate some of Meilisearch's experimental features.\n\nThis route is **synchronous**. This means that no task object will be returned, and any activated or deactivated features will be made available or unavailable immediately.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/experimental_features" - } - }, - { - "name": "Export", - "description": "The `/export` route allows you to trigger an export process to a remote Meilisearch instance.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/export" - } + "description": "The `/experimental-features` route allows you to activate or deactivate some of Meilisearch's experimental features.\n\nThis route is **synchronous**. This means that no task object will be returned, and any activated or deactivated features will be made available or unavailable immediately." }, { "name": "Network", - "description": "The `/network` route allows you to describe the topology of a network of Meilisearch instances.\n\nThis route is **synchronous**. This means that no task object will be returned, and any change to the network will be made available immediately.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/network" - } + "description": "The `/network` route allows you to describe the topology of a network of Meilisearch instances.\n\nThis route is **synchronous**. This means that no task object will be returned, and any change to the network will be made available immediately." }, { "name": "Webhooks", - "description": "The `/webhooks` route allows you to register endpoints to be called once tasks are processed.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/webhooks" - } + "description": "The `/webhooks` route allows you to register endpoints to be called once tasks are processed." } ] -} +} \ No newline at end of file diff --git a/assets/open-api/meilisearch-openapi.json b/assets/open-api/meilisearch-openapi.json index 5539f6fa8..9f27db4bd 100644 --- a/assets/open-api/meilisearch-openapi.json +++ b/assets/open-api/meilisearch-openapi.json @@ -15,7 +15,7 @@ }, "servers": [ { - "url": "/", + "url": "http://localhost:7700", "description": "Local server" } ], @@ -23,16 +23,16 @@ "/batches": { "get": { "tags": [ - "Batches" + "Async task management" ], - "summary": "Get batches", - "description": "List all batches, regardless of index. The batch objects are contained in\nthe results array. Batches are always returned in descending order of uid.\nThis means that by default, the most recently created batch objects appear\nfirst. Batch results are paginated and can be filtered with query\nparameters.", + "summary": "List batches", + "description": "The `/batches` route gives information about the progress of batches of [asynchronous operations](/learn/async/asynchronous_operations).\n\nBatches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first. Batch results are paginated and can be filtered with query parameters.", "operationId": "get_batches", "parameters": [ { "name": "limit", "in": "query", - "description": "Maximum number of results to return.", + "description": "Maximum number of batches to return", "required": false, "schema": { "type": "integer", @@ -45,7 +45,7 @@ { "name": "from", "in": "query", - "description": "Fetch the next set of results from the given uid.", + "description": "`uid` of the first batch returned", "required": false, "schema": { "type": "integer", @@ -57,7 +57,7 @@ { "name": "reverse", "in": "query", - "description": "The order you want to retrieve the objects.", + "description": "If `true`, returns results in the reverse order, from oldest to most recent", "required": false, "schema": { "type": "boolean" @@ -259,10 +259,10 @@ "finishedAt": "2024-12-10T15:49:05.105404Z" } ], - "total": 3, - "limit": 1, - "from": 2, - "next": 1 + "total": 1, + "limit": 20, + "from": 1, + "next": null } } } @@ -298,10 +298,10 @@ "/batches/{batchUid}": { "get": { "tags": [ - "Batches" + "Async task management" ], - "summary": "Get one batch", - "description": "Get a single batch.", + "summary": "Get batch", + "description": "Get a single batch by its unique identifier.\n\nThe `/batches` route gives information about the progress of batches of [asynchronous operations](/learn/async/asynchronous_operations).", "operationId": "get_batch", "parameters": [ { @@ -324,7 +324,7 @@ "$ref": "#/components/schemas/BatchView" }, "example": { - "uid": 1, + "uid": 0, "details": { "receivedDocuments": 1, "indexedDocuments": 1 @@ -381,9 +381,9 @@ "/dumps": { "post": { "tags": [ - "Dumps" + "Backups" ], - "summary": "Create a dump", + "summary": "Create dump", "description": "Triggers a dump creation process. Once the process is complete, a dump is created in the\n[dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory).\nIf the dump directory does not exist yet, it will be created.", "operationId": "create_dump", "responses": { @@ -437,7 +437,7 @@ "tags": [ "Experimental features" ], - "summary": "Get all experimental features", + "summary": "List experimental features", "description": "Get a list of all experimental features that can be activated via the\n/experimental-features route and whether or not they are currently\nactivated.", "operationId": "get_features", "responses": { @@ -551,7 +551,7 @@ "/export": { "post": { "tags": [ - "Export" + "Documents" ], "summary": "Export to a remote Meilisearch", "description": "Triggers an export process to a remote Meilisearch instance. This allows you to send\ndocuments and settings from the current instance to another Meilisearch server.", @@ -615,7 +615,7 @@ "tags": [ "Health" ], - "summary": "Get Health", + "summary": "Get health", "description": "The health check endpoint enables you to periodically test the health of\nyour Meilisearch instance.", "operationId": "get_health", "responses": { @@ -1004,9 +1004,9 @@ "/indexes/{indexUid}/compact": { "post": { "tags": [ - "Compact an index" + "Indexes" ], - "summary": "Compact an index", + "summary": "Compact index", "description": "Triggers a compaction process on the specified index. Compaction reorganizes the index database to make it smaller and more efficient.", "operationId": "compact", "parameters": [ @@ -1071,7 +1071,7 @@ "tags": [ "Documents" ], - "summary": "Get documents", + "summary": "List documents with GET", "description": "Get documents by batches.", "operationId": "get_documents", "parameters": [ @@ -1682,7 +1682,7 @@ "tags": [ "Documents" ], - "summary": "Edit documents by function.", + "summary": "Edit documents by function", "description": "Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to\nedit one or more documents directly in Meilisearch.", "operationId": "edit_documents_by_function", "parameters": [ @@ -1757,7 +1757,7 @@ "tags": [ "Documents" ], - "summary": "Get documents with POST", + "summary": "List documents with POST", "description": "Get a set of documents.", "operationId": "documents_by_query_post", "parameters": [ @@ -1853,7 +1853,7 @@ "tags": [ "Documents" ], - "summary": "Get one document", + "summary": "Get document", "description": "Get one document from its primary key.", "operationId": "get_document", "parameters": [ @@ -1962,7 +1962,7 @@ "tags": [ "Documents" ], - "summary": "Delete a document", + "summary": "Delete document", "description": "Delete a single document by id.", "operationId": "delete_document", "parameters": [ @@ -2038,7 +2038,7 @@ "tags": [ "Facet Search" ], - "summary": "Perform a facet search", + "summary": "Search in facets", "description": "Search for a facet value within a given facet.", "operationId": "search", "parameters": [ @@ -2140,13 +2140,150 @@ ] } }, + "/indexes/{indexUid}/fields": { + "post": { + "tags": [ + "Indexes" + ], + "summary": "List index fields", + "description": "Returns a paginated list of fields in the index with their metadata: whether they are displayed, searchable, sortable, filterable, distinct, have a custom ranking rule (asc/desc), and for filterable fields the sort order for facet values.", + "operationId": "post_index_fields", + "parameters": [ + { + "name": "indexUid", + "in": "path", + "description": "Unique identifier of the index whose fields to list", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListFields" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginationView_Field" + }, + "example": { + "results": [ + { + "name": "title", + "displayed": { + "enabled": true + }, + "searchable": { + "enabled": true + }, + "sortable": { + "enabled": true + }, + "distinct": { + "enabled": false + }, + "rankingRule": { + "enabled": false, + "order": null + }, + "filterable": { + "enabled": false, + "sortBy": "count", + "facetSearch": false, + "equality": false, + "comparison": false + }, + "localized": { + "locales": [] + } + }, + { + "name": "genre", + "displayed": { + "enabled": true + }, + "searchable": { + "enabled": false + }, + "sortable": { + "enabled": false + }, + "distinct": { + "enabled": false + }, + "rankingRule": { + "enabled": false, + "order": null + }, + "filterable": { + "enabled": true, + "sortBy": "alpha", + "facetSearch": true, + "equality": true, + "comparison": false + }, + "localized": { + "locales": [] + } + } + ], + "offset": 0, + "limit": 20, + "total": 2 + } + } + } + }, + "401": { + "description": "Missing or invalid authorization header", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + }, + "404": { + "description": "Index not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "fields.post", + "fields.*", + "*" + ] + } + ] + } + }, "/indexes/{indexUid}/search": { "get": { "tags": [ - "Indexes", "Search" ], - "summary": "Search an index with GET", + "summary": "Search with GET", "description": "Search for documents matching a specific query in the given index.", "operationId": "search_with_url_query", "parameters": [ @@ -2550,7 +2687,6 @@ }, "post": { "tags": [ - "Indexes", "Search" ], "summary": "Search with POST", @@ -2660,7 +2796,7 @@ "tags": [ "Settings" ], - "summary": "All settings", + "summary": "List settings", "description": "This route allows you to retrieve, configure, or reset all of an index's settings at once.", "operationId": "get_all", "parameters": [ @@ -7986,8 +8122,8 @@ "tags": [ "Keys" ], - "summary": "Get API Keys", - "description": "List all API Keys", + "summary": "List API keys", + "description": "List all API keys", "operationId": "list_api_keys", "parameters": [ { @@ -8077,7 +8213,7 @@ "tags": [ "Keys" ], - "summary": "Create an API Key", + "summary": "Create API key", "description": "Create an API Key.", "operationId": "create_api_key", "requestBody": { @@ -8149,7 +8285,7 @@ "tags": [ "Keys" ], - "summary": "Get an API Key", + "summary": "Get API key", "description": "Get an API key from its `uid` or its `key` field.", "operationId": "get_api_key", "parameters": [ @@ -8222,7 +8358,7 @@ "tags": [ "Keys" ], - "summary": "Delete a key", + "summary": "Delete API key", "description": "Delete the specified API key.", "operationId": "delete_api_key", "parameters": [ @@ -8273,7 +8409,7 @@ "tags": [ "Keys" ], - "summary": "Update a Key", + "summary": "Update API key", "description": "Update the name and description of an API key. Updates to keys are partial.\nThis means you should provide only the fields you intend to update, as any\nfields not present in the payload will remain unchanged.", "operationId": "patch_api_key", "parameters": [ @@ -8356,7 +8492,7 @@ "/logs/stderr": { "post": { "tags": [ - "Logs" + "Experimental features" ], "summary": "Update target of the console logs", "description": "This route lets you specify at runtime the level of the console logs\noutputted on stderr.", @@ -8406,7 +8542,7 @@ "/logs/stream": { "post": { "tags": [ - "Logs" + "Experimental features" ], "summary": "Retrieve logs", "description": "Stream logs over HTTP. The format of the logs depends on the\nconfiguration specified in the payload. The logs are sent as multi-part,\nand the stream never stops, so make sure your clients correctly handle\nthat. To make the server stop sending you logs, you can call the `DELETE\n/logs/stream` route.\n\nThere can only be one listener at a timeand an error will be returned if\nyou call this route while it's being used by another client.", @@ -8478,7 +8614,7 @@ }, "delete": { "tags": [ - "Logs" + "Experimental features" ], "summary": "Stop retrieving logs", "description": "Call this route to make the engine stops sending logs through the `POST\n/logs/stream` route.", @@ -8566,7 +8702,7 @@ "/multi-search": { "post": { "tags": [ - "Multi-search" + "Search" ], "summary": "Perform a multi-search", "description": "Bundle multiple search queries in a single API request. Use this endpoint\nto search through multiple indexes at once.", @@ -8649,7 +8785,7 @@ "/network": { "get": { "tags": [ - "Network" + "Experimental features" ], "summary": "Get network topology", "description": "Get a list of all Meilisearch instances currently known to this instance.", @@ -8713,9 +8849,9 @@ }, "patch": { "tags": [ - "Network" + "Experimental features" ], - "summary": "Configure Network", + "summary": "Configure network topology", "description": "Add or remove nodes from network.", "operationId": "patch_network", "requestBody": { @@ -8789,9 +8925,9 @@ "/snapshots": { "post": { "tags": [ - "Snapshots" + "Backups" ], - "summary": "Create a snapshot", + "summary": "Create snapshot", "description": "Triggers a snapshot creation process. Once the process is complete, a snapshot is created in the snapshot directory. If the snapshot directory does not exist yet, it will be created.", "operationId": "create_snapshot", "responses": { @@ -8845,7 +8981,7 @@ "tags": [ "Stats" ], - "summary": "Get stats of all indexes.", + "summary": "Get stats of all indexes", "description": "Get stats of all indexes.", "operationId": "get_stats", "responses": { @@ -8974,16 +9110,16 @@ "/tasks": { "get": { "tags": [ - "Tasks" + "Async task management" ], - "summary": "Get all tasks", + "summary": "List tasks", "description": "Get all [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)", "operationId": "get_tasks", "parameters": [ { "name": "limit", "in": "query", - "description": "Maximum number of results to return.", + "description": "Maximum number of batches to return", "required": false, "schema": { "type": "integer", @@ -8996,7 +9132,7 @@ { "name": "from", "in": "query", - "description": "Fetch the next set of results from the given uid.", + "description": "`uid` of the first batch returned", "required": false, "schema": { "type": "integer", @@ -9008,7 +9144,7 @@ { "name": "reverse", "in": "query", - "description": "The order you want to retrieve the objects.", + "description": "If `true`, returns results in the reverse order, from oldest to most recent", "required": false, "schema": { "type": "boolean" @@ -9235,7 +9371,7 @@ }, "delete": { "tags": [ - "Tasks" + "Async task management" ], "summary": "Delete tasks", "description": "Delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) on filter", @@ -9486,7 +9622,7 @@ "/tasks/cancel": { "post": { "tags": [ - "Tasks" + "Async task management" ], "summary": "Cancel tasks", "description": "Cancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", @@ -9737,9 +9873,9 @@ "/tasks/{taskUid}": { "get": { "tags": [ - "Tasks" + "Async task management" ], - "summary": "Get a task", + "summary": "Get task", "description": "Get a [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", "operationId": "get_task", "parameters": [ @@ -9942,7 +10078,7 @@ "tags": [ "Webhooks" ], - "summary": "Create a webhook", + "summary": "Create webhook", "description": "Create a new webhook to receive task notifications.", "operationId": "post_webhook", "requestBody": { @@ -10011,7 +10147,7 @@ "tags": [ "Webhooks" ], - "summary": "Get a webhook", + "summary": "Get webhook", "description": "Get a single webhook by its UUID.", "operationId": "get_webhook", "parameters": [ @@ -10081,7 +10217,7 @@ "tags": [ "Webhooks" ], - "summary": "Delete a webhook", + "summary": "Delete webhook", "description": "Delete an existing webhook by its UUID.", "operationId": "delete_webhook", "parameters": [ @@ -10135,7 +10271,7 @@ "tags": [ "Webhooks" ], - "summary": "Update a webhook", + "summary": "Update webhook", "description": "Update an existing webhook's URL or headers.", "operationId": "patch_webhook", "parameters": [ @@ -12009,6 +12145,147 @@ } } }, + "Field": { + "type": "object", + "required": [ + "name", + "displayed", + "searchable", + "sortable", + "distinct", + "rankingRule", + "filterable", + "localized" + ], + "properties": { + "name": { + "type": "string" + }, + "displayed": { + "$ref": "#/components/schemas/FieldDisplayConfig" + }, + "searchable": { + "$ref": "#/components/schemas/FieldSearchConfig" + }, + "sortable": { + "$ref": "#/components/schemas/FieldSortableConfig" + }, + "distinct": { + "$ref": "#/components/schemas/FieldDistinctConfig" + }, + "rankingRule": { + "$ref": "#/components/schemas/FieldRankingRuleConfig" + }, + "filterable": { + "$ref": "#/components/schemas/FieldFilterableConfig" + }, + "localized": { + "$ref": "#/components/schemas/FieldLocalizedConfig" + } + } + }, + "FieldDisplayConfig": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "FieldDistinctConfig": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "FieldFilterableConfig": { + "type": "object", + "required": [ + "enabled", + "sortBy", + "facetSearch", + "equality", + "comparison" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "sortBy": { + "$ref": "#/components/schemas/FacetValuesSort" + }, + "facetSearch": { + "type": "boolean" + }, + "equality": { + "type": "boolean" + }, + "comparison": { + "type": "boolean" + } + } + }, + "FieldLocalizedConfig": { + "type": "object", + "required": [ + "locales" + ], + "properties": { + "locales": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "FieldRankingRuleConfig": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "order": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "FieldSearchConfig": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "FieldSortableConfig": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + }, "FilterFeatures": { "type": "object", "description": "Controls which filter operators are allowed for an attribute. This\nprovides fine-grained control over filtering capabilities.", @@ -12468,6 +12745,95 @@ ], "example": "documentAdditionOrUpdate" }, + "ListFields": { + "type": "object", + "required": [ + "offset", + "limit" + ], + "properties": { + "offset": { + "type": "integer", + "description": "Number of fields to skip. Defaults to 0.", + "minimum": 0 + }, + "limit": { + "type": "integer", + "description": "Maximum number of fields to return. Defaults to 20.", + "minimum": 0 + }, + "filter": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ListFieldsFilter", + "description": "Optional filter to restrict which fields are returned (e.g. by attribute patterns or by capability: displayed, searchable, sortable, filterable, etc.)." + } + ] + } + } + }, + "ListFieldsFilter": { + "type": "object", + "description": "Filter fields by attribute name patterns or by capability (displayed, searchable, sortable, etc.). All criteria are ANDed.", + "properties": { + "attribute_patterns": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/AttributePatterns", + "description": "Only include fields whose names match these patterns (e.g. `[\"title\", \"desc*\"]`)." + } + ] + }, + "displayed": { + "type": [ + "boolean", + "null" + ], + "description": "Only include fields that are displayed (true) or not displayed (false) in search results." + }, + "searchable": { + "type": [ + "boolean", + "null" + ], + "description": "Only include fields that are searchable (true) or not searchable (false)." + }, + "sortable": { + "type": [ + "boolean", + "null" + ], + "description": "Only include fields that are sortable (true) or not sortable (false)." + }, + "distinct": { + "type": [ + "boolean", + "null" + ], + "description": "Only include fields that are used as distinct attribute (true) or not (false)." + }, + "ranking_rule": { + "type": [ + "boolean", + "null" + ], + "description": "Only include fields that have a custom ranking rule (asc/desc) (true) or not (false)." + }, + "filterable": { + "type": [ + "boolean", + "null" + ], + "description": "Only include fields that are filterable (true) or not filterable (false)." + } + } + }, "Locale": { "type": "string", "enum": [ @@ -12842,9 +13208,77 @@ }, "additionalProperties": false }, + "PaginationView_Field": { + "type": "object", + "required": [ + "results", + "offset", + "limit", + "total" + ], + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "required": [ + "name", + "displayed", + "searchable", + "sortable", + "distinct", + "rankingRule", + "filterable", + "localized" + ], + "properties": { + "name": { + "type": "string" + }, + "displayed": { + "$ref": "#/components/schemas/FieldDisplayConfig" + }, + "searchable": { + "$ref": "#/components/schemas/FieldSearchConfig" + }, + "sortable": { + "$ref": "#/components/schemas/FieldSortableConfig" + }, + "distinct": { + "$ref": "#/components/schemas/FieldDistinctConfig" + }, + "rankingRule": { + "$ref": "#/components/schemas/FieldRankingRuleConfig" + }, + "filterable": { + "$ref": "#/components/schemas/FieldFilterableConfig" + }, + "localized": { + "$ref": "#/components/schemas/FieldLocalizedConfig" + } + } + }, + "description": "Array of items for the current page" + }, + "offset": { + "type": "integer", + "description": "Number of items skipped", + "minimum": 0 + }, + "limit": { + "type": "integer", + "description": "Maximum number of items returned", + "minimum": 0 + }, + "total": { + "type": "integer", + "description": "Total number of items matching the query", + "minimum": 0 + } + } + }, "PaginationView_IndexView": { "type": "object", - "description": "Paginated response wrapper", "required": [ "results", "offset", @@ -12907,7 +13341,6 @@ }, "PaginationView_KeyView": { "type": "object", - "description": "Paginated response wrapper", "required": [ "results", "offset", @@ -13009,7 +13442,6 @@ }, "PaginationView_Value": { "type": "object", - "description": "Paginated response wrapper", "required": [ "results", "offset", @@ -15519,7 +15951,7 @@ "type": "http", "scheme": "bearer", "bearerFormat": "Uuidv4, string or JWT", - "description": "An API key is a token that you provide when making API calls. Include the token in a header parameter called `Authorization`.\nExample: `Authorization: Bearer 8fece4405662dd830e4cb265e7e047aab2e79672a760a12712d2a263c9003509`" + "description": "An API key is a token that you provide when making API calls. Read more about [how to secure your project](https://www.meilisearch.com/docs/learn/security/basic_security).\n\nInclude the API key to the `Authorization` header, for instance:\n`Authorization: Bearer 6436fc5237b0d6e0d64253fbaac21d135012ecf1`.\n\nIf you use a SDK, ensure you instantiate the client with the API key, for instance with JS SDK:\n`const client = new MeiliSearch({ host: 'https://your-domain.com', apiKey: '6436fc5237b0d6e0d64253fbaac21d135012ecf1' })`" } } }, @@ -15536,131 +15968,65 @@ "name": "Version", "description": "Returns the version of the running Meilisearch instance." }, + { + "name": "Backups", + "description": "Meilisearch offers two types of backups: snapshots and dumps. Snapshots are mainly intended as a safeguard, while dumps are useful when migrating Meilisearch." + }, { "name": "Tasks", - "description": "The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html).", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/tasks" - } + "description": "The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)." }, { "name": "Batches", - "description": "The /batches route gives information about the progress of batches of asynchronous operations.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/batches" - } + "description": "The /batches route gives information about the progress of batches of asynchronous operations." }, { "name": "Indexes", - "description": "An index is an entity that gathers a set of [documents](https://www.meilisearch.com/docs/learn/getting_started/documents) with its own [settings](https://www.meilisearch.com/docs/reference/api/settings). Learn more about indexes.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/indexes" - } + "description": "An index is an entity that gathers a set of [documents](https://www.meilisearch.com/docs/learn/getting_started/documents) with its own [settings](https://www.meilisearch.com/docs/reference/api/settings). Learn more about indexes." }, { "name": "Documents", - "description": "Documents are objects composed of fields that can store any type of data. Each field contains an attribute and its associated value. Documents are stored inside [indexes](https://www.meilisearch.com/docs/learn/getting_started/indexes).", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/learn/getting_started/documents" - } + "description": "Documents are objects composed of fields that can store any type of data. Each field contains an attribute and its associated value. Documents are stored inside [indexes](https://www.meilisearch.com/docs/learn/getting_started/indexes)." }, { "name": "Facet Search", - "description": "The `/facet-search` route allows you to search for facet values. Facet search supports prefix search and typo tolerance. The returned hits are sorted lexicographically in ascending order. You can configure how facets are sorted using the sortFacetValuesBy property of the faceting index settings.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/facet_search" - } + "description": "The `/facet-search` route allows you to search for facet values. Facet search supports prefix search and typo tolerance. The returned hits are sorted lexicographically in ascending order. You can configure how facets are sorted using the sortFacetValuesBy property of the faceting index settings." }, { "name": "Similar documents", - "description": "The /similar route uses AI-powered search to return a number of documents similar to a target document.\n\nMeilisearch exposes two routes for retrieving similar documents: POST and GET. In the majority of cases, POST will offer better performance and ease of use.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/similar" - } + "description": "The /similar route uses AI-powered search to return a number of documents similar to a target document.\n\nMeilisearch exposes two routes for retrieving similar documents: POST and GET. In the majority of cases, POST will offer better performance and ease of use." }, { "name": "Settings", - "description": "Use the /settings route to customize search settings for a given index. You can either modify all index settings at once using the update settings endpoint, or use a child route to configure a single setting.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/settings" - } - }, - { - "name": "Compact an index", - "description": "The /compact route uses compacts the database to reorganize and make it smaller and more efficient.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/compact" - } + "description": "Use the /settings route to customize search settings for a given index. You can either modify all index settings at once using the update settings endpoint, or use a child route to configure a single setting." }, { "name": "Search", - "description": "Meilisearch exposes two routes to perform searches:\n\n- A POST route: this is the preferred route when using API authentication, as it allows [preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) caching and better performance.\n- A GET route: the usage of this route is discouraged, unless you have good reason to do otherwise (specific caching abilities for example)", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/search" - } - }, - { - "name": "Snapshots", - "description": "The snapshots route allows the creation of database snapshots. Snapshots are .snapshot files that can be used to launch Meilisearch.\nCreating a snapshot is also referred to as exporting it, whereas launching Meilisearch with a snapshot is referred to as importing it.\nDuring a snapshot export, all indexes of the current instance are exported—together with their documents and settings—and saved as a single .snapshot file.\nDuring a snapshot import, all indexes contained in the indicated .snapshot file are imported along with their associated documents and settings.\nSnapshot imports are performed at launch using an option.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/snapshots" - } - }, - { - "name": "Dumps", - "description": "The `dumps` route allows the creation of database dumps.\nDumps are `.dump` files that can be used to launch Meilisearch. Dumps are compatible between Meilisearch versions.\nCreating a dump is also referred to as exporting it, whereas launching Meilisearch with a dump is referred to as importing it.\nDuring a [dump export](https://www.meilisearch.com/docs/reference/api/dump#create-a-dump), all indexes of the current instance are\nexported—together with their documents and settings—and saved as a single `.dump` file. During a dump import,\nall indexes contained in the indicated `.dump` file are imported along with their associated documents and settings.\nAny existing index with the same uid as an index in the dump file will be overwritten.\nDump imports are [performed at launch](https://www.meilisearch.com/docs/learn/advanced/dumps#importing-a-dump) using an option.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/dump" - } + "description": "Meilisearch exposes two routes to perform searches:\n\n- A POST route: this is the preferred route when using API authentication, as it allows [preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) caching and better performance.\n- A GET route: the usage of this route is discouraged, unless you have good reason to do otherwise (specific caching abilities for example)" }, { "name": "Keys", - "description": "Manage API `keys` for a Meilisearch instance. Each key has a given set of permissions.\nYou must have the master key or the default admin key to access the keys route. More information about the keys and their rights.\nAccessing any route under `/keys` without having set a master key will result in an error.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/keys" - } + "description": "Manage API `keys` for a Meilisearch instance. Each key has a given set of permissions.\nYou must have the master key or the default admin key to access the keys route. More information about the keys and their rights.\nAccessing any route under `/keys` without having set a master key will result in an error." }, { "name": "Logs", - "description": "Everything about retrieving or customizing logs.\nCurrently [experimental](https://www.meilisearch.com/docs/learn/experimental/overview).", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/learn/experimental/log_customization" - } + "description": "Everything about retrieving or customizing logs.\nCurrently [experimental](https://www.meilisearch.com/docs/learn/experimental/overview)." }, { "name": "Multi-search", - "description": "The `/multi-search` route allows you to perform multiple search queries on one or more indexes by bundling them into a single HTTP request. Multi-search is also known as federated search.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/multi_search" - } + "description": "The `/multi-search` route allows you to perform multiple search queries on one or more indexes by bundling them into a single HTTP request. Multi-search is also known as federated search." }, { "name": "Experimental features", - "description": "The `/experimental-features` route allows you to activate or deactivate some of Meilisearch's experimental features.\n\nThis route is **synchronous**. This means that no task object will be returned, and any activated or deactivated features will be made available or unavailable immediately.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/experimental_features" - } - }, - { - "name": "Export", - "description": "The `/export` route allows you to trigger an export process to a remote Meilisearch instance.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/export" - } + "description": "The `/experimental-features` route allows you to activate or deactivate some of Meilisearch's experimental features.\n\nThis route is **synchronous**. This means that no task object will be returned, and any activated or deactivated features will be made available or unavailable immediately." }, { "name": "Network", - "description": "The `/network` route allows you to describe the topology of a network of Meilisearch instances.\n\nThis route is **synchronous**. This means that no task object will be returned, and any change to the network will be made available immediately.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/network" - } + "description": "The `/network` route allows you to describe the topology of a network of Meilisearch instances.\n\nThis route is **synchronous**. This means that no task object will be returned, and any change to the network will be made available immediately." }, { "name": "Webhooks", - "description": "The `/webhooks` route allows you to register endpoints to be called once tasks are processed.", - "externalDocs": { - "url": "https://www.meilisearch.com/docs/reference/api/webhooks" - } + "description": "The `/webhooks` route allows you to register endpoints to be called once tasks are processed." } ] } \ No newline at end of file From 142219e58a4acfb36eb76e747177c9ed18050417 Mon Sep 17 00:00:00 2001 From: curquiza Date: Sat, 14 Feb 2026 14:28:54 +0100 Subject: [PATCH 41/45] Add CI to generate new mintlify open API file --- .github/workflows/post-deployment.yml | 47 +++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/.github/workflows/post-deployment.yml b/.github/workflows/post-deployment.yml index 04727ec86..372feed52 100644 --- a/.github/workflows/post-deployment.yml +++ b/.github/workflows/post-deployment.yml @@ -105,3 +105,50 @@ jobs: else echo "No changes in the OpenAPI file." fi + + # Runs after fetch-openapi-file: generate Mintlify OpenAPI file, validate with mint openapi-check, commit if valid. + generate-and-check-mintlify-openapi: + name: Generate and check Mintlify OpenAPI file + runs-on: ubuntu-latest + needs: fetch-openapi-file + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + with: + ref: main + token: ${{ secrets.GH_TOKEN }} + + - name: Setup Node.js + uses: actions/setup-node@v6 + + - name: Install dependencies + run: npm install && npm install mintlify + + - name: Generate Mintlify OpenAPI file + run: npm run generate-mintlify-openapi-file + + - name: Validate OpenAPI with Mintlify CLI + run: npx mintlify openapi-check assets/open-api/meilisearch-openapi-mintlify.json + + - name: Check for changes + id: mintlify_changes + run: | + if git diff --quiet assets/open-api/meilisearch-openapi-mintlify.json; then + echo "has_changes=false" >> "$GITHUB_ENV" + else + echo "has_changes=true" >> "$GITHUB_ENV" + fi + + - name: Commit changes + run: | + if [[ $has_changes == "true" ]]; then + echo "There are changes in the Mintlify OpenAPI file." + git config user.name "meili-bot" + git config user.email "robot@meilisearch.com" + git add assets/open-api/meilisearch-openapi-mintlify.json + git commit -m "[AUTOMATION POST DEPLOYMENT] Update meilisearch-openapi-mintlify.json" + git push origin main + else + echo "No changes in the Mintlify OpenAPI file." + fi From adb68a83dac0e4ea128ef5efbbf360e0e9469f01 Mon Sep 17 00:00:00 2001 From: curquiza Date: Sun, 15 Feb 2026 16:03:28 +0100 Subject: [PATCH 42/45] Remove old tip for authentication --- reference/api/authorization.mdx | 7 ------- reference/api/overview.mdx | 7 ------- 2 files changed, 14 deletions(-) diff --git a/reference/api/authorization.mdx b/reference/api/authorization.mdx index 0cc77f9a5..63b7a8f4e 100644 --- a/reference/api/authorization.mdx +++ b/reference/api/authorization.mdx @@ -5,7 +5,6 @@ description: How to authenticate with the Meilisearch API using API keys and the --- import CodeSamplesAuthorizationHeader1 from '/snippets/generated-code-samples/code_samples_authorization_header_1.mdx'; -import CodeSamplesUpdatingGuideCheckVersionOldAuthorizationHeader from '/snippets/generated-code-samples/code_samples_updating_guide_check_version_old_authorization_header.mdx'; If you are new to Meilisearch, check out the [getting started guide](/learn/self_hosted/getting_started_with_self_hosted_meilisearch). @@ -17,10 +16,4 @@ By [providing Meilisearch with a master key at launch](/learn/security/basic_sec The [`/keys`](/reference/api/keys) route can only be accessed using the master key. For security reasons, we recommend using regular API keys for all other routes. - -v0.24 and below use the `X-MEILI-API-KEY: apiKey` authorization header: - - - - [To learn more about keys and security, refer to our security tutorial.](/learn/security/basic_security) diff --git a/reference/api/overview.mdx b/reference/api/overview.mdx index d23f7e96a..e7f1dd256 100644 --- a/reference/api/overview.mdx +++ b/reference/api/overview.mdx @@ -7,7 +7,6 @@ description: Consult this page for an overview of how to query Meilisearch's API import { RouteHighlighter } from '/snippets/route_highlighter.mdx' import CodeSamplesAuthorizationHeader1 from '/snippets/generated-code-samples/code_samples_authorization_header_1.mdx'; -import CodeSamplesUpdatingGuideCheckVersionOldAuthorizationHeader from '/snippets/generated-code-samples/code_samples_updating_guide_check_version_old_authorization_header.mdx'; This reference describes the general behavior of Meilisearch's RESTful API. @@ -33,12 +32,6 @@ By [providing Meilisearch with a master key at launch](/learn/security/basic_sec The [`/keys`](/reference/api/keys) route can only be accessed using the master key. For security reasons, we recommend using regular API keys for all other routes. - -v0.24 and below use the `X-MEILI-API-KEY: apiKey` authorization header: - - - - [To learn more about keys and security, refer to our security tutorial.](/learn/security/basic_security) ## Pagination From 715f464f420629d9a1e3818b4d7a3f55270d8e4a Mon Sep 17 00:00:00 2001 From: curquiza Date: Mon, 16 Feb 2026 01:29:23 +0100 Subject: [PATCH 43/45] Add openAPI files --- .../meilisearch-openapi-mintlify.json | 3103 ++++++++++------ assets/open-api/meilisearch-openapi.json | 3129 +++++++++++------ 2 files changed, 4215 insertions(+), 2017 deletions(-) diff --git a/assets/open-api/meilisearch-openapi-mintlify.json b/assets/open-api/meilisearch-openapi-mintlify.json index dfe9c52b3..fb99d102a 100644 --- a/assets/open-api/meilisearch-openapi-mintlify.json +++ b/assets/open-api/meilisearch-openapi-mintlify.json @@ -16,7 +16,7 @@ "servers": [ { "url": "http://localhost:7700", - "description": "Local server" + "description": "Local server." } ], "paths": { @@ -26,13 +26,13 @@ "Async task management" ], "summary": "List batches", - "description": "The `/batches` route gives information about the progress of batches of [asynchronous operations](/learn/async/asynchronous_operations).\n\nBatches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first. Batch results are paginated and can be filtered with query parameters.", + "description": "Meilisearch groups compatible tasks ([asynchronous operations](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)) into batches for efficient processing.\n\nFor example, multiple document additions to the same index may be batched together. List batches to monitor their progress and performance.\n\nBatches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first. Batch results are paginated and can be filtered with query parameters.", "operationId": "get_batches", "parameters": [ { "name": "limit", "in": "query", - "description": "Maximum number of batches to return", + "description": "Maximum number of batches to return.", "required": false, "schema": { "type": "integer", @@ -45,7 +45,7 @@ { "name": "from", "in": "query", - "description": "`uid` of the first batch returned", + "description": "`uid` of the first batch returned.", "required": false, "schema": { "type": "integer", @@ -57,7 +57,7 @@ { "name": "reverse", "in": "query", - "description": "If `true`, returns results in the reverse order, from oldest to most recent", + "description": "If `true`, returns results in the reverse order, from oldest to most recent.", "required": false, "schema": { "type": "boolean" @@ -225,7 +225,7 @@ ], "responses": { "200": { - "description": "Return the batches", + "description": "Returns the batches.", "content": { "application/json": { "schema": { @@ -268,7 +268,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -331,13 +331,13 @@ "Async task management" ], "summary": "Get batch", - "description": "Get a single batch by its unique identifier.\n\nThe `/batches` route gives information about the progress of batches of [asynchronous operations](/learn/async/asynchronous_operations).", + "description": "Meilisearch groups compatible tasks ([asynchronous operations](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)) into batches for efficient processing.\n\nFor example, multiple document additions to the same index may be batched together. Retrieve a single batch by its unique identifier to monitor its progress and performance.", "operationId": "get_batch", "parameters": [ { "name": "batchUid", "in": "path", - "description": "The unique batch id", + "description": "The unique batch identifier.", "required": true, "schema": { "type": "string" @@ -347,7 +347,7 @@ ], "responses": { "200": { - "description": "Return the batch", + "description": "Returns the batch.", "content": { "application/json": { "schema": { @@ -381,7 +381,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -395,6 +395,22 @@ } } } + }, + "404": { + "description": "Batch not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Batch not found.", + "code": "batch_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#batch_not_found" + } + } + } } }, "security": [ @@ -444,11 +460,11 @@ "Backups" ], "summary": "Create dump", - "description": "Triggers a dump creation process. Once the process is complete, a dump is created in the\n[dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory).\nIf the dump directory does not exist yet, it will be created.", + "description": "Trigger a dump creation process. When complete, a dump file is written to the [dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory). The directory is created if it does not exist.", "operationId": "create_dump", "responses": { "202": { - "description": "Dump is being created", + "description": "Dump is being created.", "content": { "application/json": { "schema": { @@ -465,7 +481,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -544,11 +560,11 @@ "Experimental features" ], "summary": "List experimental features", - "description": "Get a list of all experimental features that can be activated via the\n/experimental-features route and whether or not they are currently\nactivated.", + "description": "Return all experimental features that can be toggled via this API, and whether each one is currently enabled or disabled.", "operationId": "get_features", "responses": { "200": { - "description": "Experimental features are returned", + "description": "Experimental features are returned.", "content": { "application/json": { "schema": { @@ -570,7 +586,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -619,11 +635,11 @@ "Experimental features" ], "summary": "Configure experimental features", - "description": "Activate or deactivate experimental features.", + "description": "Enable or disable experimental features at runtime. Only features that are marked as runtime-togglable can be changed.", "operationId": "patch_features", "responses": { "200": { - "description": "Experimental features are returned", + "description": "Experimental features are returned.", "content": { "application/json": { "schema": { @@ -645,7 +661,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -693,10 +709,10 @@ "/export": { "post": { "tags": [ - "Documents" + "Export" ], "summary": "Export to a remote Meilisearch", - "description": "Triggers an export process to a remote Meilisearch instance. This allows you to send\ndocuments and settings from the current instance to another Meilisearch server.", + "description": "Trigger an export that sends documents and settings from this instance to a remote Meilisearch server. Configure the remote URL and optional API key in the request body.", "operationId": "export", "requestBody": { "content": { @@ -710,7 +726,7 @@ }, "responses": { "202": { - "description": "Export successfully enqueued", + "description": "Export successfully enqueued.", "content": { "application/json": { "schema": { @@ -726,7 +742,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -768,11 +784,11 @@ "Health" ], "summary": "Get health", - "description": "The health check endpoint enables you to periodically test the health of\nyour Meilisearch instance.", + "description": "The health check endpoint enables you to periodically test the health of your Meilisearch instance. Returns a simple status indicating that the server is available.", "operationId": "get_health", "responses": { "200": { - "description": "Instance is healthy", + "description": "Instance is healthy.", "content": { "application/json": { "schema": { @@ -839,13 +855,13 @@ "Indexes" ], "summary": "List indexes", - "description": "List all indexes.", + "description": "Return all indexes on the instance.\n\nResults are paginated using `offset` and `limit` query parameters.", "operationId": "list_indexes", "parameters": [ { "name": "offset", "in": "query", - "description": "The number of indexes to skip before starting to retrieve anything", + "description": "The number of indexes to skip before starting to retrieve anything.", "required": false, "schema": { "type": "integer", @@ -856,7 +872,7 @@ { "name": "limit", "in": "query", - "description": "The number of indexes to retrieve", + "description": "The number of indexes to retrieve.", "required": false, "schema": { "type": "integer", @@ -868,7 +884,7 @@ ], "responses": { "200": { - "description": "Indexes are returned", + "description": "Indexes are returned.", "content": { "application/json": { "schema": { @@ -891,7 +907,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -968,7 +984,7 @@ "Indexes" ], "summary": "Create index", - "description": "Create an index.", + "description": "Create a new index with an optional [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key).\n\nIf no primary key is provided, Meilisearch will [infer one](https://www.meilisearch.com/docs/learn/getting_started/primary_key#meilisearch-guesses-your-primary-key) from the first batch of documents.", "operationId": "create_index", "requestBody": { "content": { @@ -981,8 +997,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -999,7 +1015,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -1078,13 +1094,13 @@ "Indexes" ], "summary": "Get index", - "description": "Get information about an index.", + "description": "Retrieve the metadata of a single index: its uid, [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key), and creation/update timestamps.", "operationId": "get_index", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -1094,7 +1110,7 @@ ], "responses": { "200": { - "description": "The index is returned", + "description": "The index is returned.", "content": { "application/json": { "schema": { @@ -1110,7 +1126,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -1126,7 +1142,7 @@ } }, "404": { - "description": "Index not found", + "description": "Index not found.", "content": { "application/json": { "schema": { @@ -1203,13 +1219,13 @@ "Indexes" ], "summary": "Delete index", - "description": "Delete an index.", + "description": "Permanently delete an index and all its documents, settings, and task history.", "operationId": "delete_index", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -1219,7 +1235,7 @@ ], "responses": { "202": { - "description": "Task successfully enqueued", + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -1236,7 +1252,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -1250,6 +1266,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -1313,13 +1345,13 @@ "Indexes" ], "summary": "Update index", - "description": "Update the `primaryKey` of an index.\nReturn an error if the index doesn't exists yet or if it contains\ndocuments.", + "description": "Update the [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) or uid of an index.\n\nReturns an error if the index does not exist or if it already contains documents ([primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) cannot be changed in that case).", "operationId": "update_index", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -1339,7 +1371,7 @@ }, "responses": { "202": { - "description": "Task successfully enqueued", + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -1356,7 +1388,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -1370,6 +1402,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -1435,13 +1483,13 @@ "Indexes" ], "summary": "Compact index", - "description": "Triggers a compaction process on the specified index. Compaction reorganizes the index database to make it smaller and more efficient.", + "description": "Trigger a compaction process on the specified index.\n\nCompaction reorganizes the index database to reclaim space and improve read performance.", "operationId": "compact", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -1451,7 +1499,7 @@ ], "responses": { "202": { - "description": "Task successfully enqueued", + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -1459,16 +1507,16 @@ }, "example": { "taskUid": 147, - "indexUid": null, + "indexUid": "movies", "status": "enqueued", - "type": "documentDeletion", + "type": "indexCompaction", "enqueuedAt": "2024-08-08T17:05:55.791772Z" } } } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -1482,6 +1530,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -1530,13 +1594,13 @@ "Documents" ], "summary": "List documents with GET", - "description": "Get documents by batches.", + "description": "Retrieve documents in batches using query parameters for offset, limit, and optional filtering. Suited for browsing or exporting index contents.", "operationId": "get_documents", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -1618,7 +1682,7 @@ ], "responses": { "200": { - "description": "The documents are returned", + "description": "The documents are returned.", "content": { "application/json": { "schema": { @@ -1649,7 +1713,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -1665,7 +1729,7 @@ } }, "404": { - "description": "Index not found", + "description": "Index not found.", "content": { "application/json": { "schema": { @@ -1738,13 +1802,13 @@ "Documents" ], "summary": "Add or update documents", - "description": "Add a list of documents or update them if they already exist.\nIf you send an already existing document (same id) the old document will\nbe only partially updated according to the fields of the new document.\nThus, any fields not present in the new document are kept and remained\nunchanged.\nTo completely overwrite a document, see Add or replace documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document.\n> `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved\n> `_vectors` field in your documents. It can accept an array of floats,\n> multiple arrays of floats in an outer array or an object. This object\n> accepts keys corresponding to the different embedders defined your index\n> settings.", + "description": "Add a list of documents or update them if they already exist.\n\nIf you send an already existing document (same id) the old document will\nbe only partially updated according to the fields of the new document.\nThus, any fields not present in the new document are kept and remained\nunchanged.\n\nIf the provided index does not exist, it will be created.\n\nTo completely overwrite a document, see [add or replace documents route](https://docs.meilisearch.com/docs/api-reference/documents/add-or-replace-documents).\n\n> Use the reserved `_geo` object to add geo coordinates to a document.\n> `_geo` is an object made of `lat` and `lng` field.", "operationId": "update_documents", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -1754,7 +1818,7 @@ { "name": "primaryKey", "in": "query", - "description": "The primary key of the documents. primaryKey is optional. If you want\nto set the primary key of your index through this route, it only has\nto be done the first time you add documents to the index. After which\nit will be ignored if given.", + "description": "The [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) field for uniquely identifying each document.\nThis parameter is optional and can only be set the first time documents are added to an index.\nSubsequent attempts to specify it will be ignored if the primary key has already been set.", "required": false, "schema": { "type": "string" @@ -1765,7 +1829,7 @@ "name": "csvDelimiter", "in": "query", "description": "Customize the csv delimiter when importing CSV documents.", - "required": true, + "required": false, "schema": { "type": "string", "default": "," @@ -1802,8 +1866,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -1820,7 +1884,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -1834,6 +1898,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -1893,13 +1973,13 @@ "Documents" ], "summary": "Add or replace documents", - "description": "Add a list of documents or replace them if they already exist.\n\nIf you send an already existing document (same id) the whole existing\ndocument will be overwritten by the new document. Fields previously in the\ndocument not present in the new document are removed.\n\nFor a partial update of the document see Add or update documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document.\n> `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved\n> `_vectors` field in your documents. It can accept an array of floats,\n> multiple arrays of floats in an outer array or an object. This object\n> accepts keys corresponding to the different embedders defined your index\n> settings.", + "description": "Add a list of documents or replace them if they already exist.\n\nIf you send an already existing document (same id) the whole existing\ndocument will be overwritten by the new document. Fields previously in the\ndocument not present in the new document are removed.\n\nIf the provided index does not exist, it will be created.\n\nFor a partial update of the document see [add or update documents route](https://docs.meilisearch.com/docs/api-reference/documents/add-or-update-documents).\n\n> Use the reserved `_geo` object to add geo coordinates to a document.\n> `_geo` is an object made of `lat` and `lng` field.", "operationId": "replace_documents", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -1909,7 +1989,7 @@ { "name": "primaryKey", "in": "query", - "description": "The primary key of the documents. primaryKey is optional. If you want\nto set the primary key of your index through this route, it only has\nto be done the first time you add documents to the index. After which\nit will be ignored if given.", + "description": "The [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) field for uniquely identifying each document.\nThis parameter is optional and can only be set the first time documents are added to an index.\nSubsequent attempts to specify it will be ignored if the primary key has already been set.", "required": false, "schema": { "type": "string" @@ -1920,7 +2000,7 @@ "name": "csvDelimiter", "in": "query", "description": "Customize the csv delimiter when importing CSV documents.", - "required": true, + "required": false, "schema": { "type": "string", "default": "," @@ -1957,8 +2037,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -1975,7 +2055,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -1989,6 +2069,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -2052,13 +2148,13 @@ "Documents" ], "summary": "Delete all documents", - "description": "Delete all documents in the specified index.", + "description": "Permanently delete all documents in the specified index. Settings and index metadata are preserved.", "operationId": "clear_all_documents", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -2067,8 +2163,8 @@ } ], "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -2085,7 +2181,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -2099,6 +2195,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -2164,13 +2276,13 @@ "Documents" ], "summary": "Delete documents by filter", - "description": "Delete a set of documents based on a filter.", + "description": "Delete all documents in the index that match the given filter expression.", "operationId": "delete_documents_by_filter", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -2190,7 +2302,7 @@ }, "responses": { "202": { - "description": "Task successfully enqueued", + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -2207,7 +2319,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -2221,6 +2333,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -2278,13 +2406,13 @@ "Documents" ], "summary": "Delete documents by batch", - "description": "Delete a set of documents based on an array of document ids.", + "description": "Delete multiple documents in one request by providing an array of [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) values.", "operationId": "delete_documents_batch", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -2304,8 +2432,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -2322,7 +2450,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -2336,6 +2464,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -2393,13 +2537,13 @@ "Documents" ], "summary": "Edit documents by function", - "description": "Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to\nedit one or more documents directly in Meilisearch.", + "description": "Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to edit one or more documents directly in Meilisearch. The function receives each document and returns the modified document.", "operationId": "edit_documents_by_function", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -2419,7 +2563,7 @@ }, "responses": { "202": { - "description": "Task successfully enqueued", + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -2436,7 +2580,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -2450,6 +2594,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -2474,13 +2634,13 @@ "Documents" ], "summary": "List documents with POST", - "description": "Get a set of documents.", + "description": "Retrieve a set of documents with optional filtering, sorting, and pagination. Use the request body to specify filters, sort order, and which fields to return.", "operationId": "documents_by_query_post", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -2500,7 +2660,7 @@ }, "responses": { "200": { - "description": "Task successfully enqueued", + "description": "The documents are returned.", "content": { "application/json": { "schema": { @@ -2537,7 +2697,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -2551,6 +2711,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -2608,13 +2784,13 @@ "Documents" ], "summary": "Get document", - "description": "Get one document from its primary key.", + "description": "Retrieve a single document by its [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) value.", "operationId": "get_document", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -2624,7 +2800,7 @@ { "name": "documentId", "in": "path", - "description": "The document identifier", + "description": "The document identifier.", "required": true, "schema": { "type": "string" @@ -2655,7 +2831,7 @@ ], "responses": { "200": { - "description": "The document is returned", + "description": "The document is returned.", "content": { "application/json": { "schema": {}, @@ -2670,7 +2846,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -2686,14 +2862,14 @@ } }, "404": { - "description": "Document not found", + "description": "Document not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" }, "example": { - "message": "Document `a` not found.", + "message": "Document :uid not found.", "code": "document_not_found", "type": "invalid_request", "link": "https://docs.meilisearch.com/errors#document_not_found" @@ -2759,13 +2935,13 @@ "Documents" ], "summary": "Delete document", - "description": "Delete a single document by id.", + "description": "Delete a single document by its [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key).", "operationId": "delete_document", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -2775,7 +2951,7 @@ { "name": "documentId", "in": "path", - "description": "Document Identifier", + "description": "Document identifier.", "required": true, "schema": { "type": "string" @@ -2784,8 +2960,8 @@ } ], "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -2802,7 +2978,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -2816,6 +2992,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -2881,13 +3073,13 @@ "Facet Search" ], "summary": "Search in facets", - "description": "Search for a facet value within a given facet.", + "description": "Search for facet values within a given facet.\n\n> Use this to build autocomplete or refinement UIs for facet filters.", "operationId": "search", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -2907,7 +3099,7 @@ }, "responses": { "200": { - "description": "The documents are returned", + "description": "The documents are returned.", "content": { "application/json": { "schema": { @@ -2940,7 +3132,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -2956,7 +3148,7 @@ } }, "404": { - "description": "Index not found", + "description": "Index not found.", "content": { "application/json": { "schema": { @@ -3032,7 +3224,7 @@ { "name": "indexUid", "in": "path", - "description": "Unique identifier of the index whose fields to list", + "description": "Unique identifier of the index whose fields to list.", "required": true, "schema": { "type": "string" @@ -3076,7 +3268,7 @@ }, "rankingRule": { "enabled": false, - "order": null + "order": [] }, "filterable": { "enabled": false, @@ -3105,7 +3297,7 @@ }, "rankingRule": { "enabled": false, - "order": null + "order": [] }, "filterable": { "enabled": true, @@ -3127,21 +3319,33 @@ } }, "401": { - "description": "Missing or invalid authorization header", + "description": "Missing or invalid authorization header.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" } } } }, "404": { - "description": "Index not found", + "description": "Index not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" } } } @@ -3170,13 +3374,13 @@ "Search" ], "summary": "Search with GET", - "description": "Search for documents matching a specific query in the given index.", + "description": "Search for documents matching a query in the given index.\n\n> Equivalent to the [search with POST route](https://www.meilisearch.com/docs/api-reference/search/search-with-post) in the Meilisearch API.", "operationId": "search_with_url_query", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -3196,7 +3400,7 @@ "name": "vector", "in": "query", "description": "A vector of floating-point numbers for semantic/vector search. The\ndimensions must match the embedder configuration. When provided,\ndocuments are ranked by vector similarity. Can be combined with `q`\nfor hybrid search.", - "required": true, + "required": false, "schema": { "type": "array", "items": { @@ -3210,7 +3414,7 @@ "name": "offset", "in": "query", "description": "Number of search results to skip. Use together with `limit` for\npagination. For example, to get results 21-40, set `offset=20` and\n`limit=20`. Defaults to `0`. Cannot be used with `page`/`hitsPerPage`.", - "required": true, + "required": false, "schema": { "type": "integer", "default": 0, @@ -3221,7 +3425,7 @@ "name": "limit", "in": "query", "description": "Maximum number of search results to return. Use together with `offset`\nfor pagination. Defaults to `20`. Cannot be used with\n`page`/`hitsPerPage`.", - "required": true, + "required": false, "schema": { "type": "integer", "default": 20, @@ -3252,7 +3456,7 @@ "name": "attributesToRetrieve", "in": "query", "description": "Comma-separated list of attributes to include in the returned\ndocuments. Use `*` to return all attributes. By default, returns\nattributes from the `displayedAttributes` setting.", - "required": true, + "required": false, "schema": { "type": "array", "items": { @@ -3265,7 +3469,7 @@ "name": "retrieveVectors", "in": "query", "description": "When `true`, includes vector embeddings in the response for documents\nthat have them. Defaults to `false`.", - "required": true, + "required": false, "schema": { "type": "boolean" } @@ -3274,7 +3478,7 @@ "name": "attributesToCrop", "in": "query", "description": "Comma-separated list of attributes whose values should be cropped to\nfit within `cropLength`. Useful for displaying long text attributes\nin search results. Format: `attribute` or `attribute:length`.", - "required": true, + "required": false, "schema": { "type": "array", "items": { @@ -3287,7 +3491,7 @@ "name": "cropLength", "in": "query", "description": "Maximum number of words to keep when cropping attribute values. The\ncropped text will be centered around the matching terms. Defaults to\n`10`.", - "required": true, + "required": false, "schema": { "type": "integer", "default": 10, @@ -3298,7 +3502,7 @@ "name": "attributesToHighlight", "in": "query", "description": "Comma-separated list of attributes whose matching terms should be\nhighlighted with `highlightPreTag` and `highlightPostTag`. Use `*` to\nhighlight all searchable attributes.", - "required": true, + "required": false, "schema": { "type": "array", "items": { @@ -3338,7 +3542,7 @@ "name": "showMatchesPosition", "in": "query", "description": "When `true`, returns the position (start and length) of each matched\nterm in the original document attributes. Useful for custom\nhighlighting implementations.", - "required": true, + "required": false, "schema": { "type": "boolean" } @@ -3347,7 +3551,7 @@ "name": "showRankingScore", "in": "query", "description": "When `true`, includes a `_rankingScore` field (0.0 to 1.0) in each\ndocument indicating how well it matches the query. Higher scores mean\nbetter matches.", - "required": true, + "required": false, "schema": { "type": "boolean" } @@ -3356,7 +3560,7 @@ "name": "showRankingScoreDetails", "in": "query", "description": "When `true`, includes a `_rankingScoreDetails` object showing the\ncontribution of each ranking rule to the final score. Useful for\ndebugging relevancy.", - "required": true, + "required": false, "schema": { "type": "boolean" } @@ -3365,7 +3569,7 @@ "name": "showPerformanceDetails", "in": "query", "description": "When `true`, includes a `_performanceDetails` object showing the\nperformance details of the search.", - "required": true, + "required": false, "schema": { "type": "boolean" } @@ -3374,7 +3578,7 @@ "name": "facets", "in": "query", "description": "Comma-separated list of attributes for which to return facet\ndistribution (value counts). Only attributes in `filterableAttributes`\ncan be used. Returns the count of documents matching each facet value.", - "required": true, + "required": false, "schema": { "type": "array", "items": { @@ -3387,7 +3591,7 @@ "name": "highlightPreTag", "in": "query", "description": "HTML tag or string to insert before highlighted matching terms.\nDefaults to ``.", - "required": true, + "required": false, "schema": { "type": "string", "default": "" @@ -3397,7 +3601,7 @@ "name": "highlightPostTag", "in": "query", "description": "HTML tag or string to insert after highlighted matching terms.\nDefaults to ``.", - "required": true, + "required": false, "schema": { "type": "string", "default": "" @@ -3407,7 +3611,7 @@ "name": "cropMarker", "in": "query", "description": "String used to indicate truncated content when cropping. Defaults to\n`…` (ellipsis).", - "required": true, + "required": false, "schema": { "type": "string", "default": "…" @@ -3417,7 +3621,7 @@ "name": "matchingStrategy", "in": "query", "description": "Strategy for matching query terms. `last` (default): all terms must\nmatch, removing terms from the end if needed. `all`: all terms must\nmatch exactly. `frequency`: prioritizes matching frequent terms.", - "required": true, + "required": false, "schema": { "$ref": "#/components/schemas/MatchingStrategy" } @@ -3426,7 +3630,7 @@ "name": "attributesToSearchOn", "in": "query", "description": "Comma-separated list of attributes to search in. By default, searches\nall `searchableAttributes`. Use this to restrict search to specific\nfields for better performance or relevance.", - "required": true, + "required": false, "schema": { "type": "array", "items": { @@ -3448,7 +3652,7 @@ "name": "hybridSemanticRatio", "in": "query", "description": "Balance between keyword search (0.0) and semantic/vector search (1.0)\nin hybrid search. A value of 0.5 gives equal weight to both. Defaults\nto `0.5`.", - "required": true, + "required": false, "schema": { "type": "number", "format": "float" @@ -3458,7 +3662,7 @@ "name": "rankingScoreThreshold", "in": "query", "description": "Minimum ranking score (0.0 to 1.0) a document must have to be\nincluded in results. Documents with lower scores are excluded. Useful\nfor filtering out poor matches.", - "required": true, + "required": false, "schema": { "type": "number", "format": "float" @@ -3468,7 +3672,7 @@ "name": "locales", "in": "query", "description": "Comma-separated list of language locales to use for tokenization and\nprocessing. Useful for multilingual content. Example: `en,fr,de`.", - "required": true, + "required": false, "schema": { "type": "array", "items": { @@ -3489,6 +3693,7 @@ { "name": "useNetwork", "in": "query", + "description": "When `true`, runs the query on the whole network (all shards covered, documents\ndeduplicated across remotes). When `false` or omitted, the query runs locally.\n\n**Enterprise Edition only.** This feature is available in the Enterprise Edition.\nIt also requires the `network` experimental feature.\n\nValues: `true` = use the whole network; `false` or omitted = local (default).\n\nWhen using the network, the index must exist with compatible settings on all remotes;\ndocuments with the same id are assumed identical for deduplication.", "required": false, "schema": { "type": "boolean" @@ -3497,7 +3702,7 @@ ], "responses": { "200": { - "description": "The documents are returned", + "description": "The documents are returned.", "content": { "application/json": { "schema": { @@ -3530,7 +3735,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -3546,7 +3751,7 @@ } }, "404": { - "description": "Index not found", + "description": "Index not found.", "content": { "application/json": { "schema": { @@ -3586,13 +3791,13 @@ "Search" ], "summary": "Search with POST", - "description": "Search for documents matching a specific query in the given index.", + "description": "Search for documents matching a query in the given index.\n\n> Equivalent to the [search with GET route](https://www.meilisearch.com/docs/api-reference/search/search-with-get) in the Meilisearch API.", "operationId": "search_with_post", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -3612,7 +3817,7 @@ }, "responses": { "200": { - "description": "The documents are returned", + "description": "The documents are returned.", "content": { "application/json": { "schema": { @@ -3645,7 +3850,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -3661,7 +3866,7 @@ } }, "404": { - "description": "Index not found", + "description": "Index not found.", "content": { "application/json": { "schema": { @@ -3738,14 +3943,14 @@ "tags": [ "Settings" ], - "summary": "List settings", - "description": "This route allows you to retrieve, configure, or reset all of an index's settings at once.", + "summary": "List all settings", + "description": "Returns all settings of the index. Each setting is returned with its current value or the default if not set.", "operationId": "get_all", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -3755,7 +3960,7 @@ ], "responses": { "200": { - "description": "Settings are returned", + "description": "Returns all settings with their current or default values.", "content": { "application/json": { "schema": { @@ -3766,7 +3971,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -3780,11 +3985,27 @@ } } } - } - }, - "security": [ - { - "Bearer": [ + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ "settings.update", "settings.*", "*" @@ -3842,14 +4063,14 @@ "tags": [ "Settings" ], - "summary": "Reset settings", - "description": "Reset all the settings of an index to their default value.", + "summary": "Reset all settings", + "description": "Resets all settings of the index to their default values.", "operationId": "delete_all", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -3858,8 +4079,8 @@ } ], "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -3876,7 +4097,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -3890,6 +4111,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -3952,14 +4189,14 @@ "tags": [ "Settings" ], - "summary": "Update settings", - "description": "Update the settings of an index.\nPassing null to an index setting will reset it to its default value.\nUpdates in the settings route are partial. This means that any parameters not provided in the body will be left unchanged.\nIf the provided index does not exist, it will be created.", + "summary": "Update all settings", + "description": "Updates one or more settings for the index. Only the fields sent in the body are changed. Pass null for a setting to reset it to its default. If the index does not exist, it is created.", "operationId": "update_all", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -3978,8 +4215,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -3996,7 +4233,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4010,6 +4247,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4071,13 +4324,13 @@ "Settings" ], "summary": "Get chat", - "description": "Get an user defined chat", + "description": "Returns the current value of the `chat` setting for the index.", "operationId": "getchat", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4087,7 +4340,7 @@ ], "responses": { "200": { - "description": "chat is returned", + "description": "Returns the current value of the `chat` setting.", "content": { "application/json": { "schema": { @@ -4098,7 +4351,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4112,6 +4365,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4135,13 +4404,13 @@ "Settings" ], "summary": "Reset chat", - "description": "Reset an index's chat to its default value", + "description": "Resets the `chat` setting to its default value.", "operationId": "deletechat", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4149,19 +4418,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChatSettings" - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -4178,7 +4437,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4192,6 +4451,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4215,13 +4490,13 @@ "Settings" ], "summary": "Update chat", - "description": "Update an index's user defined chat", + "description": "Updates the `chat` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "patchchat", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4240,8 +4515,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -4258,7 +4533,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4272,6 +4547,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4297,13 +4588,13 @@ "Settings" ], "summary": "Get dictionary", - "description": "Get an user defined dictionary", + "description": "Returns the current value of the `dictionary` setting for the index.", "operationId": "getdictionary", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4313,7 +4604,7 @@ ], "responses": { "200": { - "description": "dictionary is returned", + "description": "Returns the current value of the `dictionary` setting.", "content": { "application/json": { "schema": { @@ -4328,7 +4619,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4342,6 +4633,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4401,13 +4708,13 @@ "Settings" ], "summary": "Update dictionary", - "description": "Update an index's user defined dictionary", + "description": "Updates the `dictionary` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putdictionary", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4430,8 +4737,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -4448,7 +4755,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4462,6 +4769,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4521,13 +4844,13 @@ "Settings" ], "summary": "Reset dictionary", - "description": "Reset an index's dictionary to its default value", + "description": "Resets the `dictionary` setting to its default value.", "operationId": "deletedictionary", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4535,23 +4858,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -4568,7 +4877,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4582,6 +4891,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4643,13 +4968,13 @@ "Settings" ], "summary": "Get displayedAttributes", - "description": "Get an user defined displayedAttributes", + "description": "Returns the current value of the `displayedAttributes` setting for the index.", "operationId": "getdisplayedAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4659,7 +4984,7 @@ ], "responses": { "200": { - "description": "displayedAttributes is returned", + "description": "Returns the current value of the `displayedAttributes` setting.", "content": { "application/json": { "schema": { @@ -4673,7 +4998,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4687,6 +5012,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4750,13 +5091,13 @@ "Settings" ], "summary": "Update displayedAttributes", - "description": "Update an index's user defined displayedAttributes", + "description": "Updates the `displayedAttributes` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putdisplayedAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4778,8 +5119,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -4796,7 +5137,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4810,6 +5151,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4869,13 +5226,13 @@ "Settings" ], "summary": "Reset displayedAttributes", - "description": "Reset an index's displayedAttributes to its default value", + "description": "Resets the `displayedAttributes` setting to its default value.", "operationId": "deletedisplayedAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4883,22 +5240,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -4915,7 +5259,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4929,6 +5273,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4994,13 +5354,13 @@ "Settings" ], "summary": "Get distinctAttribute", - "description": "Get an user defined distinctAttribute", + "description": "Returns the current value of the `distinctAttribute` setting for the index.", "operationId": "getdistinctAttribute", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5010,7 +5370,7 @@ ], "responses": { "200": { - "description": "distinctAttribute is returned", + "description": "Returns the current value of the `distinctAttribute` setting.", "content": { "application/json": { "schema": { @@ -5021,7 +5381,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5035,6 +5395,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5098,13 +5474,13 @@ "Settings" ], "summary": "Update distinctAttribute", - "description": "Update an index's user defined distinctAttribute", + "description": "Updates the `distinctAttribute` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putdistinctAttribute", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5123,8 +5499,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -5141,7 +5517,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5155,7 +5531,23 @@ } } } - } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } }, "security": [ { @@ -5218,13 +5610,13 @@ "Settings" ], "summary": "Reset distinctAttribute", - "description": "Reset an index's distinctAttribute to its default value", + "description": "Resets the `distinctAttribute` setting to its default value.", "operationId": "deletedistinctAttribute", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5232,19 +5624,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -5261,7 +5643,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5275,6 +5657,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5340,13 +5738,13 @@ "Settings" ], "summary": "Get embedders", - "description": "Get an user defined embedders", + "description": "Returns the current value of the `embedders` setting for the index.", "operationId": "getembedders", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5356,7 +5754,7 @@ ], "responses": { "200": { - "description": "embedders is returned", + "description": "Returns the current value of the `embedders` setting.", "content": { "application/json": { "schema": { @@ -5373,7 +5771,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5387,6 +5785,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5418,13 +5832,13 @@ "Settings" ], "summary": "Reset embedders", - "description": "Reset an index's embedders to its default value", + "description": "Resets the `embedders` setting to its default value.", "operationId": "deleteembedders", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5432,25 +5846,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/SettingEmbeddingSettings" - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -5467,7 +5865,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5481,6 +5879,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5512,13 +5926,13 @@ "Settings" ], "summary": "Update embedders", - "description": "Update an index's user defined embedders", + "description": "Updates the `embedders` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "patchembedders", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5543,8 +5957,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -5561,7 +5975,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5575,6 +5989,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5616,13 +6046,13 @@ "Settings" ], "summary": "Get facetSearch", - "description": "Get an user defined facetSearch", + "description": "Returns the current value of the `facetSearch` setting for the index.", "operationId": "getfacetSearch", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5632,7 +6062,7 @@ ], "responses": { "200": { - "description": "facetSearch is returned", + "description": "Returns the current value of the `facetSearch` setting.", "content": { "application/json": { "schema": { @@ -5643,7 +6073,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5657,6 +6087,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5704,13 +6150,13 @@ "Settings" ], "summary": "Update facetSearch", - "description": "Update an index's user defined facetSearch", + "description": "Updates the `facetSearch` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putfacetSearch", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5729,8 +6175,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -5747,7 +6193,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5761,6 +6207,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5808,13 +6270,13 @@ "Settings" ], "summary": "Reset facetSearch", - "description": "Reset an index's facetSearch to its default value", + "description": "Resets the `facetSearch` setting to its default value.", "operationId": "deletefacetSearch", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5822,19 +6284,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "boolean" - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -5851,7 +6303,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5865,6 +6317,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5914,13 +6382,13 @@ "Settings" ], "summary": "Get faceting", - "description": "Get an user defined faceting", + "description": "Returns the current value of the `faceting` setting for the index.", "operationId": "getfaceting", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5930,7 +6398,7 @@ ], "responses": { "200": { - "description": "faceting is returned", + "description": "Returns the current value of the `faceting` setting.", "content": { "application/json": { "schema": { @@ -5941,7 +6409,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5955,6 +6423,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6014,13 +6498,13 @@ "Settings" ], "summary": "Reset faceting", - "description": "Reset an index's faceting to its default value", + "description": "Resets the `faceting` setting to its default value.", "operationId": "deletefaceting", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6028,19 +6512,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FacetingSettings" - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -6057,7 +6531,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6071,6 +6545,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6130,13 +6620,13 @@ "Settings" ], "summary": "Update faceting", - "description": "Update an index's user defined faceting", + "description": "Updates the `faceting` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "patchfaceting", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6155,8 +6645,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -6173,7 +6663,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6187,6 +6677,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6244,13 +6750,13 @@ "Settings" ], "summary": "Get filterableAttributes", - "description": "Get an user defined filterableAttributes", + "description": "Returns the current value of the `filterableAttributes` setting for the index.", "operationId": "getfilterableAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6260,7 +6766,7 @@ ], "responses": { "200": { - "description": "filterableAttributes is returned", + "description": "Returns the current value of the `filterableAttributes` setting.", "content": { "application/json": { "schema": { @@ -6274,7 +6780,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6288,6 +6794,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6351,13 +6873,13 @@ "Settings" ], "summary": "Update filterableAttributes", - "description": "Update an index's user defined filterableAttributes", + "description": "Updates the `filterableAttributes` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putfilterableAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6379,8 +6901,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -6397,7 +6919,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6411,6 +6933,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6470,13 +7008,13 @@ "Settings" ], "summary": "Reset filterableAttributes", - "description": "Reset an index's filterableAttributes to its default value", + "description": "Resets the `filterableAttributes` setting to its default value.", "operationId": "deletefilterableAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6484,22 +7022,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FilterableAttributesRule" - } - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -6516,7 +7041,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6530,6 +7055,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6595,13 +7136,13 @@ "Settings" ], "summary": "Get localizedAttributes", - "description": "Get an user defined localizedAttributes", + "description": "Returns the current value of the `localizedAttributes` setting for the index.", "operationId": "getlocalizedAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6611,7 +7152,7 @@ ], "responses": { "200": { - "description": "localizedAttributes is returned", + "description": "Returns the current value of the `localizedAttributes` setting.", "content": { "application/json": { "schema": { @@ -6625,7 +7166,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6639,6 +7180,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6690,13 +7247,13 @@ "Settings" ], "summary": "Update localizedAttributes", - "description": "Update an index's user defined localizedAttributes", + "description": "Updates the `localizedAttributes` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putlocalizedAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6718,8 +7275,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -6736,7 +7293,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6750,6 +7307,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6801,13 +7374,13 @@ "Settings" ], "summary": "Reset localizedAttributes", - "description": "Reset an index's localizedAttributes to its default value", + "description": "Resets the `localizedAttributes` setting to its default value.", "operationId": "deletelocalizedAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6815,22 +7388,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LocalizedAttributesRuleView" - } - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -6847,7 +7407,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6861,6 +7421,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6914,13 +7490,13 @@ "Settings" ], "summary": "Get nonSeparatorTokens", - "description": "Get an user defined nonSeparatorTokens", + "description": "Returns the current value of the `nonSeparatorTokens` setting for the index.", "operationId": "getnonSeparatorTokens", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6930,7 +7506,7 @@ ], "responses": { "200": { - "description": "nonSeparatorTokens is returned", + "description": "Returns the current value of the `nonSeparatorTokens` setting.", "content": { "application/json": { "schema": { @@ -6945,7 +7521,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6959,6 +7535,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -7018,13 +7610,13 @@ "Settings" ], "summary": "Update nonSeparatorTokens", - "description": "Update an index's user defined nonSeparatorTokens", + "description": "Updates the `nonSeparatorTokens` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putnonSeparatorTokens", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -7047,8 +7639,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -7065,7 +7657,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -7079,6 +7671,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -7138,13 +7746,13 @@ "Settings" ], "summary": "Reset nonSeparatorTokens", - "description": "Reset an index's nonSeparatorTokens to its default value", + "description": "Resets the `nonSeparatorTokens` setting to its default value.", "operationId": "deletenonSeparatorTokens", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -7152,23 +7760,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -7185,7 +7779,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -7199,6 +7793,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -7260,13 +7870,13 @@ "Settings" ], "summary": "Get pagination", - "description": "Get an user defined pagination", + "description": "Returns the current value of the `pagination` setting for the index.", "operationId": "getpagination", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -7276,7 +7886,7 @@ ], "responses": { "200": { - "description": "pagination is returned", + "description": "Returns the current value of the `pagination` setting.", "content": { "application/json": { "schema": { @@ -7287,7 +7897,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -7301,6 +7911,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -7360,13 +7986,13 @@ "Settings" ], "summary": "Reset pagination", - "description": "Reset an index's pagination to its default value", + "description": "Resets the `pagination` setting to its default value.", "operationId": "deletepagination", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -7374,19 +8000,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationSettings" - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -7403,7 +8019,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -7417,6 +8033,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -7476,13 +8108,13 @@ "Settings" ], "summary": "Update pagination", - "description": "Update an index's user defined pagination", + "description": "Updates the `pagination` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "patchpagination", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -7501,8 +8133,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -7519,7 +8151,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -7533,6 +8165,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -7590,13 +8238,13 @@ "Settings" ], "summary": "Get prefixSearch", - "description": "Get an user defined prefixSearch", + "description": "Returns the current value of the `prefixSearch` setting for the index.", "operationId": "getprefixSearch", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -7606,7 +8254,7 @@ ], "responses": { "200": { - "description": "prefixSearch is returned", + "description": "Returns the current value of the `prefixSearch` setting.", "content": { "application/json": { "schema": { @@ -7617,7 +8265,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -7631,6 +8279,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -7678,13 +8342,13 @@ "Settings" ], "summary": "Update prefixSearch", - "description": "Update an index's user defined prefixSearch", + "description": "Updates the `prefixSearch` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putprefixSearch", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -7703,8 +8367,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -7721,7 +8385,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -7735,6 +8399,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -7782,13 +8462,13 @@ "Settings" ], "summary": "Reset prefixSearch", - "description": "Reset an index's prefixSearch to its default value", + "description": "Resets the `prefixSearch` setting to its default value.", "operationId": "deleteprefixSearch", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -7796,19 +8476,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PrefixSearchSettings" - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -7825,7 +8495,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -7839,6 +8509,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -7888,13 +8574,13 @@ "Settings" ], "summary": "Get proximityPrecision", - "description": "Get an user defined proximityPrecision", + "description": "Returns the current value of the `proximityPrecision` setting for the index.", "operationId": "getproximityPrecision", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -7904,7 +8590,7 @@ ], "responses": { "200": { - "description": "proximityPrecision is returned", + "description": "Returns the current value of the `proximityPrecision` setting.", "content": { "application/json": { "schema": { @@ -7915,7 +8601,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -7929,6 +8615,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -7988,13 +8690,13 @@ "Settings" ], "summary": "Update proximityPrecision", - "description": "Update an index's user defined proximityPrecision", + "description": "Updates the `proximityPrecision` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putproximityPrecision", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -8013,8 +8715,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -8031,7 +8733,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8045,6 +8747,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -8104,33 +8822,23 @@ "Settings" ], "summary": "Reset proximityPrecision", - "description": "Reset an index's proximityPrecision to its default value", + "description": "Resets the `proximityPrecision` setting to its default value.", "operationId": "deleteproximityPrecision", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" }, "example": "movies" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProximityPrecisionView" - } - } - }, - "required": true - }, + ], "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -8147,7 +8855,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8161,6 +8869,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -8222,13 +8946,13 @@ "Settings" ], "summary": "Get rankingRules", - "description": "Get an user defined rankingRules", + "description": "Returns the current value of the `rankingRules` setting for the index.", "operationId": "getrankingRules", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -8238,7 +8962,7 @@ ], "responses": { "200": { - "description": "rankingRules is returned", + "description": "Returns the current value of the `rankingRules` setting.", "content": { "application/json": { "schema": { @@ -8252,7 +8976,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8266,6 +8990,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -8329,13 +9069,13 @@ "Settings" ], "summary": "Update rankingRules", - "description": "Update an index's user defined rankingRules", + "description": "Updates the `rankingRules` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putrankingRules", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -8357,8 +9097,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -8375,7 +9115,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8389,6 +9129,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -8448,13 +9204,13 @@ "Settings" ], "summary": "Reset rankingRules", - "description": "Reset an index's rankingRules to its default value", + "description": "Resets the `rankingRules` setting to its default value.", "operationId": "deleterankingRules", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -8462,22 +9218,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RankingRuleView" - } - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -8494,7 +9237,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8508,6 +9251,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -8573,13 +9332,13 @@ "Settings" ], "summary": "Get searchCutoffMs", - "description": "Get an user defined searchCutoffMs", + "description": "Returns the current value of the `searchCutoffMs` setting for the index.", "operationId": "getsearchCutoffMs", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -8589,7 +9348,7 @@ ], "responses": { "200": { - "description": "searchCutoffMs is returned", + "description": "Returns the current value of the `searchCutoffMs` setting.", "content": { "application/json": { "schema": { @@ -8602,7 +9361,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8616,6 +9375,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -8675,13 +9450,13 @@ "Settings" ], "summary": "Update searchCutoffMs", - "description": "Update an index's user defined searchCutoffMs", + "description": "Updates the `searchCutoffMs` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putsearchCutoffMs", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -8702,8 +9477,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -8720,7 +9495,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8734,6 +9509,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -8793,13 +9584,13 @@ "Settings" ], "summary": "Reset searchCutoffMs", - "description": "Reset an index's searchCutoffMs to its default value", + "description": "Resets the `searchCutoffMs` setting to its default value.", "operationId": "deletesearchCutoffMs", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -8807,21 +9598,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -8838,7 +9617,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8852,6 +9631,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -8913,13 +9708,13 @@ "Settings" ], "summary": "Get searchableAttributes", - "description": "Get an user defined searchableAttributes", + "description": "Returns the current value of the `searchableAttributes` setting for the index.", "operationId": "getsearchableAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -8929,7 +9724,7 @@ ], "responses": { "200": { - "description": "searchableAttributes is returned", + "description": "Returns the current value of the `searchableAttributes` setting.", "content": { "application/json": { "schema": { @@ -8943,7 +9738,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8957,6 +9752,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -9020,13 +9831,13 @@ "Settings" ], "summary": "Update searchableAttributes", - "description": "Update an index's user defined searchableAttributes", + "description": "Updates the `searchableAttributes` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putsearchableAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -9048,8 +9859,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -9066,7 +9877,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -9080,6 +9891,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -9139,13 +9966,13 @@ "Settings" ], "summary": "Reset searchableAttributes", - "description": "Reset an index's searchableAttributes to its default value", + "description": "Resets the `searchableAttributes` setting to its default value.", "operationId": "deletesearchableAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -9153,22 +9980,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -9185,7 +9999,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -9199,6 +10013,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -9264,13 +10094,13 @@ "Settings" ], "summary": "Get separatorTokens", - "description": "Get an user defined separatorTokens", + "description": "Returns the current value of the `separatorTokens` setting for the index.", "operationId": "getseparatorTokens", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -9280,7 +10110,7 @@ ], "responses": { "200": { - "description": "separatorTokens is returned", + "description": "Returns the current value of the `separatorTokens` setting.", "content": { "application/json": { "schema": { @@ -9295,7 +10125,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -9309,6 +10139,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -9368,13 +10214,13 @@ "Settings" ], "summary": "Update separatorTokens", - "description": "Update an index's user defined separatorTokens", + "description": "Updates the `separatorTokens` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putseparatorTokens", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -9397,8 +10243,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -9415,7 +10261,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -9429,6 +10275,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -9488,37 +10350,23 @@ "Settings" ], "summary": "Reset separatorTokens", - "description": "Reset an index's separatorTokens to its default value", + "description": "Resets the `separatorTokens` setting to its default value.", "operationId": "deleteseparatorTokens", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, + "description": "Unique identifier of the index.", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -9535,7 +10383,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -9549,6 +10397,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -9610,13 +10474,13 @@ "Settings" ], "summary": "Get sortableAttributes", - "description": "Get an user defined sortableAttributes", + "description": "Returns the current value of the `sortableAttributes` setting for the index.", "operationId": "getsortableAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -9626,7 +10490,7 @@ ], "responses": { "200": { - "description": "sortableAttributes is returned", + "description": "Returns the current value of the `sortableAttributes` setting.", "content": { "application/json": { "schema": { @@ -9641,7 +10505,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -9655,6 +10519,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -9718,13 +10598,13 @@ "Settings" ], "summary": "Update sortableAttributes", - "description": "Update an index's user defined sortableAttributes", + "description": "Updates the `sortableAttributes` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putsortableAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -9747,8 +10627,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -9765,7 +10645,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -9779,6 +10659,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -9838,13 +10734,13 @@ "Settings" ], "summary": "Reset sortableAttributes", - "description": "Reset an index's sortableAttributes to its default value", + "description": "Resets the `sortableAttributes` setting to its default value.", "operationId": "deletesortableAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -9852,23 +10748,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -9885,7 +10767,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -9899,6 +10781,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -9964,13 +10862,13 @@ "Settings" ], "summary": "Get stopWords", - "description": "Get an user defined stopWords", + "description": "Returns the current value of the `stopWords` setting for the index.", "operationId": "getstopWords", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -9980,7 +10878,7 @@ ], "responses": { "200": { - "description": "stopWords is returned", + "description": "Returns the current value of the `stopWords` setting.", "content": { "application/json": { "schema": { @@ -9995,7 +10893,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -10009,6 +10907,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -10072,13 +10986,13 @@ "Settings" ], "summary": "Update stopWords", - "description": "Update an index's user defined stopWords", + "description": "Updates the `stopWords` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putstopWords", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -10101,8 +11015,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -10119,7 +11033,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -10133,6 +11047,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -10196,13 +11126,13 @@ "Settings" ], "summary": "Reset stopWords", - "description": "Reset an index's stopWords to its default value", + "description": "Resets the `stopWords` setting to its default value.", "operationId": "deletestopWords", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -10210,23 +11140,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -10243,7 +11159,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -10257,6 +11173,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -10322,13 +11254,13 @@ "Settings" ], "summary": "Get synonyms", - "description": "Get an user defined synonyms", + "description": "Returns the current value of the `synonyms` setting for the index.", "operationId": "getsynonyms", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -10338,7 +11270,7 @@ ], "responses": { "200": { - "description": "synonyms is returned", + "description": "Returns the current value of the `synonyms` setting.", "content": { "application/json": { "schema": { @@ -10358,7 +11290,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -10372,6 +11304,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -10435,13 +11383,13 @@ "Settings" ], "summary": "Update synonyms", - "description": "Update an index's user defined synonyms", + "description": "Updates the `synonyms` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putsynonyms", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -10469,8 +11417,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -10487,7 +11435,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -10501,6 +11449,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -10560,13 +11524,13 @@ "Settings" ], "summary": "Reset synonyms", - "description": "Reset an index's synonyms to its default value", + "description": "Resets the `synonyms` setting to its default value.", "operationId": "deletesynonyms", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -10574,28 +11538,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -10612,7 +11557,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -10626,6 +11571,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -10691,13 +11652,13 @@ "Settings" ], "summary": "Get typoTolerance", - "description": "Get an user defined typoTolerance", + "description": "Returns the current value of the `typoTolerance` setting for the index.", "operationId": "gettypoTolerance", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -10707,7 +11668,7 @@ ], "responses": { "200": { - "description": "typoTolerance is returned", + "description": "Returns the current value of the `typoTolerance` setting.", "content": { "application/json": { "schema": { @@ -10718,7 +11679,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -10732,6 +11693,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -10783,13 +11760,13 @@ "Settings" ], "summary": "Reset typoTolerance", - "description": "Reset an index's typoTolerance to its default value", + "description": "Resets the `typoTolerance` setting to its default value.", "operationId": "deletetypoTolerance", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -10797,19 +11774,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TypoSettings" - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -10825,18 +11792,34 @@ } } }, - "401": { - "description": "The authorization header is missing", + "401": { + "description": "The authorization header is missing.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" }, "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" } } } @@ -10899,13 +11882,13 @@ "Settings" ], "summary": "Update typoTolerance", - "description": "Update an index's user defined typoTolerance", + "description": "Updates the `typoTolerance` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "patchtypoTolerance", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -10924,8 +11907,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -10942,7 +11925,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -10956,6 +11939,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -11017,13 +12016,13 @@ "Settings" ], "summary": "Get vectorStore", - "description": "Get an user defined vectorStore", + "description": "Returns the current value of the `vectorStore` setting for the index.", "operationId": "getvectorStore", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -11033,7 +12032,7 @@ ], "responses": { "200": { - "description": "vectorStore is returned", + "description": "Returns the current value of the `vectorStore` setting.", "content": { "application/json": { "schema": { @@ -11044,7 +12043,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -11058,6 +12057,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -11081,13 +12096,13 @@ "Settings" ], "summary": "Reset vectorStore", - "description": "Reset an index's vectorStore to its default value", + "description": "Resets the `vectorStore` setting to its default value.", "operationId": "deletevectorStore", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -11095,19 +12110,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VectorStoreBackend" - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -11124,7 +12129,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -11138,6 +12143,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -11161,13 +12182,13 @@ "Settings" ], "summary": "Update vectorStore", - "description": "Update an index's user defined vectorStore", + "description": "Updates the `vectorStore` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "patchvectorStore", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -11186,8 +12207,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -11204,7 +12225,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -11218,6 +12239,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -11243,13 +12280,13 @@ "Similar documents" ], "summary": "Get similar documents with GET", - "description": "Retrieve documents similar to a specific search result.", + "description": "Retrieve documents similar to a reference document identified by its id.\n\n> Useful for “more like this” or recommendations.", "operationId": "similar_get", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -11259,7 +12296,16 @@ { "name": "id", "in": "query", - "description": "The unique identifier (primary key value) of the target document.\nMeilisearch will find and return documents that are semantically\nsimilar to this document based on their vector embeddings. This is a\nrequired parameter.", + "description": "The unique identifier ([primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) value) of the target document.\nMeilisearch will find and return documents that are semantically\nsimilar to this document based on their vector embeddings. This is a\nrequired parameter.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "embedder", + "in": "query", + "description": "The name of the embedder to use for finding similar documents. This\nmust match one of the embedders configured in your index settings. The\nembedder determines how document similarity is calculated based on\nvector embeddings.", "required": true, "schema": { "type": "string" @@ -11269,7 +12315,7 @@ "name": "offset", "in": "query", "description": "Number of similar documents to skip in the response. Use together with\n`limit` for pagination through large result sets. For example, to get\nsimilar documents 21-40, set `offset=20` and `limit=20`. Defaults to\n`0`.", - "required": true, + "required": false, "schema": { "type": "integer", "default": 0, @@ -11280,7 +12326,7 @@ "name": "limit", "in": "query", "description": "Maximum number of similar documents to return in a single response. Use\ntogether with `offset` for pagination. Higher values return more\nresults but may increase response time. Defaults to `20`.", - "required": true, + "required": false, "schema": { "type": "integer", "default": 20, @@ -11291,7 +12337,7 @@ "name": "attributes_to_retrieve", "in": "query", "description": "Comma-separated list of document attributes to include in the response.\nUse `*` to retrieve all attributes. By default, all attributes listed\nin the `displayedAttributes` setting are returned. Example:\n`title,description,price`.", - "required": true, + "required": false, "schema": { "type": "array", "items": { @@ -11303,7 +12349,7 @@ "name": "retrieve_vectors", "in": "query", "description": "When `true`, includes the vector embeddings for each returned document.\nUseful for debugging or when you need to inspect the vector data. Note\nthat this can significantly increase response size. Defaults to\n`false`.", - "required": true, + "required": false, "schema": { "type": "boolean" } @@ -11321,7 +12367,7 @@ "name": "show_ranking_score", "in": "query", "description": "When `true`, includes a global `_rankingScore` field in each document\nshowing how similar it is to the target document. The score is a value\nbetween 0 and 1, where higher values indicate greater similarity.\nDefaults to `false`.", - "required": true, + "required": false, "schema": { "type": "boolean" } @@ -11330,7 +12376,7 @@ "name": "show_ranking_score_details", "in": "query", "description": "When `true`, includes a detailed `_rankingScoreDetails` object in each\ndocument breaking down how the similarity score was calculated. Useful\nfor debugging and understanding why certain documents are considered\nmore similar. Defaults to `false`.", - "required": true, + "required": false, "schema": { "type": "boolean" } @@ -11339,7 +12385,7 @@ "name": "show_performance_details", "in": "query", "description": "When `true`, includes a `_performanceDetails` object showing the\nperformance details of the search.", - "required": true, + "required": false, "schema": { "type": "boolean" } @@ -11353,20 +12399,11 @@ "type": "number", "format": "float" } - }, - { - "name": "embedder", - "in": "query", - "description": "The name of the embedder to use for finding similar documents. This\nmust match one of the embedders configured in your index settings. The\nembedder determines how document similarity is calculated based on\nvector embeddings.", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { "200": { - "description": "The documents are returned", + "description": "The documents are returned.", "content": { "application/json": { "schema": { @@ -11399,7 +12436,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -11415,7 +12452,7 @@ } }, "404": { - "description": "Index not found", + "description": "Index not found.", "content": { "application/json": { "schema": { @@ -11451,13 +12488,13 @@ "Similar documents" ], "summary": "Get similar documents with POST", - "description": "Retrieve documents similar to a specific search result.", + "description": "Retrieve documents similar to a reference document identified by its id.\n\n> Useful for “more like this” or recommendations.", "operationId": "similar_post", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -11477,7 +12514,7 @@ }, "responses": { "200": { - "description": "The documents are returned", + "description": "The documents are returned.", "content": { "application/json": { "schema": { @@ -11510,7 +12547,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -11526,7 +12563,7 @@ } }, "404": { - "description": "Index not found", + "description": "Index not found.", "content": { "application/json": { "schema": { @@ -11588,13 +12625,13 @@ "Stats" ], "summary": "Get stats of index", - "description": "Get the stats of an index.", + "description": "Return statistics for a single index: document count, database size, indexing status, and field distribution.", "operationId": "get_index_stats", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -11604,7 +12641,7 @@ ], "responses": { "200": { - "description": "The stats of the index", + "description": "The stats of the index.", "content": { "application/json": { "schema": { @@ -11626,7 +12663,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -11642,7 +12679,7 @@ } }, "404": { - "description": "Index not found", + "description": "Index not found.", "content": { "application/json": { "schema": { @@ -11721,14 +12758,14 @@ "Keys" ], "summary": "List API keys", - "description": "List all API keys", + "description": "Return all API keys configured on the instance. Results are paginated and can be filtered by offset and limit. The key value itself is never returned after creation.", "operationId": "list_api_keys", "parameters": [ { "name": "offset", "in": "query", - "description": "Number of API keys to skip in the response. Use together with `limit`\nfor pagination through large sets of keys. For example, to get keys\n21-40, set `offset=20` and `limit=20`. Defaults to `0`.", - "required": true, + "description": "Number of keys to skip. Use with `limit` for pagination. Defaults to 0.", + "required": false, "schema": { "type": "integer", "default": 0, @@ -11738,8 +12775,8 @@ { "name": "limit", "in": "query", - "description": "Maximum number of API keys to return in a single response. Use together\nwith `offset` for pagination. Defaults to `20`.", - "required": true, + "description": "Maximum number of keys to return. Use with `offset` for pagination. Defaults to 20.", + "required": false, "schema": { "type": "integer", "default": 20, @@ -11748,8 +12785,8 @@ } ], "responses": { - "202": { - "description": "List of keys", + "200": { + "description": "List of keys.", "content": { "application/json": { "schema": { @@ -11781,7 +12818,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -11858,7 +12895,7 @@ "Keys" ], "summary": "Create API key", - "description": "Create an API Key.", + "description": "Create a new API key with the specified name, description, actions, and index scopes. The key value is returned only once at creation time; store it securely.", "operationId": "create_api_key", "requestBody": { "content": { @@ -11871,8 +12908,8 @@ "required": true }, "responses": { - "202": { - "description": "Key has been created", + "201": { + "description": "Key has been created.", "content": { "application/json": { "schema": { @@ -11897,7 +12934,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -11972,13 +13009,13 @@ "Keys" ], "summary": "Get API key", - "description": "Get an API key from its `uid` or its `key` field.", + "description": "Retrieve a single API key by its `uid` or by its `key` value.", "operationId": "get_api_key", "parameters": [ { "name": "uidOrKey", "in": "path", - "description": "The `uid` or `key` field of an existing API key", + "description": "The `uid` or `key` field of an existing API key.", "required": true, "schema": { "type": "string", @@ -11989,7 +13026,7 @@ ], "responses": { "200": { - "description": "The key is returned", + "description": "The key is returned.", "content": { "application/json": { "schema": { @@ -12014,7 +13051,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -12028,6 +13065,22 @@ } } } + }, + "404": { + "description": "API key not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The API key was not found.", + "code": "api_key_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#api_key_not_found" + } + } + } } }, "security": [ @@ -12091,13 +13144,13 @@ "Keys" ], "summary": "Delete API key", - "description": "Delete the specified API key.", + "description": "Permanently delete the specified API key. The key will no longer be valid for authentication.", "operationId": "delete_api_key", "parameters": [ { "name": "uidOrKey", "in": "path", - "description": "The `uid` or `key` field of an existing API key", + "description": "The `uid` or `key` field of an existing API key.", "required": true, "schema": { "type": "string", @@ -12108,10 +13161,10 @@ ], "responses": { "204": { - "description": "The key have been removed" + "description": "The key has been removed." }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -12125,6 +13178,22 @@ } } } + }, + "404": { + "description": "API key not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The API key was not found.", + "code": "api_key_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#api_key_not_found" + } + } + } } }, "security": [ @@ -12188,13 +13257,13 @@ "Keys" ], "summary": "Update API key", - "description": "Update the name and description of an API key. Updates to keys are partial.\nThis means you should provide only the fields you intend to update, as any\nfields not present in the payload will remain unchanged.", + "description": "Update the name and description of an API key.\n\nUpdates are partial: only the fields you send are changed, and any fields not present in the payload remain unchanged.", "operationId": "patch_api_key", "parameters": [ { "name": "uidOrKey", "in": "path", - "description": "The `uid` or `key` field of an existing API key", + "description": "The `uid` or `key` field of an existing API key.", "required": true, "schema": { "type": "string", @@ -12215,7 +13284,7 @@ }, "responses": { "200": { - "description": "The key have been updated", + "description": "The key has been updated.", "content": { "application/json": { "schema": { @@ -12240,7 +13309,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -12254,6 +13323,22 @@ } } } + }, + "404": { + "description": "API key not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The API key was not found.", + "code": "api_key_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#api_key_not_found" + } + } + } } }, "security": [ @@ -12315,7 +13400,7 @@ "Experimental features" ], "summary": "Update target of the console logs", - "description": "This route lets you specify at runtime the level of the console logs\noutputted on stderr.", + "description": "Configure at runtime the level of the console logs written to stderr (e.g. debug, info, warn, error).", "operationId": "update_stderr_target", "requestBody": { "content": { @@ -12329,10 +13414,10 @@ }, "responses": { "204": { - "description": "The console logs have been updated" + "description": "The console logs have been updated." }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -12371,7 +13456,7 @@ "Experimental features" ], "summary": "Retrieve logs", - "description": "Stream logs over HTTP. The format of the logs depends on the\nconfiguration specified in the payload. The logs are sent as multi-part,\nand the stream never stops, so make sure your clients correctly handle\nthat. To make the server stop sending you logs, you can call the `DELETE\n/logs/stream` route.\n\nThere can only be one listener at a timeand an error will be returned if\nyou call this route while it's being used by another client.", + "description": "Stream logs over HTTP. The format of the logs depends on the configuration specified in the payload. The logs are sent as multi-part, and the stream never stops, so ensure your client can handle a long-lived connection. To stop receiving logs, call the `DELETE /logs/stream` route.\n\nOnly one client can listen at a time. An error is returned if you call this route while it is already in use by another client.", "operationId": "get_logs", "requestBody": { "content": { @@ -12385,7 +13470,7 @@ }, "responses": { "200": { - "description": "Logs are being returned", + "description": "Logs are being returned.", "content": { "application/json": { "schema": { @@ -12396,7 +13481,7 @@ } }, "400": { - "description": "The route is already being used", + "description": "The route is already being used.", "content": { "application/json": { "schema": { @@ -12412,7 +13497,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -12449,14 +13534,14 @@ "Experimental features" ], "summary": "Stop retrieving logs", - "description": "Call this route to make the engine stops sending logs through the `POST\n/logs/stream` route.", + "description": "Call this route to make the engine stop sending logs to the client that opened the `POST /logs/stream` connection.", "operationId": "cancel_logs", "responses": { "204": { - "description": "Logs are being returned" + "description": "Logs are being returned." }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -12494,12 +13579,12 @@ "tags": [ "Stats" ], - "summary": "Get prometheus metrics", - "description": "Retrieve metrics on the engine. See https://www.meilisearch.com/docs/learn/experimental/metrics\nCurrently, [the feature is experimental](https://www.meilisearch.com/docs/learn/experimental/overview)\nwhich means it must be enabled.", + "summary": "Get Prometheus metrics", + "description": "Return metrics for the engine in Prometheus format. This is an [experimental feature](https://www.meilisearch.com/docs/learn/experimental/overview) and must be enabled before use.", "operationId": "get_metrics", "responses": { "200": { - "description": "The metrics of the instance", + "description": "The metrics of the instance.", "content": { "text/plain": { "schema": { @@ -12510,7 +13595,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -12549,7 +13634,7 @@ "Search" ], "summary": "Perform a multi-search", - "description": "Bundle multiple search queries in a single API request. Use this endpoint\nto search through multiple indexes at once.", + "description": "Run multiple search queries in a single API request.\n\nEach query can target a different index, so you can search across several indexes at once and get one combined response.", "operationId": "multi_search_with_post", "requestBody": { "content": { @@ -12563,7 +13648,7 @@ }, "responses": { "200": { - "description": "Federated multi-search", + "description": "Federated multi-search.", "content": { "application/json": { "schema": { @@ -12600,7 +13685,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -12670,11 +13755,11 @@ "Experimental features" ], "summary": "Get network topology", - "description": "Get a list of all Meilisearch instances currently known to this instance.", + "description": "Return the list of Meilisearch instances currently known to this node (self and remotes).", "operationId": "get_network", "responses": { "200": { - "description": "Known nodes are returned", + "description": "Known nodes are returned.", "content": { "application/json": { "schema": { @@ -12704,7 +13789,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -12756,7 +13841,7 @@ "Experimental features" ], "summary": "Configure network topology", - "description": "Add or remove nodes from network.", + "description": "Add or remove remote nodes from the network. Changes apply to the current instance’s view of the cluster.", "operationId": "patch_network", "requestBody": { "content": { @@ -12770,7 +13855,7 @@ }, "responses": { "200": { - "description": "New network state is returned", + "description": "New network state is returned.", "content": { "application/json": { "schema": { @@ -12800,7 +13885,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -12854,11 +13939,11 @@ "Backups" ], "summary": "Create snapshot", - "description": "Triggers a snapshot creation process. Once the process is complete, a snapshot is created in the snapshot directory. If the snapshot directory does not exist yet, it will be created.", + "description": "Trigger a snapshot creation process. When complete, a snapshot file is written to the snapshot directory. The directory is created if it does not exist.", "operationId": "create_snapshot", "responses": { "202": { - "description": "Snapshot is being created", + "description": "Snapshot is being created.", "content": { "application/json": { "schema": { @@ -12875,7 +13960,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -12950,11 +14035,11 @@ "Stats" ], "summary": "Get stats of all indexes", - "description": "Get stats of all indexes.", + "description": "Return statistics for the Meilisearch instance and for each index. Includes database size, last update time, document counts, and indexing status per index.", "operationId": "get_stats", "responses": { "200": { - "description": "The stats of the instance", + "description": "The stats of the instance.", "content": { "application/json": { "schema": { @@ -12982,7 +14067,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -13061,7 +14146,7 @@ "Indexes" ], "summary": "Swap indexes", - "description": "Swap the documents, settings, and task history of two or more indexes.\nYou can only swap indexes in pairs. However, a single request can swap as\nmany index pairs as you wish. Swapping indexes is an atomic transaction:\neither all indexes are successfully swapped, or none are. Swapping indexA\nand indexB will also replace every mention of indexA by indexB and\nvice-versa in the task history. enqueued tasks are left unmodified.", + "description": "Swap the documents, settings, and task history of two or more indexes.\n\nIndexes are swapped in pairs; a single request can include multiple pairs.\nThe operation is atomic: either all swaps succeed or none do. In the task history, every mention of one index uid is replaced by the other and vice versa.\nEnqueued tasks are left unmodified.", "operationId": "swap_indexes", "requestBody": { "content": { @@ -13077,8 +14162,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -13095,7 +14180,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -13169,13 +14254,13 @@ "Async task management" ], "summary": "List tasks", - "description": "Get all [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)", + "description": "The `/tasks` route returns information about [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) (indexing, document updates, settings changes, and so on).\n\nTasks are returned in descending order of uid by default, so the most recently created or updated tasks appear first. Results are paginated and can be filtered using query parameters such as `indexUids`, `statuses`, `types`, and date ranges.", "operationId": "get_tasks", "parameters": [ { "name": "limit", "in": "query", - "description": "Maximum number of batches to return", + "description": "Maximum number of batches to return.", "required": false, "schema": { "type": "integer", @@ -13188,7 +14273,7 @@ { "name": "from", "in": "query", - "description": "`uid` of the first batch returned", + "description": "`uid` of the first batch returned.", "required": false, "schema": { "type": "integer", @@ -13200,7 +14285,7 @@ { "name": "reverse", "in": "query", - "description": "If `true`, returns results in the reverse order, from oldest to most recent", + "description": "If `true`, returns results in the reverse order, from oldest to most recent.", "required": false, "schema": { "type": "boolean" @@ -13368,7 +14453,7 @@ ], "responses": { "200": { - "description": "Get all tasks", + "description": "The list of tasks is returned.", "content": { "application/json": { "schema": { @@ -13399,7 +14484,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -13472,7 +14557,7 @@ "Async task management" ], "summary": "Delete tasks", - "description": "Delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) on filter", + "description": "Permanently delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) matching the given filters. You must provide at least one filter (e.g. `uids`, `indexUids`, `statuses`) to specify which tasks to delete.", "operationId": "delete_tasks", "parameters": [ { @@ -13641,7 +14726,7 @@ ], "responses": { "200": { - "description": "Task successfully enqueued", + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -13658,7 +14743,7 @@ } }, "400": { - "description": "A filter is missing", + "description": "A filter is missing.", "content": { "application/json": { "schema": { @@ -13674,7 +14759,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -13690,7 +14775,7 @@ } }, "404": { - "description": "The task uid does not exist", + "description": "The task uid does not exist.", "content": { "application/json": { "schema": { @@ -13769,7 +14854,7 @@ "Async task management" ], "summary": "Cancel tasks", - "description": "Cancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", + "description": "Cancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations). You must provide at least one filter (e.g. `uids`, `indexUids`, `statuses`) to specify which tasks to cancel.", "operationId": "cancel_tasks", "parameters": [ { @@ -13938,7 +15023,7 @@ ], "responses": { "200": { - "description": "Task successfully enqueued", + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -13955,7 +15040,7 @@ } }, "400": { - "description": "A filter is missing", + "description": "A filter is missing.", "content": { "application/json": { "schema": { @@ -13971,7 +15056,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -13985,22 +15070,6 @@ } } } - }, - "404": { - "description": "The task uid does not exist", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Task :taskUid not found.", - "code": "task_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors/#task_not_found" - } - } - } } }, "security": [ @@ -14066,13 +15135,13 @@ "Async task management" ], "summary": "Get task", - "description": "Get a [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", + "description": "Retrieve a single [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations) by its uid.", "operationId": "get_task", "parameters": [ { "name": "taskUid", "in": "path", - "description": "The task identifier", + "description": "The task identifier.", "required": true, "schema": { "type": "string", @@ -14083,7 +15152,7 @@ ], "responses": { "200": { - "description": "Task successfully retrieved", + "description": "Task successfully retrieved.", "content": { "application/json": { "schema": { @@ -14106,7 +15175,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -14122,7 +15191,7 @@ } }, "404": { - "description": "The task uid does not exist", + "description": "The task uid does not exist.", "content": { "application/json": { "schema": { @@ -14197,11 +15266,11 @@ "Version" ], "summary": "Get version", - "description": "Current version of Meilisearch.", + "description": "Return the current Meilisearch version, including the commit SHA and build date.", "operationId": "get_version", "responses": { "200": { - "description": "Instance is healthy", + "description": "Instance is healthy.", "content": { "application/json": { "schema": { @@ -14216,7 +15285,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -14294,11 +15363,11 @@ "Webhooks" ], "summary": "List webhooks", - "description": "Get the list of all registered webhooks.", + "description": "Return all webhooks registered on the instance. Each webhook is returned with its URL, optional headers, and UUID (the key value is never returned).", "operationId": "get_webhooks", "responses": { "200": { - "description": "Webhooks are returned", + "description": "Webhooks are returned.", "content": { "application/json": { "schema": { @@ -14325,7 +15394,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -14379,7 +15448,7 @@ "Webhooks" ], "summary": "Create webhook", - "description": "Create a new webhook to receive task notifications.", + "description": "Register a new webhook to receive task completion notifications. You can optionally set custom headers (e.g. for authentication) and configure the callback URL.", "operationId": "post_webhook", "requestBody": { "content": { @@ -14393,7 +15462,7 @@ }, "responses": { "201": { - "description": "Webhook created successfully", + "description": "Webhook created successfully.", "content": { "application/json": { "schema": { @@ -14411,21 +15480,33 @@ } }, "400": { - "description": "Bad request", + "description": "Bad request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The webhook URL is invalid. Expected a valid URL.", + "code": "invalid_webhook_url", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#invalid_webhook_url" } } } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" } } } @@ -14470,13 +15551,13 @@ "Webhooks" ], "summary": "Get webhook", - "description": "Get a single webhook by its UUID.", + "description": "Retrieve a single webhook by its UUID.", "operationId": "get_webhook", "parameters": [ { "name": "uuid", "in": "path", - "description": "The universally unique identifier of the webhook", + "description": "Unique identifier of the webhook.", "required": true, "schema": { "type": "string", @@ -14486,7 +15567,7 @@ ], "responses": { "200": { - "description": "Webhook found", + "description": "Webhook found.", "content": { "application/json": { "schema": { @@ -14504,21 +15585,33 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" } } } }, "404": { - "description": "Webhook not found", + "description": "Webhook not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The webhook was not found.", + "code": "webhook_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#webhook_not_found" } } } @@ -14562,13 +15655,13 @@ "Webhooks" ], "summary": "Delete webhook", - "description": "Delete an existing webhook by its UUID.", + "description": "Permanently remove a webhook by its UUID. The webhook will no longer receive task notifications.", "operationId": "delete_webhook", "parameters": [ { "name": "uuid", "in": "path", - "description": "The universally unique identifier of the webhook", + "description": "Universally unique identifier of the webhook.", "required": true, "schema": { "type": "string", @@ -14578,24 +15671,36 @@ ], "responses": { "204": { - "description": "Webhook deleted successfully" + "description": "Webhook deleted successfully." }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" } } } }, "404": { - "description": "Webhook not found", + "description": "Webhook not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The webhook was not found.", + "code": "webhook_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#webhook_not_found" } } } @@ -14638,13 +15743,13 @@ "Webhooks" ], "summary": "Update webhook", - "description": "Update an existing webhook's URL or headers.", + "description": "Update the URL or headers of an existing webhook identified by its UUID.", "operationId": "patch_webhook", "parameters": [ { "name": "uuid", "in": "path", - "description": "The universally unique identifier of the webhook", + "description": "Universally unique identifier of the webhook.", "required": true, "schema": { "type": "string", @@ -14664,7 +15769,7 @@ }, "responses": { "200": { - "description": "Webhook updated successfully", + "description": "Webhook updated successfully. Returns the webhook with metadata and redacted authorization headers.", "content": { "application/json": { "schema": { @@ -14682,21 +15787,49 @@ } }, "400": { - "description": "Bad request", + "description": "Bad request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The webhook URL is invalid. Expected a valid URL.", + "code": "invalid_webhook_url", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#invalid_webhook_url" } } } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Webhook not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The webhook was not found.", + "code": "webhook_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#webhook_not_found" } } } @@ -15040,7 +16173,7 @@ }, "BatchView": { "type": "object", - "description": "Represents a batch of tasks that were processed together.\n\nMeilisearch groups compatible tasks into batches for efficient processing.\nFor example, multiple document additions to the same index may be batched\ntogether. Use this view to monitor batch progress and performance.", + "description": "Represents a batch of tasks that were processed together.", "required": [ "uid", "details", @@ -15099,11 +16232,6 @@ "BrowseQuery": { "type": "object", "description": "Request body for browsing and retrieving documents from an index. Use\nthis to fetch documents with optional filtering, sorting, and pagination.\nThis is useful for displaying document lists, exporting data, or\ninspecting index contents.", - "required": [ - "offset", - "limit", - "retrieveVectors" - ], "properties": { "offset": { "type": "integer", @@ -15144,7 +16272,7 @@ "items": { "type": "string" }, - "description": "Array of specific document IDs to retrieve. Only documents with\nmatching primary key values will be returned. If not specified, all\ndocuments matching other criteria are returned. This is useful for\nfetching specific known documents.", + "description": "Array of specific document IDs to retrieve. Only documents with\nmatching [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) values will be returned. If not specified, all\ndocuments matching other criteria are returned. This is useful for\nfetching specific known documents.", "example": [ "cody", "finn", @@ -16129,8 +17257,7 @@ "type": "object", "description": "Request body for searching facet values", "required": [ - "facet_name", - "matching_strategy" + "facet_name" ], "properties": { "facet_query": { @@ -16483,7 +17610,6 @@ }, "propertyNames": { "type": "string", - "description": "An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long", "example": "movies" } }, @@ -16738,11 +17864,6 @@ "GetLogs": { "type": "object", "description": "Request body for streaming logs", - "required": [ - "target", - "mode", - "profileMemory" - ], "properties": { "target": { "type": "string", @@ -16908,7 +18029,7 @@ "string", "null" ], - "description": "Primary key of the index", + "description": "[Primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) of the index", "example": "id" } } @@ -17004,7 +18125,6 @@ }, "IndexUid": { "type": "string", - "description": "An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long", "example": "movies" }, "IndexView": { @@ -17035,7 +18155,7 @@ "string", "null" ], - "description": "Primary key of the index" + "description": "[Primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) of the index" } } }, @@ -17135,10 +18255,6 @@ }, "ListFields": { "type": "object", - "required": [ - "offset", - "limit" - ], "properties": { "offset": { "type": "integer", @@ -17646,21 +18762,21 @@ } } }, - "description": "Array of items for the current page" + "description": "Items for the current page." }, "offset": { "type": "integer", - "description": "Number of items skipped", + "description": "Number of items skipped.", "minimum": 0 }, "limit": { "type": "integer", - "description": "Maximum number of items returned", + "description": "Maximum number of items returned.", "minimum": 0 }, "total": { "type": "integer", - "description": "Total number of items matching the query", + "description": "Total number of items matching the query.", "minimum": 0 } } @@ -17704,25 +18820,25 @@ "string", "null" ], - "description": "Primary key of the index" + "description": "[Primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) of the index" } } }, - "description": "Array of items for the current page" + "description": "Items for the current page." }, "offset": { "type": "integer", - "description": "Number of items skipped", + "description": "Number of items skipped.", "minimum": 0 }, "limit": { "type": "integer", - "description": "Maximum number of items returned", + "description": "Maximum number of items returned.", "minimum": 0 }, "total": { "type": "integer", - "description": "Total number of items matching the query", + "description": "Total number of items matching the query.", "minimum": 0 } } @@ -17809,21 +18925,21 @@ } } }, - "description": "Array of items for the current page" + "description": "Items for the current page." }, "offset": { "type": "integer", - "description": "Number of items skipped", + "description": "Number of items skipped.", "minimum": 0 }, "limit": { "type": "integer", - "description": "Maximum number of items returned", + "description": "Maximum number of items returned.", "minimum": 0 }, "total": { "type": "integer", - "description": "Total number of items matching the query", + "description": "Total number of items matching the query.", "minimum": 0 } } @@ -17840,21 +18956,21 @@ "results": { "type": "array", "items": {}, - "description": "Array of items for the current page" + "description": "Items for the current page." }, "offset": { "type": "integer", - "description": "Number of items skipped", + "description": "Number of items skipped.", "minimum": 0 }, "limit": { "type": "integer", - "description": "Maximum number of items returned", + "description": "Maximum number of items returned.", "minimum": 0 }, "total": { "type": "integer", - "description": "Total number of items matching the query", + "description": "Total number of items matching the query.", "minimum": 0 } } @@ -18263,7 +19379,7 @@ "string", "null" ], - "description": "Primary key of the queried index" + "description": "[Primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) of the queried index" }, "remote": { "type": [ @@ -18276,20 +19392,6 @@ }, "SearchQuery": { "type": "object", - "required": [ - "offset", - "limit", - "retrieve_vectors", - "crop_length", - "show_matches_position", - "show_ranking_score", - "show_ranking_score_details", - "show_performance_details", - "highlight_pre_tag", - "highlight_post_tag", - "crop_marker", - "matching_strategy" - ], "properties": { "q": { "type": [ @@ -18414,7 +19516,7 @@ "boolean", "null" ], - "description": "Experimental: Whether this query should be performed on the whole network or locally.\n\nWhen performing the query on the whole network, this is \"as-if\" a remote federated search were performed,\nsuch that all shards are covered, and such that documents are deduplicated across the remotes.\n\n# Response\n\nThe response will have the same shape as a federated search response.\n\n# Edition\n\nThis feature is available in the Enterprise Edition.\n\n# Experimental\n\n- Setting this parameter to a value different from the default requires the `network` experimental feature.\n\n# Values\n\n- `Some(true)`: Use the whole network for this query.\n- `Some(false)`: Make this query local.\n- `None` (default): Same as `Some(false)`.\n\n# Assumptions when using the network\n\nNetwork queries assume that the following is true:\n\n- the target index exists with compatible settings on all remotes of the network.\n- any document with the same document id between two remotes have the same content and can be deduplicated." + "description": "When `true`, runs the query on the whole network (all shards covered, documents\ndeduplicated across remotes). When `false` or omitted, the query runs locally.\n\n**Enterprise Edition only.** This feature is available in the Enterprise Edition.\nIt also requires the `network` experimental feature.\n\nValues: `true` = use the whole network; `false` or omitted = local (default).\n\nWhen using the network, the index must exist with compatible settings on all remotes;\ndocuments with the same id are assumed identical for deduplication." }, "filter": { "description": "Filter queries by an attribute's value" @@ -19663,14 +20765,7 @@ "description": "Request body for similar document search", "required": [ "id", - "offset", - "limit", - "embedder", - "retrieve_vectors", - "show_ranking_score", - "show_ranking_score_details", - "show_performance_details", - "ranking_score_threshold" + "embedder" ], "properties": { "id": { @@ -19951,7 +21046,7 @@ "taskUid": { "type": "integer", "format": "u-int32", - "description": "Unique sequential identifier of the task", + "description": "Unique sequential identifier of the task.", "minimum": 0 }, "indexUid": { @@ -19959,27 +21054,27 @@ "string", "null" ], - "description": "Unique identifier of the targeted index. Null for global tasks" + "description": "Unique identifier of the targeted index. Null for global tasks." }, "status": { "$ref": "#/components/schemas/Status", - "description": "Status of the task. Possible values are enqueued, processing,\nsucceeded, failed, and canceled" + "description": "Status of the task. Possible values are `enqueued`, `processing`,\n`succeeded`, `failed`, and `canceled`." }, "type": { "$ref": "#/components/schemas/Kind", - "description": "Type of operation performed by the task" + "description": "Type of operation performed by the task." }, "enqueuedAt": { "type": "string", "format": "date-time", - "description": "Date and time when the task was enqueued" + "description": "Date and time when the task was enqueued." }, "customMetadata": { "type": [ "string", "null" ], - "description": "Custom metadata string that was attached to this task when it was\ncreated. This can be used to associate tasks with external systems or\nadd application-specific information." + "description": "Custom metadata attached to this task at creation. Use it to associate\ntasks with external systems or add application-specific information." } } }, @@ -19987,8 +21082,7 @@ "type": "object", "description": "Request body for swapping two indexes", "required": [ - "indexes", - "rename" + "indexes" ], "properties": { "indexes": { @@ -19996,7 +21090,7 @@ "items": { "$ref": "#/components/schemas/IndexUid" }, - "description": "Array of the two index UIDs to be swapped" + "description": "Array of the two index names to be swapped" }, "rename": { "type": "boolean", @@ -20193,7 +21287,7 @@ "string", "null" ], - "description": "New primary key of the index" + "description": "New [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) of the index" }, "uid": { "type": [ @@ -20207,9 +21301,6 @@ "UpdateStderrLogs": { "type": "object", "description": "Request body for updating stderr log configuration", - "required": [ - "target" - ], "properties": { "target": { "type": "string", @@ -20257,7 +21348,7 @@ }, "WebhookResults": { "type": "object", - "description": "Response containing a list of all registered webhooks", + "description": "Response containing a list of all registered webhooks.", "required": [ "results" ], @@ -20267,7 +21358,7 @@ "items": { "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" }, - "description": "Array of all webhooks configured in this Meilisearch instance. Each\nwebhook includes its UUID, URL, headers (with authorization values\nredacted), and editability status." + "description": "All webhooks configured on the instance. Each entry includes UUID, URL, headers (authorization redacted), and editability." } } }, @@ -20280,7 +21371,7 @@ "string", "null" ], - "description": "URL endpoint to call when tasks complete", + "description": "URL endpoint to call when tasks complete.", "example": "https://your.site/on-tasks-completed" }, "headers": { @@ -20288,7 +21379,7 @@ "object", "null" ], - "description": "HTTP headers to include in webhook requests", + "description": "HTTP headers to include in webhook requests.", "additionalProperties": { "type": "string" }, @@ -20305,7 +21396,7 @@ "allOf": [ { "$ref": "#/components/schemas/WebhookSettings", - "description": "Webhook settings" + "description": "URL and headers. Authorization header values are redacted in the response." }, { "type": "object", @@ -20317,16 +21408,16 @@ "uuid": { "type": "string", "format": "uuid", - "description": "Unique identifier of the webhook" + "description": "Unique identifier of the webhook." }, "isEditable": { "type": "boolean", - "description": "Whether the webhook can be edited" + "description": "Whether the webhook can be edited." } } } ], - "description": "A webhook with metadata and redacted authorization headers" + "description": "Webhook object with metadata and redacted authorization headers." }, "u32": { "type": "integer", @@ -20339,7 +21430,7 @@ "type": "http", "scheme": "bearer", "bearerFormat": "Uuidv4, string or JWT", - "description": "An API key is a token that you provide when making API calls. Read more about [how to secure your project](https://www.meilisearch.com/docs/learn/security/basic_security).\n\nInclude the API key to the `Authorization` header, for instance:\n`Authorization: Bearer 6436fc5237b0d6e0d64253fbaac21d135012ecf1`.\n\nIf you use a SDK, ensure you instantiate the client with the API key, for instance with JS SDK:\n`const client = new MeiliSearch({ host: 'https://your-domain.com', apiKey: '6436fc5237b0d6e0d64253fbaac21d135012ecf1' })`" + "description": "An API key is a token that you provide when making API calls. Read more about [how to secure your project](https://www.meilisearch.com/docs/learn/security/basic_security).\n\nInclude the API key to the `Authorization` header, for instance:\n```bash\n-H 'Authorization: Bearer 6436fc5237b0d6e0d64253fbaac21d135012ecf1'\n```\n\nIf you use a SDK, ensure you instantiate the client with the API key, for instance with [JS SDK](https://github.com/meilisearch/meilisearch-js):\n```js\nconst client = new MeiliSearch({\n host: 'MEILISEARCH_URL',\n apiKey: '6436fc5237b0d6e0d64253fbaac21d135012ecf1'\n});\n```" } } }, @@ -20360,13 +21451,21 @@ "name": "Backups", "description": "Meilisearch offers two types of backups: snapshots and dumps. Snapshots are mainly intended as a safeguard, while dumps are useful when migrating Meilisearch." }, + { + "name": "Export", + "description": "Export documents and settings from this instance to a remote Meilisearch server." + }, + { + "name": "Async task management", + "description": "Routes for listing and managing batches and tasks (asynchronous operations)." + }, { "name": "Tasks", "description": "The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)." }, { "name": "Batches", - "description": "The /batches route gives information about the progress of batches of asynchronous operations." + "description": "Meilisearch groups compatible tasks ([asynchronous operations](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)) into batches for efficient processing. For example, multiple document additions to the same index may be batched together. The /batches routes give information about the progress of these batches and let you monitor batch progress and performance." }, { "name": "Indexes", @@ -20386,7 +21485,7 @@ }, { "name": "Settings", - "description": "Use the /settings route to customize search settings for a given index. You can either modify all index settings at once using the update settings endpoint, or use a child route to configure a single setting." + "description": "Configure search and index behavior. Update all settings at once via PATCH /indexes/{indexUid}/settings, or use a sub-route to get, update, or reset a single setting." }, { "name": "Search", diff --git a/assets/open-api/meilisearch-openapi.json b/assets/open-api/meilisearch-openapi.json index 9f27db4bd..ab369bcca 100644 --- a/assets/open-api/meilisearch-openapi.json +++ b/assets/open-api/meilisearch-openapi.json @@ -16,7 +16,7 @@ "servers": [ { "url": "http://localhost:7700", - "description": "Local server" + "description": "Local server." } ], "paths": { @@ -26,13 +26,13 @@ "Async task management" ], "summary": "List batches", - "description": "The `/batches` route gives information about the progress of batches of [asynchronous operations](/learn/async/asynchronous_operations).\n\nBatches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first. Batch results are paginated and can be filtered with query parameters.", + "description": "Meilisearch groups compatible tasks ([asynchronous operations](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)) into batches for efficient processing.\n\nFor example, multiple document additions to the same index may be batched together. List batches to monitor their progress and performance.\n\nBatches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first. Batch results are paginated and can be filtered with query parameters.", "operationId": "get_batches", "parameters": [ { "name": "limit", "in": "query", - "description": "Maximum number of batches to return", + "description": "Maximum number of batches to return.", "required": false, "schema": { "type": "integer", @@ -45,7 +45,7 @@ { "name": "from", "in": "query", - "description": "`uid` of the first batch returned", + "description": "`uid` of the first batch returned.", "required": false, "schema": { "type": "integer", @@ -57,7 +57,7 @@ { "name": "reverse", "in": "query", - "description": "If `true`, returns results in the reverse order, from oldest to most recent", + "description": "If `true`, returns results in the reverse order, from oldest to most recent.", "required": false, "schema": { "type": "boolean" @@ -225,7 +225,7 @@ ], "responses": { "200": { - "description": "Return the batches", + "description": "Returns the batches.", "content": { "application/json": { "schema": { @@ -268,7 +268,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -301,13 +301,13 @@ "Async task management" ], "summary": "Get batch", - "description": "Get a single batch by its unique identifier.\n\nThe `/batches` route gives information about the progress of batches of [asynchronous operations](/learn/async/asynchronous_operations).", + "description": "Meilisearch groups compatible tasks ([asynchronous operations](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)) into batches for efficient processing.\n\nFor example, multiple document additions to the same index may be batched together. Retrieve a single batch by its unique identifier to monitor its progress and performance.", "operationId": "get_batch", "parameters": [ { "name": "batchUid", "in": "path", - "description": "The unique batch id", + "description": "The unique batch identifier.", "required": true, "schema": { "type": "string" @@ -317,7 +317,7 @@ ], "responses": { "200": { - "description": "Return the batch", + "description": "Returns the batch.", "content": { "application/json": { "schema": { @@ -351,7 +351,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -365,6 +365,22 @@ } } } + }, + "404": { + "description": "Batch not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Batch not found.", + "code": "batch_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#batch_not_found" + } + } + } } }, "security": [ @@ -384,11 +400,11 @@ "Backups" ], "summary": "Create dump", - "description": "Triggers a dump creation process. Once the process is complete, a dump is created in the\n[dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory).\nIf the dump directory does not exist yet, it will be created.", + "description": "Trigger a dump creation process. When complete, a dump file is written to the [dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory). The directory is created if it does not exist.", "operationId": "create_dump", "responses": { "202": { - "description": "Dump is being created", + "description": "Dump is being created.", "content": { "application/json": { "schema": { @@ -405,7 +421,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -438,11 +454,11 @@ "Experimental features" ], "summary": "List experimental features", - "description": "Get a list of all experimental features that can be activated via the\n/experimental-features route and whether or not they are currently\nactivated.", + "description": "Return all experimental features that can be toggled via this API, and whether each one is currently enabled or disabled.", "operationId": "get_features", "responses": { "200": { - "description": "Experimental features are returned", + "description": "Experimental features are returned.", "content": { "application/json": { "schema": { @@ -464,7 +480,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -495,11 +511,11 @@ "Experimental features" ], "summary": "Configure experimental features", - "description": "Activate or deactivate experimental features.", + "description": "Enable or disable experimental features at runtime. Only features that are marked as runtime-togglable can be changed.", "operationId": "patch_features", "responses": { "200": { - "description": "Experimental features are returned", + "description": "Experimental features are returned.", "content": { "application/json": { "schema": { @@ -521,7 +537,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -551,10 +567,10 @@ "/export": { "post": { "tags": [ - "Documents" + "Export" ], "summary": "Export to a remote Meilisearch", - "description": "Triggers an export process to a remote Meilisearch instance. This allows you to send\ndocuments and settings from the current instance to another Meilisearch server.", + "description": "Trigger an export that sends documents and settings from this instance to a remote Meilisearch server. Configure the remote URL and optional API key in the request body.", "operationId": "export", "requestBody": { "content": { @@ -568,7 +584,7 @@ }, "responses": { "202": { - "description": "Export successfully enqueued", + "description": "Export successfully enqueued.", "content": { "application/json": { "schema": { @@ -584,7 +600,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -616,11 +632,11 @@ "Health" ], "summary": "Get health", - "description": "The health check endpoint enables you to periodically test the health of\nyour Meilisearch instance.", + "description": "The health check endpoint enables you to periodically test the health of your Meilisearch instance. Returns a simple status indicating that the server is available.", "operationId": "get_health", "responses": { "200": { - "description": "Instance is healthy", + "description": "Instance is healthy.", "content": { "application/json": { "schema": { @@ -641,13 +657,13 @@ "Indexes" ], "summary": "List indexes", - "description": "List all indexes.", + "description": "Return all indexes on the instance.\n\nResults are paginated using `offset` and `limit` query parameters.", "operationId": "list_indexes", "parameters": [ { "name": "offset", "in": "query", - "description": "The number of indexes to skip before starting to retrieve anything", + "description": "The number of indexes to skip before starting to retrieve anything.", "required": false, "schema": { "type": "integer", @@ -658,7 +674,7 @@ { "name": "limit", "in": "query", - "description": "The number of indexes to retrieve", + "description": "The number of indexes to retrieve.", "required": false, "schema": { "type": "integer", @@ -670,7 +686,7 @@ ], "responses": { "200": { - "description": "Indexes are returned", + "description": "Indexes are returned.", "content": { "application/json": { "schema": { @@ -693,7 +709,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -724,7 +740,7 @@ "Indexes" ], "summary": "Create index", - "description": "Create an index.", + "description": "Create a new index with an optional [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key).\n\nIf no primary key is provided, Meilisearch will [infer one](https://www.meilisearch.com/docs/learn/getting_started/primary_key#meilisearch-guesses-your-primary-key) from the first batch of documents.", "operationId": "create_index", "requestBody": { "content": { @@ -737,8 +753,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -755,7 +771,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -788,13 +804,13 @@ "Indexes" ], "summary": "Get index", - "description": "Get information about an index.", + "description": "Retrieve the metadata of a single index: its uid, [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key), and creation/update timestamps.", "operationId": "get_index", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -804,7 +820,7 @@ ], "responses": { "200": { - "description": "The index is returned", + "description": "The index is returned.", "content": { "application/json": { "schema": { @@ -820,7 +836,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -836,7 +852,7 @@ } }, "404": { - "description": "Index not found", + "description": "Index not found.", "content": { "application/json": { "schema": { @@ -867,13 +883,13 @@ "Indexes" ], "summary": "Delete index", - "description": "Delete an index.", + "description": "Permanently delete an index and all its documents, settings, and task history.", "operationId": "delete_index", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -883,7 +899,7 @@ ], "responses": { "202": { - "description": "Task successfully enqueued", + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -900,7 +916,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -914,6 +930,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -931,13 +963,13 @@ "Indexes" ], "summary": "Update index", - "description": "Update the `primaryKey` of an index.\nReturn an error if the index doesn't exists yet or if it contains\ndocuments.", + "description": "Update the [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) or uid of an index.\n\nReturns an error if the index does not exist or if it already contains documents ([primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) cannot be changed in that case).", "operationId": "update_index", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -957,7 +989,7 @@ }, "responses": { "202": { - "description": "Task successfully enqueued", + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -974,7 +1006,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -988,6 +1020,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -1007,13 +1055,13 @@ "Indexes" ], "summary": "Compact index", - "description": "Triggers a compaction process on the specified index. Compaction reorganizes the index database to make it smaller and more efficient.", + "description": "Trigger a compaction process on the specified index.\n\nCompaction reorganizes the index database to reclaim space and improve read performance.", "operationId": "compact", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -1023,7 +1071,7 @@ ], "responses": { "202": { - "description": "Task successfully enqueued", + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -1031,16 +1079,16 @@ }, "example": { "taskUid": 147, - "indexUid": null, + "indexUid": "movies", "status": "enqueued", - "type": "documentDeletion", + "type": "indexCompaction", "enqueuedAt": "2024-08-08T17:05:55.791772Z" } } } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -1054,6 +1102,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -1072,13 +1136,13 @@ "Documents" ], "summary": "List documents with GET", - "description": "Get documents by batches.", + "description": "Retrieve documents in batches using query parameters for offset, limit, and optional filtering. Suited for browsing or exporting index contents.", "operationId": "get_documents", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -1160,7 +1224,7 @@ ], "responses": { "200": { - "description": "The documents are returned", + "description": "The documents are returned.", "content": { "application/json": { "schema": { @@ -1191,7 +1255,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -1207,7 +1271,7 @@ } }, "404": { - "description": "Index not found", + "description": "Index not found.", "content": { "application/json": { "schema": { @@ -1238,13 +1302,13 @@ "Documents" ], "summary": "Add or update documents", - "description": "Add a list of documents or update them if they already exist.\nIf you send an already existing document (same id) the old document will\nbe only partially updated according to the fields of the new document.\nThus, any fields not present in the new document are kept and remained\nunchanged.\nTo completely overwrite a document, see Add or replace documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document.\n> `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved\n> `_vectors` field in your documents. It can accept an array of floats,\n> multiple arrays of floats in an outer array or an object. This object\n> accepts keys corresponding to the different embedders defined your index\n> settings.", + "description": "Add a list of documents or update them if they already exist.\n\nIf you send an already existing document (same id) the old document will\nbe only partially updated according to the fields of the new document.\nThus, any fields not present in the new document are kept and remained\nunchanged.\n\nIf the provided index does not exist, it will be created.\n\nTo completely overwrite a document, see [add or replace documents route](https://docs.meilisearch.com/docs/api-reference/documents/add-or-replace-documents).\n\n> Use the reserved `_geo` object to add geo coordinates to a document.\n> `_geo` is an object made of `lat` and `lng` field.", "operationId": "update_documents", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -1254,7 +1318,7 @@ { "name": "primaryKey", "in": "query", - "description": "The primary key of the documents. primaryKey is optional. If you want\nto set the primary key of your index through this route, it only has\nto be done the first time you add documents to the index. After which\nit will be ignored if given.", + "description": "The [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) field for uniquely identifying each document.\nThis parameter is optional and can only be set the first time documents are added to an index.\nSubsequent attempts to specify it will be ignored if the primary key has already been set.", "required": false, "schema": { "type": "string" @@ -1265,7 +1329,7 @@ "name": "csvDelimiter", "in": "query", "description": "Customize the csv delimiter when importing CSV documents.", - "required": true, + "required": false, "schema": { "type": "string", "default": "," @@ -1302,8 +1366,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -1320,7 +1384,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -1334,6 +1398,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -1351,13 +1431,13 @@ "Documents" ], "summary": "Add or replace documents", - "description": "Add a list of documents or replace them if they already exist.\n\nIf you send an already existing document (same id) the whole existing\ndocument will be overwritten by the new document. Fields previously in the\ndocument not present in the new document are removed.\n\nFor a partial update of the document see Add or update documents route.\n> info\n> If the provided index does not exist, it will be created.\n> info\n> Use the reserved `_geo` object to add geo coordinates to a document.\n> `_geo` is an object made of `lat` and `lng` field.\n>\n> When the vectorStore feature is enabled you can use the reserved\n> `_vectors` field in your documents. It can accept an array of floats,\n> multiple arrays of floats in an outer array or an object. This object\n> accepts keys corresponding to the different embedders defined your index\n> settings.", + "description": "Add a list of documents or replace them if they already exist.\n\nIf you send an already existing document (same id) the whole existing\ndocument will be overwritten by the new document. Fields previously in the\ndocument not present in the new document are removed.\n\nIf the provided index does not exist, it will be created.\n\nFor a partial update of the document see [add or update documents route](https://docs.meilisearch.com/docs/api-reference/documents/add-or-update-documents).\n\n> Use the reserved `_geo` object to add geo coordinates to a document.\n> `_geo` is an object made of `lat` and `lng` field.", "operationId": "replace_documents", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -1367,7 +1447,7 @@ { "name": "primaryKey", "in": "query", - "description": "The primary key of the documents. primaryKey is optional. If you want\nto set the primary key of your index through this route, it only has\nto be done the first time you add documents to the index. After which\nit will be ignored if given.", + "description": "The [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) field for uniquely identifying each document.\nThis parameter is optional and can only be set the first time documents are added to an index.\nSubsequent attempts to specify it will be ignored if the primary key has already been set.", "required": false, "schema": { "type": "string" @@ -1378,7 +1458,7 @@ "name": "csvDelimiter", "in": "query", "description": "Customize the csv delimiter when importing CSV documents.", - "required": true, + "required": false, "schema": { "type": "string", "default": "," @@ -1415,8 +1495,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -1433,7 +1513,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -1447,6 +1527,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -1464,13 +1560,13 @@ "Documents" ], "summary": "Delete all documents", - "description": "Delete all documents in the specified index.", + "description": "Permanently delete all documents in the specified index. Settings and index metadata are preserved.", "operationId": "clear_all_documents", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -1479,8 +1575,8 @@ } ], "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -1497,7 +1593,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -1511,6 +1607,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -1530,13 +1642,13 @@ "Documents" ], "summary": "Delete documents by filter", - "description": "Delete a set of documents based on a filter.", + "description": "Delete all documents in the index that match the given filter expression.", "operationId": "delete_documents_by_filter", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -1556,7 +1668,7 @@ }, "responses": { "202": { - "description": "Task successfully enqueued", + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -1573,7 +1685,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -1587,6 +1699,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -1606,13 +1734,13 @@ "Documents" ], "summary": "Delete documents by batch", - "description": "Delete a set of documents based on an array of document ids.", + "description": "Delete multiple documents in one request by providing an array of [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) values.", "operationId": "delete_documents_batch", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -1632,8 +1760,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -1650,7 +1778,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -1664,6 +1792,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -1683,13 +1827,13 @@ "Documents" ], "summary": "Edit documents by function", - "description": "Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to\nedit one or more documents directly in Meilisearch.", + "description": "Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to edit one or more documents directly in Meilisearch. The function receives each document and returns the modified document.", "operationId": "edit_documents_by_function", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -1709,7 +1853,7 @@ }, "responses": { "202": { - "description": "Task successfully enqueued", + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -1726,7 +1870,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -1740,6 +1884,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -1758,13 +1918,13 @@ "Documents" ], "summary": "List documents with POST", - "description": "Get a set of documents.", + "description": "Retrieve a set of documents with optional filtering, sorting, and pagination. Use the request body to specify filters, sort order, and which fields to return.", "operationId": "documents_by_query_post", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -1784,7 +1944,7 @@ }, "responses": { "200": { - "description": "Task successfully enqueued", + "description": "The documents are returned.", "content": { "application/json": { "schema": { @@ -1821,7 +1981,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -1835,6 +1995,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -1854,13 +2030,13 @@ "Documents" ], "summary": "Get document", - "description": "Get one document from its primary key.", + "description": "Retrieve a single document by its [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) value.", "operationId": "get_document", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -1870,7 +2046,7 @@ { "name": "documentId", "in": "path", - "description": "The document identifier", + "description": "The document identifier.", "required": true, "schema": { "type": "string" @@ -1901,7 +2077,7 @@ ], "responses": { "200": { - "description": "The document is returned", + "description": "The document is returned.", "content": { "application/json": { "schema": {}, @@ -1916,7 +2092,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -1932,14 +2108,14 @@ } }, "404": { - "description": "Document not found", + "description": "Document not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" }, "example": { - "message": "Document `a` not found.", + "message": "Document :uid not found.", "code": "document_not_found", "type": "invalid_request", "link": "https://docs.meilisearch.com/errors#document_not_found" @@ -1963,13 +2139,13 @@ "Documents" ], "summary": "Delete document", - "description": "Delete a single document by id.", + "description": "Delete a single document by its [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key).", "operationId": "delete_document", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -1979,7 +2155,7 @@ { "name": "documentId", "in": "path", - "description": "Document Identifier", + "description": "Document identifier.", "required": true, "schema": { "type": "string" @@ -1988,8 +2164,8 @@ } ], "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -2006,7 +2182,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -2020,6 +2196,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -2039,13 +2231,13 @@ "Facet Search" ], "summary": "Search in facets", - "description": "Search for a facet value within a given facet.", + "description": "Search for facet values within a given facet.\n\n> Use this to build autocomplete or refinement UIs for facet filters.", "operationId": "search", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -2065,7 +2257,7 @@ }, "responses": { "200": { - "description": "The documents are returned", + "description": "The documents are returned.", "content": { "application/json": { "schema": { @@ -2098,7 +2290,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -2114,7 +2306,7 @@ } }, "404": { - "description": "Index not found", + "description": "Index not found.", "content": { "application/json": { "schema": { @@ -2152,7 +2344,7 @@ { "name": "indexUid", "in": "path", - "description": "Unique identifier of the index whose fields to list", + "description": "Unique identifier of the index whose fields to list.", "required": true, "schema": { "type": "string" @@ -2196,7 +2388,7 @@ }, "rankingRule": { "enabled": false, - "order": null + "order": [] }, "filterable": { "enabled": false, @@ -2225,7 +2417,7 @@ }, "rankingRule": { "enabled": false, - "order": null + "order": [] }, "filterable": { "enabled": true, @@ -2247,21 +2439,33 @@ } }, "401": { - "description": "Missing or invalid authorization header", + "description": "Missing or invalid authorization header.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" } } } }, "404": { - "description": "Index not found", + "description": "Index not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" } } } @@ -2284,13 +2488,13 @@ "Search" ], "summary": "Search with GET", - "description": "Search for documents matching a specific query in the given index.", + "description": "Search for documents matching a query in the given index.\n\n> Equivalent to the [search with POST route](https://www.meilisearch.com/docs/api-reference/search/search-with-post) in the Meilisearch API.", "operationId": "search_with_url_query", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -2310,7 +2514,7 @@ "name": "vector", "in": "query", "description": "A vector of floating-point numbers for semantic/vector search. The\ndimensions must match the embedder configuration. When provided,\ndocuments are ranked by vector similarity. Can be combined with `q`\nfor hybrid search.", - "required": true, + "required": false, "schema": { "type": "array", "items": { @@ -2324,7 +2528,7 @@ "name": "offset", "in": "query", "description": "Number of search results to skip. Use together with `limit` for\npagination. For example, to get results 21-40, set `offset=20` and\n`limit=20`. Defaults to `0`. Cannot be used with `page`/`hitsPerPage`.", - "required": true, + "required": false, "schema": { "type": "integer", "default": 0, @@ -2335,7 +2539,7 @@ "name": "limit", "in": "query", "description": "Maximum number of search results to return. Use together with `offset`\nfor pagination. Defaults to `20`. Cannot be used with\n`page`/`hitsPerPage`.", - "required": true, + "required": false, "schema": { "type": "integer", "default": 20, @@ -2366,7 +2570,7 @@ "name": "attributesToRetrieve", "in": "query", "description": "Comma-separated list of attributes to include in the returned\ndocuments. Use `*` to return all attributes. By default, returns\nattributes from the `displayedAttributes` setting.", - "required": true, + "required": false, "schema": { "type": "array", "items": { @@ -2379,7 +2583,7 @@ "name": "retrieveVectors", "in": "query", "description": "When `true`, includes vector embeddings in the response for documents\nthat have them. Defaults to `false`.", - "required": true, + "required": false, "schema": { "type": "boolean" } @@ -2388,7 +2592,7 @@ "name": "attributesToCrop", "in": "query", "description": "Comma-separated list of attributes whose values should be cropped to\nfit within `cropLength`. Useful for displaying long text attributes\nin search results. Format: `attribute` or `attribute:length`.", - "required": true, + "required": false, "schema": { "type": "array", "items": { @@ -2401,7 +2605,7 @@ "name": "cropLength", "in": "query", "description": "Maximum number of words to keep when cropping attribute values. The\ncropped text will be centered around the matching terms. Defaults to\n`10`.", - "required": true, + "required": false, "schema": { "type": "integer", "default": 10, @@ -2412,7 +2616,7 @@ "name": "attributesToHighlight", "in": "query", "description": "Comma-separated list of attributes whose matching terms should be\nhighlighted with `highlightPreTag` and `highlightPostTag`. Use `*` to\nhighlight all searchable attributes.", - "required": true, + "required": false, "schema": { "type": "array", "items": { @@ -2452,7 +2656,7 @@ "name": "showMatchesPosition", "in": "query", "description": "When `true`, returns the position (start and length) of each matched\nterm in the original document attributes. Useful for custom\nhighlighting implementations.", - "required": true, + "required": false, "schema": { "type": "boolean" } @@ -2461,7 +2665,7 @@ "name": "showRankingScore", "in": "query", "description": "When `true`, includes a `_rankingScore` field (0.0 to 1.0) in each\ndocument indicating how well it matches the query. Higher scores mean\nbetter matches.", - "required": true, + "required": false, "schema": { "type": "boolean" } @@ -2470,7 +2674,7 @@ "name": "showRankingScoreDetails", "in": "query", "description": "When `true`, includes a `_rankingScoreDetails` object showing the\ncontribution of each ranking rule to the final score. Useful for\ndebugging relevancy.", - "required": true, + "required": false, "schema": { "type": "boolean" } @@ -2479,7 +2683,7 @@ "name": "showPerformanceDetails", "in": "query", "description": "When `true`, includes a `_performanceDetails` object showing the\nperformance details of the search.", - "required": true, + "required": false, "schema": { "type": "boolean" } @@ -2488,7 +2692,7 @@ "name": "facets", "in": "query", "description": "Comma-separated list of attributes for which to return facet\ndistribution (value counts). Only attributes in `filterableAttributes`\ncan be used. Returns the count of documents matching each facet value.", - "required": true, + "required": false, "schema": { "type": "array", "items": { @@ -2501,7 +2705,7 @@ "name": "highlightPreTag", "in": "query", "description": "HTML tag or string to insert before highlighted matching terms.\nDefaults to ``.", - "required": true, + "required": false, "schema": { "type": "string", "default": "" @@ -2511,7 +2715,7 @@ "name": "highlightPostTag", "in": "query", "description": "HTML tag or string to insert after highlighted matching terms.\nDefaults to ``.", - "required": true, + "required": false, "schema": { "type": "string", "default": "" @@ -2521,7 +2725,7 @@ "name": "cropMarker", "in": "query", "description": "String used to indicate truncated content when cropping. Defaults to\n`…` (ellipsis).", - "required": true, + "required": false, "schema": { "type": "string", "default": "…" @@ -2531,7 +2735,7 @@ "name": "matchingStrategy", "in": "query", "description": "Strategy for matching query terms. `last` (default): all terms must\nmatch, removing terms from the end if needed. `all`: all terms must\nmatch exactly. `frequency`: prioritizes matching frequent terms.", - "required": true, + "required": false, "schema": { "$ref": "#/components/schemas/MatchingStrategy" } @@ -2540,7 +2744,7 @@ "name": "attributesToSearchOn", "in": "query", "description": "Comma-separated list of attributes to search in. By default, searches\nall `searchableAttributes`. Use this to restrict search to specific\nfields for better performance or relevance.", - "required": true, + "required": false, "schema": { "type": "array", "items": { @@ -2562,7 +2766,7 @@ "name": "hybridSemanticRatio", "in": "query", "description": "Balance between keyword search (0.0) and semantic/vector search (1.0)\nin hybrid search. A value of 0.5 gives equal weight to both. Defaults\nto `0.5`.", - "required": true, + "required": false, "schema": { "type": "number", "format": "float" @@ -2572,7 +2776,7 @@ "name": "rankingScoreThreshold", "in": "query", "description": "Minimum ranking score (0.0 to 1.0) a document must have to be\nincluded in results. Documents with lower scores are excluded. Useful\nfor filtering out poor matches.", - "required": true, + "required": false, "schema": { "type": "number", "format": "float" @@ -2582,7 +2786,7 @@ "name": "locales", "in": "query", "description": "Comma-separated list of language locales to use for tokenization and\nprocessing. Useful for multilingual content. Example: `en,fr,de`.", - "required": true, + "required": false, "schema": { "type": "array", "items": { @@ -2603,6 +2807,7 @@ { "name": "useNetwork", "in": "query", + "description": "When `true`, runs the query on the whole network (all shards covered, documents\ndeduplicated across remotes). When `false` or omitted, the query runs locally.\n\n**Enterprise Edition only.** This feature is available in the Enterprise Edition.\nIt also requires the `network` experimental feature.\n\nValues: `true` = use the whole network; `false` or omitted = local (default).\n\nWhen using the network, the index must exist with compatible settings on all remotes;\ndocuments with the same id are assumed identical for deduplication.", "required": false, "schema": { "type": "boolean" @@ -2611,7 +2816,7 @@ ], "responses": { "200": { - "description": "The documents are returned", + "description": "The documents are returned.", "content": { "application/json": { "schema": { @@ -2644,7 +2849,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -2660,7 +2865,7 @@ } }, "404": { - "description": "Index not found", + "description": "Index not found.", "content": { "application/json": { "schema": { @@ -2690,13 +2895,13 @@ "Search" ], "summary": "Search with POST", - "description": "Search for documents matching a specific query in the given index.", + "description": "Search for documents matching a query in the given index.\n\n> Equivalent to the [search with GET route](https://www.meilisearch.com/docs/api-reference/search/search-with-get) in the Meilisearch API.", "operationId": "search_with_post", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -2716,7 +2921,7 @@ }, "responses": { "200": { - "description": "The documents are returned", + "description": "The documents are returned.", "content": { "application/json": { "schema": { @@ -2749,7 +2954,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -2765,7 +2970,7 @@ } }, "404": { - "description": "Index not found", + "description": "Index not found.", "content": { "application/json": { "schema": { @@ -2796,14 +3001,14 @@ "tags": [ "Settings" ], - "summary": "List settings", - "description": "This route allows you to retrieve, configure, or reset all of an index's settings at once.", + "summary": "List all settings", + "description": "Returns all settings of the index. Each setting is returned with its current value or the default if not set.", "operationId": "get_all", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -2813,7 +3018,7 @@ ], "responses": { "200": { - "description": "Settings are returned", + "description": "Returns all settings with their current or default values.", "content": { "application/json": { "schema": { @@ -2824,7 +3029,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -2838,11 +3043,27 @@ } } } - } - }, - "security": [ - { - "Bearer": [ + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ "settings.update", "settings.*", "*" @@ -2854,14 +3075,14 @@ "tags": [ "Settings" ], - "summary": "Reset settings", - "description": "Reset all the settings of an index to their default value.", + "summary": "Reset all settings", + "description": "Resets all settings of the index to their default values.", "operationId": "delete_all", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -2870,8 +3091,8 @@ } ], "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -2888,7 +3109,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -2902,6 +3123,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -2918,14 +3155,14 @@ "tags": [ "Settings" ], - "summary": "Update settings", - "description": "Update the settings of an index.\nPassing null to an index setting will reset it to its default value.\nUpdates in the settings route are partial. This means that any parameters not provided in the body will be left unchanged.\nIf the provided index does not exist, it will be created.", + "summary": "Update all settings", + "description": "Updates one or more settings for the index. Only the fields sent in the body are changed. Pass null for a setting to reset it to its default. If the index does not exist, it is created.", "operationId": "update_all", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -2944,8 +3181,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -2962,7 +3199,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -2976,6 +3213,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -2995,13 +3248,13 @@ "Settings" ], "summary": "Get chat", - "description": "Get an user defined chat", + "description": "Returns the current value of the `chat` setting for the index.", "operationId": "getchat", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -3011,7 +3264,7 @@ ], "responses": { "200": { - "description": "chat is returned", + "description": "Returns the current value of the `chat` setting.", "content": { "application/json": { "schema": { @@ -3022,7 +3275,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -3036,6 +3289,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -3053,13 +3322,13 @@ "Settings" ], "summary": "Reset chat", - "description": "Reset an index's chat to its default value", + "description": "Resets the `chat` setting to its default value.", "operationId": "deletechat", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -3067,19 +3336,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChatSettings" - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -3096,7 +3355,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -3110,6 +3369,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -3127,13 +3402,13 @@ "Settings" ], "summary": "Update chat", - "description": "Update an index's user defined chat", + "description": "Updates the `chat` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "patchchat", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -3152,8 +3427,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -3170,7 +3445,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -3184,6 +3459,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -3203,13 +3494,13 @@ "Settings" ], "summary": "Get dictionary", - "description": "Get an user defined dictionary", + "description": "Returns the current value of the `dictionary` setting for the index.", "operationId": "getdictionary", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -3219,7 +3510,7 @@ ], "responses": { "200": { - "description": "dictionary is returned", + "description": "Returns the current value of the `dictionary` setting.", "content": { "application/json": { "schema": { @@ -3234,7 +3525,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -3248,6 +3539,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -3265,13 +3572,13 @@ "Settings" ], "summary": "Update dictionary", - "description": "Update an index's user defined dictionary", + "description": "Updates the `dictionary` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putdictionary", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -3294,8 +3601,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -3312,7 +3619,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -3326,6 +3633,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -3343,13 +3666,13 @@ "Settings" ], "summary": "Reset dictionary", - "description": "Reset an index's dictionary to its default value", + "description": "Resets the `dictionary` setting to its default value.", "operationId": "deletedictionary", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -3357,23 +3680,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -3390,7 +3699,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -3404,6 +3713,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -3423,13 +3748,13 @@ "Settings" ], "summary": "Get displayedAttributes", - "description": "Get an user defined displayedAttributes", + "description": "Returns the current value of the `displayedAttributes` setting for the index.", "operationId": "getdisplayedAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -3439,7 +3764,7 @@ ], "responses": { "200": { - "description": "displayedAttributes is returned", + "description": "Returns the current value of the `displayedAttributes` setting.", "content": { "application/json": { "schema": { @@ -3453,7 +3778,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -3467,6 +3792,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -3484,13 +3825,13 @@ "Settings" ], "summary": "Update displayedAttributes", - "description": "Update an index's user defined displayedAttributes", + "description": "Updates the `displayedAttributes` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putdisplayedAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -3512,8 +3853,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -3530,7 +3871,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -3544,6 +3885,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -3561,13 +3918,13 @@ "Settings" ], "summary": "Reset displayedAttributes", - "description": "Reset an index's displayedAttributes to its default value", + "description": "Resets the `displayedAttributes` setting to its default value.", "operationId": "deletedisplayedAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -3575,22 +3932,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -3607,7 +3951,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -3621,6 +3965,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -3640,13 +4000,13 @@ "Settings" ], "summary": "Get distinctAttribute", - "description": "Get an user defined distinctAttribute", + "description": "Returns the current value of the `distinctAttribute` setting for the index.", "operationId": "getdistinctAttribute", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -3656,7 +4016,7 @@ ], "responses": { "200": { - "description": "distinctAttribute is returned", + "description": "Returns the current value of the `distinctAttribute` setting.", "content": { "application/json": { "schema": { @@ -3667,7 +4027,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -3681,6 +4041,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -3698,13 +4074,13 @@ "Settings" ], "summary": "Update distinctAttribute", - "description": "Update an index's user defined distinctAttribute", + "description": "Updates the `distinctAttribute` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putdistinctAttribute", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -3723,8 +4099,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -3741,7 +4117,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -3755,7 +4131,23 @@ } } } - } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } }, "security": [ { @@ -3772,13 +4164,13 @@ "Settings" ], "summary": "Reset distinctAttribute", - "description": "Reset an index's distinctAttribute to its default value", + "description": "Resets the `distinctAttribute` setting to its default value.", "operationId": "deletedistinctAttribute", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -3786,19 +4178,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -3815,7 +4197,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -3829,6 +4211,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -3848,13 +4246,13 @@ "Settings" ], "summary": "Get embedders", - "description": "Get an user defined embedders", + "description": "Returns the current value of the `embedders` setting for the index.", "operationId": "getembedders", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -3864,7 +4262,7 @@ ], "responses": { "200": { - "description": "embedders is returned", + "description": "Returns the current value of the `embedders` setting.", "content": { "application/json": { "schema": { @@ -3881,7 +4279,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -3895,6 +4293,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -3912,13 +4326,13 @@ "Settings" ], "summary": "Reset embedders", - "description": "Reset an index's embedders to its default value", + "description": "Resets the `embedders` setting to its default value.", "operationId": "deleteembedders", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -3926,25 +4340,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/SettingEmbeddingSettings" - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -3961,7 +4359,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -3975,6 +4373,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -3992,13 +4406,13 @@ "Settings" ], "summary": "Update embedders", - "description": "Update an index's user defined embedders", + "description": "Updates the `embedders` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "patchembedders", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4023,8 +4437,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -4041,7 +4455,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4055,6 +4469,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4074,13 +4504,13 @@ "Settings" ], "summary": "Get facetSearch", - "description": "Get an user defined facetSearch", + "description": "Returns the current value of the `facetSearch` setting for the index.", "operationId": "getfacetSearch", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4090,7 +4520,7 @@ ], "responses": { "200": { - "description": "facetSearch is returned", + "description": "Returns the current value of the `facetSearch` setting.", "content": { "application/json": { "schema": { @@ -4101,7 +4531,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4115,6 +4545,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4132,13 +4578,13 @@ "Settings" ], "summary": "Update facetSearch", - "description": "Update an index's user defined facetSearch", + "description": "Updates the `facetSearch` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putfacetSearch", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4157,8 +4603,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -4175,7 +4621,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4189,6 +4635,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4206,13 +4668,13 @@ "Settings" ], "summary": "Reset facetSearch", - "description": "Reset an index's facetSearch to its default value", + "description": "Resets the `facetSearch` setting to its default value.", "operationId": "deletefacetSearch", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4220,19 +4682,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "boolean" - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -4249,7 +4701,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4263,6 +4715,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4282,13 +4750,13 @@ "Settings" ], "summary": "Get faceting", - "description": "Get an user defined faceting", + "description": "Returns the current value of the `faceting` setting for the index.", "operationId": "getfaceting", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4298,7 +4766,7 @@ ], "responses": { "200": { - "description": "faceting is returned", + "description": "Returns the current value of the `faceting` setting.", "content": { "application/json": { "schema": { @@ -4309,7 +4777,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4323,6 +4791,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4340,13 +4824,13 @@ "Settings" ], "summary": "Reset faceting", - "description": "Reset an index's faceting to its default value", + "description": "Resets the `faceting` setting to its default value.", "operationId": "deletefaceting", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4354,19 +4838,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FacetingSettings" - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -4383,7 +4857,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4397,6 +4871,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4414,13 +4904,13 @@ "Settings" ], "summary": "Update faceting", - "description": "Update an index's user defined faceting", + "description": "Updates the `faceting` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "patchfaceting", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4439,8 +4929,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -4457,7 +4947,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4471,6 +4961,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4490,13 +4996,13 @@ "Settings" ], "summary": "Get filterableAttributes", - "description": "Get an user defined filterableAttributes", + "description": "Returns the current value of the `filterableAttributes` setting for the index.", "operationId": "getfilterableAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4506,7 +5012,7 @@ ], "responses": { "200": { - "description": "filterableAttributes is returned", + "description": "Returns the current value of the `filterableAttributes` setting.", "content": { "application/json": { "schema": { @@ -4520,7 +5026,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4534,6 +5040,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4551,13 +5073,13 @@ "Settings" ], "summary": "Update filterableAttributes", - "description": "Update an index's user defined filterableAttributes", + "description": "Updates the `filterableAttributes` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putfilterableAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4579,8 +5101,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -4597,7 +5119,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4611,30 +5133,46 @@ } } } - } - }, - "security": [ - { - "Bearer": [ - "settings.update", - "settings.*", - "*" - ] - } - ] - }, - "delete": { + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } + } + }, + "security": [ + { + "Bearer": [ + "settings.update", + "settings.*", + "*" + ] + } + ] + }, + "delete": { "tags": [ "Settings" ], "summary": "Reset filterableAttributes", - "description": "Reset an index's filterableAttributes to its default value", + "description": "Resets the `filterableAttributes` setting to its default value.", "operationId": "deletefilterableAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4642,22 +5180,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FilterableAttributesRule" - } - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -4674,7 +5199,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4688,6 +5213,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4707,13 +5248,13 @@ "Settings" ], "summary": "Get localizedAttributes", - "description": "Get an user defined localizedAttributes", + "description": "Returns the current value of the `localizedAttributes` setting for the index.", "operationId": "getlocalizedAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4723,7 +5264,7 @@ ], "responses": { "200": { - "description": "localizedAttributes is returned", + "description": "Returns the current value of the `localizedAttributes` setting.", "content": { "application/json": { "schema": { @@ -4737,7 +5278,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4751,6 +5292,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4768,13 +5325,13 @@ "Settings" ], "summary": "Update localizedAttributes", - "description": "Update an index's user defined localizedAttributes", + "description": "Updates the `localizedAttributes` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putlocalizedAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4796,8 +5353,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -4814,7 +5371,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4828,6 +5385,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4845,13 +5418,13 @@ "Settings" ], "summary": "Reset localizedAttributes", - "description": "Reset an index's localizedAttributes to its default value", + "description": "Resets the `localizedAttributes` setting to its default value.", "operationId": "deletelocalizedAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4859,22 +5432,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LocalizedAttributesRuleView" - } - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -4891,7 +5451,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4905,6 +5465,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4924,13 +5500,13 @@ "Settings" ], "summary": "Get nonSeparatorTokens", - "description": "Get an user defined nonSeparatorTokens", + "description": "Returns the current value of the `nonSeparatorTokens` setting for the index.", "operationId": "getnonSeparatorTokens", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -4940,7 +5516,7 @@ ], "responses": { "200": { - "description": "nonSeparatorTokens is returned", + "description": "Returns the current value of the `nonSeparatorTokens` setting.", "content": { "application/json": { "schema": { @@ -4955,7 +5531,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -4969,6 +5545,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -4986,13 +5578,13 @@ "Settings" ], "summary": "Update nonSeparatorTokens", - "description": "Update an index's user defined nonSeparatorTokens", + "description": "Updates the `nonSeparatorTokens` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putnonSeparatorTokens", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5015,8 +5607,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -5033,7 +5625,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5047,6 +5639,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5064,13 +5672,13 @@ "Settings" ], "summary": "Reset nonSeparatorTokens", - "description": "Reset an index's nonSeparatorTokens to its default value", + "description": "Resets the `nonSeparatorTokens` setting to its default value.", "operationId": "deletenonSeparatorTokens", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5078,23 +5686,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -5111,7 +5705,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5125,6 +5719,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5144,13 +5754,13 @@ "Settings" ], "summary": "Get pagination", - "description": "Get an user defined pagination", + "description": "Returns the current value of the `pagination` setting for the index.", "operationId": "getpagination", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5160,7 +5770,7 @@ ], "responses": { "200": { - "description": "pagination is returned", + "description": "Returns the current value of the `pagination` setting.", "content": { "application/json": { "schema": { @@ -5171,7 +5781,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5185,6 +5795,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5202,13 +5828,13 @@ "Settings" ], "summary": "Reset pagination", - "description": "Reset an index's pagination to its default value", + "description": "Resets the `pagination` setting to its default value.", "operationId": "deletepagination", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5216,19 +5842,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginationSettings" - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -5245,7 +5861,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5259,6 +5875,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5276,13 +5908,13 @@ "Settings" ], "summary": "Update pagination", - "description": "Update an index's user defined pagination", + "description": "Updates the `pagination` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "patchpagination", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5301,8 +5933,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -5319,7 +5951,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5333,6 +5965,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5352,13 +6000,13 @@ "Settings" ], "summary": "Get prefixSearch", - "description": "Get an user defined prefixSearch", + "description": "Returns the current value of the `prefixSearch` setting for the index.", "operationId": "getprefixSearch", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5368,7 +6016,7 @@ ], "responses": { "200": { - "description": "prefixSearch is returned", + "description": "Returns the current value of the `prefixSearch` setting.", "content": { "application/json": { "schema": { @@ -5379,7 +6027,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5393,6 +6041,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5410,13 +6074,13 @@ "Settings" ], "summary": "Update prefixSearch", - "description": "Update an index's user defined prefixSearch", + "description": "Updates the `prefixSearch` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putprefixSearch", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5435,8 +6099,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -5453,7 +6117,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5467,6 +6131,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5484,13 +6164,13 @@ "Settings" ], "summary": "Reset prefixSearch", - "description": "Reset an index's prefixSearch to its default value", + "description": "Resets the `prefixSearch` setting to its default value.", "operationId": "deleteprefixSearch", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5498,19 +6178,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PrefixSearchSettings" - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -5527,7 +6197,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5541,6 +6211,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5560,13 +6246,13 @@ "Settings" ], "summary": "Get proximityPrecision", - "description": "Get an user defined proximityPrecision", + "description": "Returns the current value of the `proximityPrecision` setting for the index.", "operationId": "getproximityPrecision", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5576,7 +6262,7 @@ ], "responses": { "200": { - "description": "proximityPrecision is returned", + "description": "Returns the current value of the `proximityPrecision` setting.", "content": { "application/json": { "schema": { @@ -5587,7 +6273,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5601,6 +6287,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5618,13 +6320,13 @@ "Settings" ], "summary": "Update proximityPrecision", - "description": "Update an index's user defined proximityPrecision", + "description": "Updates the `proximityPrecision` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putproximityPrecision", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5643,8 +6345,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -5661,7 +6363,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5675,6 +6377,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5692,33 +6410,23 @@ "Settings" ], "summary": "Reset proximityPrecision", - "description": "Reset an index's proximityPrecision to its default value", + "description": "Resets the `proximityPrecision` setting to its default value.", "operationId": "deleteproximityPrecision", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" }, "example": "movies" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProximityPrecisionView" - } - } - }, - "required": true - }, + ], "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -5735,7 +6443,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5749,6 +6457,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5768,13 +6492,13 @@ "Settings" ], "summary": "Get rankingRules", - "description": "Get an user defined rankingRules", + "description": "Returns the current value of the `rankingRules` setting for the index.", "operationId": "getrankingRules", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5784,7 +6508,7 @@ ], "responses": { "200": { - "description": "rankingRules is returned", + "description": "Returns the current value of the `rankingRules` setting.", "content": { "application/json": { "schema": { @@ -5798,7 +6522,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5812,6 +6536,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5829,13 +6569,13 @@ "Settings" ], "summary": "Update rankingRules", - "description": "Update an index's user defined rankingRules", + "description": "Updates the `rankingRules` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putrankingRules", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5857,8 +6597,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -5875,7 +6615,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5889,6 +6629,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5906,13 +6662,13 @@ "Settings" ], "summary": "Reset rankingRules", - "description": "Reset an index's rankingRules to its default value", + "description": "Resets the `rankingRules` setting to its default value.", "operationId": "deleterankingRules", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -5920,22 +6676,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RankingRuleView" - } - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -5952,7 +6695,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -5966,6 +6709,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -5985,13 +6744,13 @@ "Settings" ], "summary": "Get searchCutoffMs", - "description": "Get an user defined searchCutoffMs", + "description": "Returns the current value of the `searchCutoffMs` setting for the index.", "operationId": "getsearchCutoffMs", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6001,7 +6760,7 @@ ], "responses": { "200": { - "description": "searchCutoffMs is returned", + "description": "Returns the current value of the `searchCutoffMs` setting.", "content": { "application/json": { "schema": { @@ -6014,7 +6773,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6028,6 +6787,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6045,13 +6820,13 @@ "Settings" ], "summary": "Update searchCutoffMs", - "description": "Update an index's user defined searchCutoffMs", + "description": "Updates the `searchCutoffMs` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putsearchCutoffMs", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6072,8 +6847,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -6090,7 +6865,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6104,6 +6879,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6121,13 +6912,13 @@ "Settings" ], "summary": "Reset searchCutoffMs", - "description": "Reset an index's searchCutoffMs to its default value", + "description": "Resets the `searchCutoffMs` setting to its default value.", "operationId": "deletesearchCutoffMs", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6135,21 +6926,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "integer", - "format": "u-int64", - "minimum": 0 - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -6166,7 +6945,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6180,6 +6959,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6199,13 +6994,13 @@ "Settings" ], "summary": "Get searchableAttributes", - "description": "Get an user defined searchableAttributes", + "description": "Returns the current value of the `searchableAttributes` setting for the index.", "operationId": "getsearchableAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6215,7 +7010,7 @@ ], "responses": { "200": { - "description": "searchableAttributes is returned", + "description": "Returns the current value of the `searchableAttributes` setting.", "content": { "application/json": { "schema": { @@ -6229,7 +7024,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6243,6 +7038,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6260,13 +7071,13 @@ "Settings" ], "summary": "Update searchableAttributes", - "description": "Update an index's user defined searchableAttributes", + "description": "Updates the `searchableAttributes` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putsearchableAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6288,8 +7099,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -6306,7 +7117,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6320,6 +7131,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6337,13 +7164,13 @@ "Settings" ], "summary": "Reset searchableAttributes", - "description": "Reset an index's searchableAttributes to its default value", + "description": "Resets the `searchableAttributes` setting to its default value.", "operationId": "deletesearchableAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6351,22 +7178,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -6383,7 +7197,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6397,6 +7211,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6416,13 +7246,13 @@ "Settings" ], "summary": "Get separatorTokens", - "description": "Get an user defined separatorTokens", + "description": "Returns the current value of the `separatorTokens` setting for the index.", "operationId": "getseparatorTokens", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6432,7 +7262,7 @@ ], "responses": { "200": { - "description": "separatorTokens is returned", + "description": "Returns the current value of the `separatorTokens` setting.", "content": { "application/json": { "schema": { @@ -6447,7 +7277,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6461,6 +7291,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6478,13 +7324,13 @@ "Settings" ], "summary": "Update separatorTokens", - "description": "Update an index's user defined separatorTokens", + "description": "Updates the `separatorTokens` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putseparatorTokens", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6507,8 +7353,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -6525,7 +7371,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6539,6 +7385,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6556,37 +7418,23 @@ "Settings" ], "summary": "Reset separatorTokens", - "description": "Reset an index's separatorTokens to its default value", + "description": "Resets the `separatorTokens` setting to its default value.", "operationId": "deleteseparatorTokens", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", - "required": true, - "schema": { - "type": "string" - }, - "example": "movies" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, + "description": "Unique identifier of the index.", + "required": true, + "schema": { + "type": "string" + }, + "example": "movies" + } + ], "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -6603,7 +7451,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6617,6 +7465,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6636,13 +7500,13 @@ "Settings" ], "summary": "Get sortableAttributes", - "description": "Get an user defined sortableAttributes", + "description": "Returns the current value of the `sortableAttributes` setting for the index.", "operationId": "getsortableAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6652,7 +7516,7 @@ ], "responses": { "200": { - "description": "sortableAttributes is returned", + "description": "Returns the current value of the `sortableAttributes` setting.", "content": { "application/json": { "schema": { @@ -6667,7 +7531,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6681,6 +7545,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6698,13 +7578,13 @@ "Settings" ], "summary": "Update sortableAttributes", - "description": "Update an index's user defined sortableAttributes", + "description": "Updates the `sortableAttributes` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putsortableAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6727,8 +7607,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -6745,7 +7625,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6759,6 +7639,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6776,13 +7672,13 @@ "Settings" ], "summary": "Reset sortableAttributes", - "description": "Reset an index's sortableAttributes to its default value", + "description": "Resets the `sortableAttributes` setting to its default value.", "operationId": "deletesortableAttributes", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6790,23 +7686,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -6823,7 +7705,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6837,6 +7719,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6856,13 +7754,13 @@ "Settings" ], "summary": "Get stopWords", - "description": "Get an user defined stopWords", + "description": "Returns the current value of the `stopWords` setting for the index.", "operationId": "getstopWords", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6872,7 +7770,7 @@ ], "responses": { "200": { - "description": "stopWords is returned", + "description": "Returns the current value of the `stopWords` setting.", "content": { "application/json": { "schema": { @@ -6887,7 +7785,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6901,6 +7799,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6918,13 +7832,13 @@ "Settings" ], "summary": "Update stopWords", - "description": "Update an index's user defined stopWords", + "description": "Updates the `stopWords` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putstopWords", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -6947,8 +7861,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -6965,7 +7879,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -6979,6 +7893,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -6996,13 +7926,13 @@ "Settings" ], "summary": "Reset stopWords", - "description": "Reset an index's stopWords to its default value", + "description": "Resets the `stopWords` setting to its default value.", "operationId": "deletestopWords", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -7010,23 +7940,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -7043,7 +7959,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -7057,6 +7973,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -7076,13 +8008,13 @@ "Settings" ], "summary": "Get synonyms", - "description": "Get an user defined synonyms", + "description": "Returns the current value of the `synonyms` setting for the index.", "operationId": "getsynonyms", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -7092,7 +8024,7 @@ ], "responses": { "200": { - "description": "synonyms is returned", + "description": "Returns the current value of the `synonyms` setting.", "content": { "application/json": { "schema": { @@ -7112,7 +8044,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -7126,6 +8058,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -7143,13 +8091,13 @@ "Settings" ], "summary": "Update synonyms", - "description": "Update an index's user defined synonyms", + "description": "Updates the `synonyms` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "putsynonyms", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -7177,8 +8125,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -7195,7 +8143,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -7209,6 +8157,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -7226,13 +8190,13 @@ "Settings" ], "summary": "Reset synonyms", - "description": "Reset an index's synonyms to its default value", + "description": "Resets the `synonyms` setting to its default value.", "operationId": "deletesynonyms", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -7240,28 +8204,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "propertyNames": { - "type": "string" - } - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -7278,7 +8223,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -7292,6 +8237,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -7311,13 +8272,13 @@ "Settings" ], "summary": "Get typoTolerance", - "description": "Get an user defined typoTolerance", + "description": "Returns the current value of the `typoTolerance` setting for the index.", "operationId": "gettypoTolerance", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -7327,7 +8288,7 @@ ], "responses": { "200": { - "description": "typoTolerance is returned", + "description": "Returns the current value of the `typoTolerance` setting.", "content": { "application/json": { "schema": { @@ -7338,7 +8299,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -7352,6 +8313,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -7369,13 +8346,13 @@ "Settings" ], "summary": "Reset typoTolerance", - "description": "Reset an index's typoTolerance to its default value", + "description": "Resets the `typoTolerance` setting to its default value.", "operationId": "deletetypoTolerance", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -7383,19 +8360,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TypoSettings" - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -7411,18 +8378,34 @@ } } }, - "401": { - "description": "The authorization header is missing", + "401": { + "description": "The authorization header is missing.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Index not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" }, "example": { - "message": "The Authorization header is missing. It must use the bearer authorization method.", - "code": "missing_authorization_header", - "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" } } } @@ -7443,13 +8426,13 @@ "Settings" ], "summary": "Update typoTolerance", - "description": "Update an index's user defined typoTolerance", + "description": "Updates the `typoTolerance` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "patchtypoTolerance", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -7468,8 +8451,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -7486,7 +8469,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -7500,6 +8483,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -7519,13 +8518,13 @@ "Settings" ], "summary": "Get vectorStore", - "description": "Get an user defined vectorStore", + "description": "Returns the current value of the `vectorStore` setting for the index.", "operationId": "getvectorStore", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -7535,7 +8534,7 @@ ], "responses": { "200": { - "description": "vectorStore is returned", + "description": "Returns the current value of the `vectorStore` setting.", "content": { "application/json": { "schema": { @@ -7546,7 +8545,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -7560,6 +8559,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -7577,13 +8592,13 @@ "Settings" ], "summary": "Reset vectorStore", - "description": "Reset an index's vectorStore to its default value", + "description": "Resets the `vectorStore` setting to its default value.", "operationId": "deletevectorStore", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -7591,19 +8606,9 @@ "example": "movies" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VectorStoreBackend" - } - } - }, - "required": true - }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -7620,7 +8625,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -7634,6 +8639,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -7651,13 +8672,13 @@ "Settings" ], "summary": "Update vectorStore", - "description": "Update an index's user defined vectorStore", + "description": "Updates the `vectorStore` setting for the index. Send the new value in the request body; send null to reset to default.", "operationId": "patchvectorStore", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -7676,8 +8697,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -7694,7 +8715,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -7708,6 +8729,22 @@ } } } + }, + "404": { + "description": "Index not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "Index `movies` not found.", + "code": "index_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#index_not_found" + } + } + } } }, "security": [ @@ -7727,13 +8764,13 @@ "Similar documents" ], "summary": "Get similar documents with GET", - "description": "Retrieve documents similar to a specific search result.", + "description": "Retrieve documents similar to a reference document identified by its id.\n\n> Useful for “more like this” or recommendations.", "operationId": "similar_get", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -7743,7 +8780,16 @@ { "name": "id", "in": "query", - "description": "The unique identifier (primary key value) of the target document.\nMeilisearch will find and return documents that are semantically\nsimilar to this document based on their vector embeddings. This is a\nrequired parameter.", + "description": "The unique identifier ([primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) value) of the target document.\nMeilisearch will find and return documents that are semantically\nsimilar to this document based on their vector embeddings. This is a\nrequired parameter.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "embedder", + "in": "query", + "description": "The name of the embedder to use for finding similar documents. This\nmust match one of the embedders configured in your index settings. The\nembedder determines how document similarity is calculated based on\nvector embeddings.", "required": true, "schema": { "type": "string" @@ -7753,7 +8799,7 @@ "name": "offset", "in": "query", "description": "Number of similar documents to skip in the response. Use together with\n`limit` for pagination through large result sets. For example, to get\nsimilar documents 21-40, set `offset=20` and `limit=20`. Defaults to\n`0`.", - "required": true, + "required": false, "schema": { "type": "integer", "default": 0, @@ -7764,7 +8810,7 @@ "name": "limit", "in": "query", "description": "Maximum number of similar documents to return in a single response. Use\ntogether with `offset` for pagination. Higher values return more\nresults but may increase response time. Defaults to `20`.", - "required": true, + "required": false, "schema": { "type": "integer", "default": 20, @@ -7775,7 +8821,7 @@ "name": "attributes_to_retrieve", "in": "query", "description": "Comma-separated list of document attributes to include in the response.\nUse `*` to retrieve all attributes. By default, all attributes listed\nin the `displayedAttributes` setting are returned. Example:\n`title,description,price`.", - "required": true, + "required": false, "schema": { "type": "array", "items": { @@ -7787,7 +8833,7 @@ "name": "retrieve_vectors", "in": "query", "description": "When `true`, includes the vector embeddings for each returned document.\nUseful for debugging or when you need to inspect the vector data. Note\nthat this can significantly increase response size. Defaults to\n`false`.", - "required": true, + "required": false, "schema": { "type": "boolean" } @@ -7805,7 +8851,7 @@ "name": "show_ranking_score", "in": "query", "description": "When `true`, includes a global `_rankingScore` field in each document\nshowing how similar it is to the target document. The score is a value\nbetween 0 and 1, where higher values indicate greater similarity.\nDefaults to `false`.", - "required": true, + "required": false, "schema": { "type": "boolean" } @@ -7814,7 +8860,7 @@ "name": "show_ranking_score_details", "in": "query", "description": "When `true`, includes a detailed `_rankingScoreDetails` object in each\ndocument breaking down how the similarity score was calculated. Useful\nfor debugging and understanding why certain documents are considered\nmore similar. Defaults to `false`.", - "required": true, + "required": false, "schema": { "type": "boolean" } @@ -7823,7 +8869,7 @@ "name": "show_performance_details", "in": "query", "description": "When `true`, includes a `_performanceDetails` object showing the\nperformance details of the search.", - "required": true, + "required": false, "schema": { "type": "boolean" } @@ -7837,20 +8883,11 @@ "type": "number", "format": "float" } - }, - { - "name": "embedder", - "in": "query", - "description": "The name of the embedder to use for finding similar documents. This\nmust match one of the embedders configured in your index settings. The\nembedder determines how document similarity is calculated based on\nvector embeddings.", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { "200": { - "description": "The documents are returned", + "description": "The documents are returned.", "content": { "application/json": { "schema": { @@ -7883,7 +8920,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -7899,7 +8936,7 @@ } }, "404": { - "description": "Index not found", + "description": "Index not found.", "content": { "application/json": { "schema": { @@ -7929,13 +8966,13 @@ "Similar documents" ], "summary": "Get similar documents with POST", - "description": "Retrieve documents similar to a specific search result.", + "description": "Retrieve documents similar to a reference document identified by its id.\n\n> Useful for “more like this” or recommendations.", "operationId": "similar_post", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -7955,7 +8992,7 @@ }, "responses": { "200": { - "description": "The documents are returned", + "description": "The documents are returned.", "content": { "application/json": { "schema": { @@ -7988,7 +9025,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8004,7 +9041,7 @@ } }, "404": { - "description": "Index not found", + "description": "Index not found.", "content": { "application/json": { "schema": { @@ -8036,13 +9073,13 @@ "Stats" ], "summary": "Get stats of index", - "description": "Get the stats of an index.", + "description": "Return statistics for a single index: document count, database size, indexing status, and field distribution.", "operationId": "get_index_stats", "parameters": [ { "name": "indexUid", "in": "path", - "description": "Index Unique Identifier", + "description": "Unique identifier of the index.", "required": true, "schema": { "type": "string" @@ -8052,7 +9089,7 @@ ], "responses": { "200": { - "description": "The stats of the index", + "description": "The stats of the index.", "content": { "application/json": { "schema": { @@ -8074,7 +9111,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8090,7 +9127,7 @@ } }, "404": { - "description": "Index not found", + "description": "Index not found.", "content": { "application/json": { "schema": { @@ -8123,14 +9160,14 @@ "Keys" ], "summary": "List API keys", - "description": "List all API keys", + "description": "Return all API keys configured on the instance. Results are paginated and can be filtered by offset and limit. The key value itself is never returned after creation.", "operationId": "list_api_keys", "parameters": [ { "name": "offset", "in": "query", - "description": "Number of API keys to skip in the response. Use together with `limit`\nfor pagination through large sets of keys. For example, to get keys\n21-40, set `offset=20` and `limit=20`. Defaults to `0`.", - "required": true, + "description": "Number of keys to skip. Use with `limit` for pagination. Defaults to 0.", + "required": false, "schema": { "type": "integer", "default": 0, @@ -8140,8 +9177,8 @@ { "name": "limit", "in": "query", - "description": "Maximum number of API keys to return in a single response. Use together\nwith `offset` for pagination. Defaults to `20`.", - "required": true, + "description": "Maximum number of keys to return. Use with `offset` for pagination. Defaults to 20.", + "required": false, "schema": { "type": "integer", "default": 20, @@ -8150,8 +9187,8 @@ } ], "responses": { - "202": { - "description": "List of keys", + "200": { + "description": "List of keys.", "content": { "application/json": { "schema": { @@ -8183,7 +9220,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8214,7 +9251,7 @@ "Keys" ], "summary": "Create API key", - "description": "Create an API Key.", + "description": "Create a new API key with the specified name, description, actions, and index scopes. The key value is returned only once at creation time; store it securely.", "operationId": "create_api_key", "requestBody": { "content": { @@ -8227,8 +9264,8 @@ "required": true }, "responses": { - "202": { - "description": "Key has been created", + "201": { + "description": "Key has been created.", "content": { "application/json": { "schema": { @@ -8253,7 +9290,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8286,13 +9323,13 @@ "Keys" ], "summary": "Get API key", - "description": "Get an API key from its `uid` or its `key` field.", + "description": "Retrieve a single API key by its `uid` or by its `key` value.", "operationId": "get_api_key", "parameters": [ { "name": "uidOrKey", "in": "path", - "description": "The `uid` or `key` field of an existing API key", + "description": "The `uid` or `key` field of an existing API key.", "required": true, "schema": { "type": "string", @@ -8303,7 +9340,7 @@ ], "responses": { "200": { - "description": "The key is returned", + "description": "The key is returned.", "content": { "application/json": { "schema": { @@ -8328,7 +9365,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8342,6 +9379,22 @@ } } } + }, + "404": { + "description": "API key not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The API key was not found.", + "code": "api_key_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#api_key_not_found" + } + } + } } }, "security": [ @@ -8359,13 +9412,13 @@ "Keys" ], "summary": "Delete API key", - "description": "Delete the specified API key.", + "description": "Permanently delete the specified API key. The key will no longer be valid for authentication.", "operationId": "delete_api_key", "parameters": [ { "name": "uidOrKey", "in": "path", - "description": "The `uid` or `key` field of an existing API key", + "description": "The `uid` or `key` field of an existing API key.", "required": true, "schema": { "type": "string", @@ -8376,10 +9429,10 @@ ], "responses": { "204": { - "description": "The key have been removed" + "description": "The key has been removed." }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8393,6 +9446,22 @@ } } } + }, + "404": { + "description": "API key not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The API key was not found.", + "code": "api_key_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#api_key_not_found" + } + } + } } }, "security": [ @@ -8410,13 +9479,13 @@ "Keys" ], "summary": "Update API key", - "description": "Update the name and description of an API key. Updates to keys are partial.\nThis means you should provide only the fields you intend to update, as any\nfields not present in the payload will remain unchanged.", + "description": "Update the name and description of an API key.\n\nUpdates are partial: only the fields you send are changed, and any fields not present in the payload remain unchanged.", "operationId": "patch_api_key", "parameters": [ { "name": "uidOrKey", "in": "path", - "description": "The `uid` or `key` field of an existing API key", + "description": "The `uid` or `key` field of an existing API key.", "required": true, "schema": { "type": "string", @@ -8437,7 +9506,7 @@ }, "responses": { "200": { - "description": "The key have been updated", + "description": "The key has been updated.", "content": { "application/json": { "schema": { @@ -8462,7 +9531,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8476,6 +9545,22 @@ } } } + }, + "404": { + "description": "API key not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The API key was not found.", + "code": "api_key_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#api_key_not_found" + } + } + } } }, "security": [ @@ -8495,7 +9580,7 @@ "Experimental features" ], "summary": "Update target of the console logs", - "description": "This route lets you specify at runtime the level of the console logs\noutputted on stderr.", + "description": "Configure at runtime the level of the console logs written to stderr (e.g. debug, info, warn, error).", "operationId": "update_stderr_target", "requestBody": { "content": { @@ -8509,10 +9594,10 @@ }, "responses": { "204": { - "description": "The console logs have been updated" + "description": "The console logs have been updated." }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8545,7 +9630,7 @@ "Experimental features" ], "summary": "Retrieve logs", - "description": "Stream logs over HTTP. The format of the logs depends on the\nconfiguration specified in the payload. The logs are sent as multi-part,\nand the stream never stops, so make sure your clients correctly handle\nthat. To make the server stop sending you logs, you can call the `DELETE\n/logs/stream` route.\n\nThere can only be one listener at a timeand an error will be returned if\nyou call this route while it's being used by another client.", + "description": "Stream logs over HTTP. The format of the logs depends on the configuration specified in the payload. The logs are sent as multi-part, and the stream never stops, so ensure your client can handle a long-lived connection. To stop receiving logs, call the `DELETE /logs/stream` route.\n\nOnly one client can listen at a time. An error is returned if you call this route while it is already in use by another client.", "operationId": "get_logs", "requestBody": { "content": { @@ -8559,7 +9644,7 @@ }, "responses": { "200": { - "description": "Logs are being returned", + "description": "Logs are being returned.", "content": { "application/json": { "schema": { @@ -8570,7 +9655,7 @@ } }, "400": { - "description": "The route is already being used", + "description": "The route is already being used.", "content": { "application/json": { "schema": { @@ -8586,7 +9671,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8617,14 +9702,14 @@ "Experimental features" ], "summary": "Stop retrieving logs", - "description": "Call this route to make the engine stops sending logs through the `POST\n/logs/stream` route.", + "description": "Call this route to make the engine stop sending logs to the client that opened the `POST /logs/stream` connection.", "operationId": "cancel_logs", "responses": { "204": { - "description": "Logs are being returned" + "description": "Logs are being returned." }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8656,12 +9741,12 @@ "tags": [ "Stats" ], - "summary": "Get prometheus metrics", - "description": "Retrieve metrics on the engine. See https://www.meilisearch.com/docs/learn/experimental/metrics\nCurrently, [the feature is experimental](https://www.meilisearch.com/docs/learn/experimental/overview)\nwhich means it must be enabled.", + "summary": "Get Prometheus metrics", + "description": "Return metrics for the engine in Prometheus format. This is an [experimental feature](https://www.meilisearch.com/docs/learn/experimental/overview) and must be enabled before use.", "operationId": "get_metrics", "responses": { "200": { - "description": "The metrics of the instance", + "description": "The metrics of the instance.", "content": { "text/plain": { "schema": { @@ -8672,7 +9757,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8705,7 +9790,7 @@ "Search" ], "summary": "Perform a multi-search", - "description": "Bundle multiple search queries in a single API request. Use this endpoint\nto search through multiple indexes at once.", + "description": "Run multiple search queries in a single API request.\n\nEach query can target a different index, so you can search across several indexes at once and get one combined response.", "operationId": "multi_search_with_post", "requestBody": { "content": { @@ -8719,7 +9804,7 @@ }, "responses": { "200": { - "description": "Federated multi-search", + "description": "Federated multi-search.", "content": { "application/json": { "schema": { @@ -8756,7 +9841,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8788,11 +9873,11 @@ "Experimental features" ], "summary": "Get network topology", - "description": "Get a list of all Meilisearch instances currently known to this instance.", + "description": "Return the list of Meilisearch instances currently known to this node (self and remotes).", "operationId": "get_network", "responses": { "200": { - "description": "Known nodes are returned", + "description": "Known nodes are returned.", "content": { "application/json": { "schema": { @@ -8822,7 +9907,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8852,7 +9937,7 @@ "Experimental features" ], "summary": "Configure network topology", - "description": "Add or remove nodes from network.", + "description": "Add or remove remote nodes from the network. Changes apply to the current instance’s view of the cluster.", "operationId": "patch_network", "requestBody": { "content": { @@ -8866,7 +9951,7 @@ }, "responses": { "200": { - "description": "New network state is returned", + "description": "New network state is returned.", "content": { "application/json": { "schema": { @@ -8896,7 +9981,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8928,11 +10013,11 @@ "Backups" ], "summary": "Create snapshot", - "description": "Triggers a snapshot creation process. Once the process is complete, a snapshot is created in the snapshot directory. If the snapshot directory does not exist yet, it will be created.", + "description": "Trigger a snapshot creation process. When complete, a snapshot file is written to the snapshot directory. The directory is created if it does not exist.", "operationId": "create_snapshot", "responses": { "202": { - "description": "Snapshot is being created", + "description": "Snapshot is being created.", "content": { "application/json": { "schema": { @@ -8949,7 +10034,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -8982,11 +10067,11 @@ "Stats" ], "summary": "Get stats of all indexes", - "description": "Get stats of all indexes.", + "description": "Return statistics for the Meilisearch instance and for each index. Includes database size, last update time, document counts, and indexing status per index.", "operationId": "get_stats", "responses": { "200": { - "description": "The stats of the instance", + "description": "The stats of the instance.", "content": { "application/json": { "schema": { @@ -9014,7 +10099,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -9047,7 +10132,7 @@ "Indexes" ], "summary": "Swap indexes", - "description": "Swap the documents, settings, and task history of two or more indexes.\nYou can only swap indexes in pairs. However, a single request can swap as\nmany index pairs as you wish. Swapping indexes is an atomic transaction:\neither all indexes are successfully swapped, or none are. Swapping indexA\nand indexB will also replace every mention of indexA by indexB and\nvice-versa in the task history. enqueued tasks are left unmodified.", + "description": "Swap the documents, settings, and task history of two or more indexes.\n\nIndexes are swapped in pairs; a single request can include multiple pairs.\nThe operation is atomic: either all swaps succeed or none do. In the task history, every mention of one index uid is replaced by the other and vice versa.\nEnqueued tasks are left unmodified.", "operationId": "swap_indexes", "requestBody": { "content": { @@ -9063,8 +10148,8 @@ "required": true }, "responses": { - "200": { - "description": "Task successfully enqueued", + "202": { + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -9081,7 +10166,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -9113,13 +10198,13 @@ "Async task management" ], "summary": "List tasks", - "description": "Get all [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)", + "description": "The `/tasks` route returns information about [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) (indexing, document updates, settings changes, and so on).\n\nTasks are returned in descending order of uid by default, so the most recently created or updated tasks appear first. Results are paginated and can be filtered using query parameters such as `indexUids`, `statuses`, `types`, and date ranges.", "operationId": "get_tasks", "parameters": [ { "name": "limit", "in": "query", - "description": "Maximum number of batches to return", + "description": "Maximum number of batches to return.", "required": false, "schema": { "type": "integer", @@ -9132,7 +10217,7 @@ { "name": "from", "in": "query", - "description": "`uid` of the first batch returned", + "description": "`uid` of the first batch returned.", "required": false, "schema": { "type": "integer", @@ -9144,7 +10229,7 @@ { "name": "reverse", "in": "query", - "description": "If `true`, returns results in the reverse order, from oldest to most recent", + "description": "If `true`, returns results in the reverse order, from oldest to most recent.", "required": false, "schema": { "type": "boolean" @@ -9312,7 +10397,7 @@ ], "responses": { "200": { - "description": "Get all tasks", + "description": "The list of tasks is returned.", "content": { "application/json": { "schema": { @@ -9343,7 +10428,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -9374,7 +10459,7 @@ "Async task management" ], "summary": "Delete tasks", - "description": "Delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) on filter", + "description": "Permanently delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) matching the given filters. You must provide at least one filter (e.g. `uids`, `indexUids`, `statuses`) to specify which tasks to delete.", "operationId": "delete_tasks", "parameters": [ { @@ -9543,7 +10628,7 @@ ], "responses": { "200": { - "description": "Task successfully enqueued", + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -9560,7 +10645,7 @@ } }, "400": { - "description": "A filter is missing", + "description": "A filter is missing.", "content": { "application/json": { "schema": { @@ -9576,7 +10661,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -9592,7 +10677,7 @@ } }, "404": { - "description": "The task uid does not exist", + "description": "The task uid does not exist.", "content": { "application/json": { "schema": { @@ -9625,7 +10710,7 @@ "Async task management" ], "summary": "Cancel tasks", - "description": "Cancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", + "description": "Cancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations). You must provide at least one filter (e.g. `uids`, `indexUids`, `statuses`) to specify which tasks to cancel.", "operationId": "cancel_tasks", "parameters": [ { @@ -9794,7 +10879,7 @@ ], "responses": { "200": { - "description": "Task successfully enqueued", + "description": "Task successfully enqueued.", "content": { "application/json": { "schema": { @@ -9811,7 +10896,7 @@ } }, "400": { - "description": "A filter is missing", + "description": "A filter is missing.", "content": { "application/json": { "schema": { @@ -9827,7 +10912,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -9841,22 +10926,6 @@ } } } - }, - "404": { - "description": "The task uid does not exist", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResponseError" - }, - "example": { - "message": "Task :taskUid not found.", - "code": "task_not_found", - "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors/#task_not_found" - } - } - } } }, "security": [ @@ -9876,13 +10945,13 @@ "Async task management" ], "summary": "Get task", - "description": "Get a [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)", + "description": "Retrieve a single [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations) by its uid.", "operationId": "get_task", "parameters": [ { "name": "taskUid", "in": "path", - "description": "The task identifier", + "description": "The task identifier.", "required": true, "schema": { "type": "string", @@ -9893,7 +10962,7 @@ ], "responses": { "200": { - "description": "Task successfully retrieved", + "description": "Task successfully retrieved.", "content": { "application/json": { "schema": { @@ -9916,7 +10985,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -9932,7 +11001,7 @@ } }, "404": { - "description": "The task uid does not exist", + "description": "The task uid does not exist.", "content": { "application/json": { "schema": { @@ -9965,11 +11034,11 @@ "Version" ], "summary": "Get version", - "description": "Current version of Meilisearch.", + "description": "Return the current Meilisearch version, including the commit SHA and build date.", "operationId": "get_version", "responses": { "200": { - "description": "Instance is healthy", + "description": "Instance is healthy.", "content": { "application/json": { "schema": { @@ -9984,7 +11053,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -10016,11 +11085,11 @@ "Webhooks" ], "summary": "List webhooks", - "description": "Get the list of all registered webhooks.", + "description": "Return all webhooks registered on the instance. Each webhook is returned with its URL, optional headers, and UUID (the key value is never returned).", "operationId": "get_webhooks", "responses": { "200": { - "description": "Webhooks are returned", + "description": "Webhooks are returned.", "content": { "application/json": { "schema": { @@ -10047,7 +11116,7 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { @@ -10079,7 +11148,7 @@ "Webhooks" ], "summary": "Create webhook", - "description": "Create a new webhook to receive task notifications.", + "description": "Register a new webhook to receive task completion notifications. You can optionally set custom headers (e.g. for authentication) and configure the callback URL.", "operationId": "post_webhook", "requestBody": { "content": { @@ -10093,7 +11162,7 @@ }, "responses": { "201": { - "description": "Webhook created successfully", + "description": "Webhook created successfully.", "content": { "application/json": { "schema": { @@ -10111,21 +11180,33 @@ } }, "400": { - "description": "Bad request", + "description": "Bad request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The webhook URL is invalid. Expected a valid URL.", + "code": "invalid_webhook_url", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#invalid_webhook_url" } } } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" } } } @@ -10148,13 +11229,13 @@ "Webhooks" ], "summary": "Get webhook", - "description": "Get a single webhook by its UUID.", + "description": "Retrieve a single webhook by its UUID.", "operationId": "get_webhook", "parameters": [ { "name": "uuid", "in": "path", - "description": "The universally unique identifier of the webhook", + "description": "Unique identifier of the webhook.", "required": true, "schema": { "type": "string", @@ -10164,7 +11245,7 @@ ], "responses": { "200": { - "description": "Webhook found", + "description": "Webhook found.", "content": { "application/json": { "schema": { @@ -10182,21 +11263,33 @@ } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" } } } }, "404": { - "description": "Webhook not found", + "description": "Webhook not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The webhook was not found.", + "code": "webhook_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#webhook_not_found" } } } @@ -10218,13 +11311,13 @@ "Webhooks" ], "summary": "Delete webhook", - "description": "Delete an existing webhook by its UUID.", + "description": "Permanently remove a webhook by its UUID. The webhook will no longer receive task notifications.", "operationId": "delete_webhook", "parameters": [ { "name": "uuid", "in": "path", - "description": "The universally unique identifier of the webhook", + "description": "Universally unique identifier of the webhook.", "required": true, "schema": { "type": "string", @@ -10234,24 +11327,36 @@ ], "responses": { "204": { - "description": "Webhook deleted successfully" + "description": "Webhook deleted successfully." }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" } } } }, "404": { - "description": "Webhook not found", + "description": "Webhook not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The webhook was not found.", + "code": "webhook_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#webhook_not_found" } } } @@ -10272,13 +11377,13 @@ "Webhooks" ], "summary": "Update webhook", - "description": "Update an existing webhook's URL or headers.", + "description": "Update the URL or headers of an existing webhook identified by its UUID.", "operationId": "patch_webhook", "parameters": [ { "name": "uuid", "in": "path", - "description": "The universally unique identifier of the webhook", + "description": "Universally unique identifier of the webhook.", "required": true, "schema": { "type": "string", @@ -10298,7 +11403,7 @@ }, "responses": { "200": { - "description": "Webhook updated successfully", + "description": "Webhook updated successfully. Returns the webhook with metadata and redacted authorization headers.", "content": { "application/json": { "schema": { @@ -10316,21 +11421,49 @@ } }, "400": { - "description": "Bad request", + "description": "Bad request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The webhook URL is invalid. Expected a valid URL.", + "code": "invalid_webhook_url", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#invalid_webhook_url" } } } }, "401": { - "description": "The authorization header is missing", + "description": "The authorization header is missing.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The Authorization header is missing. It must use the bearer authorization method.", + "code": "missing_authorization_header", + "type": "auth", + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" + } + } + } + }, + "404": { + "description": "Webhook not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseError" + }, + "example": { + "message": "The webhook was not found.", + "code": "webhook_not_found", + "type": "invalid_request", + "link": "https://docs.meilisearch.com/errors#webhook_not_found" } } } @@ -10652,7 +11785,7 @@ }, "BatchView": { "type": "object", - "description": "Represents a batch of tasks that were processed together.\n\nMeilisearch groups compatible tasks into batches for efficient processing.\nFor example, multiple document additions to the same index may be batched\ntogether. Use this view to monitor batch progress and performance.", + "description": "Represents a batch of tasks that were processed together.", "required": [ "uid", "details", @@ -10711,11 +11844,6 @@ "BrowseQuery": { "type": "object", "description": "Request body for browsing and retrieving documents from an index. Use\nthis to fetch documents with optional filtering, sorting, and pagination.\nThis is useful for displaying document lists, exporting data, or\ninspecting index contents.", - "required": [ - "offset", - "limit", - "retrieveVectors" - ], "properties": { "offset": { "type": "integer", @@ -10756,7 +11884,7 @@ "items": { "type": "string" }, - "description": "Array of specific document IDs to retrieve. Only documents with\nmatching primary key values will be returned. If not specified, all\ndocuments matching other criteria are returned. This is useful for\nfetching specific known documents.", + "description": "Array of specific document IDs to retrieve. Only documents with\nmatching [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) values will be returned. If not specified, all\ndocuments matching other criteria are returned. This is useful for\nfetching specific known documents.", "example": [ "cody", "finn", @@ -11741,8 +12869,7 @@ "type": "object", "description": "Request body for searching facet values", "required": [ - "facet_name", - "matching_strategy" + "facet_name" ], "properties": { "facet_query": { @@ -12095,7 +13222,6 @@ }, "propertyNames": { "type": "string", - "description": "An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long", "example": "movies" } }, @@ -12350,11 +13476,6 @@ "GetLogs": { "type": "object", "description": "Request body for streaming logs", - "required": [ - "target", - "mode", - "profileMemory" - ], "properties": { "target": { "type": "string", @@ -12520,7 +13641,7 @@ "string", "null" ], - "description": "Primary key of the index", + "description": "[Primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) of the index", "example": "id" } } @@ -12616,7 +13737,6 @@ }, "IndexUid": { "type": "string", - "description": "An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400\nbytes long", "example": "movies" }, "IndexView": { @@ -12647,7 +13767,7 @@ "string", "null" ], - "description": "Primary key of the index" + "description": "[Primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) of the index" } } }, @@ -12747,10 +13867,6 @@ }, "ListFields": { "type": "object", - "required": [ - "offset", - "limit" - ], "properties": { "offset": { "type": "integer", @@ -13258,21 +14374,21 @@ } } }, - "description": "Array of items for the current page" + "description": "Items for the current page." }, "offset": { "type": "integer", - "description": "Number of items skipped", + "description": "Number of items skipped.", "minimum": 0 }, "limit": { "type": "integer", - "description": "Maximum number of items returned", + "description": "Maximum number of items returned.", "minimum": 0 }, "total": { "type": "integer", - "description": "Total number of items matching the query", + "description": "Total number of items matching the query.", "minimum": 0 } } @@ -13316,25 +14432,25 @@ "string", "null" ], - "description": "Primary key of the index" + "description": "[Primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) of the index" } } }, - "description": "Array of items for the current page" + "description": "Items for the current page." }, "offset": { "type": "integer", - "description": "Number of items skipped", + "description": "Number of items skipped.", "minimum": 0 }, "limit": { "type": "integer", - "description": "Maximum number of items returned", + "description": "Maximum number of items returned.", "minimum": 0 }, "total": { "type": "integer", - "description": "Total number of items matching the query", + "description": "Total number of items matching the query.", "minimum": 0 } } @@ -13421,21 +14537,21 @@ } } }, - "description": "Array of items for the current page" + "description": "Items for the current page." }, "offset": { "type": "integer", - "description": "Number of items skipped", + "description": "Number of items skipped.", "minimum": 0 }, "limit": { "type": "integer", - "description": "Maximum number of items returned", + "description": "Maximum number of items returned.", "minimum": 0 }, "total": { "type": "integer", - "description": "Total number of items matching the query", + "description": "Total number of items matching the query.", "minimum": 0 } } @@ -13452,21 +14568,21 @@ "results": { "type": "array", "items": {}, - "description": "Array of items for the current page" + "description": "Items for the current page." }, "offset": { "type": "integer", - "description": "Number of items skipped", + "description": "Number of items skipped.", "minimum": 0 }, "limit": { "type": "integer", - "description": "Maximum number of items returned", + "description": "Maximum number of items returned.", "minimum": 0 }, "total": { "type": "integer", - "description": "Total number of items matching the query", + "description": "Total number of items matching the query.", "minimum": 0 } } @@ -13875,7 +14991,7 @@ "string", "null" ], - "description": "Primary key of the queried index" + "description": "[Primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) of the queried index" }, "remote": { "type": [ @@ -13888,20 +15004,6 @@ }, "SearchQuery": { "type": "object", - "required": [ - "offset", - "limit", - "retrieve_vectors", - "crop_length", - "show_matches_position", - "show_ranking_score", - "show_ranking_score_details", - "show_performance_details", - "highlight_pre_tag", - "highlight_post_tag", - "crop_marker", - "matching_strategy" - ], "properties": { "q": { "type": [ @@ -14026,7 +15128,7 @@ "boolean", "null" ], - "description": "Experimental: Whether this query should be performed on the whole network or locally.\n\nWhen performing the query on the whole network, this is \"as-if\" a remote federated search were performed,\nsuch that all shards are covered, and such that documents are deduplicated across the remotes.\n\n# Response\n\nThe response will have the same shape as a federated search response.\n\n# Edition\n\nThis feature is available in the Enterprise Edition.\n\n# Experimental\n\n- Setting this parameter to a value different from the default requires the `network` experimental feature.\n\n# Values\n\n- `Some(true)`: Use the whole network for this query.\n- `Some(false)`: Make this query local.\n- `None` (default): Same as `Some(false)`.\n\n# Assumptions when using the network\n\nNetwork queries assume that the following is true:\n\n- the target index exists with compatible settings on all remotes of the network.\n- any document with the same document id between two remotes have the same content and can be deduplicated." + "description": "When `true`, runs the query on the whole network (all shards covered, documents\ndeduplicated across remotes). When `false` or omitted, the query runs locally.\n\n**Enterprise Edition only.** This feature is available in the Enterprise Edition.\nIt also requires the `network` experimental feature.\n\nValues: `true` = use the whole network; `false` or omitted = local (default).\n\nWhen using the network, the index must exist with compatible settings on all remotes;\ndocuments with the same id are assumed identical for deduplication." }, "filter": { "description": "Filter queries by an attribute's value" @@ -15275,14 +16377,7 @@ "description": "Request body for similar document search", "required": [ "id", - "offset", - "limit", - "embedder", - "retrieve_vectors", - "show_ranking_score", - "show_ranking_score_details", - "show_performance_details", - "ranking_score_threshold" + "embedder" ], "properties": { "id": { @@ -15563,7 +16658,7 @@ "taskUid": { "type": "integer", "format": "u-int32", - "description": "Unique sequential identifier of the task", + "description": "Unique sequential identifier of the task.", "minimum": 0 }, "indexUid": { @@ -15571,27 +16666,27 @@ "string", "null" ], - "description": "Unique identifier of the targeted index. Null for global tasks" + "description": "Unique identifier of the targeted index. Null for global tasks." }, "status": { "$ref": "#/components/schemas/Status", - "description": "Status of the task. Possible values are enqueued, processing,\nsucceeded, failed, and canceled" + "description": "Status of the task. Possible values are `enqueued`, `processing`,\n`succeeded`, `failed`, and `canceled`." }, "type": { "$ref": "#/components/schemas/Kind", - "description": "Type of operation performed by the task" + "description": "Type of operation performed by the task." }, "enqueuedAt": { "type": "string", "format": "date-time", - "description": "Date and time when the task was enqueued" + "description": "Date and time when the task was enqueued." }, "customMetadata": { "type": [ "string", "null" ], - "description": "Custom metadata string that was attached to this task when it was\ncreated. This can be used to associate tasks with external systems or\nadd application-specific information." + "description": "Custom metadata attached to this task at creation. Use it to associate\ntasks with external systems or add application-specific information." } } }, @@ -15599,8 +16694,7 @@ "type": "object", "description": "Request body for swapping two indexes", "required": [ - "indexes", - "rename" + "indexes" ], "properties": { "indexes": { @@ -15608,7 +16702,7 @@ "items": { "$ref": "#/components/schemas/IndexUid" }, - "description": "Array of the two index UIDs to be swapped" + "description": "Array of the two index names to be swapped" }, "rename": { "type": "boolean", @@ -15805,7 +16899,7 @@ "string", "null" ], - "description": "New primary key of the index" + "description": "New [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) of the index" }, "uid": { "type": [ @@ -15819,9 +16913,6 @@ "UpdateStderrLogs": { "type": "object", "description": "Request body for updating stderr log configuration", - "required": [ - "target" - ], "properties": { "target": { "type": "string", @@ -15869,7 +16960,7 @@ }, "WebhookResults": { "type": "object", - "description": "Response containing a list of all registered webhooks", + "description": "Response containing a list of all registered webhooks.", "required": [ "results" ], @@ -15879,7 +16970,7 @@ "items": { "$ref": "#/components/schemas/WebhookWithMetadataRedactedAuthorization" }, - "description": "Array of all webhooks configured in this Meilisearch instance. Each\nwebhook includes its UUID, URL, headers (with authorization values\nredacted), and editability status." + "description": "All webhooks configured on the instance. Each entry includes UUID, URL, headers (authorization redacted), and editability." } } }, @@ -15892,7 +16983,7 @@ "string", "null" ], - "description": "URL endpoint to call when tasks complete", + "description": "URL endpoint to call when tasks complete.", "example": "https://your.site/on-tasks-completed" }, "headers": { @@ -15900,7 +16991,7 @@ "object", "null" ], - "description": "HTTP headers to include in webhook requests", + "description": "HTTP headers to include in webhook requests.", "additionalProperties": { "type": "string" }, @@ -15917,7 +17008,7 @@ "allOf": [ { "$ref": "#/components/schemas/WebhookSettings", - "description": "Webhook settings" + "description": "URL and headers. Authorization header values are redacted in the response." }, { "type": "object", @@ -15929,16 +17020,16 @@ "uuid": { "type": "string", "format": "uuid", - "description": "Unique identifier of the webhook" + "description": "Unique identifier of the webhook." }, "isEditable": { "type": "boolean", - "description": "Whether the webhook can be edited" + "description": "Whether the webhook can be edited." } } } ], - "description": "A webhook with metadata and redacted authorization headers" + "description": "Webhook object with metadata and redacted authorization headers." }, "u32": { "type": "integer", @@ -15951,7 +17042,7 @@ "type": "http", "scheme": "bearer", "bearerFormat": "Uuidv4, string or JWT", - "description": "An API key is a token that you provide when making API calls. Read more about [how to secure your project](https://www.meilisearch.com/docs/learn/security/basic_security).\n\nInclude the API key to the `Authorization` header, for instance:\n`Authorization: Bearer 6436fc5237b0d6e0d64253fbaac21d135012ecf1`.\n\nIf you use a SDK, ensure you instantiate the client with the API key, for instance with JS SDK:\n`const client = new MeiliSearch({ host: 'https://your-domain.com', apiKey: '6436fc5237b0d6e0d64253fbaac21d135012ecf1' })`" + "description": "An API key is a token that you provide when making API calls. Read more about [how to secure your project](https://www.meilisearch.com/docs/learn/security/basic_security).\n\nInclude the API key to the `Authorization` header, for instance:\n```bash\n-H 'Authorization: Bearer 6436fc5237b0d6e0d64253fbaac21d135012ecf1'\n```\n\nIf you use a SDK, ensure you instantiate the client with the API key, for instance with [JS SDK](https://github.com/meilisearch/meilisearch-js):\n```js\nconst client = new MeiliSearch({\n host: 'MEILISEARCH_URL',\n apiKey: '6436fc5237b0d6e0d64253fbaac21d135012ecf1'\n});\n```" } } }, @@ -15972,13 +17063,21 @@ "name": "Backups", "description": "Meilisearch offers two types of backups: snapshots and dumps. Snapshots are mainly intended as a safeguard, while dumps are useful when migrating Meilisearch." }, + { + "name": "Export", + "description": "Export documents and settings from this instance to a remote Meilisearch server." + }, + { + "name": "Async task management", + "description": "Routes for listing and managing batches and tasks (asynchronous operations)." + }, { "name": "Tasks", "description": "The tasks route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html)." }, { "name": "Batches", - "description": "The /batches route gives information about the progress of batches of asynchronous operations." + "description": "Meilisearch groups compatible tasks ([asynchronous operations](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)) into batches for efficient processing. For example, multiple document additions to the same index may be batched together. The /batches routes give information about the progress of these batches and let you monitor batch progress and performance." }, { "name": "Indexes", @@ -15998,7 +17097,7 @@ }, { "name": "Settings", - "description": "Use the /settings route to customize search settings for a given index. You can either modify all index settings at once using the update settings endpoint, or use a child route to configure a single setting." + "description": "Configure search and index behavior. Update all settings at once via PATCH /indexes/{indexUid}/settings, or use a sub-route to get, update, or reset a single setting." }, { "name": "Search", From ccfc21c763f4dd995774e472e8c87f56d410899f Mon Sep 17 00:00:00 2001 From: curquiza Date: Mon, 16 Feb 2026 01:48:01 +0100 Subject: [PATCH 44/45] Use appropriate URL for API + make Guides section down --- docs.json | 71 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/docs.json b/docs.json index 09bb6f6e0..57f469b70 100644 --- a/docs.json +++ b/docs.json @@ -344,6 +344,43 @@ } ] }, + { + "anchor": "API Reference", + "icon": "code", + "groups": [ + { + "group": "Overview", + "pages": [ + "reference/api/authorization", + "reference/api/headers", + "reference/api/requests", + "reference/api/pagination", + "reference/api/openapi" + ] + }, + { + "group": "API Routes", + "openapi": { + "source": "assets/open-api/meilisearch-openapi-mintlify.json", + "directory": "reference/api" + }, + "internal-meili-fetch-automation": true, + "examples": { + "languages": ["curl", "javascript", "php", "python", "java", "ruby", "go", "csharp", "rust", "dart", "swift"], + "autogenerate": false + } + }, + { + "group": "Errors", + "pages": [ + "reference/errors/overview", + "reference/errors/error_codes" + ] + } + + ] + + }, { "anchor": "Guides", "icon": "file-lines", @@ -423,40 +460,6 @@ ] } ] - }, - { - "anchor": "API Reference", - "icon": "code", - "groups": [ - { - "group": "Overview", - "pages": [ - "reference/api/authorization", - "reference/api/headers", - "reference/api/requests", - "reference/api/pagination", - "reference/api/openapi" - ] - }, - { - "group": "API Routes", - "openapi": "assets/open-api/meilisearch-openapi-mintlify.json", - "internal-meili-fetch-automation": true, - "examples": { - "languages": ["curl", "javascript", "php", "python", "java", "ruby", "go", "csharp", "rust", "dart", "swift"], - "autogenerate": false - } - }, - { - "group": "Errors", - "pages": [ - "reference/errors/overview", - "reference/errors/error_codes" - ] - } - - ] - } ] } From a4f050d816ad3de5cd3b1b53e8d88b2d187abdd9 Mon Sep 17 00:00:00 2001 From: curquiza Date: Mon, 16 Feb 2026 02:06:10 +0100 Subject: [PATCH 45/45] Fix link in docs --- .../getting_started_with_ai_search.mdx | 2 +- learn/async/asynchronous_operations.mdx | 10 +++++----- learn/async/filtering_tasks.mdx | 4 ++-- learn/async/paginating_tasks.mdx | 2 +- learn/async/working_with_tasks.mdx | 2 +- learn/configuration/configuring_index_settings.mdx | 2 +- learn/configuration/configuring_index_settings_api.mdx | 2 +- learn/data_backup/dumps.mdx | 2 +- .../search_with_facet_filters.mdx | 2 +- learn/relevancy/distinct_attribute.mdx | 2 +- learn/security/tenant_token_reference.mdx | 2 +- learn/security/tenant_tokens.mdx | 10 +++++----- reference/api/keys.mdx | 2 +- reference/api/overview.mdx | 2 +- reference/api/pagination.mdx | 2 +- 15 files changed, 24 insertions(+), 24 deletions(-) diff --git a/learn/ai_powered_search/getting_started_with_ai_search.mdx b/learn/ai_powered_search/getting_started_with_ai_search.mdx index 6275993e3..9928632a6 100644 --- a/learn/ai_powered_search/getting_started_with_ai_search.mdx +++ b/learn/ai_powered_search/getting_started_with_ai_search.mdx @@ -164,4 +164,4 @@ Now you have a basic overview of the basic steps required for setting up and per For practical information on implementing AI-powered search with other services, consult our [guides section](/guides/embedders/openai). There you will find specific instructions for embedders such as [LangChain](/guides/langchain) and [Cloudflare](/guides/embedders/cloudflare). -For more in-depth information, consult the API reference for [embedder settings](/reference/api/settings#embedders) and [the `hybrid` search parameter](/reference/api/search#hybrid-search). +For more in-depth information, consult the API reference for [embedder settings](/reference/api/settings/get-embedders) and [the `hybrid` search parameter](/reference/api/search/search-with-post#hybrid-search). diff --git a/learn/async/asynchronous_operations.mdx b/learn/async/asynchronous_operations.mdx index f85a21bca..02c2815a4 100644 --- a/learn/async/asynchronous_operations.mdx +++ b/learn/async/asynchronous_operations.mdx @@ -55,11 +55,11 @@ A [task object](/reference/api/tasks#task-object) includes data not present in t } ``` -For a comprehensive description of each task object field, consult the [task API reference](/reference/api/tasks). +For a comprehensive description of each task object field, consult the [task API reference](/reference/api/async-task-management/get-task). #### Summarized task objects -When you make an API request for an asynchronous operation, Meilisearch returns a [summarized version](/reference/api/tasks#summarized-task-object) of the full `task` object. +When you make an API request for an asynchronous operation, Meilisearch returns a [summarized version](/reference/api/async-task-management/get-task) of the full `task` object. ```json { @@ -71,7 +71,7 @@ When you make an API request for an asynchronous operation, Meilisearch returns } ``` -Use the summarized task's `taskUid` to [track the progress of a task](/reference/api/tasks#get-one-task). +Use the summarized task's `taskUid` to [track the progress of a task](/reference/api/async-task-management/get-task). #### Task `status` @@ -131,7 +131,7 @@ All other tasks are processed in the order they were enqueued. When you make a [request for an asynchronous operation](#which-operations-are-asynchronous), Meilisearch processes all tasks following the same steps: -1. Meilisearch creates a task, puts it in the task queue, and returns a [summarized `task` object](/learn/async/asynchronous_operations#summarized-task-objects). Task `status` set to `enqueued` +1. Meilisearch creates a task, puts it in the task queue, and returns a [summarized `task` object](/reference/api/async-task-management/get-task). Task `status` set to `enqueued` 2. When your task reaches the front of the queue, Meilisearch begins working on it. Task `status` set to `processing` 3. Meilisearch finishes the task. Status set to `succeeded` if task was successfully processed, or `failed` if there was an error @@ -153,7 +153,7 @@ Tasks are not canceled when you terminate a Meilisearch instance. Meilisearch di ### Deleting tasks -[Finished tasks](#task-status) remain visible in [the task list](/reference/api/tasks#get-tasks). To delete them manually, use the [delete tasks route](/reference/api/tasks#delete-tasks). +[Finished tasks](#task-status) remain visible in [the task list](/reference/api/async-task-management/list-tasks). To delete them manually, use the [delete tasks route](/reference/api/async-task-management/delete-tasks). Meilisearch stores up to 1M tasks in the task database. If enqueuing a new task would exceed this limit, Meilisearch automatically tries to delete the oldest 100K finished tasks. If there are no finished tasks in the database, Meilisearch does not delete anything and enqueues the new task as usual. diff --git a/learn/async/filtering_tasks.mdx b/learn/async/filtering_tasks.mdx index c62af96f5..c2553da5b 100644 --- a/learn/async/filtering_tasks.mdx +++ b/learn/async/filtering_tasks.mdx @@ -8,7 +8,7 @@ import CodeSamplesAsyncGuideFilterByStatuses1 from '/snippets/generated-code-sam import CodeSamplesAsyncGuideFilterByStatuses2 from '/snippets/generated-code-samples/code_samples_async_guide_filter_by_statuses_2.mdx'; import CodeSamplesAsyncGuideMultipleFilters1 from '/snippets/generated-code-samples/code_samples_async_guide_multiple_filters_1.mdx'; -Querying the [get tasks endpoint](/reference/api/tasks#get-tasks) returns all tasks that have not been deleted. This unfiltered list may be difficult to parse in large projects. +Querying the [get tasks endpoint](/reference/api/async-task-management/list-tasks) returns all tasks that have not been deleted. This unfiltered list may be difficult to parse in large projects. This guide shows you how to use query parameters to filter tasks and obtain a more readable list of asynchronous operations. @@ -31,7 +31,7 @@ Use a comma to separate multiple values and fetch both `canceled` and `failed` t -You may filter tasks based on `uid`, `status`, `type`, `indexUid`, `canceledBy`, or date. Consult the API reference for a full list of task filtering parameters. +You may filter tasks based on `uid`, `status`, `type`, `indexUid`, `canceledBy`, or date. Consult the [API reference](/reference/api/async-task-management/list-tasks) for a full list of task filtering parameters. ## Combining filters diff --git a/learn/async/paginating_tasks.mdx b/learn/async/paginating_tasks.mdx index 47068d5bd..75c9d6e91 100644 --- a/learn/async/paginating_tasks.mdx +++ b/learn/async/paginating_tasks.mdx @@ -7,7 +7,7 @@ description: Meilisearch uses a task queue to handle asynchronous operations. Th import CodeSamplesGetAllTasksPaginating1 from '/snippets/generated-code-samples/code_samples_get_all_tasks_paginating_1.mdx'; import CodeSamplesGetAllTasksPaginating2 from '/snippets/generated-code-samples/code_samples_get_all_tasks_paginating_2.mdx'; -By default, Meilisearch returns a list of 20 tasks for each request when you query the [get tasks endpoint](/reference/api/tasks#get-tasks). This guide shows you how to navigate the task list using query parameters. +By default, Meilisearch returns a list of 20 tasks for each request when you query the [get tasks endpoint](/reference/api/async-task-management/list-tasks). This guide shows you how to navigate the task list using query parameters. Paginating batches with [the `/batches` route](/reference/api/batches) follows the same rules as paginating tasks. diff --git a/learn/async/working_with_tasks.mdx b/learn/async/working_with_tasks.mdx index db64bce29..340db33ba 100644 --- a/learn/async/working_with_tasks.mdx +++ b/learn/async/working_with_tasks.mdx @@ -94,4 +94,4 @@ If the task `status` changes to `failed`, Meilisearch was not able to fulfill yo ## Conclusion -You have seen what happens when an API request adds a task to the task queue, and how to check the status of a that task. Consult the [task API reference](/reference/api/tasks) and the [asynchronous operations explanation](/learn/async/asynchronous_operations) for more information on how tasks work. +You have seen what happens when an API request adds a task to the task queue, and how to check the status of a that task. Consult the [task API reference](/reference/api/async-task-management/list-tasks) and the [asynchronous operations explanation](/learn/async/asynchronous_operations) for more information on how tasks work. diff --git a/learn/configuration/configuring_index_settings.mdx b/learn/configuration/configuring_index_settings.mdx index c2275eb78..1bf25f697 100644 --- a/learn/configuration/configuring_index_settings.mdx +++ b/learn/configuration/configuring_index_settings.mdx @@ -81,4 +81,4 @@ This tutorial used the "Searchable attributes" setting, but the procedure is the If you prefer to access the settings API directly through your console, you can also [configure index settings using the Meilisearch Cloud API](/learn/configuration/configuring_index_settings_api). -For a comprehensive reference of all index settings, consult the [settings API reference](/reference/api/settings). +For a comprehensive reference of all index settings, consult the [settings API reference](/reference/api/settings/list-all-settings). diff --git a/learn/configuration/configuring_index_settings_api.mdx b/learn/configuration/configuring_index_settings_api.mdx index b8a81a5eb..1b783fc78 100644 --- a/learn/configuration/configuring_index_settings_api.mdx +++ b/learn/configuration/configuring_index_settings_api.mdx @@ -94,4 +94,4 @@ You have used the Meilisearch API to check the value of an index setting. This r This tutorial used the searchable attributes setting, but the procedure is the same no matter which index setting you are editing. -For a comprehensive reference of all index settings, consult the [settings API reference](/reference/api/settings). +For a comprehensive reference of all index settings, consult the [settings API reference](/reference/api/settings/list-all-settings). diff --git a/learn/data_backup/dumps.mdx b/learn/data_backup/dumps.mdx index 86648b70e..fff9cdf83 100644 --- a/learn/data_backup/dumps.mdx +++ b/learn/data_backup/dumps.mdx @@ -29,7 +29,7 @@ To create a dump, use the [create a dump endpoint](/reference/api/dump#create-a- -This will return a [summarized task object](/learn/async/asynchronous_operations#summarized-task-objects) that you can use to check the status of your dump. +This will return a [summarized task object](/reference/api/async-task-management/get-task) that you can use to check the status of your dump. ```json { diff --git a/learn/filtering_and_sorting/search_with_facet_filters.mdx b/learn/filtering_and_sorting/search_with_facet_filters.mdx index 01de8a574..1e68202ba 100644 --- a/learn/filtering_and_sorting/search_with_facet_filters.mdx +++ b/learn/filtering_and_sorting/search_with_facet_filters.mdx @@ -153,4 +153,4 @@ The response contains a `facetHits` array listing all matching facets, together } ``` -You can further refine results using the `q`, `filter`, and `matchingStrategy` parameters. [Learn more about them in the API reference.](/reference/api/facet_search) +You can further refine results using the `q`, `filter`, and `matchingStrategy` parameters. [Learn more about them in the API reference.](/reference/api/facet-search/search-in-facets) diff --git a/learn/relevancy/distinct_attribute.mdx b/learn/relevancy/distinct_attribute.mdx index 5054b6c92..eb0889fc4 100644 --- a/learn/relevancy/distinct_attribute.mdx +++ b/learn/relevancy/distinct_attribute.mdx @@ -85,7 +85,7 @@ After setting the distinct attribute as shown above, querying for `lee leather j } ``` -For more in-depth information on distinct attribute, consult the [API reference](/reference/api/settings#distinct-attribute). +For more in-depth information on distinct attribute, consult the [API reference](/reference/api/settings/get-distinctattribute). ## Setting a distinct attribute at search time diff --git a/learn/security/tenant_token_reference.mdx b/learn/security/tenant_token_reference.mdx index b784e50b0..b1055818a 100644 --- a/learn/security/tenant_token_reference.mdx +++ b/learn/security/tenant_token_reference.mdx @@ -55,7 +55,7 @@ A token may contain rules for any number of indexes. **Specific rulesets take pr Because tenant tokens are generated in your application, Meilisearch cannot check if search rule filters are valid. Invalid search rules return throw errors when searching. -Consult the search API reference for [more information on Meilisearch filter syntax](/reference/api/search#filter). +Consult the search API reference for [more information on Meilisearch filter syntax](/reference/api/search/search-with-post#filter). The search rule may also be an empty object. In this case, the tenant token will have access to all documents in an index: diff --git a/learn/security/tenant_tokens.mdx b/learn/security/tenant_tokens.mdx index fd87830cd..189fb7e0b 100644 --- a/learn/security/tenant_tokens.mdx +++ b/learn/security/tenant_tokens.mdx @@ -42,7 +42,7 @@ There are three important parameters to keep in mind when using an SDK to genera **Search rules** must be a JSON object specifying the restrictions that will be applied to search requests on a given index. It must contain at least one search rule. [To learn more about search rules, take a look at our tenant token payload reference.](#search-rules) -As its name indicates, **API key** must be a valid Meilisearch API key with access to [the search action](/reference/api/keys#actions). A tenant token will have access to the same indexes as the API key used when generating it. If no API key is provided, the SDK might be able to infer it automatically. +As its name indicates, **API key** must be a valid Meilisearch API key with access to [the search action](/reference/api/keys/list-api-keys#actions). A tenant token will have access to the same indexes as the API key used when generating it. If no API key is provided, the SDK might be able to infer it automatically. **Expiration date** is optional when using an SDK. Tokens become invalid after their expiration date. Tokens without an expiration date will expire when their parent API key does. @@ -229,12 +229,12 @@ The previous rules can be combined in one tenant token: Because tenant tokens are generated in your application, Meilisearch cannot check if search rule filters are valid. Invalid search rules will only throw errors when they are used in a query. -Consult the search API reference for [more information on Meilisearch filter syntax](/reference/api/search#filter). +Consult the search API reference for [more information on Meilisearch filter syntax](/reference/api/search/search-with-post#filter). ### API key -Creating a token requires an API key with access to [the search action](/reference/api/keys#actions). A token has access to the same indexes and routes as the API key used to generate it. +Creating a token requires an API key with access to [the search action](/reference/api/keys/list-api-keys#actions). A token has access to the same indexes and routes as the API key used to generate it. Since a master key is not an API key, **you cannot use a master key to create a tenant token**. @@ -246,7 +246,7 @@ When using an official Meilisearch SDK, you may indicate which API key you wish If an API key expires, any tenant tokens created with it will become invalid. The same applies if the API key is deleted or regenerated due to a changed master key. -[You can read more about API keys in the API reference.](/reference/api/keys) +[You can read more about API keys in the API reference.](/reference/api/keys/list-api-keys) ### Expiry date @@ -257,7 +257,7 @@ The expiry date must be a UNIX timestamp or `null`. Additionally, a token's expi Setting a token expiry date is optional, but recommended. A token without an expiry date never expires and can be used indefinitely as long as its parent API key remains valid. -The only way to revoke a token without an expiry date is to [delete](/reference/api/keys#delete-a-key) its parent API key. +The only way to revoke a token without an expiry date is to [delete](/reference/api/keys/delete-api-key) its parent API key. Changing an instance's master key forces Meilisearch to regenerate all API keys and will also render all existing tenant tokens invalid. diff --git a/reference/api/keys.mdx b/reference/api/keys.mdx index 69948a7ba..8e116bc92 100644 --- a/reference/api/keys.mdx +++ b/reference/api/keys.mdx @@ -95,7 +95,7 @@ For security reasons, we do not recommend creating keys that can perform all act | **`indexes.update`** | Provides access to the [update index](/reference/api/indexes#update-an-index) endpoint | | **`indexes.delete`** | Provides access to the [delete index](/reference/api/indexes#delete-an-index) endpoint | | **`indexes.swap`** | Provides access to the swap indexes endpoint. **Non-authorized `indexes` will not be swapped** | -| **`tasks.get`** | Provides access to the [get one task](/reference/api/tasks#get-one-task) and [get tasks](/reference/api/tasks#get-tasks) endpoints. **Tasks from non-authorized `indexes` will be omitted from the response** | +| **`tasks.get`** | Provides access to the [get one task](/reference/api/async-task-management/get-task) and [get tasks](/reference/api/async-task-management/list-tasks) endpoints. **Tasks from non-authorized `indexes` will be omitted from the response** | | **`tasks.cancel`** | Provides access to the [cancel tasks](/reference/api/tasks#cancel-tasks) endpoint. **Tasks from non-authorized `indexes` will not be canceled** | | **`tasks.delete`** | Provides access to the [delete tasks](/reference/api/tasks#delete-tasks) endpoint. **Tasks from non-authorized `indexes` will not be deleted** | | **`settings.get`** | Provides access to the [get settings](/reference/api/settings#get-settings) endpoint and equivalents for all subroutes | diff --git a/reference/api/overview.mdx b/reference/api/overview.mdx index e7f1dd256..c67899418 100644 --- a/reference/api/overview.mdx +++ b/reference/api/overview.mdx @@ -48,7 +48,7 @@ All paginated responses contain the following fields: ### `/tasks` endpoint -Since the `/tasks` endpoint uses a different type of pagination, the response contains different fields. You can read more about it in the [tasks API reference](/reference/api/tasks#get-tasks). +Since the `/tasks` endpoint uses a different type of pagination, the response contains different fields. You can read more about it in the [tasks API reference](/reference/api/async-task-management/list-tasks). ## Parameters diff --git a/reference/api/pagination.mdx b/reference/api/pagination.mdx index a53a30c50..b61dcf854 100644 --- a/reference/api/pagination.mdx +++ b/reference/api/pagination.mdx @@ -16,4 +16,4 @@ All paginated responses contain the following fields: ## `/tasks` endpoint -Since the `/tasks` endpoint uses a different type of pagination, the response contains different fields. You can read more about it in the [tasks API reference](/reference/api/tasks#get-tasks). +Since the `/tasks` endpoint uses a different type of pagination, the response contains different fields. You can read more about it in the [tasks API reference](/reference/api/async-task-management/list-tasks).